From 4e1843706ef6168c111abcb8ec8a67ecb6cb0eca Mon Sep 17 00:00:00 2001 From: Quinn Dunki Date: Sun, 7 Sep 2014 16:06:25 -0700 Subject: [PATCH] - Fixed some warnings - Code cleanup - Added pretty window rendering --- .gitignore | 2 + WeeGUI.xcodeproj/project.pbxproj | 4 + gui.s | 22 +- guidemo.dsk | Bin 143360 -> 143360 bytes guidemo.lst | 37 -- guidemo.s | 9 +- memory.s | 16 +- painting.s | 422 +---------------- rects.s | 745 +++++++++++++++++++++++++++++++ views.s | 44 +- zeropage.s | 23 + 11 files changed, 847 insertions(+), 477 deletions(-) delete mode 100644 guidemo.lst create mode 100644 rects.s create mode 100644 zeropage.s diff --git a/.gitignore b/.gitignore index 0fcd880..97d55bf 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ /WeeGUI.xcodeproj/xcuserdata/ /gui.lst + +/guidemo.lst diff --git a/WeeGUI.xcodeproj/project.pbxproj b/WeeGUI.xcodeproj/project.pbxproj index fae5090..a874f05 100644 --- a/WeeGUI.xcodeproj/project.pbxproj +++ b/WeeGUI.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXFileReference section */ + 70868EE019BD150C00E4B4CB /* rects.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = rects.s; sourceTree = ""; }; + 70868EE119BD178F00E4B4CB /* zeropage.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = zeropage.s; sourceTree = ""; }; 709E88E319AC0A5F0069DB55 /* views.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = views.s; sourceTree = ""; }; 709E88E419AC0DC20069DB55 /* unit_test.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = unit_test.s; sourceTree = ""; }; 70B2272519A9685200702171 /* utility.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = utility.s; sourceTree = ""; }; @@ -28,9 +30,11 @@ 70D435B119A0137F001BFD9B /* Makefile */, 70F1DB4A19A56CDA00321637 /* macros.s */, 70F1DB4B19A56D6300321637 /* switches.s */, + 70868EE119BD178F00E4B4CB /* zeropage.s */, 70F1DB5D19A7FF8700321637 /* memory.s */, 70B2272519A9685200702171 /* utility.s */, 70F1DB5619A6B02900321637 /* painting.s */, + 70868EE019BD150C00E4B4CB /* rects.s */, 709E88E319AC0A5F0069DB55 /* views.s */, 70D435B219A013AF001BFD9B /* gui.s */, 709E88E419AC0DC20069DB55 /* unit_test.s */, diff --git a/gui.s b/gui.s index 73779fc..0eee19c 100644 --- a/gui.s +++ b/gui.s @@ -12,10 +12,10 @@ ; Common definitions +.include "zeropage.s" .include "switches.s" .include "macros.s" - ; Main main: @@ -32,6 +32,12 @@ main: sta PARAM1 jsr WGCreateView + lda #testTitle0 + sta PARAM1 + jsr WGViewSetTitle + lda #testCheck @@ -230,13 +236,14 @@ read80ColSwitch_40: ; Code modules .include "utility.s" .include "painting.s" +.include "rects.s" .include "views.s" .include "unit_test.s" .include "memory.s" testView: - .byte "0007033e133e7e" ; 0, 7,3,62,19,62,126 + .byte "1007033e133e7e" ; 1:0, 7,3,62,19,62,126 testCheck: .byte "011004" @@ -252,9 +259,20 @@ testStr: .byte "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ !",34,"#$%&'()*+,-./0123456789:;<=>?`abcdefghijklmno",0 testStr2: .byte "pqrstuvwxyz{|}~",$ff,0 +testTitle0: + .byte "Nifty Window",0 testTitle1: .byte "Okay",0 testTitle2: .byte "Cancel",0 + + +; Suppress some linker warnings - Must be the last thing in the file +.SEGMENT "ZPSAVE" +.SEGMENT "EXEHDR" +.SEGMENT "STARTUP" +.SEGMENT "INIT" +.SEGMENT "LOWCODE" + diff --git a/guidemo.dsk b/guidemo.dsk index 5ccef5b3c64f3116fbbbc1389e3d2dbf9ce9acdf..2af08299dd00936e08336ed477b53362c435cfb7 100644 GIT binary patch delta 3393 zcmb7GeP~lx6n`(#e6(t#BFoEAFT!Rc`$L_uF3N1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