mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-07-07 20:11:51 -04:00
Implement (nonmatching) m_titledemo.c
This commit is contained in:
@@ -10,6 +10,7 @@ extern "C" {
|
||||
extern void mBGM_reset();
|
||||
extern void mBGMPsComp_make_ps_lost_fanfare(u8 bgm_no, u16 unk);
|
||||
extern void mBGMPsComp_scene_mode(int scene_mode);
|
||||
extern void mBGMPsComp_make_ps_wipe(u16 ps_wipe);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -179,7 +179,15 @@ typedef struct common_data_s {
|
||||
/* 0x02887C */ u8 save_error_type; /* set to one of the mFRm_ERROR_* states when save is invalid */
|
||||
/* 0x02887D */ u8 train_coming_flag; /* set when the train is coming */
|
||||
/* 0x02887E */ u8 buried_treasure_flag; /* when set, treasure cannot be buried */
|
||||
/* 0x02887F */ u8 tmp2[0x288A0 - 0x2887F];
|
||||
/* 0x02887F */ u8 spnpc_first_talk_flags;
|
||||
/* 0x028880 */ u8 needlework_first_talk_flags;
|
||||
/* 0x028882 */ u16 event_notification_active;
|
||||
/* 0x028884 */ lbRTC_time_c newly_set_time; /* time set by player in time adjust menu */
|
||||
/* 0x02888C */ lbRTC_time_c old_time; /* time before being changed by the player */
|
||||
/* 0x028894 */ s16 balloon_state; /* balloon's current state */
|
||||
/* 0x028896 */ s16 balloon_last_spawn_min; /* last minute the balloon was spawned */
|
||||
/* 0x028898 */ f32 balloon_spawn_percent; /* chance that a balloon will spawn */
|
||||
/* 0x02889C */ int nook_shop_state; /* adjusted based on any current events happening to Nook's shop */
|
||||
/* 0x0288A0 */ u8 pad_connected; /* is gamepad 0 connected? */
|
||||
/* 0x0288A1 */ u8 _288a1[0x02DB40 - 0x0288A1];
|
||||
/* 0x02DB40 */ u8 auto_nwrite_set; /* when true, saved nwrite time will be utilized. Seems to be used to keep same date for fishing tourney stuff. */
|
||||
|
||||
+12
-16
@@ -3,34 +3,30 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "PR/mbi.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ f32 x;
|
||||
/* 0x4 */ f32 y;
|
||||
} TransitionTileVtxData; // size = 0x8
|
||||
#include "m_lib.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ int cols;
|
||||
/* 0x04 */ int rows;
|
||||
/* 0x08 */ int frame;
|
||||
/* 0x0C */ TransitionTileVtxData* vtxData;
|
||||
/* 0x0C */ xy_t* vtxData;
|
||||
/* 0x10 */ Vtx* vtxFrame1;
|
||||
/* 0x14 */ Vtx* vtxFrame2;
|
||||
/* 0x18 */ Mtx projection;
|
||||
/* 0x58 */ Mtx modelView;
|
||||
/* 0x98 */ Mtx unk_98;
|
||||
/* 0x58 */ Mtx modelView1;
|
||||
/* 0x98 */ Mtx modelView2;
|
||||
/* 0xD8 */ Gfx* gfx; // "gfxtbl"
|
||||
/* 0xDC */ u16* zBuffer;
|
||||
} TransitionTile; // size = 0xE0
|
||||
} fbdemo; // size = 0xE0
|
||||
|
||||
|
||||
extern void fbdemo_init_gfx(TransitionTile*);
|
||||
extern void fbdemo_init_data(TransitionTile*);
|
||||
extern void fbdemo_cleanup(TransitionTile*);
|
||||
extern TransitionTile* fbdemo_init(TransitionTile*, int, int);
|
||||
extern void fbdemo_update(TransitionTile*);
|
||||
extern void fbdemo_draw(TransitionTile*, Gfx**);
|
||||
extern void fbdemo_move(void);
|
||||
extern void fbdemo_init_gfx(fbdemo*);
|
||||
extern void fbdemo_init_data(fbdemo*);
|
||||
extern void fbdemo_cleanup(fbdemo*);
|
||||
extern fbdemo* fbdemo_init(fbdemo*, int, int);
|
||||
extern void fbdemo_update(fbdemo*);
|
||||
extern void fbdemo_draw(fbdemo*, Gfx**);
|
||||
extern void fbdemo_move(fbdemo*);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -13,14 +13,14 @@ typedef struct {
|
||||
/* 0x008 */ s16 frame;
|
||||
/* 0x00A */ u16 unkA;
|
||||
/* 0x00C */ u16 timer;
|
||||
} TransitionFade; // size = 0x10
|
||||
} fbdemo_fade; // size = 0x10
|
||||
|
||||
|
||||
extern TransitionFade* fbdemo_fade_init(TransitionFade*);
|
||||
extern void fbdemo_fade_move(TransitionFade*, int);
|
||||
extern void fbdemo_fade_startup(TransitionFade*);
|
||||
extern void fbdemo_fade_settype(TransitionFade*, int);
|
||||
extern void fbdemo_fade_setcolor_rgba8888(TransitionFade*, u32);
|
||||
extern u8 fbdemo_fade_is_finish(TransitionFade*);
|
||||
extern fbdemo_fade* fbdemo_fade_init(fbdemo_fade*);
|
||||
extern void fbdemo_fade_move(fbdemo_fade*, int);
|
||||
extern void fbdemo_fade_startup(fbdemo_fade*);
|
||||
extern void fbdemo_fade_settype(fbdemo_fade*, int);
|
||||
extern void fbdemo_fade_setcolor_rgba8888(fbdemo_fade*, u32);
|
||||
extern u8 fbdemo_fade_is_finish(fbdemo_fade*);
|
||||
|
||||
#endif
|
||||
@@ -16,14 +16,14 @@ typedef struct {
|
||||
/* 0x0E*/ u8 temp2[2];
|
||||
/* 0x10 */ Mtx perspmtx;
|
||||
/* 0x50 */ Mtx lookatmtx;
|
||||
} TransitionTriforce; // size = 0x90;
|
||||
} fbdemo_triforce; // size = 0x90;
|
||||
|
||||
extern void fbdemo_triforce_startup(TransitionTriforce*);
|
||||
extern TransitionTriforce* fbdemo_triforce_init(TransitionTriforce*);
|
||||
extern void fbdemo_triforce_move(TransitionTriforce*, int);
|
||||
extern void fbdemo_triforce_draw(TransitionTriforce*, Gfx**);
|
||||
extern s8 fbdemo_triforce_is_finish(TransitionTriforce*);
|
||||
extern void fbdemo_triforce_settype(TransitionTriforce*, int);
|
||||
extern void fbdemo_triforce_startup(fbdemo_triforce*);
|
||||
extern fbdemo_triforce* fbdemo_triforce_init(fbdemo_triforce*);
|
||||
extern void fbdemo_triforce_move(fbdemo_triforce*, int);
|
||||
extern void fbdemo_triforce_draw(fbdemo_triforce*, Gfx**);
|
||||
extern s8 fbdemo_triforce_is_finish(fbdemo_triforce*);
|
||||
extern void fbdemo_triforce_settype(fbdemo_triforce*, int);
|
||||
extern void fbdemo_fade_setcolor_rgba8888(void);
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
#ifndef M_FBDEMO_WIPE_H
|
||||
#define M_FBDEMO_WIPE_H
|
||||
|
||||
#include "types.h"
|
||||
#include "m_fbdemo.h"
|
||||
#include "m_fbdemo_wipe1.h"
|
||||
#include "m_fbdemo_fade.h"
|
||||
#include "m_fbdemo_triforce.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef union fbdemo_wipe_union {
|
||||
fbdemo_wipe1 fbdemo_wipe1;
|
||||
fbdemo_triforce fbdemo_triforce;
|
||||
fbdemo_fade fbdemo_fade;
|
||||
} fbdemo_wipe_u;
|
||||
|
||||
typedef fbdemo_wipe_u* (*FBDEMO_INIT_PROC)(fbdemo_wipe_u*);
|
||||
typedef void (*FBDEMO_CLEANUP_PROC)(fbdemo_wipe_u*);
|
||||
typedef void (*FBDEMO_MOVE_PROC)(fbdemo_wipe_u*, int);
|
||||
typedef void (*FBDEMO_DRAW_PROC)(fbdemo_wipe_u*, Gfx**);
|
||||
typedef void (*FBDEMO_STARTUP_PROC)(fbdemo_wipe_u*);
|
||||
typedef void (*FBDEMO_SETTYPE_PROC)(fbdemo_wipe_u*, int);
|
||||
typedef void (*FBDEMO_SETCOLOR_PROC)(fbdemo_wipe_u*, u32);
|
||||
typedef int (*FBDEMO_ISFINISHED_PROC)(fbdemo_wipe_u*);
|
||||
|
||||
typedef struct {
|
||||
FBDEMO_INIT_PROC init_proc;
|
||||
FBDEMO_CLEANUP_PROC cleanup_proc;
|
||||
FBDEMO_MOVE_PROC move_proc;
|
||||
FBDEMO_DRAW_PROC draw_proc;
|
||||
FBDEMO_STARTUP_PROC startup_proc;
|
||||
FBDEMO_SETTYPE_PROC settype_proc;
|
||||
FBDEMO_SETCOLOR_PROC setcolor_proc;
|
||||
void* unused_proc; // unknown
|
||||
FBDEMO_ISFINISHED_PROC isfinished_proc;
|
||||
} fbdemo_wipe_proc_c;
|
||||
|
||||
typedef struct {
|
||||
fbdemo_wipe_u wipe_data;
|
||||
int wipe_type;
|
||||
fbdemo_wipe_proc_c wipe_procs;
|
||||
} fbdemo_wipe;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -16,14 +16,14 @@ typedef struct {
|
||||
/* 0x018 */ Mtx projection;
|
||||
/* 0x058 */ Mtx lookAt;
|
||||
/* 0x098 */ Mtx modelView[2][3];
|
||||
} TransitionWipe; // size = 0x218
|
||||
} fbdemo_wipe1; // size = 0x218
|
||||
|
||||
|
||||
extern TransitionWipe* fbdemo_wipe1_init(TransitionWipe*);
|
||||
extern void fbdemo_wipe1_move(TransitionWipe*, int);
|
||||
extern void fbdemo_wipe1_draw(TransitionWipe*, Gfx**);
|
||||
extern void fbdemo_wipe1_startup(TransitionWipe*);
|
||||
extern void fbdemo_wipe1_settype(TransitionWipe*, int);
|
||||
extern void fbdemo_wipe1_setcolor_rgba8888(TransitionWipe*, u32);
|
||||
extern u8 fbdemo_wipe1_is_finish(TransitionWipe*);
|
||||
extern fbdemo_wipe1* fbdemo_wipe1_init(fbdemo_wipe1*);
|
||||
extern void fbdemo_wipe1_move(fbdemo_wipe1*, int);
|
||||
extern void fbdemo_wipe1_draw(fbdemo_wipe1*, Gfx**);
|
||||
extern void fbdemo_wipe1_startup(fbdemo_wipe1*);
|
||||
extern void fbdemo_wipe1_settype(fbdemo_wipe1*, int);
|
||||
extern void fbdemo_wipe1_setcolor_rgba8888(fbdemo_wipe1*, u32);
|
||||
extern u8 fbdemo_wipe1_is_finish(fbdemo_wipe1*);
|
||||
#endif
|
||||
@@ -329,6 +329,7 @@ extern int mNT_check_unknown(mActor_name_t item_no);
|
||||
#define ITM_AXE 0x2201
|
||||
#define ITM_SHOVEL 0x2202
|
||||
#define ITM_ROD 0x2203
|
||||
#define ITM_GELATO_UMBRELLA 0x2204
|
||||
|
||||
#define ITM_DUST0_EMPTY_CAN 0x250E
|
||||
#define ITM_DUST1_BOOT 0x250F
|
||||
|
||||
+6
-1
@@ -17,7 +17,12 @@ typedef struct game_play_s {
|
||||
/* 0x1DA0 */ int isPause;
|
||||
/* 0x1DA4 */ u8 _temp[0x268];
|
||||
/* 0x200C */ MtxF matrix;
|
||||
/* 0x204C */ u8 _204C[0x2600-0x204C];
|
||||
/* 0x204C */ u8 _204C[0x20D0-0x204C];
|
||||
/* 0x20D0 */ u8 fb_fade_type;
|
||||
/* 0x20D1 */ u8 fb_wipe_type;
|
||||
/* 0x20D2 */ u8 fb_mode;
|
||||
/* 0x20D3 */ u8 fb_wipe_mode;
|
||||
/* 0x20D4 */ u8 _20D4[0x2600 - 0x20D4];
|
||||
} GAME_PLAY;
|
||||
|
||||
extern void play_init(GAME_PLAY* play);
|
||||
|
||||
@@ -9,6 +9,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
extern PLAYER_ACTOR* get_player_actor_withoutCheck(GAME_PLAY* play);
|
||||
extern void mPlib_SetData1_controller_data_for_title_demo(f32 stick_x, f32 stick_y, int btn_a, int btn_b);
|
||||
extern void mPlib_SetData2_controller_data_for_title_demo(mActor_name_t tool);
|
||||
extern void mPlib_request_main_invade_type1(GAME_PLAY* play);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+19
-1
@@ -9,8 +9,26 @@ extern "C" {
|
||||
|
||||
#define mTD_TITLE_DEMO_NUM 5
|
||||
|
||||
extern int mTD_get_titledemo_no();
|
||||
/* key presses for title screen */
|
||||
extern u16 pact0_key_data[];
|
||||
extern u16 pact1_key_data[];
|
||||
extern u16 pact2_key_data[];
|
||||
extern u16 pact3_key_data[];
|
||||
extern u16 pact4_key_data[];
|
||||
|
||||
/* initial state for title screen */
|
||||
extern u16 pact0_head_table[];
|
||||
extern u16 pact1_head_table[];
|
||||
extern u16 pact2_head_table[];
|
||||
extern u16 pact3_head_table[];
|
||||
extern u16 pact4_head_table[];
|
||||
|
||||
extern int mTD_demono_get();
|
||||
extern void title_demo_move(GAME_PLAY* play);
|
||||
extern void mTD_rtc_set();
|
||||
extern void mTD_rtc_reserve();
|
||||
extern int mTD_get_titledemo_no();
|
||||
extern int mTD_tdemo_button_ok_check();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user