mirror of
https://github.com/pret/pokegold-spaceworld.git
synced 2026-10-01 21:06:56 -05:00
2
Makefile
2
Makefile
@@ -21,7 +21,7 @@ CORRECTEDROM := $(ROM:%.gb=%-correctheader.gb)
|
||||
|
||||
rwildcard = $(foreach d, $(wildcard $1*), $(filter $(subst *, %, $2), $d) $(call rwildcard, $d/, $2))
|
||||
DIRS := home engine data audio
|
||||
OBJS := $(addprefix $(BUILD)/, gfx.o sram.o wram.o hram.o shim.o)
|
||||
OBJS := $(addprefix $(BUILD)/, gfx.o vram.o sram.o wram.o hram.o shim.o)
|
||||
OBJS += $(patsubst %.asm, $(BUILD)/%.o, $(call rwildcard, $(DIRS), *.asm))
|
||||
|
||||
GFX := $(patsubst %.png, $(BUILD)/%.2bpp, \
|
||||
|
||||
@@ -22,6 +22,7 @@ INCLUDE "constants/palette_constants.asm"
|
||||
INCLUDE "constants/music_constants.asm"
|
||||
INCLUDE "constants/landmark_constants.asm"
|
||||
INCLUDE "constants/map_constants.asm"
|
||||
INCLUDE "constants/map_setup_constants.asm"
|
||||
INCLUDE "constants/tileset_constants.asm"
|
||||
INCLUDE "constants/map_data_constants.asm"
|
||||
|
||||
@@ -31,3 +32,4 @@ INCLUDE "constants/misc_constants.asm"
|
||||
|
||||
INCLUDE "constants/battle_anim_constants.asm"
|
||||
INCLUDE "constants/menu_constants.asm"
|
||||
INCLUDE "constants/wram_constants.asm"
|
||||
|
||||
10
constants/map_setup_constants.asm
Normal file
10
constants/map_setup_constants.asm
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
const_def $f1
|
||||
const MAPSETUP_CONTINUE ; $f1
|
||||
const MAPSETUP_F2
|
||||
const MAPSETUP_RELOADMAP ; $f3
|
||||
const MAPSETUP_F4
|
||||
const MAPSETUP_F5 ; Note: entry is duplicate of $F4
|
||||
const MAPSETUP_WARP ; $f6
|
||||
const MAPSETUP_CONNECTION ; $f7
|
||||
const MAPSETUP_F8
|
||||
8
constants/wram_constants.asm
Normal file
8
constants/wram_constants.asm
Normal file
@@ -0,0 +1,8 @@
|
||||
; wWalkingDirection::
|
||||
const_def -1
|
||||
const STANDING ; -1
|
||||
const DOWN ; 0
|
||||
const UP ; 1
|
||||
const LEFT ; 2
|
||||
const RIGHT ; 3
|
||||
NUM_DIRECTIONS EQU const_value
|
||||
1859
home/map.asm
1859
home/map.asm
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,4 @@
|
||||
INCLUDE "constants.asm"
|
||||
INCLUDE "vram.asm"
|
||||
|
||||
SECTION "Copy Routines used by VBlank ISR", ROM0[$123a]
|
||||
|
||||
|
||||
@@ -309,6 +309,7 @@ map_object: MACRO
|
||||
\1ObjectRange:: ds 1
|
||||
\1ObjectScript:: ds 2
|
||||
\1ObjectEventFlag:: ds 2
|
||||
\1ObjectUnused::
|
||||
ds 2
|
||||
endm
|
||||
|
||||
|
||||
12
shim.sym
12
shim.sym
@@ -18,8 +18,6 @@
|
||||
00:1D2D MenuBoxCoord2Tile
|
||||
00:202C Function202c
|
||||
|
||||
00:23DC LoadWildMons
|
||||
00:23E5 FadeIn ; This is not OverworldFadeIn, but I don't know what it is
|
||||
00:2C05 StartMenuCheck
|
||||
00:3171 Function3171
|
||||
00:3621 WaitBGMap
|
||||
@@ -49,6 +47,7 @@
|
||||
|
||||
|
||||
01:4031 Function4031
|
||||
01:5190 _UpdateSprites
|
||||
01:53CC MainMenu
|
||||
01:5D27 Function5d27
|
||||
01:6114 TitleScreenInputAndTimeout
|
||||
@@ -72,6 +71,7 @@
|
||||
|
||||
03:4791 DebugWarp
|
||||
03:479F DebugWarp.Destinations
|
||||
03:488D Tilesets
|
||||
03:4D33 Functioncd33
|
||||
03:4D6F Functioncd6f
|
||||
03:4DE3 Functioncde3
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
05:4000 Function14000
|
||||
05:400A GetPlayerSprite
|
||||
05:4036 AddMapSprites
|
||||
05:4036 RefreshSprites
|
||||
05:404C CheckInteriorMap
|
||||
05:405B AddIndoorSprites
|
||||
05:40AA AddOutdoorSprites
|
||||
@@ -126,6 +126,8 @@
|
||||
|
||||
0B:5663 Function2d663
|
||||
|
||||
0C:7C00 CommonExteriorTiles
|
||||
|
||||
0E:4B78 LoadTrainerClassName
|
||||
0E:4BA0 LoadTrainerClassName.got_name
|
||||
0E:4BA9 LoadTrainerClass
|
||||
@@ -447,6 +449,7 @@
|
||||
3F:6750 PicTestMenu
|
||||
3F:6755 PicTestMenu.loop
|
||||
|
||||
00:CB6F wPlayerStepDirection
|
||||
00:CC22 wMenuData3
|
||||
00:CE67 wPlayerName
|
||||
|
||||
@@ -456,7 +459,6 @@
|
||||
01:D264 wPlayerBikeSurfState
|
||||
; The starting house's map script number is stored at d29a. Others are probably nearby.
|
||||
01:D35F wOptions
|
||||
01:D656 wMapGroup
|
||||
01:D657 wMapId
|
||||
01:D513 wWarpNumber
|
||||
01:D7D2 wPartyMonOT
|
||||
01:DA3B wOTPartyMonOT
|
||||
|
||||
77
vram.asm
77
vram.asm
@@ -1,21 +1,64 @@
|
||||
vChars0 EQU $8000
|
||||
vChars1 EQU $8800
|
||||
vChars2 EQU $9000
|
||||
vBGMap0 EQU $9800
|
||||
vBGMap1 EQU $9c00
|
||||
INCLUDE "constants.asm"
|
||||
|
||||
; Battle/Menu
|
||||
vSprites EQU vChars0
|
||||
vFont EQU vChars1
|
||||
vFrontPic EQU vChars2
|
||||
vBackPic EQU vFrontPic + 7 * 7 * $10
|
||||
SECTION "VRAM", VRAM[$8000],BANK[0] ; Get around a RGBLINK bug. Remove this when it doesn't yield an error about fixing the section
|
||||
|
||||
; Overworld
|
||||
vNPCSprites EQU vChars0
|
||||
vNPCSprites2 EQU vChars1
|
||||
vTileset EQU vChars2
|
||||
UNION
|
||||
|
||||
; Title
|
||||
vTitleLogo EQU vChars1
|
||||
vTitleLogo2 EQU vFrontPic + 7 * 7 * $10
|
||||
vChars0:: ; 8000
|
||||
ds $80 tiles
|
||||
|
||||
vChars1:: ; 8800
|
||||
ds $80 tiles
|
||||
|
||||
vChars2:: ; 9000
|
||||
ds $80 tiles
|
||||
|
||||
NEXTU
|
||||
|
||||
; Battle/menu
|
||||
vSprites:: ; 8000
|
||||
ds $80 tiles
|
||||
|
||||
vFont:: ; 8800
|
||||
ds $80 tiles
|
||||
|
||||
vFrontPic:: ; 9000
|
||||
ds 7 * 7 tiles
|
||||
|
||||
NEXTU
|
||||
|
||||
vNPCSprites:: ; 8000
|
||||
ds $80 tiles
|
||||
|
||||
vNPCSprites2:: ; 8800
|
||||
ds $80 tiles
|
||||
|
||||
vTileset:: ; 9000
|
||||
; ds $60 tiles
|
||||
ds $20 tiles
|
||||
|
||||
vExteriorTileset:: ; 9200
|
||||
ds $40 tiles
|
||||
vTilesetEnd:: ; 9600
|
||||
|
||||
NEXTU
|
||||
|
||||
ds $80 tiles
|
||||
|
||||
vTitleLogo:: ; 8800
|
||||
ds $80 tiles
|
||||
|
||||
;vFrontPic:: ; 9000
|
||||
ds 7 * 7 tiles
|
||||
|
||||
vTitleLogo2:: ; 9310
|
||||
; TODO: what size?
|
||||
|
||||
ENDU
|
||||
|
||||
|
||||
vBGMap0:: ; 9800
|
||||
ds BG_MAP_WIDTH * BG_MAP_HEIGHT
|
||||
|
||||
vBGMap1:: ; 9c00
|
||||
ds BG_MAP_WIDTH * BG_MAP_HEIGHT
|
||||
51
wram.asm
51
wram.asm
@@ -94,7 +94,7 @@ wWhichPicTest:: ; c40b
|
||||
ENDU
|
||||
|
||||
|
||||
SECTION "Unknown map buffer?", WRAM0[$C5E8]
|
||||
SECTION "Map buffer", WRAM0[$C5E8]
|
||||
|
||||
wMapBuffer::
|
||||
wMapScriptNumber:: db ; c5e8
|
||||
@@ -106,9 +106,9 @@ wMapBufferEnd:: ; c600
|
||||
|
||||
UNION
|
||||
|
||||
wOverworldMapBlocks:: ; c600
|
||||
wOverworldMap:: ; c600
|
||||
ds $514 ; TODO: constantify this
|
||||
wOverworldMapBlocksEnd:: ; cb14
|
||||
wOverworldMapEnd:: ; cb14
|
||||
|
||||
NEXTU
|
||||
|
||||
@@ -246,6 +246,9 @@ wTileUp:: db ; cb91
|
||||
wTileLeft:: db ; cb92
|
||||
wTileRight:: db ; cb93
|
||||
|
||||
wScreenSave:: ; cb94
|
||||
ds 6 * 5
|
||||
|
||||
SECTION "CBD2", WRAM0[$CBD2]
|
||||
wcbd2:: ; cbd2
|
||||
ds $14
|
||||
@@ -310,10 +313,10 @@ wSGB:: ; cc40
|
||||
|
||||
SECTION "CC9C", WRAM0[$CC9C]
|
||||
|
||||
wUnknownWordCC9C:: ; cc9c
|
||||
wUnknownWordcc9c:: ; cc9c
|
||||
dw
|
||||
|
||||
wUnknownBufferCC9E:: ; cc9e
|
||||
wUnknownBuffercc9e:: ; cc9e
|
||||
ds 14
|
||||
|
||||
|
||||
@@ -418,11 +421,13 @@ wLinkMode:: db ; cdbd
|
||||
; 02 -
|
||||
; 03 -
|
||||
|
||||
wTargetMapUnk:: db ; cdbe ; TODO: Probably warp ID, check
|
||||
wTargetMapGroup:: db ; cdbf
|
||||
wTargetMapId:: db ; cdc0
|
||||
; cdc1
|
||||
ds $c
|
||||
wNextWarp:: db ; cdbe
|
||||
wNextMapGroup:: db ; cdbf
|
||||
wNextMapId:: db ; cdc0
|
||||
wPrevWarp:: db ; cdc1
|
||||
|
||||
ds 11
|
||||
|
||||
wLinkBattleRNs:: ds 10 ; cdcd
|
||||
; cddd
|
||||
|
||||
@@ -544,10 +549,11 @@ wObjectFollow_Follower:: ; ce77
|
||||
db
|
||||
|
||||
|
||||
SECTION "Object structs", WRAM0[$CECF]
|
||||
SECTION "Object structs", WRAM0[$CEA7]
|
||||
|
||||
wObjectStructs:: ; cecf
|
||||
wObjectStructs:: ; cea7
|
||||
wPlayerStruct:: object_struct wPlayer
|
||||
wObject0Struct:: object_struct wObject0
|
||||
wObject1Struct:: object_struct wObject1
|
||||
wObject2Struct:: object_struct wObject2
|
||||
wObject3Struct:: object_struct wObject3
|
||||
@@ -557,7 +563,17 @@ wObject6Struct:: object_struct wObject6
|
||||
wObject7Struct:: object_struct wObject7
|
||||
wObjectStructsEnd:: ; d00f
|
||||
|
||||
SECTION "Objects", WRAM0[$D04F]
|
||||
; TODO: there are 4 structs of 16 bytes here,
|
||||
; cleared by ClearObjectStructs.
|
||||
; What are they?
|
||||
; d00f
|
||||
ds 16
|
||||
; d01f
|
||||
ds 16
|
||||
; d02f
|
||||
ds 16
|
||||
; d03f
|
||||
ds 16
|
||||
|
||||
wMapObjects:: ; d04f
|
||||
wPlayerObject:: map_object wPlayer
|
||||
@@ -669,7 +685,10 @@ wUsedSprites:: ; d645
|
||||
wUsedSpritesEnd:: ; d651
|
||||
|
||||
|
||||
SECTION "Map header", WRAM0[$D658]
|
||||
SECTION "Map header", WRAM0[$D656]
|
||||
|
||||
wMapGroup:: db ; d656
|
||||
wMapId:: db ; d657
|
||||
|
||||
wOverworldMapAnchor:: ; d658
|
||||
dw
|
||||
@@ -677,8 +696,8 @@ wOverworldMapAnchor:: ; d658
|
||||
wYCoord:: db ; d65a
|
||||
wXCoord:: db ; d65b
|
||||
|
||||
wMetaTileStandingY:: db ; d65c
|
||||
wMetaTileStandingX:: db ; d65d
|
||||
wMetatileStandingY:: db ; d65c
|
||||
wMetatileStandingX:: db ; d65d
|
||||
|
||||
; d65f
|
||||
ds 1 ; TODO
|
||||
|
||||
Reference in New Issue
Block a user