diff --git a/game/controller.asm b/game/controller.asm new file mode 100644 index 0000000..8e532e1 --- /dev/null +++ b/game/controller.asm @@ -0,0 +1 @@ +controller.asm \ No newline at end of file diff --git a/game/text.asm b/game/text.asm index dde4276..d891c77 100644 --- a/game/text.asm +++ b/game/text.asm @@ -6,7 +6,7 @@ textwriter_posy: ds 1 textwriter_curdelay: ds 1 textwriter_active: ds 1 -SECTION "ram_textmap", ROM0,ALIGN[8] +SECTION "rom_textmap", ROM0,ALIGN[8] textwriter_map: ; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F db $50,$50,$50,$50,$50,$50,$50,$50,$50,$50,$50,$50,$50,$50,$50,$50 ; 0 @@ -65,9 +65,16 @@ InitWindow: ld [hl], $55 ret ; Return +ClearWindow: + ld hl, (_SCRN1 + $21) + ld a, $50 + ld b, $1E + call Memfill + ld hl, (_SCRN1 + $41) + ld b, $1E + call Memfill + ; Start to print a string on screen -; @param b - PosX on where to draw text -; @param c - PosY on where to draw text ; @param de - Address source string ; @return a - garbage ; @return b - PosX on where to draw text @@ -78,10 +85,10 @@ StartText: ld a, 0 ld [textwriter_curletter], a ld [textwriter_curdelay], a - ld a, 1 - ld [textwriter_active], a ld [textwriter_posx], a ld [textwriter_posy], a + ld a, 1 + ld [textwriter_active], a ld hl, textwriter_curtext ld a, d ld [hli], a diff --git a/main.o b/main.o index ab626f6..ca37ac9 100644 Binary files a/main.o and b/main.o differ diff --git a/test.gb b/test.gb index 5725dee..7e95358 100644 Binary files a/test.gb and b/test.gb differ diff --git a/test.map b/test.map index 1956e39..11c8fc5 100644 --- a/test.map +++ b/test.map @@ -1,17 +1,17 @@ ROM Bank #0 (HOME): - SECTION: $0200-$027F ($0080 bytes) ["ram_textmap"] + SECTION: $0200-$027F ($0080 bytes) ["rom_textmap"] $0200 = textwriter_map - SECTION: $1280-$136B ($00EC bytes) ["TextWriter"] - $1368 = DrawActiveText.exit - $1314 = DrawActiveText.movexaxis - $1305 = DrawActiveText.moveyaxis - $131C = DrawActiveText.drawletter - $1330 = DrawActiveText.checkNewline - $134E = DrawActiveText.continue - $1345 = DrawActiveText.checkRepeatOnce - $12F4 = DrawActiveText.startdrawtext - $12C1 = StartText - $12DD = DrawActiveText + SECTION: $1280-$137D ($00FE bytes) ["TextWriter"] + $137A = DrawActiveText.exit + $1326 = DrawActiveText.movexaxis + $1317 = DrawActiveText.moveyaxis + $132E = DrawActiveText.drawletter + $1342 = DrawActiveText.checkNewline + $1360 = DrawActiveText.continue + $1357 = DrawActiveText.checkRepeatOnce + $1306 = DrawActiveText.startdrawtext + $12D3 = StartText + $12EF = DrawActiveText $1280 = InitWindow SECTION: $0031-$003E ($000E bytes) ["Game Loop"] $0037 = GameLoop.mainloop @@ -34,15 +34,15 @@ ROM Bank #0 (HOME): SECTION: $0280-$127F ($1000 bytes) ["Font"] $0280 = Page1 $1280 = Page1End - SLACK: $2DBF bytes + SLACK: $2DAD bytes WRAM Bank #0: SECTION: $C000-$C006 ($0007 bytes) ["ram_textwriter"] $C002 = textwriter_curletter $C005 = textwriter_curdelay - $C006 = textwriter_active $C003 = textwriter_posx $C004 = textwriter_posy + $C006 = textwriter_active $C000 = textwriter_curtext SLACK: $0FF9 bytes diff --git a/test.sym b/test.sym index 41425ae..d4c75f3 100644 --- a/test.sym +++ b/test.sym @@ -1,16 +1,16 @@ ; File generated by rgblink 00:0200 textwriter_map -00:1368 DrawActiveText.exit -00:1314 DrawActiveText.movexaxis -00:1305 DrawActiveText.moveyaxis -00:131C DrawActiveText.drawletter -00:1330 DrawActiveText.checkNewline -00:134E DrawActiveText.continue -00:1345 DrawActiveText.checkRepeatOnce -00:12F4 DrawActiveText.startdrawtext -00:12C1 StartText -00:12DD DrawActiveText +00:137A DrawActiveText.exit +00:1326 DrawActiveText.movexaxis +00:1317 DrawActiveText.moveyaxis +00:132E DrawActiveText.drawletter +00:1342 DrawActiveText.checkNewline +00:1360 DrawActiveText.continue +00:1357 DrawActiveText.checkRepeatOnce +00:1306 DrawActiveText.startdrawtext +00:12D3 StartText +00:12EF DrawActiveText 00:1280 InitWindow 00:0037 GameLoop.mainloop 00:0031 GameLoop @@ -24,7 +24,7 @@ 00:1280 Page1End 00:C002 textwriter_curletter 00:C005 textwriter_curdelay -00:C006 textwriter_active 00:C003 textwriter_posx 00:C004 textwriter_posy +00:C006 textwriter_active 00:C000 textwriter_curtext