diff options
author | xCrystal <rgr.crystal@gmail.com> | 2015-04-01 17:03:05 +0200 |
---|---|---|
committer | xCrystal <rgr.crystal@gmail.com> | 2015-04-01 17:05:51 +0200 |
commit | 10211cc461b35140c815e18e95f7070eb0dcc586 (patch) | |
tree | a3ccfaf788d8b7cb7e743125bfceb3785a1b0d19 | |
parent | 2fe782b11a039b52fd236da28fb2f1ae10cae7db (diff) |
Rename battle files and split move effects Part 5
15.asm, 16.asm, 1a.asm, 1c.asm
-rw-r--r--[-rwxr-xr-x] | engine/battle/battle_transitions.asm (renamed from engine/battle/1c.asm) | 90 | ||||
-rw-r--r--[-rwxr-xr-x] | engine/battle/common_text.asm (renamed from engine/battle/16.asm) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | engine/battle/decrement_pp.asm (renamed from engine/battle/1a.asm) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | engine/battle/experience.asm (renamed from engine/battle/15.asm) | 0 | ||||
-rw-r--r-- | engine/battle/ghost_marowak_anim.asm | 89 | ||||
-rwxr-xr-x | main.asm | 9 |
6 files changed, 94 insertions, 94 deletions
diff --git a/engine/battle/1c.asm b/engine/battle/battle_transitions.asm index ce0296f7..f1aa4161 100755..100644 --- a/engine/battle/1c.asm +++ b/engine/battle/battle_transitions.asm @@ -1,93 +1,3 @@ -MarowakAnim: ; 708ca (1c:48ca) -; animate the ghost being unveiled as a Marowak - ld a, $e4 - ld [rOBP1], a - call CopyMonPicFromBGToSpriteVRAM ; cover the BG ghost pic with a sprite ghost pic that looks the same -; now that the ghost pic is being displayed using sprites, clear the ghost pic from the BG tilemap - hlCoord 12, 0 - ld bc, $707 - call ClearScreenArea - call Delay3 - xor a - ld [H_AUTOBGTRANSFERENABLED], a ; disable BG transfer so we don't see the Marowak too soon -; replace ghost pic with Marowak in BG - ld a, MAROWAK - ld [wHPBarMaxHP], a - ld a, $1 - ld [H_WHOSETURN], a - callab Func_79793 - ; alternate between black and light grey 8 times. - ; this makes the ghost's body appear to flash - ld d, $80 - call FlashSprite8Times -.fadeOutGhostLoop - ld c, 10 - call DelayFrames - ld a, [rOBP1] - sla a - sla a - ld [rOBP1], a - jr nz, .fadeOutGhostLoop - call ClearSprites - call CopyMonPicFromBGToSpriteVRAM ; copy Marowak pic from BG to sprite VRAM - ld b, $e4 -.fadeInMarowakLoop - ld c, 10 - call DelayFrames - ld a, [rOBP1] - srl b - rra - srl b - rra - ld [rOBP1], a - ld a, b - and a - jr nz, .fadeInMarowakLoop - ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; enable BG transfer so the BG Marowak pic will be visible after the sprite one is cleared - call Delay3 - jp ClearSprites - -; copies a mon pic's from background VRAM to sprite VRAM and sets up OAM -CopyMonPicFromBGToSpriteVRAM: ; 7092a (1c:492a) - ld de, vFrontPic - ld hl, vSprites - ld bc, 7 * 7 - call CopyVideoData - ld a, $10 - ld [W_BASECOORDY], a - ld a, $70 - ld [W_BASECOORDX], a - ld hl, wOAMBuffer - ld bc, $606 - ld d, $8 -.oamLoop - push bc - ld a, [W_BASECOORDY] - ld e, a -.oamInnerLoop - ld a, e - add $8 - ld e, a - ld [hli], a - ld a, [W_BASECOORDX] - ld [hli], a - ld a, d - ld [hli], a - ld a, $10 ; use OBP1 - ld [hli], a - inc d - dec c - jr nz, .oamInnerLoop - inc d - ld a, [W_BASECOORDX] - add $8 - ld [W_BASECOORDX], a - pop bc - dec b - jr nz, .oamLoop - ret - BattleTransition: ; 7096d (1c:496d) ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a diff --git a/engine/battle/16.asm b/engine/battle/common_text.asm index 9a00bd98..9a00bd98 100755..100644 --- a/engine/battle/16.asm +++ b/engine/battle/common_text.asm diff --git a/engine/battle/1a.asm b/engine/battle/decrement_pp.asm index ecf5040b..ecf5040b 100755..100644 --- a/engine/battle/1a.asm +++ b/engine/battle/decrement_pp.asm diff --git a/engine/battle/15.asm b/engine/battle/experience.asm index 9bd67654..9bd67654 100755..100644 --- a/engine/battle/15.asm +++ b/engine/battle/experience.asm diff --git a/engine/battle/ghost_marowak_anim.asm b/engine/battle/ghost_marowak_anim.asm new file mode 100644 index 00000000..73d3bcc2 --- /dev/null +++ b/engine/battle/ghost_marowak_anim.asm @@ -0,0 +1,89 @@ +MarowakAnim: ; 708ca (1c:48ca) +; animate the ghost being unveiled as a Marowak + ld a, $e4 + ld [rOBP1], a + call CopyMonPicFromBGToSpriteVRAM ; cover the BG ghost pic with a sprite ghost pic that looks the same +; now that the ghost pic is being displayed using sprites, clear the ghost pic from the BG tilemap + hlCoord 12, 0 + ld bc, $707 + call ClearScreenArea + call Delay3 + xor a + ld [H_AUTOBGTRANSFERENABLED], a ; disable BG transfer so we don't see the Marowak too soon +; replace ghost pic with Marowak in BG + ld a, MAROWAK + ld [wHPBarMaxHP], a + ld a, $1 + ld [H_WHOSETURN], a + callab Func_79793 + ; alternate between black and light grey 8 times. + ; this makes the ghost's body appear to flash + ld d, $80 + call FlashSprite8Times +.fadeOutGhostLoop + ld c, 10 + call DelayFrames + ld a, [rOBP1] + sla a + sla a + ld [rOBP1], a + jr nz, .fadeOutGhostLoop + call ClearSprites + call CopyMonPicFromBGToSpriteVRAM ; copy Marowak pic from BG to sprite VRAM + ld b, $e4 +.fadeInMarowakLoop + ld c, 10 + call DelayFrames + ld a, [rOBP1] + srl b + rra + srl b + rra + ld [rOBP1], a + ld a, b + and a + jr nz, .fadeInMarowakLoop + ld a, $1 + ld [H_AUTOBGTRANSFERENABLED], a ; enable BG transfer so the BG Marowak pic will be visible after the sprite one is cleared + call Delay3 + jp ClearSprites + +; copies a mon pic's from background VRAM to sprite VRAM and sets up OAM +CopyMonPicFromBGToSpriteVRAM: ; 7092a (1c:492a) + ld de, vFrontPic + ld hl, vSprites + ld bc, 7 * 7 + call CopyVideoData + ld a, $10 + ld [W_BASECOORDY], a + ld a, $70 + ld [W_BASECOORDX], a + ld hl, wOAMBuffer + ld bc, $606 + ld d, $8 +.oamLoop + push bc + ld a, [W_BASECOORDY] + ld e, a +.oamInnerLoop + ld a, e + add $8 + ld e, a + ld [hli], a + ld a, [W_BASECOORDX] + ld [hli], a + ld a, d + ld [hli], a + ld a, $10 ; use OBP1 + ld [hli], a + inc d + dec c + jr nz, .oamInnerLoop + inc d + ld a, [W_BASECOORDX] + add $8 + ld [W_BASECOORDX], a + pop bc + dec b + jr nz, .oamLoop + ret @@ -6014,7 +6014,7 @@ DayCareMBlocks: INCBIN "maps/daycarem.blk" FuchsiaHouse3Blocks: INCBIN "maps/fuchsiahouse3.blk" -INCLUDE "engine/battle/15.asm" +INCLUDE "engine/battle/experience.asm" INCLUDE "scripts/route2.asm" INCLUDE "scripts/route3.asm" @@ -6094,7 +6094,7 @@ Route18Blocks: INCBIN "maps/route18.blk" INCBIN "maps/unusedblocks58d7d.blk" -INCLUDE "engine/battle/16.asm" +INCLUDE "engine/battle/common_text.asm" INCLUDE "engine/experience.asm" @@ -6451,7 +6451,7 @@ Plateau_Block: INCBIN "gfx/blocksets/plateau.bst" SECTION "bank1A",ROMX,BANK[$1A] -INCLUDE "engine/battle/1a.asm" +INCLUDE "engine/battle/decrement_pp.asm" Version_GFX: IF DEF(_RED) @@ -6508,7 +6508,8 @@ INCLUDE "engine/gamefreak.asm" INCLUDE "engine/hall_of_fame.asm" INCLUDE "engine/overworld/healing_machine.asm" INCLUDE "engine/overworld/player_animations.asm" -INCLUDE "engine/battle/1c.asm" +INCLUDE "engine/battle/ghost_marowak_anim.asm" +INCLUDE "engine/battle/battle_transitions.asm" INCLUDE "engine/town_map.asm" INCLUDE "engine/mon_party_sprites.asm" INCLUDE "engine/in_game_trades.asm" |