clean up bank 0; time-sensitive fns; add Predef fn

comment redone joypad functions + automated input
comment some uncommented functions
comment known hram addresses
try to clean up CalcMagikarpLength
label known addresses
add time-sensitive functions (rtc, palettes)
add Predef and PredefPointers
This commit is contained in:
padz 2012-12-23 03:21:19 -05:00
parent 8092f62cf4
commit eb4db4618f
3 changed files with 1503 additions and 197 deletions

View File

@ -3292,4 +3292,25 @@ BATTLETYPE_ROAMING EQU $05
BATTLETYPE_SHINY EQU $07 BATTLETYPE_SHINY EQU $07
BATTLETYPE_TREE EQU $08 BATTLETYPE_TREE EQU $08
BATTLETYPE_FORCEITEM EQU $0a BATTLETYPE_FORCEITEM EQU $0a
BATTLETYPE_SUICUNE EQU $0c BATTLETYPE_SUICUNE EQU $0c
; joypad
NO_INPUT EQU %00000000
BUTTON_A EQU %00000001
BUTTON_B EQU %00000010
SELECT EQU %00000100
START EQU %00001000
D_RIGHT EQU %00010000
D_LEFT EQU %00100000
D_UP EQU %01000000
D_DOWN EQU %10000000
; mbc
NUM_SRAM_BANKS EQU 4
; provisional wram bank 5 labels
Unkn1Pals EQU $d000 ; 8 4-color palettes little endian)
Unkn2Pals EQU $d040 ; 8 4-color palettes little endian)
BGPals EQU $d080 ; 8 4-color palettes little endian)
OBPals EQU $d0c0 ; 8 4-color palettes little endian)

1623
main.asm

File diff suppressed because it is too large Load Diff

View File

@ -283,10 +283,28 @@ CurMusic: ; c2c0
; id of music currently playing ; id of music currently playing
ds 1 ds 1
SECTION "auto",BSS[$c2c7]
InputType: ; c2c7
; 00 normal
; ff auto
ds 1
AutoInputAddress: ; c2c8
ds 2
AutoInputBank: ; c2ca
ds 1
AutoInputLength: ; c2cb
ds 1
SECTION "linkbattle",BSS[$c2dc] SECTION "linkbattle",BSS[$c2dc]
InLinkBattle: ; c2dc InLinkBattle: ; c2dc
ds 1 ; nonzero when in a link battle ; 0 not in link battle
; 1 link battle
; 4 mobile battle
ds 1
SECTION "scriptengine",BSS[$c2dd]
ScriptVar: ; c2dd
ds 1
SECTION "tiles",BSS[$c2fa] SECTION "tiles",BSS[$c2fa]
@ -652,10 +670,17 @@ TileX: ; cf83
SECTION "VBlank",BSS[$cfb3] SECTION "VBlank",BSS[$cfb2]
TextDelayFrames: ; cfb2
ds 1
VBlankOccurred: ; cfb3 VBlankOccurred: ; cfb3
ds 1 ds 1
ds 8
GameTimerPause: ; cfbc
; bit 0
ds 1
SECTION "Engine",BSS[$cfc2] SECTION "Engine",BSS[$cfc2]
FXAnimID: FXAnimID:
@ -674,7 +699,8 @@ TileAnimationTimer: ; cfc6
Options: ; cfcc Options: ; cfcc
; bit 0-2: number of frames to delay when printing text ; bit 0-2: number of frames to delay when printing text
; fast 1; mid 3; slow 5 ; fast 1; mid 3; slow 5
; bit 3-4: unused ; bit 3: ?
; bit 4: no text delay
; bit 5: stereo off/on ; bit 5: stereo off/on
; bit 6: battle style shift/set ; bit 6: battle style shift/set
; bit 7: battle scene off/on ; bit 7: battle scene off/on
@ -902,9 +928,10 @@ CurBaseStats: ; d236
SECTION "TimeOfDay",BSS[$d269] SECTION "TimeOfDay",BSS[$d269]
TimeOfDay: ; d269 TimeOfDay: ; d269
; 0 if morn ; 0 morn
; 1 if day ; 1 day
; 2 if nite ; 2 nite
; 3 darkness
ds 1 ds 1
SECTION "OtherTrainerParty",BSS[$d280] SECTION "OtherTrainerParty",BSS[$d280]
@ -1460,7 +1487,7 @@ StartSecond: ; d4b9
GameTimeCap: ; d4c3 GameTimeCap: ; d4c3
ds 1 ds 1
GameTimeHours: ; 14c4 GameTimeHours: ; d4c4
ds 2 ds 2
GameTimeMinutes: ; d4c6 GameTimeMinutes: ; d4c6
ds 1 ds 1
@ -1489,7 +1516,18 @@ PlayerDirection: ; d4de
; $11 right ; $11 right
ds 1 ds 1
SECTION "Status",BSS[$d84e] SECTION "Status",BSS[$d841]
TimeOfDayPal: ; d841
ds 1
ds 4
; d846
ds 1
ds 1
CurTimeOfDay: ; d848
ds 1
ds 5
Money: ; d84e Money: ; d84e
ds 3 ds 3