mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-13 07:03:40 +01:00
Decompile cable_car.c (#438)
This commit is contained in:
parent
342d23e0ba
commit
a7722a0b93
2882
asm/cable_car.s
2882
asm/cable_car.s
File diff suppressed because it is too large
Load Diff
106
data/cable_car.s
106
data/cable_car.s
@ -1,106 +0,0 @@
|
|||||||
#include "constants/event_objects.h"
|
|
||||||
.include "asm/macros.inc"
|
|
||||||
.include "constants/constants.inc"
|
|
||||||
|
|
||||||
.section .rodata
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gUnknown_085CD66C:: @ 85CD66C
|
|
||||||
.4byte 0x000011c0, 0x000021d1, 0x000031e2, 0x000001f3
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gCableCarMtChimneyTilemap:: @ 85CD67C
|
|
||||||
.incbin "graphics/misc/cable_car_mt_chimney_map.bin.lz"
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gCableCarTreeTilemap:: @ 85CD7D4
|
|
||||||
.incbin "graphics/misc/cable_car_tree_map.bin.lz"
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gCableCarMountainTilemap:: @ 85CD958
|
|
||||||
.incbin "graphics/misc/cable_car_mountain_map.bin.lz"
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gCableCarPylonHookTilemapEntries:: @ 85CDB1C
|
|
||||||
.2byte 0x3000
|
|
||||||
.2byte 0x3001
|
|
||||||
.2byte 0x3002
|
|
||||||
.2byte 0x3003
|
|
||||||
.2byte 0x3004
|
|
||||||
.2byte 0x3005
|
|
||||||
.2byte 0x3006
|
|
||||||
.2byte 0x3007
|
|
||||||
.2byte 0x3008
|
|
||||||
.2byte 0x3009
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gCableCarPylonStemTilemap:: @ 85CDB30
|
|
||||||
.incbin "graphics/misc/cable_car_pylon_stem_map.bin.lz"
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gUnknown_085CDB54:: @ 85CDB54
|
|
||||||
obj_tiles gCableCar_Gfx, 0x800, 1
|
|
||||||
obj_tiles gCableCarDoor_Gfx, 0x40, 2
|
|
||||||
obj_tiles gCableCarCord_Gfx, 0x80, 3
|
|
||||||
null_obj_tiles
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gUnknown_085CDB74:: @ 85CDB74
|
|
||||||
obj_pal gCableCar_Pal, 1
|
|
||||||
null_obj_pal
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gOamData_85CDB84:: @ 85CDB84
|
|
||||||
.2byte 0x0300
|
|
||||||
.2byte 0xC000
|
|
||||||
.2byte 0x0800
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gOamData_85CDB8C:: @ 85CDB8C
|
|
||||||
.2byte 0x4300
|
|
||||||
.2byte 0x0000
|
|
||||||
.2byte 0x0800
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gOamData_85CDB94:: @ 85CDB94
|
|
||||||
.2byte 0x0300
|
|
||||||
.2byte 0x4000
|
|
||||||
.2byte 0x0800
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gSpriteTemplate_85CDB9C:: @ 85CDB9C
|
|
||||||
spr_template 1, 1, gOamData_85CDB84, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8150868
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gSpriteTemplate_85CDBB4:: @ 85CDBB4
|
|
||||||
spr_template 2, 1, gOamData_85CDB8C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8150868
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gSpriteTemplate_85CDBCC:: @ 85CDBCC
|
|
||||||
spr_template 3, 1, gOamData_85CDB94, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, nullsub_58
|
|
||||||
|
|
||||||
gCableCarPlayerGraphicsIDs:: @ 85CDBE4
|
|
||||||
.byte EVENT_OBJ_GFX_RIVAL_BRENDAN_NORMAL
|
|
||||||
.byte EVENT_OBJ_GFX_RIVAL_MAY_NORMAL
|
|
||||||
|
|
||||||
gMtChimneyHikerGraphicsIDs:: @ 85CDBE6
|
|
||||||
.byte EVENT_OBJ_GFX_HIKER
|
|
||||||
.byte EVENT_OBJ_GFX_CAMPER
|
|
||||||
.byte EVENT_OBJ_GFX_PICNICKER
|
|
||||||
.byte EVENT_OBJ_GFX_ZIGZAGOON_1 @ not used
|
|
||||||
|
|
||||||
.align 1
|
|
||||||
gMtChimneyHikerCoords:: @ 85CDBEA
|
|
||||||
.2byte 0, 80
|
|
||||||
.2byte 240, 146
|
|
||||||
|
|
||||||
gMtChimneyHikerMovementDelayTable:: @ 85CDBF2
|
|
||||||
.byte 0
|
|
||||||
.byte 60
|
|
||||||
.byte 120
|
|
||||||
.byte 170
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gUnknown_085CDBF8:: @ 85CDBF8
|
|
||||||
.4byte sub_8150A68
|
|
||||||
.4byte sub_8150AF4
|
|
@ -48,7 +48,7 @@ MtChimney_CableCarStation_EventScript_22AC6C:: @ 822AC6C
|
|||||||
setvar VAR_0x40A3, 2
|
setvar VAR_0x40A3, 2
|
||||||
incrementgamestat 48
|
incrementgamestat 48
|
||||||
special CableCarWarp
|
special CableCarWarp
|
||||||
special sub_814FC9C
|
special CableCar
|
||||||
waitstate
|
waitstate
|
||||||
release
|
release
|
||||||
end
|
end
|
||||||
|
@ -49,7 +49,7 @@ Route112_CableCarStation_EventScript_22AB38:: @ 822AB38
|
|||||||
setvar VAR_0x40A3, 1
|
setvar VAR_0x40A3, 1
|
||||||
incrementgamestat 48
|
incrementgamestat 48
|
||||||
special CableCarWarp
|
special CableCarWarp
|
||||||
special sub_814FC9C
|
special CableCar
|
||||||
waitstate
|
waitstate
|
||||||
release
|
release
|
||||||
end
|
end
|
||||||
|
@ -163,7 +163,7 @@ gSpecials:: @ 81DBA64
|
|||||||
def_special GetRivalSonDaughterString
|
def_special GetRivalSonDaughterString
|
||||||
def_special SetFlagInVar
|
def_special SetFlagInVar
|
||||||
def_special CableCarWarp
|
def_special CableCarWarp
|
||||||
def_special sub_814FC9C
|
def_special CableCar
|
||||||
def_special Overworld_PlaySpecialMapMusic
|
def_special Overworld_PlaySpecialMapMusic
|
||||||
def_special StartWallClock
|
def_special StartWallClock
|
||||||
def_special Special_ViewWallClock
|
def_special Special_ViewWallClock
|
||||||
|
@ -79,6 +79,14 @@
|
|||||||
#define T2_READ_32(ptr) ((ptr)[0] + ((ptr)[1] << 8) + ((ptr)[2] << 16) + ((ptr)[3] << 24))
|
#define T2_READ_32(ptr) ((ptr)[0] + ((ptr)[1] << 8) + ((ptr)[2] << 16) + ((ptr)[3] << 24))
|
||||||
#define T2_READ_PTR(ptr) (void*) T2_READ_32(ptr)
|
#define T2_READ_PTR(ptr) (void*) T2_READ_32(ptr)
|
||||||
|
|
||||||
|
#define S16TOPOSFLOAT(val) \
|
||||||
|
({ \
|
||||||
|
s16 v = (val); \
|
||||||
|
float f = (float)v; \
|
||||||
|
if(v < 0) f += 65536.0f; \
|
||||||
|
f; \
|
||||||
|
})
|
||||||
|
|
||||||
// Invalid Versions show as "----------" in Gen 4 and Gen 5's summary screen.
|
// Invalid Versions show as "----------" in Gen 4 and Gen 5's summary screen.
|
||||||
// In Gens 6 and 7, invalid versions instead show "a distant land" in the summary screen.
|
// In Gens 6 and 7, invalid versions instead show "a distant land" in the summary screen.
|
||||||
// In Gen 4 only, migrated Pokemon with Diamond, Pearl, or Platinum's ID show as "----------".
|
// In Gen 4 only, migrated Pokemon with Diamond, Pearl, or Platinum's ID show as "----------".
|
||||||
|
@ -4740,4 +4740,12 @@ extern const u32 gUnknown_08D8D58C[];
|
|||||||
extern const u32 gPokedexAreaScreenAreaUnknown_Gfx[];
|
extern const u32 gPokedexAreaScreenAreaUnknown_Gfx[];
|
||||||
extern const u16 gPokedexAreaScreenAreaUnknown_Pal[];
|
extern const u16 gPokedexAreaScreenAreaUnknown_Pal[];
|
||||||
|
|
||||||
|
// Cable Car
|
||||||
|
extern const u32 gUnknown_08DBA5B8[];
|
||||||
|
extern const u16 gUnknown_08DBA518[];
|
||||||
|
extern const u32 gCableCar_Gfx[];
|
||||||
|
extern const u32 gCableCarDoor_Gfx[];
|
||||||
|
extern const u32 gCableCarCord_Gfx[];
|
||||||
|
extern const u16 gCableCar_Pal[];
|
||||||
|
|
||||||
#endif //GUARD_GRAPHICS_H
|
#endif //GUARD_GRAPHICS_H
|
||||||
|
@ -214,7 +214,7 @@ SECTIONS {
|
|||||||
src/battle_transition.o(.text);
|
src/battle_transition.o(.text);
|
||||||
src/battle_controller_link_partner.o(.text);
|
src/battle_controller_link_partner.o(.text);
|
||||||
src/battle_message.o(.text);
|
src/battle_message.o(.text);
|
||||||
asm/cable_car.o(.text);
|
src/cable_car.o(.text);
|
||||||
src/math_util.o(.text);
|
src/math_util.o(.text);
|
||||||
src/roulette_util.o(.text);
|
src/roulette_util.o(.text);
|
||||||
src/rom_81520A8.o(.text);
|
src/rom_81520A8.o(.text);
|
||||||
@ -533,7 +533,7 @@ SECTIONS {
|
|||||||
src/battle_transition.o(.rodata);
|
src/battle_transition.o(.rodata);
|
||||||
src/battle_controller_link_partner.o(.rodata);
|
src/battle_controller_link_partner.o(.rodata);
|
||||||
src/battle_message.o(.rodata);
|
src/battle_message.o(.rodata);
|
||||||
data/cable_car.o(.rodata);
|
src/cable_car.o(.rodata);
|
||||||
src/save.o(.rodata);
|
src/save.o(.rodata);
|
||||||
src/field_effect_helpers.o(.rodata);
|
src/field_effect_helpers.o(.rodata);
|
||||||
data/field_effect_helpers.o(.rodata);
|
data/field_effect_helpers.o(.rodata);
|
||||||
|
1006
src/cable_car.c
Executable file
1006
src/cable_car.c
Executable file
File diff suppressed because it is too large
Load Diff
@ -147,7 +147,6 @@ extern void ResetAllPicSprites(void);
|
|||||||
extern void FieldEffectActiveListClear(void);
|
extern void FieldEffectActiveListClear(void);
|
||||||
extern void SetUpFieldTasks(void);
|
extern void SetUpFieldTasks(void);
|
||||||
extern void sub_81BE6B8(void);
|
extern void sub_81BE6B8(void);
|
||||||
extern void StartWeather(void);
|
|
||||||
extern void ShowStartMenu(void);
|
extern void ShowStartMenu(void);
|
||||||
extern void sub_80AEE84(void);
|
extern void sub_80AEE84(void);
|
||||||
extern void mapldr_default(void);
|
extern void mapldr_default(void);
|
||||||
|
@ -334,28 +334,7 @@ gUnknown_0203AB8C: @ 203AB8C
|
|||||||
.include "src/coins.o"
|
.include "src/coins.o"
|
||||||
.include "src/battle_transition.o"
|
.include "src/battle_transition.o"
|
||||||
.include "src/battle_message.o"
|
.include "src/battle_message.o"
|
||||||
|
.include "src/cable_car.o"
|
||||||
gUnknown_0203ABAC: @ 203ABAC
|
|
||||||
.space 0x4
|
|
||||||
|
|
||||||
gUnknown_0203ABB0: @ 203ABB0
|
|
||||||
.space 0x1
|
|
||||||
|
|
||||||
gUnknown_0203ABB1: @ 203ABB1
|
|
||||||
.space 0x1
|
|
||||||
|
|
||||||
gUnknown_0203ABB2: @ 203ABB2
|
|
||||||
.space 0x1
|
|
||||||
|
|
||||||
gUnknown_0203ABB3: @ 203ABB3
|
|
||||||
.space 0x1
|
|
||||||
|
|
||||||
gUnknown_0203ABB4: @ 203ABB4
|
|
||||||
.space 0x1
|
|
||||||
|
|
||||||
gUnknown_0203ABB5: @ 203ABB5
|
|
||||||
.space 0x3
|
|
||||||
|
|
||||||
.include "src/rom_81520A8.o"
|
.include "src/rom_81520A8.o"
|
||||||
.include "src/save.o"
|
.include "src/save.o"
|
||||||
.include "src/mystery_event_script.o"
|
.include "src/mystery_event_script.o"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user