diff options
author | scnorton <scnorton@biociphers.org> | 2017-10-15 15:30:38 -0400 |
---|---|---|
committer | scnorton <scnorton@biociphers.org> | 2017-10-15 15:30:38 -0400 |
commit | 2fff1ae7c56ae2511137d14ea2085bb03e1e2d43 (patch) | |
tree | 136f8e100208817f34fd6ee7349c809485e8833c | |
parent | 2022b1dfb43691e3123024fcddcd07dd45b20a75 (diff) |
Decompile remaining data
-rw-r--r-- | data/cable_car.s | 60 | ||||
-rw-r--r-- | ld_script.txt | 1 | ||||
-rw-r--r-- | src/scene/cable_car.c | 84 |
3 files changed, 83 insertions, 62 deletions
diff --git a/data/cable_car.s b/data/cable_car.s deleted file mode 100644 index 6523e0314..000000000 --- a/data/cable_car.s +++ /dev/null @@ -1,60 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - - .align 2 -gOamData_8401D28:: @ 8401D28 - .2byte 0x0300 - .2byte 0xC000 - .2byte 0x0800 - - .align 2 -gOamData_8401D30:: @ 8401D30 - .2byte 0x4300 - .2byte 0x0000 - .2byte 0x0800 - - .align 2 -gOamData_8401D38:: @ 8401D38 - .2byte 0x0300 - .2byte 0x4000 - .2byte 0x0800 - - .align 2 -gSpriteTemplate_8401D40:: @ 8401D40 - spr_template 1, 1, gOamData_8401D28, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8123CB8 - - .align 2 -gSpriteTemplate_8401D58:: @ 8401D58 - spr_template 2, 1, gOamData_8401D30, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8123CB8 - - .align 2 -gSpriteTemplate_8401D70:: @ 8401D70 - spr_template 3, 1, gOamData_8401D38, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, nullsub_76 - -gCableCarPlayerGraphicsIDs:: @ 8401D88 - .byte MAP_OBJ_GFX_RIVAL_BRENDAN_NORMAL - .byte MAP_OBJ_GFX_RIVAL_MAY_NORMAL - -gMtChimneyHikerGraphicsIDs:: @ 8401D8A - .byte MAP_OBJ_GFX_HIKER - .byte MAP_OBJ_GFX_CAMPER - .byte MAP_OBJ_GFX_PICNICKER - .byte MAP_OBJ_GFX_POOCHYENA @ not used - - .align 1 -gMtChimneyHikerCoords:: @ 8401D8E - .2byte 0, 80 - .2byte 240, 146 - -gMtChimneyHikerMovementDelayTable:: @ 8401D96 - .byte 0 - .byte 60 - .byte 120 - .byte 170 - - .align 2 -gUnknown_08401D9C:: @ 8401D9C - .4byte sub_8123EB8 - .4byte sub_8123F44 diff --git a/ld_script.txt b/ld_script.txt index 96dce388a..84785c7b9 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -438,7 +438,6 @@ SECTIONS { data/battle_message.o(.rodata); src/field/choose_party.o(.rodata); src/scene/cable_car.o(.rodata); - data/cable_car.o(.rodata); src/engine/save.o(.rodata); src/field/field_effect_helpers.o(.rodata); data/contest_ai.o(.rodata); diff --git a/src/scene/cable_car.c b/src/scene/cable_car.c index 76223925b..d5398f262 100644 --- a/src/scene/cable_car.c +++ b/src/scene/cable_car.c @@ -13,6 +13,7 @@ #include "unknown_task.h" #include "event_data.h" #include "cable_car_util.h" +#include "map_object_constants.h" // Static type declarations @@ -79,6 +80,10 @@ void sub_81239E4(u8 taskId); void sub_8123AF8(u8 taskId); void sub_812453C(void); void sub_8124598(void); +void sub_8123CB8(struct Sprite *sprite); +void nullsub_76(struct Sprite *sprite); +void sub_8123EB8(struct Sprite *sprite); +void sub_8123F44(struct Sprite *sprite); // .rodata @@ -121,6 +126,83 @@ const struct SpritePalette gUnknown_08401D18[] = { { } }; +const struct OamData gOamData_8401D28 = { + .affineMode = ST_OAM_AFFINE_DOUBLE, + .size = 3, + .priority = 2 +}; + +const struct OamData gOamData_8401D30 = { + .affineMode = ST_OAM_AFFINE_DOUBLE, + .shape = ST_OAM_H_RECTANGLE, + .priority = 2 +}; + +const struct OamData gOamData_8401D38 = { + .affineMode = ST_OAM_AFFINE_DOUBLE, + .size = 1, + .priority = 2 +}; + +const struct SpriteTemplate gSpriteTemplate_8401D40 = { + 1, + 1, + &gOamData_8401D28, + gDummySpriteAnimTable, + NULL, + gDummySpriteAffineAnimTable, + sub_8123CB8 +}; + +const struct SpriteTemplate gSpriteTemplate_8401D58 = { + 2, + 1, + &gOamData_8401D30, + gDummySpriteAnimTable, + NULL, + gDummySpriteAffineAnimTable, + sub_8123CB8 +}; + +const struct SpriteTemplate gSpriteTemplate_8401D70 = { + 3, + 1, + &gOamData_8401D38, + gDummySpriteAnimTable, + NULL, + gDummySpriteAffineAnimTable, + nullsub_76 +}; + +const u8 gCableCarPlayerGraphicsIDs[] = { + MAP_OBJ_GFX_RIVAL_BRENDAN_NORMAL, + MAP_OBJ_GFX_RIVAL_MAY_NORMAL +}; + +const u8 gMtChimneyHikerGraphicsIDs[] = { + MAP_OBJ_GFX_HIKER, + MAP_OBJ_GFX_CAMPER, + MAP_OBJ_GFX_PICNICKER, + MAP_OBJ_GFX_POOCHYENA +}; + +const u16 gMtChimneyHikerCoords[][2] = { + { 0, 80 }, + { 240, 146 } +}; + +const u8 gMtChimneyHikerMovementDelayTable[] = { + 0, + 60, + 120, + 170 +}; + +void (*const gUnknown_08401D9C[])(struct Sprite *sprite) = { + sub_8123EB8, + sub_8123F44 +}; + // .text void sub_81231EC(u8 taskId) @@ -456,7 +538,7 @@ void sub_8123C40(void) TransferPlttBuffer(); } -void nullsub_76(void) +void nullsub_76(struct Sprite *sprite) { } |