Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update code for rgbds 0.3.1 #147

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ language: c
install:
- |-
path="$(pwd)"; cd;
wget https://github.com/rednex/rgbds/archive/v0.2.5.tar.gz -O rgbds.tar.gz &&
tar xf rgbds.tar.gz &&
cd rgbds-0.2.5 &&
sudo make install &&
cd - &&
rm -rf rgbds &&
wget https://github.com/rednex/rgbds/archive/v0.3.1.tar.gz -O rgbds.tar.gz &&
tar xf rgbds.tar.gz &&
cd rgbds-0.3.1 &&
sudo make install &&
cd - &&
rm -rf rgbds &&
cd "$path"
before_script:
- |-
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pokered_opt = -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03 -t "POKEMON RED"
pokeblue_opt = -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03 -t "POKEMON BLUE"

%.gbc: $$(%_obj)
rgblink -n $*.sym -o $@ $^
rgblink -n $*.sym -l linkerscript.link -o $@ $^
rgbfix $($*_opt) $@

%.png: ;
Expand Down
8 changes: 4 additions & 4 deletions engine/battle/animations.asm
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ PlayAnimation:
ld h,a
ld de,.nextAnimationCommand
push de
jp [hl] ; jump to special effect function
jp hl ; jump to special effect function
.playSubanimation
ld c,a
and a,%00111111
Expand Down Expand Up @@ -457,7 +457,7 @@ PlayApplyingAttackAnimation:
ld a,[hli]
ld h,[hl]
ld l,a
jp [hl]
jp hl

AnimationTypePointerTable:
dw ShakeScreenVertically ; enemy mon has used a damaging move without a side effect
Expand Down Expand Up @@ -642,7 +642,7 @@ DoSpecialEffectByAnimationId:
ld l,a
ld de,.done
push de
jp [hl]
jp hl
.done
pop bc
pop de
Expand Down Expand Up @@ -1080,7 +1080,7 @@ CallWithTurnFlipped:
ld [H_WHOSETURN],a
ld de,.returnAddress
push de
jp [hl]
jp hl
.returnAddress
pop af
ld [H_WHOSETURN],a
Expand Down
2 changes: 1 addition & 1 deletion engine/battle/battle_transitions.asm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ BattleTransition:
ld a, [hli]
ld h, [hl]
ld l, a
jp [hl]
jp hl

; the three GetBattleTransitionID functions set the first
; three bits of c, which determines what transition animation
Expand Down
6 changes: 3 additions & 3 deletions engine/battle/core.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3150,7 +3150,7 @@ ExecutePlayerMove:
jp z, ExecutePlayerMoveDone
call CheckPlayerStatusConditions
jr nz, .playerHasNoSpecialCondition
jp [hl]
jp hl
.playerHasNoSpecialCondition
call GetCurrentMove
ld hl, wPlayerBattleStatus1
Expand Down Expand Up @@ -5690,7 +5690,7 @@ ExecuteEnemyMove:
ld [wDamageMultipliers], a
call CheckEnemyStatusConditions
jr nz, .enemyHasNoSpecialConditions
jp [hl]
jp hl
.enemyHasNoSpecialConditions
ld hl, wEnemyBattleStatus1
bit ChargingUp, [hl] ; is the enemy charging up for attack?
Expand Down Expand Up @@ -7139,7 +7139,7 @@ _JumpMoveEffect:
ld a, [hli]
ld h, [hl]
ld l, a
jp [hl] ; jump to special effect handler
jp hl ; jump to special effect handler

MoveEffectPointerTable:
dw SleepEffect ; unused effect
Expand Down
4 changes: 2 additions & 2 deletions engine/battle/trainer_ai.asm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ AIEnemyTrainerChooseMoves:
ld l, a
ld de, .nextMoveChoiceModification ; set return address
push de
jp [hl] ; execute modification function
jp hl ; execute modification function
.loopFindMinimumEntries ; all entries will be decremented sequentially until one of them is zero
ld hl, wBuffer ; temp move selection array
ld de, wEnemyMonMoves ; enemy moves
Expand Down Expand Up @@ -366,7 +366,7 @@ TrainerAI:
ld h,[hl]
ld l,a
call Random
jp [hl]
jp hl

TrainerAIPointers:
; one entry per trainer class
Expand Down
2 changes: 1 addition & 1 deletion engine/cable_club.asm
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ CallCurrentTradeCenterFunction:
ld a, [hli]
ld h, [hl]
ld l, a
jp [hl]
jp hl

TradeCenter_SelectMon:
call ClearScreen
Expand Down
2 changes: 1 addition & 1 deletion engine/items/items.asm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ UseItem_:
ld a,[hli]
ld h,[hl]
ld l,a
jp [hl]
jp hl

ItemUsePtrTable:
dw ItemUseBall ; MASTER_BALL
Expand Down
2 changes: 1 addition & 1 deletion engine/menu/start_sub_menus.asm
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ StartMenu_Pokemon:
ld h,[hl]
ld l,a
ld a,[wObtainedBadges] ; badges obtained
jp [hl]
jp hl
.outOfBattleMovePointers
dw .cut
dw .fly
Expand Down
2 changes: 1 addition & 1 deletion engine/menu/text_box.asm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ DisplayTextBoxID_:
ld l,a ; hl = address of function
ld de,.done
push de
jp [hl] ; jump to the function
jp hl ; jump to the function
.coordTableMatch
call GetTextBoxIDCoords
call GetAddressOfScreenCoords
Expand Down
2 changes: 1 addition & 1 deletion engine/overworld/player_state.asm
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ IsPlayerFacingEdgeOfMap:
ld c, a
ld de, .asm_c41e
push de
jp [hl]
jp hl
.asm_c41e
pop bc
pop de
Expand Down
2 changes: 1 addition & 1 deletion engine/overworld/ssanne.asm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ AnimateBoulderDust:
ld bc, .returnAddress
push bc
ld c, 4
jp [hl]
jp hl
.returnAddress
ld a, [rOBP1]
xor %01100100
Expand Down
2 changes: 1 addition & 1 deletion engine/palettes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ _RunPaletteCommand:
ld l, a
ld de, SendSGBPackets
push de
jp [hl]
jp hl

SetPal_BattleBlack:
ld hl, PalPacket_Black
Expand Down
2 changes: 1 addition & 1 deletion engine/slot_machine.asm
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ SlotMachine_CheckForMatches:
pop hl
ld de, .flashScreenLoop
push de
jp [hl]
jp hl

.flashScreenLoop
ld a, [rBGP]
Expand Down
2 changes: 1 addition & 1 deletion engine/trade.asm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ TradeAnimCommon:
ld l, a
ld de, .loop
push de
jp [hl] ; call trade func, which will return to the top of the loop
jp hl ; call trade func, which will return to the top of the loop
.done
pop af
ld [hSCX], a
Expand Down
6 changes: 3 additions & 3 deletions home.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2966,7 +2966,7 @@ Bankswitch::
ld [MBC1RomBank],a
ld bc,.Return
push bc
jp [hl]
jp hl
.Return
pop bc
ld a,b
Expand Down Expand Up @@ -4422,7 +4422,7 @@ CallFunctionInTable::
ld l, a
ld de, .returnAddress
push de
jp [hl]
jp hl
.returnAddress
pop bc
pop de
Expand Down Expand Up @@ -4605,7 +4605,7 @@ CheckForHiddenObjectOrBookshelfOrCardKeyDoor::
ld [H_LOADEDROMBANK], a
ld de, .returnAddress
push de
jp [hl]
jp hl
.returnAddress
xor a
jr .done
Expand Down
2 changes: 1 addition & 1 deletion home/overworld.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1995,7 +1995,7 @@ RunMapScript::
ld l,a
ld de,.return
push de
jp [hl] ; jump to script
jp hl ; jump to script
.return
ret

Expand Down
2 changes: 1 addition & 1 deletion home/predef.asm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Predef::

ld de, .done
push de
jp [hl]
jp hl
.done

pop af
Expand Down
12 changes: 6 additions & 6 deletions home/vcopy.asm
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ AutoBgMapTransfer::
ld a,[H_AUTOBGTRANSFERENABLED]
and a
ret z
ld hl,[sp + 0]
ld hl,sp + 0
ld a,h
ld [H_SPTEMP],a
ld a,l
Expand Down Expand Up @@ -205,7 +205,7 @@ VBlankCopyBgMap::
ld a,[H_VBCOPYBGSRC] ; doubles as enabling byte
and a
ret z
ld hl,[sp + 0]
ld hl,sp + 0
ld a,h
ld [H_SPTEMP],a
ld a,l
Expand Down Expand Up @@ -238,7 +238,7 @@ VBlankCopyDouble::
and a
ret z

ld hl, [sp + 0]
ld hl, sp + 0
ld a, h
ld [H_SPTEMP], a
ld a, l
Expand Down Expand Up @@ -290,7 +290,7 @@ VBlankCopyDouble::
ld a, h
ld [H_VBCOPYDOUBLEDEST + 1], a

ld hl, [sp + 0]
ld hl, sp + 0
ld a, l
ld [H_VBCOPYDOUBLESRC], a
ld a, h
Expand All @@ -316,7 +316,7 @@ VBlankCopy::
and a
ret z

ld hl, [sp + 0]
ld hl, sp + 0
ld a, h
ld [H_SPTEMP], a
ld a, l
Expand Down Expand Up @@ -360,7 +360,7 @@ VBlankCopy::
ld a, h
ld [H_VBCOPYDEST + 1], a

ld hl, [sp + 0]
ld hl, sp + 0
ld a, l
ld [H_VBCOPYSRC], a
ld a, h
Expand Down
Loading