mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-06-30 18:01:56 -04:00
Implement & link evw_anime.c
This commit is contained in:
+61
-6
@@ -2,19 +2,74 @@
|
||||
#define EVW_ANIME_H
|
||||
|
||||
#include "types.h"
|
||||
#include "m_play_h.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
#define EVW_COLOR_BUF_MAX 50
|
||||
|
||||
typedef struct evw_anime_s{
|
||||
s16 unk0;
|
||||
s16 unk4;
|
||||
void* data_p;
|
||||
}EVW_ANIME_DATA;
|
||||
enum {
|
||||
EVW_ANIME_TYPE_SCROLL1,
|
||||
EVW_ANIME_TYPE_SCROLL2,
|
||||
EVW_ANIME_TYPE_COLREG_MANUAL,
|
||||
EVW_ANIME_TYPE_COLREG_LINEAR,
|
||||
EVW_ANIME_TYPE_COLREG_NONLINEAR,
|
||||
EVW_ANIME_TYPE_TEXANIME,
|
||||
|
||||
void Evw_Anime_Set(GAME*, EVW_ANIME_DATA*);
|
||||
EVW_ANIME_TYPE_NUM
|
||||
};
|
||||
|
||||
typedef struct evw_anime_col_prim_s {
|
||||
u8 r;
|
||||
u8 g;
|
||||
u8 b;
|
||||
u8 a;
|
||||
u8 l;
|
||||
} EVW_ANIME_COL_PRIM;
|
||||
|
||||
typedef struct evw_anime_col_env_s {
|
||||
u8 r;
|
||||
u8 g;
|
||||
u8 b;
|
||||
u8 a;
|
||||
} EVW_ANIME_COL_ENV;
|
||||
|
||||
typedef struct evw_anime_col_reg_s {
|
||||
u16 frame_count; /* total frames in the animation */
|
||||
u16 key_count; /* number of animation keyframes */
|
||||
|
||||
EVW_ANIME_COL_PRIM* prim_colors; /* list of primitive colors per-keyframe */
|
||||
EVW_ANIME_COL_ENV* env_colors; /* list of environment colors per-keyframe */
|
||||
|
||||
u16* keyframes; /* list of keyframe frame indices */
|
||||
} EVW_ANIME_COLREG;
|
||||
|
||||
typedef struct evw_anime_scroll_s {
|
||||
s8 x; /* x (s) texture position */
|
||||
s8 y; /* y (t) texture position */
|
||||
u8 width; /* texture width */
|
||||
u8 height; /* texture height */
|
||||
} EVW_ANIME_SCROLL;
|
||||
|
||||
typedef struct evw_anime_texanime_s {
|
||||
u16 frame_count; /* total frames in the animation */
|
||||
u16 key_count; /* number of animation keyframes */
|
||||
|
||||
void** texture_tbl; /* list of each texture */
|
||||
u8* animation_pattern; /* list of which texture to use per keyframe (runs at 30 FPS) */
|
||||
|
||||
u16* keyframes; /* list of keyframe frame indices */
|
||||
} EVW_ANIME_TEXANIME;
|
||||
|
||||
typedef struct evw_anime_s {
|
||||
s8 segment; /* Negative segments signal the end of the animation data array */
|
||||
s16 type;
|
||||
void* data_p;
|
||||
} EVW_ANIME_DATA;
|
||||
|
||||
extern void Evw_Anime_Set(GAME_PLAY* play, EVW_ANIME_DATA* evw_anime_data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -112,6 +112,8 @@ typedef struct sound_source_info_s {
|
||||
xyz_t wpos;
|
||||
} mFI_sound_source_info_c;
|
||||
|
||||
|
||||
|
||||
extern int mFI_CheckFieldData();
|
||||
extern mActor_name_t mFI_GetFieldId();
|
||||
extern int mFI_GetClimate();
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor_type.h"
|
||||
#include "libforest/gbi_extensions.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -29,6 +30,8 @@ extern "C" {
|
||||
|
||||
#define BLOCKXZ_2_BLOCKIDX(x, z) ((z) * BLOCK_X_NUM + (x))
|
||||
|
||||
#define mFM_VISIBLE_BLOCK_NUM 4 /* number of visible blocks (nearest to the Player) */
|
||||
|
||||
/* sizeof(mFM_combination_c) == 2 */
|
||||
typedef struct block_combination_s {
|
||||
/* 0x00 */ u16 combination_type:14; /* acre type index */
|
||||
@@ -47,6 +50,42 @@ typedef struct block_combo_s {
|
||||
/* 0x05 */ u8 type;
|
||||
} mFM_combo_info_c;
|
||||
|
||||
typedef struct field_display_list_info_s {
|
||||
int block_x;
|
||||
int block_z;
|
||||
u8* display_list;
|
||||
} mFM_field_draw_info_c;
|
||||
|
||||
typedef struct field_pal_s {
|
||||
u16* earth_pal;
|
||||
u16* cliff_pal;
|
||||
u16* bush_pal;
|
||||
u16* flower0_pal;
|
||||
u16* flower1_pal;
|
||||
u16* flower2_pal;
|
||||
u16* grass_pal;
|
||||
u16* tree_pal;
|
||||
u16* cedar_tree_pal; // probably?
|
||||
u16* palm_tree_pal;
|
||||
u16* golden_tree_pal;
|
||||
} mFM_field_pal_c;
|
||||
|
||||
typedef struct field_bg_info_s {
|
||||
mFM_combination_c bg_id;
|
||||
Gfx* oapque_gfx;
|
||||
Gfx* translucent_gfx;
|
||||
|
||||
} mFM_bg_info_c;
|
||||
|
||||
typedef struct field_info_s {
|
||||
mActor_name_t field_id;
|
||||
u32 _04; // only set, never read?
|
||||
mFM_field_draw_info_c bg_draw_info[mFM_VISIBLE_BLOCK_NUM];
|
||||
u8* bg_display_list_p[mFM_VISIBLE_BLOCK_NUM];
|
||||
mFM_field_pal_c field_palette;
|
||||
|
||||
} mFM_fdinfo_c;
|
||||
|
||||
extern u8* g_block_type_p;
|
||||
extern int* g_block_kind_p;
|
||||
|
||||
|
||||
+3
-1
@@ -39,7 +39,9 @@ struct game_play_s {
|
||||
/* 0x1FA4 */ u8 _1FA4[0x2008 - 0x1FA4];
|
||||
/* 0x2008 */ int next_scene_no;
|
||||
/* 0x200C */ MtxF matrix;
|
||||
/* 0x204C */ u8 _204C[0x20D0-0x204C];
|
||||
/* 0x204C */ u8 _204C[0x2090 - 0x204C];
|
||||
/* 0x2090 */ u32 game_frame;
|
||||
/* 0x2094 */ u8 _2094[0x20D0 - 0x2094];
|
||||
/* 0x20D0 */ u8 fb_fade_type;
|
||||
/* 0x20D1 */ u8 fb_wipe_type;
|
||||
/* 0x20D2 */ u8 fb_mode;
|
||||
|
||||
Reference in New Issue
Block a user