diff options
author | Astatin <[email protected]> | 2025-04-11 11:41:48 +0200 |
---|---|---|
committer | Astatin <[email protected]> | 2025-04-11 11:41:48 +0200 |
commit | 690ff7c09726d9e760b52b717c70e9567531175c (patch) | |
tree | 4e951d5ca5914b998dbb066aee11b03955e7281b /utils.gbasm | |
parent | 5eb4fc176cae7907a90789051e1e3a9d1fc10f37 (diff) |
Add per entity spawning rate
Diffstat (limited to 'utils.gbasm')
-rw-r--r-- | utils.gbasm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/utils.gbasm b/utils.gbasm index ba808bd..38ae74a 100644 --- a/utils.gbasm +++ b/utils.gbasm @@ -298,6 +298,31 @@ MUL: ; B x C => EA .bit0: RET +RRx: ; B is the number to rotate, A & 7 is how many bits to rotate it + AND $07 + + CP $04 + CALL NC, =.swap + CP $00 + RET Z + + RRC B + DEC A + RET Z + + RRC B + DEC A + RET Z + + RRC B + DEC A + RET + + .swap: + SWAP B + SUB $04 + RET + VBlank_Wait: PUSH AF LD A, $reg_lcd_controller |