Skip to content

Commit

Permalink
Merge pull request #76 from Lorenzooone/window-text-buffering
Browse files Browse the repository at this point in the history
Move equip numbers window one tile to the right
  • Loading branch information
jeffman committed Sep 17, 2019
2 parents f968305 + b4e6133 commit 199b70a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
4 changes: 2 additions & 2 deletions src/c/equip.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,8 @@ void equipPrint(WINDOW* window) //Prints equipment
print_blankstr_buffer(window->window_x + 6, 7, 0xC, (int*)(OVERWORLD_BUFFER - 0x2000));

//Clear the previous numbers
print_blankstr_buffer(7, 0xB, 0x8, (int*)(OVERWORLD_BUFFER - 0x2000));
print_blankstr_buffer(7, 0xD, 0x8, (int*)(OVERWORLD_BUFFER - 0x2000));
print_blankstr_buffer(8, 0xB, 0x8, (int*)(OVERWORLD_BUFFER - 0x2000));
print_blankstr_buffer(8, 0xD, 0x8, (int*)(OVERWORLD_BUFFER - 0x2000));

//Reprint the ":"s

Expand Down
8 changes: 4 additions & 4 deletions src/m2-hack.asm
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ mov r3,6
.org 0x80BB02C :: bl innerEquipInput
.org 0x80B8066 :: bl printstr_hlight_buffer
.org 0x80B8074 :: mov r3,#0x12
.org 0x80B80A6 :: mov r3,#0x0D
.org 0x80B80A2 :: mov r1,#3 :: mov r2,#0xB :: mov r3,#0xD
.org 0x80B8092 :: bl initWindow_buffer //Initialize equipment window
.org 0x80B8098 :: bl print_window_with_buffer
.org 0x80B80BE :: bl initWindow_buffer
Expand Down Expand Up @@ -264,21 +264,21 @@ mov r3,6

// Erase offense change
.macro erase_offense_buffer
mov r0,0xB
mov r0,0xC
mov r1,0xB
mov r2,4
bl bb21c_print_blankstr_buffer
.endmacro

.macro erase_defense_buffer
mov r0,0xB
mov r0,0xC
mov r1,0xD
mov r2,4
bl bb21c_print_blankstr_buffer
.endmacro

.macro erase_defense_buffer_store
mov r0,0xB
mov r0,0xC
mov r1,0xD
mov r2,4
bl bb21c_print_blankstr_buffer_store
Expand Down
22 changes: 10 additions & 12 deletions src/m2-vwf-entries.asm
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,11 @@ bl clear_equipment

// Clear offense/defense
push {r0-r3}
mov r0,8
mov r0,9
mov r1,0xB
mov r2,8
bl bb21c_print_blankstr_buffer
mov r0,8
mov r0,9
mov r1,0xD
mov r2,8
bl bb21c_print_blankstr_buffer
Expand All @@ -319,11 +319,11 @@ bl clear_equipment

// Clear offense/defense
push {r0-r3}
mov r0,8
mov r0,9
mov r1,0xB
mov r2,8
bl bb21c_print_blankstr_buffer
mov r0,8
mov r0,9
mov r1,0xD
mov r2,8
bl bb21c_print_blankstr_buffer
Expand Down Expand Up @@ -505,16 +505,14 @@ pop {pc}
// Clear offense/defense when re-equipping (or un-equipping) something
baef8_reequip_erase:
push {r0-r3,lr}
mov r0,7
mov r0,8
mov r1,0xB
mov r2,4
ldr r3,=#overworld_buffer - 0x2000
bl print_blankstr_buffer
mov r0,7
bl bb21c_print_blankstr_buffer
mov r0,8
mov r1,0xD
mov r2,4
ldr r3,=#overworld_buffer - 0x2000
bl print_blankstr_buffer
bl bb21c_print_blankstr_buffer

// Clobbered code
pop {r0-r3}
Expand Down Expand Up @@ -2726,11 +2724,11 @@ bx r0
//Clears the rightmost part of the Offense/Defense window for the innermost equipment menu
clear_offense_defense_inner_equip:
push {lr}
mov r0,0xC
mov r0,0xD
mov r1,0xB
mov r2,0x3
bl bb21c_print_blankstr_buffer
mov r0,0xC
mov r0,0xD
mov r1,0xD
mov r2,0x3
bl bb21c_print_blankstr_buffer
Expand Down

0 comments on commit 199b70a

Please sign in to comment.