aboutsummaryrefslogtreecommitdiffstats
path: root/engine/battle/scale_sprites.asm
diff options
context:
space:
mode:
authorRangi42 <remy.oukaour+rangi42@gmail.com>2023-11-20 17:53:19 -0500
committerRangi42 <remy.oukaour+rangi42@gmail.com>2023-11-20 17:53:19 -0500
commitb066d3c9bc02cf4213173538d148cfabcc7212a8 (patch)
tree9ce48f3d91afbbb8fbe9274de3c271d6fa602190 /engine/battle/scale_sprites.asm
parentIdentify the unnamed HRAM variables and one WRAM label (#438) (diff)
downloadpokeyellow-b066d3c9bc02cf4213173538d148cfabcc7212a8.tar.gz
pokeyellow-b066d3c9bc02cf4213173538d148cfabcc7212a8.tar.xz
pokeyellow-b066d3c9bc02cf4213173538d148cfabcc7212a8.zip
Add `bigdw` and `dc` data macros
Diffstat (limited to 'engine/battle/scale_sprites.asm')
-rw-r--r--engine/battle/scale_sprites.asm21
1 files changed, 4 insertions, 17 deletions
diff --git a/engine/battle/scale_sprites.asm b/engine/battle/scale_sprites.asm
index 8b8942e6..9e24c89d 100644
--- a/engine/battle/scale_sprites.asm
+++ b/engine/battle/scale_sprites.asm
@@ -77,21 +77,8 @@ ScalePixelsByTwo:
add hl, bc ; add offset
ret
-; repeats each input bit twice
+; repeats each input bit twice, e.g. DuplicateBitsTable[%0101] = %00110011
DuplicateBitsTable:
- db %00000000
- db %00000011
- db %00001100
- db %00001111
- db %00110000
- db %00110011
- db %00111100
- db %00111111
- db %11000000
- db %11000011
- db %11001100
- db %11001111
- db %11110000
- db %11110011
- db %11111100
- db %11111111
+FOR n, 16
+ db (n & 1) * 3 + (n & 2) * 6 + (n & 4) * 12 + (n & 8) * 24
+ENDR