diff options
| author | emilybrooks <emilybrooksemilybrooks@gmail.com> | 2024-02-14 11:26:50 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-14 11:26:50 -0700 |
| commit | a60184c64bd669bd31eeafd391c15ffd4a50741c (patch) | |
| tree | e126899825d95962356daab76bea80112d6cd8e7 | |
| parent | 689adc94465e36d452322927a95c5cc4b2907966 (diff) | |
imported data for ac_train_window (#144)
* initial commit
* add space
* made till_data static
| -rw-r--r-- | linker_scripts/jp/symbol_addrs_overlays.txt | 3 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_Train_Window/ac_train_window.c | 28 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_Train_Window/ac_train_window.h | 1 | ||||
| -rw-r--r-- | tools/splat_ext/af_palette.py | 5 | ||||
| -rw-r--r-- | yamls/jp/overlays.yaml | 15 |
5 files changed, 31 insertions, 21 deletions
diff --git a/linker_scripts/jp/symbol_addrs_overlays.txt b/linker_scripts/jp/symbol_addrs_overlays.txt index 628c4a7..f7855b2 100644 --- a/linker_scripts/jp/symbol_addrs_overlays.txt +++ b/linker_scripts/jp/symbol_addrs_overlays.txt @@ -17796,9 +17796,8 @@ Train_Window_Actor_draw = 0x80A5A198; // type:func // .data -D_80A5A580_jp = 0x80A5A580; // aTrainWindow_tree_pal_table = 0x80A5A588; // -D_80A5A768_jp = 0x80A5A768; // +aTrainWindow_out_cloud = 0x80A5A768; // aTrainWindow_evw_anime_data = 0x80A5A76C; // Train_Window_Profile = 0x80A5A774; // till_data = 0x80A5A798; // type:u8 diff --git a/src/overlays/actors/ovl_Train_Window/ac_train_window.c b/src/overlays/actors/ovl_Train_Window/ac_train_window.c index 9b89edf..adacb1c 100644 --- a/src/overlays/actors/ovl_Train_Window/ac_train_window.c +++ b/src/overlays/actors/ovl_Train_Window/ac_train_window.c @@ -10,7 +10,18 @@ void Train_Window_Actor_dt(Actor* thisx, Game_Play* game_play); void Train_Window_Actor_move(Actor* thisx, Game_Play* game_play); void Train_Window_Actor_draw(Actor* thisx, Game_Play* play); -#if 0 +s32 pad922020[] = { 0x00000000, 0x00000000 }; + +u16 aTrainWindow_tree_pal_table[15][16] = { +#include "assets/jp/overlays/actors/ovl_Train_Window/aTrainWindow_tree_pal_table.palette.inc.c" +}; + +extern EvwAnimeScroll aTrainWindow_out_cloud[1]; +#include "assets/jp/overlays/actors/ovl_Train_Window/aTrainWindow_out_cloud.inc.c" + +extern EvwAnimeData aTrainWindow_evw_anime_data[1]; +#include "assets/jp/overlays/actors/ovl_Train_Window/aTrainWindow_evw_anime_data.inc.c" + ActorProfile Train_Window_Profile = { /* */ ACTOR_TRAIN_WINDOW, /* */ ACTOR_PART_0, @@ -24,24 +35,21 @@ ActorProfile Train_Window_Profile = { /* */ Train_Window_Actor_draw, /* */ NULL, }; -#endif - -// TODO: Import data extern Gfx rom_train_out_bgsky_model[]; extern Gfx rom_train_out_bgcloud_modelT[]; extern Gfx rom_train_out_shineglass_modelT[]; -extern u8 till_data[15][2]; -extern u16 aTrainWindow_tree_pal_table[15][16]; - -extern EvwAnimeData aTrainWindow_evw_anime_data; - s32 aTrainWindow_NoDraw(Actor* thisx, Game* game); s32 aTrainWindow_DrawGoneOutTunnel(Actor* thisx, Game* game); s32 aTrainWindow_DrawInTunnel(Actor* thisx, Game* game); s32 aTrainWindow_GetTreePalletIdx(void) { + static u8 till_data[15][2] = { + { 0x02, 0x03 }, { 0x02, 0x11 }, { 0x02, 0x18 }, { 0x04, 0x03 }, { 0x04, 0x08 }, + { 0x07, 0x16 }, { 0x09, 0x0F }, { 0x0A, 0x05 }, { 0x0A, 0x17 }, { 0x0B, 0x07 }, + { 0x0B, 0x0E }, { 0x0B, 0x1C }, { 0x0C, 0x0A }, { 0x0C, 0x11 }, { 0x0C, 0x1F }, + }; s32 i; lbRTC_month_t month = common_data.time.rtcTime.month; lbRTC_day_t day = common_data.time.rtcTime.day; @@ -307,7 +315,7 @@ void Train_Window_Actor_draw(Actor* thisx, Game_Play* play) { aTrainWindow_SetLightPrimColorDetail(&play->state, 127, 255, this->xluAlpha); gSPSegment(POLY_XLU_DISP++, 10, this->currentPalette); if (1) {} - Evw_Anime_Set(&play->state, &aTrainWindow_evw_anime_data); + Evw_Anime_Set(&play->state, aTrainWindow_evw_anime_data); aTrainWindow_SetLightPrimColorDetail(&play->state, 255, 255, this->xluAlpha); gSPDisplayList(POLY_OPA_DISP++, rom_train_out_bgsky_model); diff --git a/src/overlays/actors/ovl_Train_Window/ac_train_window.h b/src/overlays/actors/ovl_Train_Window/ac_train_window.h index 77af624..f076bdc 100644 --- a/src/overlays/actors/ovl_Train_Window/ac_train_window.h +++ b/src/overlays/actors/ovl_Train_Window/ac_train_window.h @@ -26,7 +26,6 @@ typedef struct Train_Window{ /* 0x1A4 */ f32 xluAlpha; /* 0x1A8 */ f32 scrollSpeed; /* 0x1AC */ s_xyz pos; - /* 0x1B0 */ UNK_TYPE unk_1B0; }Train_Window; // size = 0x1B4 #endif diff --git a/tools/splat_ext/af_palette.py b/tools/splat_ext/af_palette.py index 837e56f..8a36c09 100644 --- a/tools/splat_ext/af_palette.py +++ b/tools/splat_ext/af_palette.py @@ -2,8 +2,6 @@ import struct from splat.util import options, log from splat.segtypes.common.codesubsegment import CommonSegCodeSubsegment -VALID_SIZES = [0x20, 0x40, 0x80, 0x100, 0x200] - class N64SegAf_palette(CommonSegCodeSubsegment): def __init__(self, rom_start, rom_end, type, name, vram_start, args, yaml): super().__init__(rom_start, rom_end, type, name, vram_start, args=args, yaml=yaml), @@ -14,9 +12,6 @@ class N64SegAf_palette(CommonSegCodeSubsegment): data = rom_bytes[self.rom_start : self.rom_end] lines = [] - if len(data) not in VALID_SIZES: - log.error(f"Error: {self.name} (0x{len(data):X} bytes) is not a valid palette size ({', '.join(hex(s) for s in VALID_SIZES)})") - if not self.data_only: lines.append(options.opts.generated_c_preamble) lines.append("") diff --git a/yamls/jp/overlays.yaml b/yamls/jp/overlays.yaml index ce50dff..1f22fda 100644 --- a/yamls/jp/overlays.yaml +++ b/yamls/jp/overlays.yaml @@ -11275,6 +11275,7 @@ - [0x920DE0, data, overlays/other_ovl/ovl__00920D90/ovl__00920D90_reloc] - name: ovl_Train_Window + dir: overlays/actors/ovl_Train_Window type: code start: 0x920E00 vram: 0x80A59360 @@ -11282,9 +11283,17 @@ compress: True bss_size: 0x0 subsegments: - - [0x920E00, c, overlays/actors/ovl_Train_Window/ac_train_window] - - [0x922020, data, overlays/actors/ovl_Train_Window/ac_train_window] - - [0x922260, .rodata, overlays/actors/ovl_Train_Window/ac_train_window] + - [0x920E00, c, ac_train_window] + - start: 0x922020 + type: .data + name: ac_train_window + subsegments: + - [0x922020, pad] + - { start: 0x922028, type: af_palette, name: aTrainWindow_tree_pal_table, data_only: true } + - [0x922208, evw_scroll, aTrainWindow_out_cloud] + - [0x92220C, evw_data, aTrainWindow_evw_anime_data] + - [0x922214, .data, ac_train_window] + - [0x922260, .rodata, ac_train_window] - name: ovl_Train_Window_reloc type: code start: 0x922270 |
