Implement & link ac_animal_logo.c

This commit is contained in:
Cuyler36
2023-06-21 15:32:00 -04:00
parent 3e49021b39
commit fcff757c90
15 changed files with 889 additions and 11 deletions
+1
View File
@@ -70,6 +70,7 @@ typedef struct famicom_common_s {
typedef u8 (*FAMICOM_GETSAVECHAN_PROC)(int* player_no, int* slot_card_result);
extern void famicom_setCallback_getSaveChan(FAMICOM_GETSAVECHAN_PROC getSaveChan_proc);
extern int famicom_mount_archive_end_check();
#ifdef __cplusplus
}
+91
View File
@@ -0,0 +1,91 @@
#ifndef AC_ANIMAL_LOGO_H
#define AC_ANIMAL_LOGO_H
#include "types.h"
#include "game.h"
#include "m_actor.h"
#include "m_lib.h"
#include "c_keyframe.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef void (*aAL_DATA_INIT_PROC)(GAME_PLAY*);
typedef struct animal_logo_clip_s {
aAL_DATA_INIT_PROC data_init_proc;
} aAL_Clip_c;
#define aAL_BACK_FADEIN_RATE 20
#define aAL_BACK_FADEIN_MAX 220
#define aAL_TIMER 60
#define aAL_FADEOUT_TIMER 26
#define aAL_COPYRIGHT_ALPHA_RATE 63
typedef struct actor_animal_logo_s ANIMAL_LOGO_ACTOR;
typedef void (*ANIMAL_LOGO_ACTION_PROC)(ANIMAL_LOGO_ACTOR*, GAME*);
typedef struct logo_skeleton_info_s {
cKF_SkeletonInfo_R_c skeleton;
s_xyz* work_area_p;
s_xyz* morph_area_p;
} aAL_SkeletonInfo_c;
struct actor_animal_logo_s {
ACTOR actor_class;
int action;
ANIMAL_LOGO_ACTION_PROC action_proc;
aAL_SkeletonInfo_c animal;
aAL_SkeletonInfo_c cros;
aAL_SkeletonInfo_c sing;
s_xyz animal_work_area[22];
s_xyz animal_morph_area[22];
s_xyz cros_work_area[15];
s_xyz cros_morph_area[15];
s_xyz sing_work_area[15];
s_xyz sing_morph_area[15];
s16 back_opacity;
int copyright_opacity;
f32 press_start_opacity;
s16 start_opacity_timer;
int title_timer;
int titledemo_no;
int unused_56C[6];
};
enum {
aAL_ACTION_IN,
aAL_ACTION_BACK_FADE_IN,
aAL_ACTION_START_KEY_CHK_START,
aAL_ACTION_GAME_START,
aAL_ACTION_FADE_OUT_START,
aAL_ACTION_OUT,
aAL_ACTION_6,
aAL_ACTION_NUM
};
extern ACTOR_PROFILE Animal_Logo_Profile;
// TODO: these are private but due to the way our build system works,
// we must expose them to get them in a separate TU.
extern void flash_rom_and_player_info_clear();
extern int decide_next_scene_no();
extern void title_action_data_init_start_select(GAME_PLAY* play);
#ifdef __cplusplus
}
#endif
#endif
+1 -1
View File
@@ -103,7 +103,7 @@ extern void cKF_SkeletonInfo_R_init_standard_repeat_morph(cKF_SkeletonInfo_R_c*
extern void cKF_SkeletonInfo_R_init(cKF_SkeletonInfo_R_c* keyframe, cKF_Skeleton_R_c* skeleton, cKF_Animation_R_c* animation, f32 start_frame, f32 end_frame,
f32 current_frame, f32 frame_speed, f32 morph_counter,int mode,s_xyz* rotation_diff_table);
extern int cKF_Animation_R_play(cKF_SkeletonInfo_R_c* keyframe);
extern int cKF_SkeletonInfo_R_play(cKF_SkeletonInfo_R_c* keyframe);
extern void cKF_Si3_draw_SV_R_child(GAME* game, cKF_SkeletonInfo_R_c* keyframe, int* joint_num, cKF_draw_callback prerender_callback, cKF_draw_callback postrender_callback, void* arg, Mtx** mtxpp);
extern void cKF_Si3_draw_R_SV(GAME* game, cKF_SkeletonInfo_R_c* keyframe, Mtx* mtxp, cKF_draw_callback prerender_callback, cKF_draw_callback postrender_callback, void* arg);
+2
View File
@@ -10,9 +10,11 @@ extern "C" {
extern u8 mCD_GetThisLandSlotNo_code(int* player_no, int* slot_card_results);
extern void mCD_save_data_aram_malloc();
extern void mCD_set_aram_save_data();
extern void mCD_PrintErrInfo(gfxprint_t* gfxprint);
extern void mCD_InitAll();
extern void mCD_LoadLand();
#ifdef __cplusplus
}
+4 -1
View File
@@ -5,6 +5,7 @@
#include "ac_gyoei_h.h"
#include "ac_insect_h.h"
#include "ac_structure.h"
#include "ac_animal_logo.h"
#ifdef __cplusplus
extern "C" {
@@ -18,7 +19,9 @@ typedef struct clip_s {
/* 0x08C */ aSTR_Clip_c* structure_clip;
/* 0x090 */ void* _090[(0x0AC - 0x090) / sizeof(void*)];
/* 0x0AC */ aGYO_Clip_c* gyo_clip;
/* 0x0B0 */ void* _0B0[(0x104 - 0x0B0) / sizeof(void*)];
/* 0x0B0 */ void* _0B0[(0x0DC - 0x0B0) / sizeof(void*)];
/* 0x0DC */ aAL_Clip_c* animal_logo_clip;
/* 0x0E0 */ void* _0E0[(0x104 - 0x0E0) / sizeof(void*)];
} Clip_c;
#ifdef __cplusplus
+1 -1
View File
@@ -20,7 +20,7 @@ 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 void fbdemo_fade_setcolor_rgba8888(fbdemo_fade* this, u32 color);
extern u8 fbdemo_fade_is_finish(fbdemo_fade*);
#endif
+1 -1
View File
@@ -24,7 +24,7 @@ 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);
extern void fbdemo_triforce_setcolor_rgba8888(void);
#endif
+4
View File
@@ -193,6 +193,10 @@ extern void mNpc_CopyAnimalPersonalID(AnmPersonalID_c* dst, AnmPersonalID_c* src
extern AnmPersonalID_c* mNpc_GetOtherAnimalPersonalID(AnmPersonalID_c* ids, int num_ids);
extern void mNpc_ClearEventNpc();
extern void mNpc_ClearMaskNpc();
extern int mNpc_SearchAnimalinfo(Animal_c* animal, mActor_name_t npc_name, int count);
extern int mNpc_RegistEventNpc(mActor_name_t actor_name, mActor_name_t tex_name, mActor_name_t npc_name, mActor_name_t cloth_name);
extern void mNpc_ClearAnimalInfo(Animal_c* animal_p);
extern Animal_c* mNpc_GetInAnimalP();
extern void mNpc_PrintRemoveInfo(gfxprint_t* gfxprint);
extern void mNpc_PrintFriendship_fdebug(gfxprint_t* gfxprint);
+8 -2
View File
@@ -9,6 +9,7 @@
#include "m_submenu.h"
#include "m_pause.h"
#include "m_field_info.h"
#include "m_fbdemo_wipe.h"
#include "m_play_h.h"
#ifdef __cplusplus
@@ -29,16 +30,21 @@ struct game_play_s {
/* 0x1DA0 */ pause_t pause;
/* 0x1DA8 */ Actor_info actor_info;
/* 0x1DEC */ Submenu submenu;
/* 0x1FA4 */ u8 _1FA4[0x200C - 0x1FA4];
/* 0x1FA4 */ u8 _1FA4[0x2008 - 0x1FA4];
/* 0x2008 */ int next_scene_no;
/* 0x200C */ MtxF matrix;
/* 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];
/* 0x20D4 */ //int _20D4;
/* 0x20D8 */ fbdemo_wipe fbdemo_wipe;
/* 0x2318 */ fbdemo_fade color_fade;
/* 0x2328 */ u8 _2328[0x2600 - 0x2328];
};
extern void play_init(GAME_PLAY* play);
extern void play_cleanup(GAME_PLAY* play);
-2
View File
@@ -21,8 +21,6 @@ enum field_draw_type {
there may be a better place for this
*/
#define SCENE_INVALID -1
enum scene_table {
SCENE_TEST1,
SCENE_TEST2,
+12 -2
View File
@@ -71,7 +71,18 @@ typedef struct time_calendar_term_s {
s16 bgitem_bank;
} mTM_calendar_term_t;
extern void mTM_set_renew_time(lbRTC_ymd_t* renew_time, lbRTC_time_c* rtc_time);
extern void mTM_set_season_com(int term_idx);
extern void mTM_set_season();
extern int mTM_check_renew_time(u8 renew_flag);
extern void mTM_off_renew_time(u8 renew_flag);
extern void mTM_set_renew_is();
extern void mTM_set_renew_time(lbRTC_ymd_t* renew_time, const lbRTC_time_c* time);
extern void mTM_ymd_2_time(lbRTC_time_c* time, const lbRTC_ymd_t* ymd);
extern void mTM_renewal_renew_time();
extern void mTM_clear_renew_is();
extern void mTM_rtcTime_limit_check();
extern void mTM_time();
extern void mTM_time_init();
extern const lbRTC_time_c mTM_rtcTime_clear_code;
extern const lbRTC_ymd_t mTM_rtcTime_ymd_clear_code;
@@ -80,7 +91,6 @@ extern const lbRTC_time_c mTM_rtcTime_default_code;
#define mTM_IsTimeCleared(time) (lbRTC_IsEqualTime((time), &mTM_rtcTime_clear_code, lbRTC_CHECK_ALL) == TRUE)
#define mTM_AreTimesEqual(t0, t1) (lbRTC_IsEqualTime(t0, t1, lbRTC_CHECK_ALL))
extern void mTM_set_season();
#ifdef __cplusplus
}