Strong Arm, Water Sport, and more HMs.

This adds Rock Climb functionality to Strong Arm and Dive functionality to Water Sport, as discussed in the server. HMs have been added, but we need 16bit Items to add Wind Ride, and I haven't finished their functionality.

The Rock Climb tile is a bit terrible, it's not easy to notice. Maybe change so that it works well with yellow or another colour?

This does not build due to issues with effect_commands.asm, but since Zeta is meant to be working on the mapping and Water Sport anyway, it seems to be up his alley.

I ported over much of the underwater assets Rangi was using as they looked very pretty. I imagine it'll be fun to utilise going forward. May as well, right?

I shall now lay down in a dark room.

Review: c21561ea71 (diff-5508f3b794fc68821ba35e94b6a293b2aaaa16c02a1b34fac70d03fd2f74c4b2R113)
This commit is contained in:
Llinos Evans 2024-12-28 06:26:01 +00:00
parent 4b11121836
commit 093bda0253
77 changed files with 993 additions and 97 deletions

View file

@ -38,7 +38,7 @@ _AnimateTileset::
Tileset0Anim:
TilesetJohtoModernAnim:
dw vTiles2 tile $14, AnimateWaterTile
dw NULL, WaitTileAnimation
dw vTiles2 tile $5b, AnimateDeepWaterTile
dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation
dw NULL, AnimateWaterPalette
@ -357,6 +357,23 @@ TilesetNihonMartAnim:
dw NULL, WaitTileAnimation
dw NULL, DoneTileAnimation
; Currently unused.
; Zeta, you've made your own tileset, but check here and see what you want.
; https://github.com/Rangi42/pokecrystal/commit/c21561ea717feef9b2eb3785c2ea112cd0d19ba0#diff-88dbff1eb3920f69b17a3d5f613643e1a41096514706bc09f449e4aa637f20e4R5647
TilesetUnderwaterAnim:
dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation
dw NULL, UnderwaterBubbleTile
dw NULL, WaitTileAnimation
dw NULL, AnimateSeaweedTile1
dw NULL, AnimateSeaweedTile2
dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation
dw NULL, StandingTileFrame8
dw NULL, DoneTileAnimation
DoneTileAnimation:
; Reset the animation command loop.
xor a
@ -551,6 +568,32 @@ AnimateWaterTile:
.WaterTileFrames:
INCBIN "gfx/tilesets/water/water.2bpp"
AnimateDeepWaterTile:
; Draw a deep water tile for the current frame in VRAM tile at de.
; Save sp in bc (see WriteTile).
ld hl, sp+0
ld b, h
ld c, l
ld a, [wTileAnimationTimer]
; 4 tile graphics, updated every other frame.
and %110
; 2 x 8 = 16 bytes per tile
add a
add a
add a
add LOW(DeepWaterTileFrames)
ld l, a
ld a, 0
adc HIGH(DeepWaterTileFrames)
ld h, a
; The stack now points to the start of the tile for this frame.
ld sp, hl
ld l, e
ld h, d
jp WriteTile
DeepWaterTileFrames:
INCBIN "gfx/tilesets/water/deep-water.2bpp"
ForestTreeLeftAnimation:
; Save the stack pointer in bc for WriteTile to restore
ld hl, sp+0
@ -1124,3 +1167,76 @@ WhirlpoolTiles1: INCBIN "gfx/tilesets/whirlpool/1.2bpp"
WhirlpoolTiles2: INCBIN "gfx/tilesets/whirlpool/2.2bpp"
WhirlpoolTiles3: INCBIN "gfx/tilesets/whirlpool/3.2bpp"
WhirlpoolTiles4: INCBIN "gfx/tilesets/whirlpool/4.2bpp"
UnderwaterBubbleTile:
; No parameters.
; Save sp in bc (see WriteTile).
ld hl, sp+$0
ld b, h
ld c, l
; Alternate tile graphic every frame
ld a, [wTileAnimationTimer]
and %111 ; 8 frames
swap a ; * 16 bytes per tile
ld e, a
ld d, 0
ld hl, UnderwaterBubbleTileFrames
add hl, de
ld sp, hl
ld hl, vTiles2 tile $13 ; index of bubble tile
jp WriteTile
UnderwaterBubbleTileFrames:
INCBIN "gfx/tilesets/bubble/1.2bpp"
INCBIN "gfx/tilesets/bubble/2.2bpp"
INCBIN "gfx/tilesets/bubble/3.2bpp"
INCBIN "gfx/tilesets/bubble/4.2bpp"
INCBIN "gfx/tilesets/bubble/5.2bpp"
INCBIN "gfx/tilesets/bubble/5.2bpp"
INCBIN "gfx/tilesets/bubble/5.2bpp"
INCBIN "gfx/tilesets/bubble/5.2bpp"
AnimateSeaweedTile1:
; No parameters.
; Save sp in bc (see WriteTile).
ld hl, sp+$0
ld b, h
ld c, l
; Alternate tile graphic every eighth frame
ld a, [wTileAnimationTimer]
and %100
srl a
srl a
swap a ; * 16 bytes per tile
ld e, a
ld d, 0
ld hl, SeaweedTileFrames
add hl, de
ld sp, hl
ld hl, vTiles2 tile $03 ; index of seaweed tile 1
jp WriteTile
AnimateSeaweedTile2:
; No parameters.
; Save sp in bc (see WriteTile).
ld hl, sp+$0
ld b, h
ld c, l
; Alternate tile graphic every eighth frame
ld a, [wTileAnimationTimer]
xor %100 ; invert tile alternation from AnimateSeaweedTile1
and %100
srl a
srl a
swap a ; * 16 bytes per tile
ld e, a
ld d, 0
ld hl, SeaweedTileFrames
add hl, de
ld sp, hl
ld hl, vTiles2 tile $04 ; index of seaweed tile 2
jp WriteTile
SeaweedTileFrames:
INCBIN "gfx/tilesets/seaweed/1.2bpp"
INCBIN "gfx/tilesets/seaweed/2.2bpp"

View file

@ -1,3 +1,8 @@
; Zeta, Rangi's Dive code sets something special here.
; https://github.com/Rangi42/pokecrystal/commit/c21561ea717feef9b2eb3785c2ea112cd0d19ba0#diff-3f65a383d53b5b6bef93c0cf6b1078db365ec51031b8c9b8cccff1d8b81b77db
; Test and see if you like it; do so by adding the changes from the equivalent file.
; Requires underwater tileset to exist.
LoadSpecialMapPalette:
ld a, [wMapTileset]
cp TILESET_POKECOM_CENTER