wUnlockedUnowns engine flag constants

Use local labels for "End"ings
This commit is contained in:
Rangi
2018-01-22 13:00:35 -05:00
parent 6ecf18aa52
commit 7cef012335
31 changed files with 199 additions and 203 deletions

View File

@@ -6642,7 +6642,7 @@ CheckUnownLetter: ; 3eb75
jr nc, .next
; Is our letter in the set?
ld hl, .LetterSets
ld hl, UnlockedUnownLetterSets
add hl, de
ld a, [hli]
ld h, [hl]
@@ -6663,7 +6663,7 @@ CheckUnownLetter: ; 3eb75
inc e
inc e
ld a, e
cp .Set1 - .LetterSets
cp UnlockedUnownLetterSets.End - UnlockedUnownLetterSets
jr c, .loop
; Hasn't been unlocked, or the letter is invalid
@@ -6675,26 +6675,8 @@ CheckUnownLetter: ; 3eb75
and a
ret
.LetterSets:
dw .Set1
dw .Set2
dw .Set3
dw .Set4
INCLUDE "data/wild/unlocked_unowns.asm"
.Set1:
; A B C D E F G H I J K
db 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, $ff
.Set2:
; L M N O P Q R
db 12, 13, 14, 15, 16, 17, 18, $ff
.Set3:
; S T U V W
db 19, 20, 21, 22, 23, $ff
.Set4:
; X Y Z
db 24, 25, 26, $ff
; 3ebc7
Unreferenced_SwapBattlerLevels: ; 3ebc7
push bc

View File

@@ -15,7 +15,7 @@ GetMobileOTTrainerClass: ; mobile function
.male_trainer_loop
srl c
ld a, c
cp MaleTrainersEnd - MaleTrainers - 1
cp MaleTrainers.End - MaleTrainers - 1
jr nc, .male_trainer_loop
inc c
@@ -33,7 +33,7 @@ GetMobileOTTrainerClass: ; mobile function
.female_trainer_loop
srl c
ld a, c
cp FemaleTrainersEnd - FemaleTrainers - 1
cp FemaleTrainers.End - FemaleTrainers - 1
jr nc, .female_trainer_loop
inc c

View File

@@ -288,7 +288,7 @@ Buena_PrizeMenu: ; 8b0e2
dba .prizepoints
; 8b129
NUM_BUENA_PRIZES EQU 9 ; ((BuenaPrizeItemsEnd - BuenaPrizeItems) / 2)
NUM_BUENA_PRIZES EQU 9 ; ((BuenaPrizeItems.End - BuenaPrizeItems) / 2)
.indices ; 8b129
db NUM_BUENA_PRIZES

View File

@@ -1,5 +1,5 @@
NUM_MOM_ITEMS_1 EQUS "((MomItems_1End - MomItems_1) / 8)"
NUM_MOM_ITEMS_2 EQUS "((MomItems_2End - MomItems_2) / 8)"
NUM_MOM_ITEMS_1 EQUS "((MomItems_1.End - MomItems_1) / 8)"
NUM_MOM_ITEMS_2 EQUS "((MomItems_2.End - MomItems_2) / 8)"
const_value = 1
const MOM_ITEM

View File

@@ -902,7 +902,7 @@ ShrinkPlayer: ; 610f
Intro_RotatePalettesLeftFrontpic: ; 616a
ld hl, IntroFadePalettes
ld b, IntroFadePalettesEnd - IntroFadePalettes
ld b, IntroFadePalettes.End - IntroFadePalettes
.loop
ld a, [hli]
call DmgToCgbBGPals
@@ -920,7 +920,7 @@ IntroFadePalettes: ; 0x617c
db %11111000
db %11110100
db %11100100
IntroFadePalettesEnd
.End
; 6182
Intro_WipeInFrontpic: ; 6182

View File

@@ -121,7 +121,7 @@ LoadMartPointer: ; 15b10
GetMart: ; 15b31
ld a, e
cp (MartsEnd - Marts) / 2
cp (Marts.End - Marts) / 2
jr c, .IsAMart
ld b, BANK(DefaultMart)
ld de, DefaultMart

View File

@@ -1279,7 +1279,7 @@ InitMysteryGiftLayout: ; 105153 (41:5153)
ld hl, MysteryGiftGFX
ld de, vTiles2 tile $00
ld a, BANK(MysteryGiftGFX)
ld bc, MysteryGiftGFXEnd - MysteryGiftGFX
ld bc, MysteryGiftGFX.End - MysteryGiftGFX
call FarCopyBytes
hlcoord 0, 0
ld a, $42
@@ -1412,7 +1412,7 @@ InitMysteryGiftLayout: ; 105153 (41:5153)
MysteryGiftGFX: ; 105258
INCBIN "gfx/mystery_gift/mystery_gift.2bpp"
MysteryGiftGFXEnd:
.End
Function105688: ; 105688 (41:5688)
call ClearTileMap

View File

@@ -123,7 +123,7 @@ PrepMysteryGiftDataToSend: ; 2c642 (b:4642)
MysteryGiftGetItemHeldEffect: ; 2c708 (b:4708)
ld a, c
cp MysteryGiftItemsEnd - MysteryGiftItems
cp MysteryGiftItems.End - MysteryGiftItems
jr nc, MysteryGiftFallbackItem
ld hl, MysteryGiftItems
ld b, 0
@@ -133,7 +133,7 @@ MysteryGiftGetItemHeldEffect: ; 2c708 (b:4708)
MysteryGiftGetDecoration: ; 2c715 (b:4715)
ld a, c
cp MysteryGiftDecosEnd - MysteryGiftDecos
cp MysteryGiftDecos.End - MysteryGiftDecos
jr nc, MysteryGiftFallbackItem
ld hl, MysteryGiftDecos
ld b, 0

View File

@@ -205,7 +205,7 @@ OaksPkmnTalk4:
.sample
call Random
and %11111
cp (OaksPkmnTalkRoutesEnd - OaksPkmnTalkRoutes) / 2
cp (OaksPkmnTalkRoutes.End - OaksPkmnTalkRoutes) / 2
jr nc, .sample
; We now have a number between 0 and 14.
ld hl, OaksPkmnTalkRoutes
@@ -1330,7 +1330,7 @@ PnP_odd:
PeoplePlaces6: ; Places
call Random
cp (PnP_HiddenPlacesEnd - PnP_HiddenPlaces) / 2
cp (PnP_HiddenPlaces.End - PnP_HiddenPlaces) / 2
jr nc, PeoplePlaces6
ld hl, PnP_HiddenPlaces
ld c, a

View File

@@ -1294,7 +1294,7 @@ Script_earthquake:
ld hl, EarthquakeMovement
ld de, wEarthquakeMovementDataBuffer
ld bc, EarthquakeMovementEnd - EarthquakeMovement
ld bc, EarthquakeMovement.End - EarthquakeMovement
call CopyBytes
call GetScriptByte
ld [wEarthquakeMovementDataBuffer + 1], a
@@ -1312,7 +1312,7 @@ EarthquakeMovement:
step_shake 16 ; the 16 gets overwritten with the script byte
step_sleep 16 ; the 16 gets overwritten with the lower 6 bits of the script byte
step_end
EarthquakeMovementEnd
.End
Script_loadpikachudata: