diff options
Diffstat (limited to 'engine/battle')
-rw-r--r-- | engine/battle/display_effectiveness.asm | 6 | ||||
-rw-r--r-- | engine/battle/scale_sprites.asm | 17 |
2 files changed, 15 insertions, 8 deletions
diff --git a/engine/battle/display_effectiveness.asm b/engine/battle/display_effectiveness.asm index 17f0bd5b..1ef9873c 100644 --- a/engine/battle/display_effectiveness.asm +++ b/engine/battle/display_effectiveness.asm @@ -1,4 +1,4 @@ -DisplayEffectiveness: ; 2fb7b (b:7b7b) +DisplayEffectiveness: ; 2fd25 (b:7d25) ld a, [wDamageMultipliers] and a, $7F cp a, $0A @@ -9,10 +9,10 @@ DisplayEffectiveness: ; 2fb7b (b:7b7b) .done jp PrintText -SuperEffectiveText: ; 2fb8e (b:7b8e) +SuperEffectiveText: ; 2fd38 (b:7d38) TX_FAR _SuperEffectiveText db "@" -NotVeryEffectiveText: ; 2fb93 (b:7b93) +NotVeryEffectiveText: ; 2fd3d (b:7d3d) TX_FAR _NotVeryEffectiveText db "@" diff --git a/engine/battle/scale_sprites.asm b/engine/battle/scale_sprites.asm index ed227984..3d4c0e0b 100644 --- a/engine/battle/scale_sprites.asm +++ b/engine/battle/scale_sprites.asm @@ -1,7 +1,14 @@ ; scales both uncompressed sprite chunks by two in every dimension (creating 2x2 output pixels per input pixel) ; assumes that input sprite chunks are 4x4 tiles, and the rightmost and bottommost 4 pixels will be ignored ; resulting in a 7*7 tile output sprite chunk -ScaleSpriteByTwo: ; 2fe40 (b:7e40) +ScaleSpriteByTwo: ; 2fd79 (b:7d79) + ld a, $0 + call SwitchSRAMBankAndLatchClockData + call ScaleSpriteByTwo_ + call PrepareRTCDataAndDisableSRAM + ret + +ScaleSpriteByTwo_: ; 2fd85 (b:7d85) ld de, S_SPRITEBUFFER1 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped ld hl, S_SPRITEBUFFER0 + SPRITEBUFFERSIZE - 1 ; end of destination buffer call ScaleLastSpriteColumnByTwo ; last tile column is special case @@ -10,7 +17,7 @@ ScaleSpriteByTwo: ; 2fe40 (b:7e40) ld hl, S_SPRITEBUFFER1 + SPRITEBUFFERSIZE - 1 ; end of destination buffer call ScaleLastSpriteColumnByTwo ; last tile column is special case -ScaleFirstThreeSpriteColumnsByTwo: ; 2fe55 (b:7e55) +ScaleFirstThreeSpriteColumnsByTwo: ; 2fd9a (b:7d9a) ld b, $3 ; 3 tile columns .columnLoop ld c, 4*8 - 4 ; $1c, 4 tiles minus 4 unused rows @@ -39,7 +46,7 @@ ScaleFirstThreeSpriteColumnsByTwo: ; 2fe55 (b:7e55) jr nz, .columnLoop ret -ScaleLastSpriteColumnByTwo: ; 2fe7d (b:7e7d) +ScaleLastSpriteColumnByTwo: ; 2fdc2 (b:7dc2) ld a, 4*8 - 4 ; $1c, 4 tiles minus 4 unused rows ld [H_SPRITEINTERLACECOUNTER], a ld bc, -1 @@ -61,7 +68,7 @@ ScaleLastSpriteColumnByTwo: ; 2fe7d (b:7e7d) ; scales the given 4 bits in a (4x1 pixels) to 2 output bytes (8x2 pixels) ; hl: destination pointer ; bc: destination pointer offset (added after the two bytes have been written) -ScalePixelsByTwo: ; 2fe97 (b:7e97) +ScalePixelsByTwo: ; 2fddc (b:7ddc) push hl and $f ld hl, DuplicateBitsTable @@ -78,7 +85,7 @@ ScalePixelsByTwo: ; 2fe97 (b:7e97) ret ; repeats each input bit twice -DuplicateBitsTable: ; 2fea8 (b:7ea8) +DuplicateBitsTable: ; 2fded (b:7ded) db $00, $03, $0c, $0f db $30, $33, $3c, $3f db $c0, $c3, $cc, $cf |