diff --git a/bin/WORDLE.8xp b/bin/WORDLE.8xp index 0816d7d..5ed41bc 100644 Binary files a/bin/WORDLE.8xp and b/bin/WORDLE.8xp differ diff --git a/bin/WORDLE.bin b/bin/WORDLE.bin index b49b951..71319fc 100644 Binary files a/bin/WORDLE.bin and b/bin/WORDLE.bin differ diff --git a/bin/WORDLE.map b/bin/WORDLE.map index c7c14f8..d1e18ce 100644 --- a/bin/WORDLE.map +++ b/bin/WORDLE.map @@ -7,9 +7,9 @@ Section Base Top High Length .init.reruncheck D1A933 D1A933 0h .init D1A933 D1A95D 2Ah .fini D1A95D D1A991 34h -.text D1A991 D1B641 CB0h -.data D1B641 D25492 9E51h -.rodata D25492 D254F7 65h +.text D1A991 D1B5F4 C63h +.data D1B5F4 D25445 9E51h +.rodata D25445 D254AA 65h .init_array 000000 000000 0h .ctors 000000 000000 0h .dtors 000000 000000 0h @@ -33,21 +33,19 @@ _os_DisableHomeTextBuffer = D1A991 _os_EnableHomeTextBuffer = D1A9A3 _random = D1A9B5 _srandom = D1AA0C -__state = D1B641 +__state = D1B5F4 _os_FontSelect = 021E28 __frameset = D1AA23 __frameset0 = D1AA31 -__iand = 000134 -__idivs = 00013C __imulu = 000158 __iremu = 000170 __ishru = 000184 __sand = 000200 __setflag = 000218 -.missingappvar = D25492 -.libloadname = D25497 +.missingappvar = D25445 +.libloadname = D2544A .libloadnamelen = 000007 -.webaddress = D2549F +.webaddress = D25452 __start = D1A933 ___exithl = D1A95D skip._exit = D1A95D @@ -65,33 +63,33 @@ _clearSquare = D1ABAA _fillSquare = D1AC1A _dispLetter = D1AC8F _winLossDisplay = D1ACF0 -_enterLetter = D1ADC0 -_backspace = D1ADF9 -_handleKeys = D1AE15 -_inDictionary = D1B029 -_inSelected = D1B0E6 -_resetGame = D1B1A3 -_gameWin = D1B1E2 -_gameLoss = D1B2DF -_evaluateGuess = D1B3DC -_init = D1B5B9 -_mainGame = D1B5DB -_main = D1B626 -_SELECTED = D1B651 -_DICTIONARY = D1E36A +_enterLetter = D1AD73 +_backspace = D1ADAC +_handleKeys = D1ADC8 +_inDictionary = D1AFDC +_inSelected = D1B099 +_resetGame = D1B156 +_gameWin = D1B195 +_gameLoss = D1B292 +_evaluateGuess = D1B38F +_init = D1B56C +_mainGame = D1B58E +_main = D1B5D9 +_SELECTED = D1B604 +_DICTIONARY = D1E31D _rowPtr = D052C6 _colPtr = D052C7 _answer = D052C8 _guess = D052CE -L_.str = D254B4 -_YOU_WIN = D25485 -L_.str.1 = D254BD -_YOU_LOSE = D25488 -L_.str.2 = D254C7 -_PLAY_AGAIN = D2548B -L_.str.3 = D254E3 -_reveal = D2548E -_gameRunning = D25491 +L_.str = D25467 +_YOU_WIN = D25438 +L_.str.1 = D25470 +_YOU_LOSE = D2543B +L_.str.2 = D2547A +_PLAY_AGAIN = D2543E +L_.str.3 = D25496 +_reveal = D25441 +_gameRunning = D25444 _prevkey = D052D4 _#gfx_Begin = D1A901 _#gfx_End = D1A905 diff --git a/obj/src/main.c.src b/obj/src/main.c.src index 3f67301..e647974 100644 --- a/obj/src/main.c.src +++ b/obj/src/main.c.src @@ -381,25 +381,13 @@ _dispLetter: section .text,"ax",@progbits public _winLossDisplay _winLossDisplay: - ld hl, -9 + ld hl, -3 call __frameset - ld hl, (_PLAY_AGAIN) - push hl - call _gfx_GetStringWidth - pop de - ld de, 50 - add hl, de - ld bc, 65535 - call __iand - push hl - pop de - ld hl, 320 - ld (ix - 3), de or a, a - sbc hl, de - ld bc, 2 - call __idivs - ld (ix - 9), hl + sbc hl, hl + push hl + call _gfx_SetColor + pop hl ld a, (ix + 6) or a, a jq z, BB9_1 @@ -408,49 +396,30 @@ _winLossDisplay: BB9_1: ld hl, 130 BB9_3: - ld (ix - 6), hl - or a, a - sbc hl, hl - push hl - call _gfx_SetColor - pop hl - ld hl, (ix - 9) - ld bc, 255 - call __iand - ld (ix - 9), hl + ld (ix - 3), hl dec hl - push hl - pop bc - ld iy, (ix - 6) - dec iy - ld hl, (ix - 3) - ld de, 2 - add hl, de ld de, 102 push de + ld de, 222 + push de + push hl + ld hl, 49 push hl - push iy - push bc call _gfx_Rectangle pop hl pop hl pop hl pop hl - ld iy, (ix - 9) - ld hl, -2 - ex de, hl - add iy, de - lea bc, iy - ld iy, (ix - 6) - add iy, de ld hl, (ix - 3) - ld de, 4 + ld de, -2 add hl, de ld de, 104 push de + ld de, 224 + push de + push hl + ld hl, 48 push hl - push iy - push bc call _gfx_Rectangle pop hl pop hl @@ -462,11 +431,11 @@ BB9_3: pop hl ld hl, 100 push hl - ld hl, (ix - 3) + ld hl, 220 push hl - ld hl, (ix - 6) + ld hl, (ix - 3) push hl - ld hl, (ix - 9) + ld hl, 50 push hl call _gfx_FillRectangle ld sp, ix @@ -9876,10 +9845,8 @@ _prevkey: extern _gfx_SetTextFGColor extern _gfx_Begin extern __sand - extern __idivs extern __setflag extern _srandom - extern __iand extern _gfx_FillRectangle extern _os_FontSelect extern __frameset diff --git a/src/main.c b/src/main.c index ce24993..7778ce7 100644 --- a/src/main.c +++ b/src/main.c @@ -128,9 +128,8 @@ void dispLetter(char letter, u8 x, u8 y) { } void winLossDisplay(u8 pos) { // pos: 0 is top, 1 is bottom - const u16 width = gfx_GetStringWidth(PLAY_AGAIN) + 50; - const u16 height = 100; - const u8 x = (LCD_WIDTH - width) / 2, y = (pos ? 0 : LCD_HEIGHT / 2) + (LCD_HEIGHT / 2 - height) / 2; + const u16 width = 220, height = 100; + const u16 x = (LCD_WIDTH - width) / 2, y = (!pos * LCD_HEIGHT / 2) + (LCD_HEIGHT / 2 - height) / 2; // draw outline gfx_SetColor(BLACK);