mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-08-06 17:32:26 -04:00
Partial implementation of m_event.c, link 3 TUs
This commit is contained in:
@@ -3,13 +3,33 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor.h"
|
||||
#include "ac_aprilfool_control_h.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define aAPC_GET_NPC_BIT(bitfield, data_idx) ((1 << (data_idx)) & (bitfield))
|
||||
#define aAPC_SET_NPC_BIT(bitfield, data_idx) ((bitfield) | (1 << (data_idx)))
|
||||
|
||||
typedef int (*aAPC_TALK_CHK_PROC)(mActor_name_t);
|
||||
typedef void (*aAPC_TALK_SET_PROC)(mActor_name_t);
|
||||
typedef int (*aAPC_GET_MSG_NUM_PROC)(mActor_name_t, int);
|
||||
|
||||
typedef struct aprilfool_control_clip_s {
|
||||
aAPC_TALK_CHK_PROC talk_chk_proc;
|
||||
aAPC_TALK_SET_PROC talk_set_proc;
|
||||
aAPC_GET_MSG_NUM_PROC get_msg_num_proc;
|
||||
aAPC_event_save_data_c* event_save_data_p;
|
||||
} aAPC_Clip_c;
|
||||
|
||||
extern ACTOR_PROFILE Aprilfool_Control_Profile;
|
||||
|
||||
typedef struct aprilfool_control_s {
|
||||
ACTOR actor_class;
|
||||
aAPC_Clip_c clip;
|
||||
} APRILFOOL_CONTROL_ACTOR;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef AC_APRILFOOL_CONTROL_H_H
|
||||
#define AC_APRILFOOL_CONTROL_H_H
|
||||
|
||||
#include "types.h"
|
||||
#include "m_private.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct aprilfool_event_save_data_s {
|
||||
u16 talk_bitfield[PLAYER_NUM];
|
||||
} aAPC_event_save_data_c;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -3,11 +3,58 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor.h"
|
||||
#include "m_npc.h"
|
||||
#include "m_olib.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct event_manager_actor_s EVENT_MANAGER_ACTOR;
|
||||
|
||||
enum {
|
||||
aEvMgr_EVENT_PLACE_SHRINE = 4,
|
||||
};
|
||||
|
||||
typedef int (*aEvMgr_TITLE_FADE_PROC)(EVENT_MANAGER_ACTOR*, int, u8, int);
|
||||
|
||||
typedef struct event_manager_clip_s {
|
||||
EVENT_MANAGER_ACTOR* event_manager_actor;
|
||||
aEvMgr_TITLE_FADE_PROC title_fade_proc;
|
||||
} aEvMgr_Clip_c;
|
||||
|
||||
typedef struct event_manager_field_info_s {
|
||||
BlockOrUnit_c block_max;
|
||||
Anmhome_c* reserve_buf;
|
||||
int reserve_num;
|
||||
} aEvMgr_field_info_c;
|
||||
|
||||
struct event_manager_actor_s {
|
||||
ACTOR actor_class;
|
||||
int player_bx;
|
||||
int player_bz;
|
||||
int player_last_bx;
|
||||
int player_last_bz;
|
||||
u8 _184[0x1E8 - 0x184];
|
||||
aEvMgr_field_info_c field_info;
|
||||
u8 _1F8[0x208 - 0x1F8];
|
||||
int change;
|
||||
BlockOrUnit_c next_block;
|
||||
BlockOrUnit_c pool_block;
|
||||
int pool_block_exists;
|
||||
BlockOrUnit_c station_block;
|
||||
int station_block_exists;
|
||||
BlockOrUnit_c shrine_block;
|
||||
int shrine_block_exists;
|
||||
BlockOrUnit_c player_home_block;
|
||||
int player_home_exists;
|
||||
BlockOrUnit_c dock_block;
|
||||
int dock_block_exists;
|
||||
int _250;
|
||||
int _254;
|
||||
aEvMgr_Clip_c clip;
|
||||
};
|
||||
|
||||
extern ACTOR_PROFILE Event_Manager_Profile;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -3,11 +3,65 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor.h"
|
||||
#include "ac_groundhog_control_h.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define aGHC_TIME_CHECK(hour, min, sec) (Common_Get(time.now_sec) >= ((hour) * mTM_SECONDS_IN_HOUR + (min) * mTM_SECONDS_IN_MINUTE + (sec)))
|
||||
|
||||
typedef struct groundhog_control_actor_s GROUNDHOG_CONTROL_ACTOR;
|
||||
|
||||
enum {
|
||||
aGHC_ACTION_BEFORE_800,
|
||||
aGHC_ACTION_BIRTH_RESET_WAIT,
|
||||
aGHC_ACTION_BIRTH_RESET,
|
||||
aGHC_ACTION_RETIRE_RESET_WAIT,
|
||||
aGHC_ACTION_RESET_SPEECH_BGM_START_WAIT,
|
||||
aGHC_ACTION_SONCHO_SPEECH_START_WAIT,
|
||||
aGHC_ACTION_SONCHO_SPEECH_END_WAIT,
|
||||
aGHC_ACTION_FADE_OUT_START_WAIT,
|
||||
aGHC_ACTION_AFTER_800,
|
||||
|
||||
aGHC_ACTION_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
aGHC_ATTENTION_SONCHO,
|
||||
aGHC_ATTENTION_GROUNDHOG,
|
||||
|
||||
aGHC_ATTENTION_NUM
|
||||
};
|
||||
|
||||
enum {
|
||||
aGHC_EVENT_STATE_NONE, /* nothing to report */
|
||||
aGHC_EVENT_STATE_MAJIN_DONE, /* ac_ev_majin signals it is done */
|
||||
aGHC_EVENT_STATE_SONCHO_DONE, /* ac_ev_speech_soncho signals it is done */
|
||||
|
||||
aGHC_EVENT_STATE_NUM
|
||||
};
|
||||
|
||||
typedef struct groundhog_control_clip_s {
|
||||
int now_term;
|
||||
ACTOR* groundhog_npc_actor;
|
||||
ACTOR* attention_target_actor;
|
||||
int fading_title;
|
||||
} aGHC_Clip_c;
|
||||
|
||||
typedef void (*aGHC_ACTION_PROC)(GROUNDHOG_CONTROL_ACTOR*, GAME_PLAY*);
|
||||
|
||||
struct groundhog_control_actor_s {
|
||||
ACTOR actor_class;
|
||||
int action;
|
||||
aGHC_ACTION_PROC action_proc;
|
||||
int event_state;
|
||||
int timer;
|
||||
aGHC_Clip_c clip;
|
||||
aGHC_event_area_c* event_area_p;
|
||||
int attention_mode;
|
||||
};
|
||||
|
||||
extern ACTOR_PROFILE Groundhog_Control_Profile;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef AC_GROUNDHOG_CONTROL_H_H
|
||||
#define AC_GROUNDHOG_CONTROL_H_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct groundhog_control_event_data_s {
|
||||
int awaiting_birth;
|
||||
} aGHC_event_area_c;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+11
-1
@@ -20,11 +20,20 @@ typedef struct npc_draw_data_s {
|
||||
u8 _04[0x68]; // TODO
|
||||
} aNPC_draw_data_c;
|
||||
|
||||
enum {
|
||||
aNPC_ATTENTION_TYPE_NONE,
|
||||
aNPC_ATTENTION_TYPE_ACTOR,
|
||||
aNPC_ATTENTION_TYPE_POSITION,
|
||||
|
||||
aNPC_ATTENTION_TYPE_NUM
|
||||
};
|
||||
|
||||
typedef int (*aNPC_SETUP_ACTOR_PROC)(GAME_PLAY*, mActor_name_t, s8, int, s16, int, int, int, int);
|
||||
typedef void (*aNPC_DMA_DRAW_DATA_PROC)(aNPC_draw_data_c*, mActor_name_t);
|
||||
typedef void (*aNPC_FREE_OVERLAY_AREA_PROC)(ACTOR_DLFTBL*);
|
||||
typedef ACTOR* (*aNPC_GET_ACTOR_AREA_PROC)(size_t, const char*, int);
|
||||
typedef void (*aNPC_FREE_ACTOR_AREA_PROC)(ACTOR*);
|
||||
typedef void (*aNPC_SET_ATTENTION_REQUEST_PROC)(u8, ACTOR*, xyz_t*);
|
||||
|
||||
typedef int (*aNPC_FORCE_CALL_REQ_PROC)(NPC_ACTOR*, int);
|
||||
|
||||
@@ -35,7 +44,8 @@ struct ac_npc_clip_s {
|
||||
aNPC_GET_ACTOR_AREA_PROC get_actor_area_proc;
|
||||
aNPC_FREE_ACTOR_AREA_PROC free_actor_area_proc;
|
||||
aNPC_DMA_DRAW_DATA_PROC dma_draw_data_proc;
|
||||
void* _018[(0x124 - 0x018) / sizeof(void*)];
|
||||
aNPC_SET_ATTENTION_REQUEST_PROC set_attention_request_proc;
|
||||
void* _01C[(0x124 - 0x01C) / sizeof(void*)];
|
||||
aNPC_FORCE_CALL_REQ_PROC force_call_req_proc;
|
||||
void* _128;
|
||||
};
|
||||
|
||||
@@ -15,6 +15,9 @@ extern void mBGMPsComp_make_ps_wipe(u16 ps_wipe);
|
||||
extern void mBGMPsComp_delete_ps_demo(u8 bgm_num, u16 stop_type);
|
||||
extern void mBGMPsComp_make_ps_demo(u8 bgm_no, u16 stop_type);
|
||||
extern void mBGMPsComp_museum_status(int museum_status);
|
||||
extern void mBGMPsComp_make_ps_quietField(u16 stop_type);
|
||||
extern void mBGMPsComp_delete_ps_quietField();
|
||||
extern void mBGMPsComp_make_ps_co_quiet(u16 stop_type, s16 frames);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+10
-1
@@ -11,6 +11,9 @@
|
||||
#include "bg_item_h.h"
|
||||
#include "ac_npc.h"
|
||||
#include "ac_tools.h"
|
||||
#include "ac_aprilfool_control.h"
|
||||
#include "ac_groundhog_control.h"
|
||||
#include "ac_event_manager.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -35,7 +38,13 @@ typedef struct clip_s {
|
||||
/* 0x0AC */ aGYO_Clip_c* gyo_clip;
|
||||
/* 0x0B0 */ void* _0B0[(0x0DC - 0x0B0) / sizeof(void*)];
|
||||
/* 0x0DC */ aAL_Clip_c* animal_logo_clip;
|
||||
/* 0x0E0 */ void* _0E0[(0x104 - 0x0E0) / sizeof(void*)];
|
||||
/* 0x0E0 */ void* _0E0[(0x0EC - 0x0E0) / sizeof(void*)];
|
||||
/* 0x0EC */ aAPC_Clip_c* aprilfool_control_clip;
|
||||
/* 0x0F0 */ aEvMgr_Clip_c* event_manager_clip;
|
||||
/* 0x0F4 */ aGHC_Clip_c* groundhog_control_clip;
|
||||
/* 0x0F8 */ void* _0F8;
|
||||
/* 0x0FC */ void* _0FC;
|
||||
/* 0x100 */ void* _100;
|
||||
} Clip_c;
|
||||
|
||||
extern void clip_clear();
|
||||
|
||||
@@ -94,7 +94,7 @@ typedef struct Save_s {
|
||||
/* 0x020340 */ Shop_c shop; /* Nook's shop */
|
||||
/* 0x020480 */ Kabu_price_c kabu_price_schedule; /* Stalk Market info */
|
||||
/* 0x020498 */ mEv_event_save_c event_save_data;
|
||||
/* 0x020554 */ u8 _20554[0x20688 - 0x20554]; /* active event data? */
|
||||
/* 0x020554 */ mEv_save_common_data_c event_save_common;
|
||||
/* 0x020688 */ mActor_name_t fruit; /* town fruit type */
|
||||
/* 0x02068A */ u8 house_arrangement; /* 2 bits for each player for the # of house they own */
|
||||
/* 0x02068B */ u8 num_statues; /* number of statues built for players who have paid off their debts */
|
||||
@@ -198,7 +198,8 @@ typedef struct common_data_s {
|
||||
/* 0x02666C */ s16 weather;
|
||||
/* 0x02666E */ s16 weather_intensity;
|
||||
/* 0x026670 */ lbRTC_time_c weather_time;
|
||||
/* 0x026678 */ u8 _26678[0x2669C - 0x26678];
|
||||
/* 0x026678 */ u8 _26678[0x26684 - 0x26678];
|
||||
/* 0x026684 */ mEv_event_common_u special_event_common;
|
||||
/* 0x02669C */ mQst_not_saved_c quest;
|
||||
/* 0x0266A4 */ int scene_from_title_demo; /* next scene to be loaded when title demo finishes */
|
||||
/* 0x0266A8 */ mNPS_schedule_c npc_schedule[SCHEDULE_NUM];
|
||||
@@ -220,8 +221,9 @@ typedef struct common_data_s {
|
||||
/* 0x0285C1 */ u8 _285C1;
|
||||
/* 0x0285C2 */ u8 make_npc2_actor;
|
||||
/* 0x0285C3 */ u8 _285C3[0x0285C6 - 0x0285C3];
|
||||
/* 0x0285C6 */ u8 event_id;
|
||||
/* 0x0285C7 */ u8 _285C7[0x0287F8 - 0x0285C7];
|
||||
/* 0x0285C6 */ u8 event_title_flags;
|
||||
/* 0x0285C7 */ u8 event_title_fade_in_progress;
|
||||
/* 0x0285C8 */ mEv_common_data_c event_common;
|
||||
/* 0x0287F8 */ s8 current_famicom_rom;
|
||||
/* 0x0287F9 */ s8 famicom_287F9;
|
||||
/* 0x0287FA */ u8 _287FA[0x28838 - 0x0287FA];
|
||||
@@ -275,7 +277,7 @@ typedef struct common_data_s {
|
||||
/* 0X02DBAC */ int famicom_2DBAC;
|
||||
/* 0x02DBB0 */ s16 can_look_goki_count;
|
||||
/* 0x02DBB4 */ f32 rainbow_opacity; /* current opacity of rainbow (0.0f - 1.0f) */
|
||||
/* 0x02DBB8 */ u32 event_flags[7]; /* TODO: make array size a definition/enum */
|
||||
/* 0x02DBB8 */ u32 event_flags[mEv_EVENT_TYPE_NUM];
|
||||
/* 0x02DBD4 */ xyz_t* pluss_bridge_pos; /* position of extra bridge */
|
||||
/* 0x02DBD8 */ lbRTC_time_c auto_nwrite_time; /* cached notice time used for fishing tourney results? */
|
||||
/* 0x02DBE0 */ u8 rhythym_updated;
|
||||
|
||||
+264
-13
@@ -6,11 +6,52 @@
|
||||
#include "m_personal_id.h"
|
||||
#include "m_private.h"
|
||||
#include "m_time.h"
|
||||
#include "m_olib.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define mEv_TODAY_EVENT_NUM 16
|
||||
|
||||
#define mEv_SCHEDULE_LAST_WEEKDAY_OF_MONTH 6 /* day of last weekday of the month */
|
||||
#define mEv_SCHEDULE_WEEKLY 7 /* scheduled for the desired day this week (e.g. this saturday) */
|
||||
|
||||
#define mEv_SCHEDULE_MULTIDAY 0x40 /* event scheduled over more than a single day */
|
||||
#define mEv_SCHEDULE_TODAY 0x80 /* event will be active on the day loaded */
|
||||
|
||||
typedef union event_monthday_s {
|
||||
struct {
|
||||
s8 month;
|
||||
s8 day;
|
||||
};
|
||||
u16 raw;
|
||||
} mEv_MonthDay_u;
|
||||
|
||||
typedef struct event_today_s {
|
||||
int type;
|
||||
u32 active_hours; /* bitfield (24 bits) */
|
||||
mEv_MonthDay_u begin_date;
|
||||
mEv_MonthDay_u end_date;
|
||||
u16 status;
|
||||
u16 pad;
|
||||
} mEv_event_today_c;
|
||||
|
||||
typedef struct event_date_s {
|
||||
struct {
|
||||
mEv_MonthDay_u month_day;
|
||||
u8 _2;
|
||||
u8 hour;
|
||||
};
|
||||
u32 raw;
|
||||
} mEv_schedule_date_u;
|
||||
|
||||
typedef struct event_schedule_s {
|
||||
mEv_schedule_date_u date[2]; /* 0 = begin, 1 = end */
|
||||
s16 _8;
|
||||
s16 type; /* event type */
|
||||
} mEv_schedule_c;
|
||||
|
||||
/**
|
||||
* Event type definition
|
||||
* xxxyyyyy yyyyyyyy yyyyyyyy yyyyyyyy
|
||||
@@ -40,7 +81,7 @@ enum event_type {
|
||||
mEv_DAILY_EVENT, /* checked daily always? aSL_ReportShopOpen2Event has event 3 */
|
||||
mEv_SPECL_EVENT, /* ??? secondary special npc event data? */
|
||||
|
||||
mEv_EVENT_NUM
|
||||
mEv_EVENT_TYPE_NUM
|
||||
};
|
||||
|
||||
enum events {
|
||||
@@ -111,16 +152,139 @@ enum week_type {
|
||||
};
|
||||
|
||||
enum event_table {
|
||||
mEv_EVENT_MOTHERS_DAY = 23,
|
||||
mEv_EVENT_FATHERS_DAY = 26,
|
||||
mEv_EVENT_FISHING_TOURNEY_1 = 29,
|
||||
mEv_EVENT_MUSHROOM_SEASON = 47,
|
||||
mEv_EVENT_HALLOWEEN = 49,
|
||||
mEv_EVENT_FISHING_TOURNEY_2 = 54,
|
||||
mEv_EVENT_GHOST = 64,
|
||||
mEv_EVENT_KK_SLIDER = 71,
|
||||
mEv_EVENT_BROKER_SALE = 75,
|
||||
mEv_EVENT_SHOP_SALE = 78,
|
||||
mEv_EVENT_RUMOR_NEW_YEARS_DAY,
|
||||
mEv_EVENT_NEW_YEARS_DAY,
|
||||
mEv_EVENT_RUMOR_KAMAKURA,
|
||||
mEv_EVENT_KAMAKURA,
|
||||
mEv_EVENT_SONCHO_VACATION_JANUARY,
|
||||
mEv_EVENT_SONCHO_VACATION_FEBRUARY,
|
||||
mEv_EVENT_RUMOR_GROUNDHOG_DAY,
|
||||
mEv_EVENT_GROUNDHOG_DAY,
|
||||
mEv_EVENT_RUMOR_VALENTINES_DAY,
|
||||
mEv_EVENT_VALENTINES_DAY,
|
||||
mEv_EVENT_RUMOR_SPRING_SPORTS_FAIR,
|
||||
mEv_EVENT_SPRING_EQUINOX,
|
||||
mEv_EVENT_SPORTS_FAIR_BALL_TOSS,
|
||||
mEv_EVENT_SPORTS_FAIR_AEROBICS,
|
||||
mEv_EVENT_SPORTS_FAIR_TUG_OF_WAR,
|
||||
mEv_EVENT_SPORTS_FAIR_FOOT_RACE,
|
||||
mEv_EVENT_SPRING_SPORTS_FAIR,
|
||||
mEv_EVENT_APRILFOOLS_DAY,
|
||||
mEv_EVENT_RUMOR_APRILFOOLS_DAY,
|
||||
mEv_EVENT_RUMOR_CHERRY_BLOSSOM_FESTIVAL,
|
||||
mEv_EVENT_CHERRY_BLOSSOM_FESTIVAL,
|
||||
mEv_EVENT_NATURE_DAY,
|
||||
mEv_EVENT_SPRING_CLEANING,
|
||||
mEv_EVENT_MOTHERS_DAY,
|
||||
mEv_EVENT_SUMMER_CAMPER,
|
||||
mEv_EVENT_GRADUATION_DAY,
|
||||
mEv_EVENT_FATHERS_DAY,
|
||||
mEv_EVENT_RUMOR_FISHING_TOURNEY_1,
|
||||
mEv_EVENT_TALK_FISHING_TOURNEY_1, // for dialog?
|
||||
mEv_EVENT_FISHING_TOURNEY_1,
|
||||
mEv_EVENT_TOWN_DAY,
|
||||
mEv_EVENT_RUMOR_FIREWORKS_SHOW,
|
||||
mEv_EVENT_FIREWORKS_SHOW,
|
||||
mEv_EVENT_RUMOR_MORNING_AEROBICS,
|
||||
mEv_EVENT_TALK_MORNING_AEROBICS,
|
||||
mEv_EVENT_MORNING_AEROBICS,
|
||||
mEv_EVENT_RUMOR_METEOR_SHOWER,
|
||||
mEv_EVENT_METEOR_SHOWER,
|
||||
mEv_EVENT_FOUNDERS_DAY,
|
||||
mEv_EVENT_LABOR_DAY,
|
||||
mEv_EVENT_RUMOR_FALL_SPORTS_FAIR,
|
||||
mEv_EVENT_AUTUMN_EQUINOX,
|
||||
mEv_EVENT_HARVEST_MOON_DAY,
|
||||
mEv_EVENT_HARVEST_MOON_FESTIVAL,
|
||||
mEv_EVENT_EXPLORERS_DAY,
|
||||
mEv_EVENT_RUMOR_MUSHROOM_SEASON,
|
||||
mEv_EVENT_TALK_MUSHROOM_SEASON,
|
||||
mEv_EVENT_MUSHROOM_SEASON,
|
||||
mEv_EVENT_RUMOR_HALLOWEEN,
|
||||
mEv_EVENT_HALLOWEEN,
|
||||
mEv_EVENT_MAYORS_DAY,
|
||||
mEv_EVENT_OFFICERS_DAY,
|
||||
mEv_EVENT_RUMOR_FISHING_TOURNEY_2,
|
||||
mEv_EVENT_TALK_FISHING_TOURNEY_2,
|
||||
mEv_EVENT_FISHING_TOURNEY_2,
|
||||
mEv_EVENT_RUMOR_HARVEST_FESTIVAL,
|
||||
mEv_EVENT_HARVEST_FESTIVAL,
|
||||
mEv_EVENT_SALE_DAY,
|
||||
mEv_EVENT_SNOW_DAY,
|
||||
mEv_EVENT_TOY_DAY_SONCHO,
|
||||
mEv_EVENT_RUMOR_TOY_DAY,
|
||||
mEv_EVENT_TOY_DAY_JINGLE,
|
||||
mEv_EVENT_SNOWMAN_SEASON,
|
||||
mEv_EVENT_RUMOR_NEW_YEARS_EVE_COUNTDOWN,
|
||||
mEv_EVENT_NEW_YEARS_EVE_COUNTDOWN,
|
||||
mEv_EVENT_CHERRY_BLOSSOM_PETALS,
|
||||
mEv_EVENT_TALK_TOY_DAY,
|
||||
|
||||
mEv_EVENT_PLAYER_BIRTHDAY,
|
||||
|
||||
mEv_EVENT_DOZAEMON,
|
||||
mEv_EVENT_KABU_PEDDLER,
|
||||
mEv_EVENT_LOTTERY,
|
||||
mEv_EVENT_KK_SLIDER,
|
||||
|
||||
mEv_EVENT_HANDBILL_BROKER,
|
||||
mEv_EVENT_HANDBILL_SHOP_SALE,
|
||||
|
||||
mEv_EVENT_ARTIST,
|
||||
mEv_EVENT_BROKER_SALE,
|
||||
mEv_EVENT_DESIGNER,
|
||||
mEv_EVENT_GYPSY,
|
||||
mEv_EVENT_SHOP_SALE,
|
||||
mEv_EVENT_CARPET_PEDDLER,
|
||||
|
||||
mEv_EVENT_SONCHO_NEW_YEARS_DAY,
|
||||
mEv_EVENT_SONCHO_GROUNDHOG_DAY,
|
||||
mEv_EVENT_SONCHO_SPRING_SPORTS_FAIR,
|
||||
mEv_EVENT_SONCHO_APRILFOOLS_DAY,
|
||||
mEv_EVENT_SONCHO_CHERRY_BLOSSOM_FESTIVAL,
|
||||
mEv_EVENT_SONCHO_NATURE_DAY,
|
||||
mEv_EVENT_SONCHO_SPRING_CLEANING,
|
||||
mEv_EVENT_SONCHO_MOTHERS_DAY,
|
||||
mEv_EVENT_SONCHO_GRADUATION_DAY,
|
||||
mEv_EVENT_SONCHO_FATHERS_DAY,
|
||||
mEv_EVENT_SONCHO_FISHING_TOURNEY_1,
|
||||
mEv_EVENT_SONCHO_TOWN_DAY,
|
||||
mEv_EVENT_SONCHO_FIREWORKS_SHOW,
|
||||
mEv_EVENT_SONCHO_METEOR_SHOWER,
|
||||
mEv_EVENT_SONCHO_FOUNDERS_DAY,
|
||||
mEv_EVENT_SONCHO_LABOR_DAY,
|
||||
mEv_EVENT_SONCHO_FALL_SPORTS_FAIR,
|
||||
mEv_EVENT_SONCHO_HARVEST_MOON_FESTIVAL,
|
||||
mEv_EVENT_SONCHO_EXPLORERS_DAY,
|
||||
mEv_EVENT_SONCHO_HALLOWEEN,
|
||||
mEv_EVENT_SONCHO_MAYORS_DAY,
|
||||
mEv_EVENT_SONCHO_OFFICERS_DAY,
|
||||
mEv_EVENT_SONCHO_FISHING_TOURNEY_2,
|
||||
mEv_EVENT_SONCHO_HARVEST_FESTIVAL,
|
||||
mEv_EVENT_SONCHO_SALE_DAY,
|
||||
mEv_EVENT_SONCHO_SNOW_DAY,
|
||||
mEv_EVENT_SONCHO_TOY_DAY,
|
||||
|
||||
mEv_EVENT_TALK_NEW_YEARS_COUNTDOWN,
|
||||
mEv_EVENT_HARVEST_FESTIVAL_FRANKLIN,
|
||||
|
||||
mEv_EVENT_WEATHER_CLEAR,
|
||||
mEv_EVENT_WEATHER_SNOW,
|
||||
mEv_EVENT_WEATHER_SPORTS_FAIR,
|
||||
|
||||
mEv_EVENT_BRIDGE_MAKE,
|
||||
mEv_EVENT_SONCHO_BRIDGE_MAKE,
|
||||
|
||||
mEv_EVENT_GHOST,
|
||||
mEv_EVENT_MASK_CAT,
|
||||
|
||||
mEv_EVENT_74, // unused?
|
||||
|
||||
mEv_EVENT_KOINOBORI,
|
||||
|
||||
mEv_EVENT_76, // unused?
|
||||
|
||||
mEv_EVENT_NUM
|
||||
};
|
||||
|
||||
#define mEv_STATUS_ACTIVE (1 << 0) /* event is active */
|
||||
@@ -130,6 +294,7 @@ enum event_table {
|
||||
#define mEv_STATUS_RUN (1 << 4) /* event should run */
|
||||
#define mEv_STATUS_ERROR (1 << 5) /* event is in error state */
|
||||
#define mEv_STATUS_TALK (1 << 6) /* event requires talking to player */
|
||||
#define mEv_STATUS_EXIST (1 << 7) /* event is scheduled */
|
||||
|
||||
#define mEv_GHOST_HITODAMA_NUM 5
|
||||
typedef struct ghost_spirit_block_data_s {
|
||||
@@ -211,7 +376,7 @@ typedef union {
|
||||
typedef struct special_event_s {
|
||||
lbRTC_time_c scheduled;
|
||||
u32 type;
|
||||
mEv_special_u;
|
||||
mEv_special_u event;
|
||||
} mEv_special_c;
|
||||
|
||||
typedef struct save_event_data_s {
|
||||
@@ -220,6 +385,24 @@ typedef struct save_event_data_s {
|
||||
u32 flags;
|
||||
} mEv_event_save_c;
|
||||
|
||||
typedef struct broker_event_common_s {
|
||||
PersonalID_c entered_pid;
|
||||
int hide_npc;
|
||||
} mEv_broker_common_c;
|
||||
|
||||
typedef struct santa_event_common_s {
|
||||
u8 present;
|
||||
u8 talk_counter;
|
||||
s8 bx;
|
||||
s8 bz;
|
||||
mActor_name_t last_talk_cloth;
|
||||
} mEv_santa_event_common_c;
|
||||
|
||||
typedef union {
|
||||
mEv_broker_common_c broker;
|
||||
mEv_santa_event_common_c santa;
|
||||
} mEv_event_common_u;
|
||||
|
||||
typedef struct event_s {
|
||||
u8 day;
|
||||
u8 hour;
|
||||
@@ -233,18 +416,86 @@ typedef struct event_s {
|
||||
int unused[5];
|
||||
} Event_c;
|
||||
|
||||
typedef struct event_info_s {
|
||||
s8 type;
|
||||
s8 id;
|
||||
u16 year;
|
||||
mEv_MonthDay_u start_date;
|
||||
mEv_MonthDay_u end_date;
|
||||
} mEv_info_c;
|
||||
|
||||
typedef struct event_place_data_s {
|
||||
BlockOrUnit_c block;
|
||||
BlockOrUnit_c unit;
|
||||
mActor_name_t actor_name;
|
||||
s16 flag;
|
||||
} mEv_place_data_c;
|
||||
|
||||
typedef struct event_place_s {
|
||||
mEv_info_c info;
|
||||
mEv_place_data_c data;
|
||||
} mEv_place_c;
|
||||
|
||||
typedef struct event_area_s {
|
||||
mEv_info_c info;
|
||||
int data[11];
|
||||
} mEv_area_c;
|
||||
|
||||
typedef struct event_common_s {
|
||||
s16 _00;
|
||||
s16 area_use_bitfield;
|
||||
mEv_area_c area[5];
|
||||
s16 too_short;
|
||||
s16 place_use_bitfield;
|
||||
mEv_place_c place[10];
|
||||
s16 fieldday_event_id;
|
||||
s16 fieldday_event_over_status;
|
||||
u32 unused[2];
|
||||
} mEv_common_data_c;
|
||||
|
||||
typedef struct event_save_event_info_s {
|
||||
s8 type;
|
||||
s8 flags;
|
||||
} mEv_event_save_info_c;
|
||||
|
||||
typedef struct event_common_save_data {
|
||||
mEv_event_save_info_c special_event;
|
||||
mEv_event_save_info_c weekly_event;
|
||||
u16 dates[8];
|
||||
int area_use_bitfield;
|
||||
mEv_area_c area[5];
|
||||
int last_date;
|
||||
int _120;
|
||||
u32 valentines_day_date;
|
||||
u32 white_day_date; /* unused in AC */
|
||||
u16 ghost_day;
|
||||
u16 bridge_day; // last date suspension bridge event was active
|
||||
struct {
|
||||
u8 used_all_locations:1; // set to true when tortimer has cycled through all possible bridge locations?
|
||||
u8 locations_used:7; // index of river acre w/ possible bridge location currently at
|
||||
} bridge_flags;
|
||||
u8 ghost_event_type; // 0x72 will spawn wisp, 0x77 won't?
|
||||
u8 soncho_event_type; // checked not equal to 0xFF for summer & fall fishing tournies
|
||||
u8 current_event_state; // used to signal when you've received an item from gracie or woken gulliver up
|
||||
} mEv_save_common_data_c;
|
||||
|
||||
extern int mEv_CheckFirstJob();
|
||||
extern int mEv_CheckFirstIntro();
|
||||
extern int mEv_CheckArbeit();
|
||||
extern int mEv_CheckTitleDemo();
|
||||
extern int mEv_check_status(int event, s16 status);
|
||||
extern s8* mEv_get_common_area(int type, s8 id);
|
||||
extern s8* mEv_reserve_common_area(int type, s8 id);
|
||||
extern s8* mEv_get_save_area(int type, s8 id);
|
||||
extern s8* mEv_reserve_save_area(int type, s8 id);
|
||||
extern void mEv_actor_dying_message(int type, ACTOR* actor);
|
||||
extern int mEv_ArbeitPlayer(u32 player_no);
|
||||
extern u16 mEv_get_special_event_type();
|
||||
extern int mEv_ClearEventSaveInfo(mEv_event_save_c* event_save_data);
|
||||
extern void mEv_ClearEventSaveInfo(mEv_event_save_c* event_save_data);
|
||||
extern void mEv_EventON(u32 event_kind);
|
||||
extern int mEv_CheckGateway();
|
||||
extern int mEv_check_schedule(int event);
|
||||
extern mEv_place_data_c* mEv_get_common_place(int type, s8 id);
|
||||
|
||||
extern int mEv_weekday2day(lbRTC_month_t month, int week_type, lbRTC_weekday_t weekday);
|
||||
extern void mEv_ClearEventInfo();
|
||||
|
||||
+106
-106
@@ -288,127 +288,127 @@ extern mActor_name_t bg_item_fg_sub_dig2take_conv(mActor_name_t item);
|
||||
/* begin environmental/nature objects */
|
||||
#define ENV_START 0x0800
|
||||
/* tree */
|
||||
#define TREE_SAPLING ENV_START
|
||||
#define TREE_S0 (TREE_SAPLING + 1)
|
||||
#define TREE_S1 (TREE_S0 + 1)
|
||||
#define TREE_S2 (TREE_S1 + 1)
|
||||
#define TREE (TREE_S2 + 1) /* fully grown */
|
||||
#define TREE_SAPLING (ENV_START + 0)
|
||||
#define TREE_S0 (ENV_START + 1)
|
||||
#define TREE_S1 (ENV_START + 2)
|
||||
#define TREE_S2 (ENV_START + 3)
|
||||
#define TREE (ENV_START + 4) /* fully grown */
|
||||
/* apple tree */
|
||||
#define TREE_APPLE_SAPLING (TREE + 1)
|
||||
#define TREE_APPLE_S0 (TREE_APPLE_SAPLING + 1)
|
||||
#define TREE_APPLE_S1 (TREE_APPLE_S0 + 1)
|
||||
#define TREE_APPLE_S2 (TREE_APPLE_S1 + 1)
|
||||
#define TREE_APPLE_NOFRUIT_0 (TREE_APPLE_S2 + 1) /* fully grown, no fruit */
|
||||
#define TREE_APPLE_NOFRUIT_1 (TREE_APPLE_NOFRUIT_0 + 1)
|
||||
#define TREE_APPLE_NOFRUIT_2 (TREE_APPLE_NOFRUIT_1 + 1)
|
||||
#define TREE_APPLE_FRUIT (TREE_APPLE_NOFRUIT_2 + 1)
|
||||
#define TREE_APPLE_SAPLING (ENV_START + 5)
|
||||
#define TREE_APPLE_S0 (ENV_START + 6)
|
||||
#define TREE_APPLE_S1 (ENV_START + 7)
|
||||
#define TREE_APPLE_S2 (ENV_START + 8)
|
||||
#define TREE_APPLE_NOFRUIT_0 (ENV_START + 9) /* fully grown, no fruit */
|
||||
#define TREE_APPLE_NOFRUIT_1 (ENV_START + 10)
|
||||
#define TREE_APPLE_NOFRUIT_2 (ENV_START + 11)
|
||||
#define TREE_APPLE_FRUIT (ENV_START + 12)
|
||||
/* orange tree */
|
||||
#define TREE_ORANGE_SAPLING (TREE_APPLE_FRUIT + 1)
|
||||
#define TREE_ORANGE_S0 (TREE_ORANGE_SAPLING + 1)
|
||||
#define TREE_ORANGE_S1 (TREE_ORANGE_S0 + 1)
|
||||
#define TREE_ORANGE_S2 (TREE_ORANGE_S1 + 1) /* fully grown, no fruit */
|
||||
#define TREE_ORANGE_NOFRUIT_0 (TREE_ORANGE_S2 + 1)
|
||||
#define TREE_ORANGE_NOFRUIT_1 (TREE_ORANGE_NOFRUIT_0 + 1)
|
||||
#define TREE_ORANGE_NOFRUIT_2 (TREE_ORANGE_NOFRUIT_1 + 1)
|
||||
#define TREE_ORANGE_FRUIT (TREE_ORANGE_NOFRUIT_2 + 1)
|
||||
#define TREE_ORANGE_SAPLING (ENV_START + 13)
|
||||
#define TREE_ORANGE_S0 (ENV_START + 14)
|
||||
#define TREE_ORANGE_S1 (ENV_START + 15)
|
||||
#define TREE_ORANGE_S2 (ENV_START + 16) /* fully grown, no fruit */
|
||||
#define TREE_ORANGE_NOFRUIT_0 (ENV_START + 17)
|
||||
#define TREE_ORANGE_NOFRUIT_1 (ENV_START + 18)
|
||||
#define TREE_ORANGE_NOFRUIT_2 (ENV_START + 19)
|
||||
#define TREE_ORANGE_FRUIT (ENV_START + 20)
|
||||
/* peach tree */
|
||||
#define TREE_PEACH_SAPLING (TREE_ORANGE_FRUIT + 1)
|
||||
#define TREE_PEACH_S0 (TREE_PEACH_SAPLING + 1)
|
||||
#define TREE_PEACH_S1 (TREE_PEACH_S0 + 1)
|
||||
#define TREE_PEACH_S2 (TREE_PEACH_S1 + 1)
|
||||
#define TREE_PEACH_NOFRUIT_0 (TREE_PEACH_S2 + 1) /* fully grown, no fruit */
|
||||
#define TREE_PEACH_NOFRUIT_1 (TREE_PEACH_NOFRUIT_0 + 1)
|
||||
#define TREE_PEACH_NOFRUIT_2 (TREE_PEACH_NOFRUIT_1 + 1)
|
||||
#define TREE_PEACH_FRUIT (TREE_PEACH_NOFRUIT_2 + 1)
|
||||
#define TREE_PEACH_SAPLING (ENV_START + 21)
|
||||
#define TREE_PEACH_S0 (ENV_START + 22)
|
||||
#define TREE_PEACH_S1 (ENV_START + 23)
|
||||
#define TREE_PEACH_S2 (ENV_START + 24)
|
||||
#define TREE_PEACH_NOFRUIT_0 (ENV_START + 25) /* fully grown, no fruit */
|
||||
#define TREE_PEACH_NOFRUIT_1 (ENV_START + 26)
|
||||
#define TREE_PEACH_NOFRUIT_2 (ENV_START + 27)
|
||||
#define TREE_PEACH_FRUIT (ENV_START + 28)
|
||||
/* pear tree */
|
||||
#define TREE_PEAR_SAPLING (TREE_PEACH_FRUIT + 1)
|
||||
#define TREE_PEAR_S0 (TREE_PEAR_SAPLING + 1)
|
||||
#define TREE_PEAR_S1 (TREE_PEAR_S0 + 1)
|
||||
#define TREE_PEAR_S2 (TREE_PEAR_S1 + 1)
|
||||
#define TREE_PEAR_NOFRUIT_0 (TREE_PEAR_S2 + 1) /* fully grown, no fruit */
|
||||
#define TREE_PEAR_NOFRUIT_1 (TREE_PEAR_NOFRUIT_0 + 1)
|
||||
#define TREE_PEAR_NOFRUIT_2 (TREE_PEAR_NOFRUIT_1 + 1)
|
||||
#define TREE_PEAR_FRUIT (TREE_PEAR_NOFRUIT_2 + 1)
|
||||
#define TREE_PEAR_SAPLING (ENV_START + 29)
|
||||
#define TREE_PEAR_S0 (ENV_START + 30)
|
||||
#define TREE_PEAR_S1 (ENV_START + 31)
|
||||
#define TREE_PEAR_S2 (ENV_START + 32)
|
||||
#define TREE_PEAR_NOFRUIT_0 (ENV_START + 33) /* fully grown, no fruit */
|
||||
#define TREE_PEAR_NOFRUIT_1 (ENV_START + 34)
|
||||
#define TREE_PEAR_NOFRUIT_2 (ENV_START + 35)
|
||||
#define TREE_PEAR_FRUIT (ENV_START + 36)
|
||||
/* cherry tree */
|
||||
#define TREE_CHERRY_SAPLING (TREE_PEAR_FRUIT + 1)
|
||||
#define TREE_CHERRY_S0 (TREE_CHERRY_SAPLING + 1)
|
||||
#define TREE_CHERRY_S1 (TREE_CHERRY_S0 + 1)
|
||||
#define TREE_CHERRY_S2 (TREE_CHERRY_S1 + 1)
|
||||
#define TREE_CHERRY_NOFRUIT_0 (TREE_CHERRY_S2 + 1) /* fully grown, no fruit */
|
||||
#define TREE_CHERRY_NOFRUIT_1 (TREE_CHERRY_NOFRUIT_0 + 1)
|
||||
#define TREE_CHERRY_NOFRUIT_2 (TREE_CHERRY_NOFRUIT_1 + 1)
|
||||
#define TREE_CHERRY_FRUIT (TREE_CHERRY_NOFRUIT_2 + 1)
|
||||
#define TREE_CHERRY_SAPLING (ENV_START + 37)
|
||||
#define TREE_CHERRY_S0 (ENV_START + 38)
|
||||
#define TREE_CHERRY_S1 (ENV_START + 39)
|
||||
#define TREE_CHERRY_S2 (ENV_START + 40)
|
||||
#define TREE_CHERRY_NOFRUIT_0 (ENV_START + 41) /* fully grown, no fruit */
|
||||
#define TREE_CHERRY_NOFRUIT_1 (ENV_START + 42)
|
||||
#define TREE_CHERRY_NOFRUIT_2 (ENV_START + 43)
|
||||
#define TREE_CHERRY_FRUIT (ENV_START + 44)
|
||||
/* money tree (1,000 Bells) */
|
||||
#define TREE_1000BELLS_SAPLING (TREE_CHERRY_FRUIT + 1)
|
||||
#define TREE_1000BELLS_S0 (TREE_1000BELLS_SAPLING + 1)
|
||||
#define TREE_1000BELLS_S1 (TREE_1000BELLS_S0 + 1)
|
||||
#define TREE_1000BELLS_S2 (TREE_1000BELLS_S1 + 1)
|
||||
#define TREE_1000BELLS (TREE_1000BELLS_S2 + 1) /* fully grown w/ bells */
|
||||
#define TREE_1000BELLS_SAPLING (ENV_START + 45)
|
||||
#define TREE_1000BELLS_S0 (ENV_START + 46)
|
||||
#define TREE_1000BELLS_S1 (ENV_START + 47)
|
||||
#define TREE_1000BELLS_S2 (ENV_START + 48)
|
||||
#define TREE_1000BELLS (ENV_START + 49) /* fully grown w/ bells */
|
||||
/* money tree (10,000 Bells) */
|
||||
#define TREE_10000BELLS_SAPLING (TREE_1000BELLS + 1)
|
||||
#define TREE_10000BELLS_S0 (TREE_10000BELLS_SAPLING + 1)
|
||||
#define TREE_10000BELLS_S1 (TREE_10000BELLS_S0 + 1)
|
||||
#define TREE_10000BELLS_S2 (TREE_10000BELLS_S1 + 1)
|
||||
#define TREE_10000BELLS (TREE_10000BELLS_S2 + 1) /* fully grown w/ bells */
|
||||
#define TREE_10000BELLS_SAPLING (ENV_START + 50)
|
||||
#define TREE_10000BELLS_S0 (ENV_START + 51)
|
||||
#define TREE_10000BELLS_S1 (ENV_START + 52)
|
||||
#define TREE_10000BELLS_S2 (ENV_START + 53)
|
||||
#define TREE_10000BELLS (ENV_START + 54) /* fully grown w/ bells */
|
||||
/* money tree (30,000 Bells) */
|
||||
#define TREE_30000BELLS_SAPLING (TREE_10000BELLS + 1)
|
||||
#define TREE_30000BELLS_S0 (TREE_30000BELLS_SAPLING + 1)
|
||||
#define TREE_30000BELLS_S1 (TREE_30000BELLS_S0 + 1)
|
||||
#define TREE_30000BELLS_S2 (TREE_30000BELLS_S1 + 1)
|
||||
#define TREE_30000BELLS (TREE_30000BELLS_S2 + 1) /* fully grown w/ bells */
|
||||
#define TREE_30000BELLS_SAPLING (ENV_START + 55)
|
||||
#define TREE_30000BELLS_S0 (ENV_START + 56)
|
||||
#define TREE_30000BELLS_S1 (ENV_START + 57)
|
||||
#define TREE_30000BELLS_S2 (ENV_START + 58)
|
||||
#define TREE_30000BELLS (ENV_START + 59) /* fully grown w/ bells */
|
||||
/* flower leaves (unused growth stage) */
|
||||
#define FLOWER_LEAVES_PANSIES0 (TREE_30000BELLS + 1) /* white */
|
||||
#define FLOWER_LEAVES_PANSIES1 (FLOWER_LEAVES_PANSIES0 + 1) /* purple */
|
||||
#define FLOWER_LEAVES_PANSIES2 (FLOWER_LEAVES_PANSIES1 + 1) /* yellow */
|
||||
#define FLOWER_LEAVES_COSMOS0 (FLOWER_LEAVES_PANSIES2 + 1) /* yellow */
|
||||
#define FLOWER_LEAVES_COSMOS1 (FLOWER_LEAVES_COSMOS0 + 1) /* purple */
|
||||
#define FLOWER_LEAVES_COSMOS2 (FLOWER_LEAVES_COSMOS1 + 1) /* blue */
|
||||
#define FLOWER_LEAVES_TULIP0 (FLOWER_LEAVES_COSMOS2 + 1) /* red */
|
||||
#define FLOWER_LEAVES_TULIP1 (FLOWER_LEAVES_TULIP0 + 1) /* white */
|
||||
#define FLOWER_LEAVES_TULIP2 (FLOWER_LEAVES_TULIP1 + 1) /* yellow */
|
||||
#define FLOWER_LEAVES_PANSIES0 (ENV_START + 60) /* white */
|
||||
#define FLOWER_LEAVES_PANSIES1 (ENV_START + 61) /* purple */
|
||||
#define FLOWER_LEAVES_PANSIES2 (ENV_START + 62) /* yellow */
|
||||
#define FLOWER_LEAVES_COSMOS0 (ENV_START + 63) /* yellow */
|
||||
#define FLOWER_LEAVES_COSMOS1 (ENV_START + 64) /* purple */
|
||||
#define FLOWER_LEAVES_COSMOS2 (ENV_START + 65) /* blue */
|
||||
#define FLOWER_LEAVES_TULIP0 (ENV_START + 66) /* red */
|
||||
#define FLOWER_LEAVES_TULIP1 (ENV_START + 67) /* white */
|
||||
#define FLOWER_LEAVES_TULIP2 (ENV_START + 68) /* yellow */
|
||||
/* flowers */
|
||||
#define FLOWER_PANSIES0 (FLOWER_LEAVES_TULIP2 + 1) /* white */
|
||||
#define FLOWER_PANSIES1 (FLOWER_PANSIES0 + 1) /* purple */
|
||||
#define FLOWER_PANSIES2 (FLOWER_PANSIES1 + 1) /* yellow */
|
||||
#define FLOWER_COSMOS0 (FLOWER_PANSIES2 + 1) /* yellow */
|
||||
#define FLOWER_COSMOS1 (FLOWER_COSMOS0 + 1) /* purple */
|
||||
#define FLOWER_COSMOS2 (FLOWER_COSMOS1 + 1) /* blue */
|
||||
#define FLOWER_TULIP0 (FLOWER_COSMOS2 + 1) /* red */
|
||||
#define FLOWER_TULIP1 (FLOWER_TULIP0 + 1) /* white */
|
||||
#define FLOWER_TULIP2 (FLOWER_TULIP1 + 1) /* yellow */
|
||||
#define FLOWER_PANSIES0 (ENV_START + 69) /* white */
|
||||
#define FLOWER_PANSIES1 (ENV_START + 70) /* purple */
|
||||
#define FLOWER_PANSIES2 (ENV_START + 71) /* yellow */
|
||||
#define FLOWER_COSMOS0 (ENV_START + 72) /* yellow */
|
||||
#define FLOWER_COSMOS1 (ENV_START + 73) /* purple */
|
||||
#define FLOWER_COSMOS2 (ENV_START + 74) /* blue */
|
||||
#define FLOWER_TULIP0 (ENV_START + 75) /* red */
|
||||
#define FLOWER_TULIP1 (ENV_START + 76) /* white */
|
||||
#define FLOWER_TULIP2 (ENV_START + 77) /* yellow */
|
||||
/* dead sapling */
|
||||
#define DEAD_SAPLING (FLOWER_TULIP2 + 1)
|
||||
#define DEAD_SAPLING (ENV_START + 78)
|
||||
/* money tree (100 Bells) */
|
||||
#define TREE_100BELLS_SAPLING (DEAD_SAPLING + 1)
|
||||
#define TREE_100BELLS_S0 (TREE_100BELLS_SAPLING + 1)
|
||||
#define TREE_100BELLS_S1 (TREE_100BELLS_S0 + 1)
|
||||
#define TREE_100BELLS_S2 (TREE_100BELLS_S1 + 1)
|
||||
#define TREE_100BELLS (TREE_100BELLS_S2 + 1) /* fully grown w/ bells */
|
||||
#define TREE_100BELLS_SAPLING (ENV_START + 79)
|
||||
#define TREE_100BELLS_S0 (ENV_START + 80)
|
||||
#define TREE_100BELLS_S1 (ENV_START + 81)
|
||||
#define TREE_100BELLS_S2 (ENV_START + 82)
|
||||
#define TREE_100BELLS (ENV_START + 83) /* fully grown w/ bells */
|
||||
/* palm tree */
|
||||
#define TREE_PALM_SAPLING (TREE_100BELLS + 1)
|
||||
#define TREE_PALM_S0 (TREE_PALM_SAPLING + 1)
|
||||
#define TREE_PALM_S1 (TREE_PALM_S0 + 1)
|
||||
#define TREE_PALM_S2 (TREE_PALM_S1 + 1)
|
||||
#define TREE_PALM_NOFRUIT_0 (TREE_PALM_S2 + 1) /* fully grown, no fruit */
|
||||
#define TREE_PALM_NOFRUIT_1 (TREE_PALM_NOFRUIT_0 + 1)
|
||||
#define TREE_PALM_NOFRUIT_2 (TREE_PALM_NOFRUIT_1 + 1)
|
||||
#define TREE_PALM_FRUIT (TREE_PALM_NOFRUIT_2 + 1)
|
||||
#define DEAD_PALM_SAPLING (TREE_PALM_FRUIT + 1)
|
||||
#define TREE_PALM_SAPLING (ENV_START + 84)
|
||||
#define TREE_PALM_S0 (ENV_START + 85)
|
||||
#define TREE_PALM_S1 (ENV_START + 86)
|
||||
#define TREE_PALM_S2 (ENV_START + 87)
|
||||
#define TREE_PALM_NOFRUIT_0 (ENV_START + 88) /* fully grown, no fruit */
|
||||
#define TREE_PALM_NOFRUIT_1 (ENV_START + 89)
|
||||
#define TREE_PALM_NOFRUIT_2 (ENV_START + 90)
|
||||
#define TREE_PALM_FRUIT (ENV_START + 91)
|
||||
#define DEAD_PALM_SAPLING (ENV_START + 92)
|
||||
/* cedar tree */
|
||||
#define CEDAR_TREE_SAPLING (DEAD_PALM_SAPLING + 1)
|
||||
#define CEDAR_TREE_S0 (CEDAR_TREE_SAPLING + 1)
|
||||
#define CEDAR_TREE_S1 (CEDAR_TREE_S0 + 1)
|
||||
#define CEDAR_TREE_S2 (CEDAR_TREE_S1 + 1)
|
||||
#define CEDAR_TREE (CEDAR_TREE_S2 + 1) /* fully grown */
|
||||
#define DEAD_CEDAR_SAPLING (CEDAR_TREE + 1)
|
||||
#define CEDAR_TREE_SAPLING (ENV_START + 93)
|
||||
#define CEDAR_TREE_S0 (ENV_START + 94)
|
||||
#define CEDAR_TREE_S1 (ENV_START + 95)
|
||||
#define CEDAR_TREE_S2 (ENV_START + 96)
|
||||
#define CEDAR_TREE (ENV_START + 97) /* fully grown */
|
||||
#define DEAD_CEDAR_SAPLING (ENV_START + 98)
|
||||
/* gold tree */
|
||||
#define GOLD_TREE_SAPLING (DEAD_CEDAR_SAPLING + 1)
|
||||
#define GOLD_TREE_S0 (GOLD_TREE_SAPLING + 1)
|
||||
#define GOLD_TREE_S1 (GOLD_TREE_S0 + 1)
|
||||
#define GOLD_TREE_S2 (GOLD_TREE_S1 + 1)
|
||||
#define GOLD_TREE_SHOVEL (GOLD_TREE_S2 + 1) /* fully grown w/ golden shovel */
|
||||
#define GOLD_TREE (GOLD_TREE_SHOVEL + 1) /* fully grown */
|
||||
#define DEAD_GOLD_SAPLING (GOLD_TREE + 1)
|
||||
#define GOLD_TREE_SAPLING (ENV_START + 99)
|
||||
#define GOLD_TREE_S0 (ENV_START + 100)
|
||||
#define GOLD_TREE_S1 (ENV_START + 101)
|
||||
#define GOLD_TREE_S2 (ENV_START + 102)
|
||||
#define GOLD_TREE_SHOVEL (ENV_START + 103) /* fully grown w/ golden shovel */
|
||||
#define GOLD_TREE (ENV_START + 104) /* fully grown */
|
||||
#define DEAD_GOLD_SAPLING (ENV_START + 105)
|
||||
/* end of environmental objects */
|
||||
|
||||
#define SIGNBOARD_START 0x0900
|
||||
|
||||
@@ -19,6 +19,11 @@ typedef struct rect_s {
|
||||
int l, r;
|
||||
} rect;
|
||||
|
||||
typedef struct generic_unit_s {
|
||||
int z;
|
||||
int x;
|
||||
} BlockOrUnit_c;
|
||||
|
||||
extern void radianxy_by_2pos(xyz_t* dest, xyz_t* sub, xyz_t* min);
|
||||
extern s_xyz sanglexy_by_2pos(xyz_t* sub, xyz_t* min);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user