start using relevant constants in wram.asm

This commit is contained in:
yenatch 2013-07-02 14:10:49 -04:00
parent 425b727784
commit dca6fd37cd
5 changed files with 105 additions and 134 deletions

View File

@ -9953,7 +9953,7 @@ Function0x377f5: ; 377f5
ld [$d123], a ld [$d123], a
ld a, [hl] ld a, [hl]
ld [$d124], a ld [$d124], a
ld a, $3 ld a, 3
ld [MonType], a ld [MonType], a
ld a, $14 ld a, $14
ld hl, $4bdd ld hl, $4bdd

View File

@ -184,22 +184,6 @@ ICON_SUDOWOODO EQU $25
ICON_BIGMON EQU $26 ICON_BIGMON EQU $26
; days of the week
SUNDAY EQU 0
MONDAY EQU 1
TUESDAY EQU 2
WEDNESDAY EQU 3
THURSDAY EQU 4
FRIDAY EQU 5
SATURDAY EQU 6
; time of day
MORN EQU 0
DAY EQU 1
NITE EQU 2
DARKNESS EQU 3
; evolution types ; evolution types
EVOLVE_LEVEL EQU 1 EVOLVE_LEVEL EQU 1
EVOLVE_ITEM EQU 2 EVOLVE_ITEM EQU 2
@ -220,23 +204,6 @@ ATK_LT_DEF EQU 2
ATK_EQ_DEF EQU 3 ATK_EQ_DEF EQU 3
; main menu
CONTINUE EQU 0
NEW_GAME EQU 1
OPTION EQU 2
MYSTERY_GIFT EQU 3
MOBILE EQU 4
MOBILE_STUDIUM EQU 5
; kris's pc menu items
WITHDRAW_ITEM EQU 0
DEPOSIT_ITEM EQU 1
TOSS_ITEM EQU 2
MAIL_BOX EQU 3
DECORATION EQU 4
TURN_OFF EQU 5
LOG_OFF EQU 6
; name length ; name length
PLAYER_NAME_LENGTH EQU 8 PLAYER_NAME_LENGTH EQU 8
PKMN_NAME_LENGTH EQU 11 PKMN_NAME_LENGTH EQU 11
@ -258,20 +225,10 @@ SET_FLAG EQU 1
CHECK_FLAG EQU 2 CHECK_FLAG EQU 2
; player states
PLAYER_NORMAL EQU 0
PLAYER_BIKE EQU 1
PLAYER_SLIP EQU 2
PLAYER_SURF EQU 4
PLAYER_SURF_PIKA EQU 8
; joypad ; joypad
BUTTONS EQU %00010000 BUTTONS EQU %00010000
D_PAD EQU %00100000 D_PAD EQU %00100000
AUTO_INPUT EQU $ff
NO_INPUT EQU %00000000 NO_INPUT EQU %00000000
BUTTON_A EQU %00000001 BUTTON_A EQU %00000001
BUTTON_B EQU %00000010 BUTTON_B EQU %00000010
@ -284,12 +241,6 @@ D_DOWN EQU %10000000
; movement ; movement
STANDING EQU -1
DOWN EQU 0
UP EQU 1
LEFT EQU 2
RIGHT EQU 3
STEP_SLOW EQU 0 STEP_SLOW EQU 0
STEP_WALK EQU 1 STEP_WALK EQU 1
STEP_BIKE EQU 2 STEP_BIKE EQU 2
@ -299,19 +250,4 @@ STEP_TURN EQU 5
STEP_BACK_LEDGE EQU 6 STEP_BACK_LEDGE EQU 6
STEP_WALK_IN_PLACE EQU 7 STEP_WALK_IN_PLACE EQU 7
; facing
FACE_CURRENT EQU 0
FACE_DOWN EQU 8
FACE_UP EQU 4
FACE_LEFT EQU 2
FACE_RIGHT EQU 1
; Provisional wram bank 5 labels:
; 8 4-color palettes
Unkn1Pals EQU $d000
Unkn2Pals EQU $d040
BGPals EQU $d080
OBPals EQU $d0c0

View File

@ -448,7 +448,7 @@ ParkBall: ; e8a2
xor a xor a
ld [CurPartyMon], a ld [CurPartyMon], a
ld a, $2 ld a, BOXMON
ld [MonType], a ld [MonType], a
ld de, $d050 ld de, $d050
ld b, $0 ld b, $0
@ -775,7 +775,7 @@ Function_0xed12: ; ed12
push de push de
ld a, [TempEnemyMonSpecies] ld a, [TempEnemyMonSpecies]
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld a, $4 ld a, WILDMON
ld [MonType], a ld [MonType], a
ld a, $14 ld a, $14
ld hl, $4bdd ld hl, $4bdd

View File

@ -8200,7 +8200,8 @@ INCBIN "baserom.gbc", $12cdf, $12e00 - $12cdf
OpenPartyStats: ; 12e00 OpenPartyStats: ; 12e00
call $1d6e call $1d6e
call ClearSprites call ClearSprites
xor a ; partymon ; PartyMon
xor a
ld [MonType], a ld [MonType], a
call LowVolume call LowVolume
ld a, $25 ld a, $25
@ -8255,7 +8256,7 @@ INCBIN "baserom.gbc", $14000, $14032 - $14000
GetTimeOfDay: ; 14032 GetTimeOfDay: ; 14032
; get time of day based on the current hour ; get time of day based on the current hour
ld a, [hHours] ; hour ld a, [hHours] ; hour
ld hl, TimeOfDayTable ld hl, TimesOfDay
.check .check
; if we're within the given time period, ; if we're within the given time period,
@ -8276,14 +8277,13 @@ GetTimeOfDay: ; 14032
ret ret
; 14044 ; 14044
TimeOfDayTable: ; 14044 TimesOfDay: ; 14044
; boundaries for the time of day ; hours for the time of day
; 04-09 morn | 10-17 day | 18-03 nite ; 04-09 morn | 10-17 day | 18-03 nite
; hr, time of day db 04, NITE
db 04, $02 ; NITE db 10, MORN
db 10, $00 ; MORN db 18, DAY
db 18, $01 ; DAY db 24, NITE
db 24, $02 ; NITE
; 1404c ; 1404c
INCBIN "baserom.gbc", $1404c, $152ab - $1404c INCBIN "baserom.gbc", $1404c, $152ab - $1404c
@ -8324,7 +8324,7 @@ INCBIN "baserom.gbc", $1531f, $15736 - $1531f
KrissPCMenuData: ; 0x15736 KrissPCMenuData: ; 0x15736
db %01000000 db %01000000
db 0, 0 ; top left corner coords (y, x) db 0, 0 ; top left corner coords (y, x)
db $c, $f ; bottom right corner coords (y, x) db 12, 15 ; bottom right corner coords (y, x)
dw .KrissPCMenuData2 dw .KrissPCMenuData2
db 1 ; default selected option db 1 ; default selected option
@ -8337,35 +8337,29 @@ KrissPCMenuData: ; 0x15736
dw .KrissPCMenuPointers dw .KrissPCMenuPointers
.KrissPCMenuPointers ; 0x15746 .KrissPCMenuPointers ; 0x15746
dw KrisWithdrawItemMenu ; 57d1 dw KrisWithdrawItemMenu, .WithdrawItem
dw .WithdrawItem dw KrisDepositItemMenu, .DepositItem
dw KrisDepositItemMenu ; 588b dw KrisTossItemMenu, .TossItem
dw .DepositItem dw KrisMailBoxMenu, .MailBox
dw KrisTossItemMenu ; 585f dw KrisDecorationMenu, .Decoration
dw .TossItem dw KrisLogOffMenu, .LogOff
dw KrisMailBoxMenu ; 587d dw KrisLogOffMenu, .TurnOff
dw .MailBox
dw KrisDecorationMenu ; 597d
dw .Decoration
dw KrisLogOffMenu ; 5888
dw .LogOff
dw KrisLogOffMenu ; 5888
dw .TurnOff
.WithdrawItem .WithdrawItem db "WITHDRAW ITEM@"
db "WITHDRAW ITEM@" .DepositItem db "DEPOSIT ITEM@"
.DepositItem .TossItem db "TOSS ITEM@"
db "DEPOSIT ITEM@" .MailBox db "MAIL BOX@"
.TossItem .Decoration db "DECORATION@"
db "TOSS ITEM@" .TurnOff db "TURN OFF@"
.MailBox .LogOff db "LOG OFF@"
db "MAIL BOX@"
.Decoration WITHDRAW_ITEM EQU 0
db "DECORATION@" DEPOSIT_ITEM EQU 1
.TurnOff TOSS_ITEM EQU 2
db "TURN OFF@" MAIL_BOX EQU 3
.LogOff DECORATION EQU 4
db "LOG OFF@" TURN_OFF EQU 5
LOG_OFF EQU 6
.KrissPCMenuList1 .KrissPCMenuList1
db 5 db 5
@ -8374,7 +8368,7 @@ KrissPCMenuData: ; 0x15736
db TOSS_ITEM db TOSS_ITEM
db MAIL_BOX db MAIL_BOX
db TURN_OFF db TURN_OFF
db $FF db $ff
.KrissPCMenuList2 .KrissPCMenuList2
db 6 db 6
@ -8384,7 +8378,7 @@ KrissPCMenuData: ; 0x15736
db MAIL_BOX db MAIL_BOX
db DECORATION db DECORATION
db LOG_OFF db LOG_OFF
db $FF db $ff
INCBIN "baserom.gbc", $157bb, $157d1 - $157bb INCBIN "baserom.gbc", $157bb, $157d1 - $157bb
@ -12010,6 +12004,13 @@ Label49d60: ; 0x49d60
dw $5efc ; XXX is this MobileASM? dw $5efc ; XXX is this MobileASM?
dw $6496 ; XXX is this MobileStudiumASM? dw $6496 ; XXX is this MobileStudiumASM?
CONTINUE EQU 0
NEW_GAME EQU 1
OPTION EQU 2
MYSTERY_GIFT EQU 3
MOBILE EQU 4
MOBILE_STUDIUM EQU 5
NewGameMenu: ; 0x49d6c NewGameMenu: ; 0x49d6c
db 2 db 2
db NEW_GAME db NEW_GAME
@ -13358,7 +13359,7 @@ GetGender: ; 50bdd
; BoxMon data is read directly from SRAM. ; BoxMon data is read directly from SRAM.
ld a, [MonType] ld a, [MonType]
cp 2 cp BOXMON
ld a, 1 ld a, 1
call z, GetSRAMBank call z, GetSRAMBank
@ -13376,8 +13377,8 @@ GetGender: ; 50bdd
ld b, a ld b, a
; Close SRAM if we were dealing with a BoxMon. ; Close SRAM if we were dealing with a BoxMon.
ld a, [MonType] ; MonType ld a, [MonType]
cp 2 ; BOXMON cp BOXMON
call z, CloseSRAM call z, CloseSRAM

View File

@ -10,12 +10,14 @@ SECTION "bgmap1",VRAM[$9C00]
VBGMap1: VBGMap1:
; So far, WRAM banks 0 and 1 are included in this file. ; WRAM banks 0 and 1 are included as BSS labels.
; Any bank 2-7 labels are in constants.asm. ; Other WRAM banks (2-7) are constants for now.
SECTION "WRAMBank0",BSS[$c000]
SECTION "stack",BSS[$c000] SECTION "stack",BSS[$c000]
ds 256 ds $100
Stack: ; c100 Stack: ; c100
@ -65,10 +67,7 @@ Channel1MusicAddress: ; c107
Channel1LastMusicAddress: ; c109 Channel1LastMusicAddress: ; c109
ds 2 ds 2
; could have been meant as a third-level address ; could have been meant as a third-level address
; unused? ; c10b ds 2
ds 1
; unused? ; c10c
ds 1
Channel1NoteFlags: ; c10d Channel1NoteFlags: ; c10d
; 0: ; 0:
; 1: ; 1:
@ -312,8 +311,7 @@ CurMusic: ; c2c0
SECTION "auto",BSS[$c2c7] SECTION "auto",BSS[$c2c7]
InputType: ; c2c7 InputType: ; c2c7
; 00 normal AUTO_INPUT EQU $ff
; ff auto
ds 1 ds 1
AutoInputAddress: ; c2c8 AutoInputAddress: ; c2c8
ds 2 ds 2
@ -824,11 +822,10 @@ AttrMap: ; cdd9
ds 30 ds 30
MonType: ; cf5f MonType: ; cf5f
; 0 partymon PARTYMON EQU 0
; 1 otpartymon OTPARTYMON EQU 1
; 2 boxmon BOXMON EQU 2
; 3 ????mon WILDMON EQU 4
; 4 wildmon
ds 1 ds 1
CurSpecies: ; cf60 CurSpecies: ; cf60
@ -907,7 +904,9 @@ Options2: ; cfd1
ds 46 ds 46
; d000
SECTION "WRAMBank1",BSS[$d000]
ds 2 ds 2
DefaultFlypoint: ; d002 DefaultFlypoint: ; d002
@ -937,10 +936,23 @@ CurFruit: ; d03f
MovementAnimation: ; d042 MovementAnimation: ; d042
ds 1 ds 1
WalkingDirection: ; d043 WalkingDirection: ; d043
STANDING EQU -1
DOWN EQU 0
UP EQU 1
LEFT EQU 2
RIGHT EQU 3
ds 1 ds 1
FacingDirection: ; d044 FacingDirection: ; d044
FACE_CURRENT EQU 0
FACE_DOWN EQU 8
FACE_UP EQU 4
FACE_LEFT EQU 2
FACE_RIGHT EQU 1
ds 1 ds 1
WalkingX: ; d045 WalkingX: ; d045
ds 1 ds 1
WalkingY: ; d046 WalkingY: ; d046
@ -1378,10 +1390,10 @@ CurDamage: ; d256
SECTION "TimeOfDay",BSS[$d269] SECTION "TimeOfDay",BSS[$d269]
TimeOfDay: ; d269 TimeOfDay: ; d269
; 0 morn MORN EQU 0
; 1 day DAY EQU 1
; 2 nite NITE EQU 2
; 3 darkness DARKNESS EQU 3
ds 1 ds 1
SECTION "OTParty",BSS[$d280] SECTION "OTParty",BSS[$d280]
@ -1568,6 +1580,13 @@ GameTimeFrames: ; d4c8
ds 2 ds 2
CurDay: ; d4cb CurDay: ; d4cb
SUNDAY EQU 0
MONDAY EQU 1
TUESDAY EQU 2
WEDNESDAY EQU 3
THURSDAY EQU 4
FRIDAY EQU 5
SATURDAY EQU 6
ds 1 ds 1
ds 12 ds 12
@ -1660,10 +1679,11 @@ Balls: ; d8d8
SECTION "overworld",BSS[$d95d] SECTION "overworld",BSS[$d95d]
PlayerState: ; d95d PlayerState: ; d95d
; $00: normal PLAYER_NORMAL EQU 0
; $01: bicycle PLAYER_BIKE EQU 1
; $04: surf PLAYER_SLIP EQU 2
; $08: surf (pikachu) PLAYER_SURF EQU 4
PLAYER_SURF_PIKA EQU 8
ds 1 ds 1
SECTION "scriptram",BSS[$d962] SECTION "scriptram",BSS[$d962]
@ -2005,3 +2025,17 @@ RoamMon3CurHP: ; dfe1
ds 1 ds 1
RoamMon3DVs: ; dfe2 RoamMon3DVs: ; dfe2
ds 2 ds 2
; SECTION "WRAMBank5",BSS[$d000]
; 8 4-color palettes
Unkn1Pals EQU $d000
Unkn2Pals EQU $d040
BGPals EQU $d080
OBPals EQU $d0c0