Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2020-07-26 19:38:51

Ferropexola
Member
Registered: 2020-06-08
Post 18/25

New Surf Item not functioning as intended.

I added items for Cut, Fly and Surf so far. Cut works as intended. Fly works except for the animation. Surf is reversed. You can surf without the item, and when you have the item, you can no longer check the water, but can still surf when you use it from the pack.

.TrySurf:
- ld de, ENGINE_FOGBADGE
- call CheckBadge
- jr c, .nofogbadge
ld hl, wBikeFlags
bit BIKEFLAGS_ALWAYS_ON_BIKE_F, [hl]
jr nz, .cannotsurf
ld a, [wPlayerState]
cp PLAYER_SURF
jr z, .alreadyfail
cp PLAYER_SURF_PIKA
jr z, .alreadyfail
call GetFacingTileCoord
call GetTileCollision
cp WATER_TILE
jr nz, .cannotsurf
call CheckDirection
jr c, .cannotsurf
farcall CheckFacingObject
jr c, .cannotsurf
ld a, $1
ret
-.nofogbadge
- ld a, $80
- ret
...

; Check tile permissions.
call CheckDirection
jr c, .quit

- ld de, ENGINE_FOGBADGE
- call CheckEngineFlag
- jr c, .quit

- ld d, SURF
- call CheckPartyMove
- jr c, .quit

+ ld a, LAPRAS_CALLA
+ ld [wCurItem], a
+ ld hl, wNumItems
+ call CheckItem
+ jr c, .quit

These are the changes I made to engine/events/overworld.asm

I know that there's something I did wrong, but I'm not sure where.

Last edited by Ferropexola (2020-07-26 19:39:26)


Just because you can, doesn't mean you have to.

Offline

Board footer

Powered by FluxBB