diff options
author | Astatin <[email protected]> | 2024-08-22 18:17:04 +0900 |
---|---|---|
committer | Astatin <astatin@redacted> | 2024-08-22 18:17:04 +0900 |
commit | f0d9de7afa943ebd41c1b202690b2ab3e387f708 (patch) | |
tree | ffd085c9a6182b67ef44a506a2728057f72f5d12 /utils.gbasm | |
parent | 358e97cc2628d4617543d20d2c40111699f067d6 (diff) |
Stored the rooms + spawn the bunny at the top left (sometimes) of the room
Diffstat (limited to 'utils.gbasm')
-rw-r--r-- | utils.gbasm | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/utils.gbasm b/utils.gbasm index 2c8ef2b..babf7da 100644 --- a/utils.gbasm +++ b/utils.gbasm @@ -30,3 +30,68 @@ Print_8bit: ; Number in A, Memory Tilemap position in HL POP AF RET +MUL: ; B x C => EA + XOR A + LD E, $00 + + BIT 7, B + JR Z, =MUL.bit7 + ADD C + MUL.bit7: + + SLA A + RL E + + BIT 6, B + JR Z, =MUL.bit6 + ADD C + MUL.bit6: + + SLA A + RL E + + BIT 5, B + JR Z, =MUL.bit5 + ADD C + MUL.bit5: + + SLA A + RL E + + BIT 4, B + JR Z, =MUL.bit4 + ADD C + MUL.bit4: + + SLA A + RL E + + BIT 3, B + JR Z, =MUL.bit3 + ADD C + MUL.bit3: + + SLA A + RL E + + BIT 2, B + JR Z, =MUL.bit2 + ADD C + MUL.bit2: + + SLA A + RL E + + BIT 1, B + JR Z, =MUL.bit1 + ADD C + MUL.bit1: + + SLA A + RL E + + BIT 0, B + JR Z, =MUL.bit0 + ADD C + MUL.bit0: + RET |