mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-23 06:34:18 -04:00
+39
-37
@@ -172,6 +172,9 @@ config/rel.yml:
|
||||
addrs: [0x8065FD4C, 0x80674F90]
|
||||
aBTD_island_ldr:
|
||||
addrs: [0x80674F90, 0x806817CC]
|
||||
mbg_v:
|
||||
addrs: [0x80684BB0, 0x80684C30]
|
||||
type: vtx
|
||||
aKOI_obj_e_koinobori_a_pal:
|
||||
addrs: [0x806C5900, 0x806C5920]
|
||||
type: pal16
|
||||
@@ -206,6 +209,42 @@ config/rel.yml:
|
||||
obj_09_lotus_pal:
|
||||
addrs: [0x806C5AE0, 0x806C5B00]
|
||||
type: pal16
|
||||
itemName_paper:
|
||||
addrs: [0x808BF660, 0x808C0660]
|
||||
itemName_money:
|
||||
addrs: [0x808C0660, 0x808C06A0]
|
||||
itemName_tool:
|
||||
addrs: [0x808C06A0, 0x808C0C60]
|
||||
itemName_fish:
|
||||
addrs: [0x808C0C60, 0x808C0EE0]
|
||||
itemName_cloth:
|
||||
addrs: [0x808C0EE0, 0x808C1ED0]
|
||||
itemName_etc:
|
||||
addrs: [0x808C1ED0, 0x808C21E0]
|
||||
itemName_carpet:
|
||||
addrs: [0x808C21E0, 0x808C2610]
|
||||
itemName_wall:
|
||||
addrs: [0x808C2610, 0x808C2A40]
|
||||
itemName_fruit:
|
||||
addrs: [0x808C2A40, 0x808C2AC0]
|
||||
itemName_plant:
|
||||
addrs: [0x808C2AC0, 0x808C2B70]
|
||||
itemName_minidisk:
|
||||
addrs: [0x808C2B70, 0x808C2EE0]
|
||||
itemName_dummy:
|
||||
addrs: [0x808C2EE0, 0x808C2FE0]
|
||||
itemName_ticket:
|
||||
addrs: [0x808C2FE0, 0x808C35E0]
|
||||
itemName_insect:
|
||||
addrs: [0x808C35E0, 0x808C38B0]
|
||||
itemName_hukubukuro:
|
||||
addrs: [0x808C38B0, 0x808C38D0]
|
||||
itemName_kabu:
|
||||
addrs: [0x808C38D0, 0x808C3910]
|
||||
ftrName_table:
|
||||
addrs: [0x808C3910, 0x808C7910]
|
||||
ftrName2_table:
|
||||
addrs: [0x808C7910, 0x808C8830]
|
||||
mFM_beach_pal_0:
|
||||
addrs: [0x80C59CA8, 0x80C59CC8]
|
||||
type: pal16
|
||||
@@ -392,40 +431,3 @@ config/rel.yml:
|
||||
# ac_koinobori
|
||||
|
||||
# dataobj.obj item names
|
||||
itemName_paper:
|
||||
addrs: [0x808BF660, 0x808C0660]
|
||||
itemName_money:
|
||||
addrs: [0x808C0660, 0x808C06A0]
|
||||
itemName_tool:
|
||||
addrs: [0x808C06A0, 0x808C0C60]
|
||||
itemName_fish:
|
||||
addrs: [0x808C0C60, 0x808C0EE0]
|
||||
itemName_cloth:
|
||||
addrs: [0x808C0EE0, 0x808C1ED0]
|
||||
itemName_etc:
|
||||
addrs: [0x808C1ED0, 0x808C21E0]
|
||||
itemName_carpet:
|
||||
addrs: [0x808C21E0, 0x808C2610]
|
||||
itemName_wall:
|
||||
addrs: [0x808C2610, 0x808C2A40]
|
||||
itemName_fruit:
|
||||
addrs: [0x808C2A40, 0x808C2AC0]
|
||||
itemName_plant:
|
||||
addrs: [0x808C2AC0, 0x808C2B70]
|
||||
itemName_minidisk:
|
||||
addrs: [0x808C2B70, 0x808C2EE0]
|
||||
itemName_dummy:
|
||||
addrs: [0x808C2EE0, 0x808C2FE0]
|
||||
itemName_ticket:
|
||||
addrs: [0x808C2FE0, 0x808C35E0]
|
||||
itemName_insect:
|
||||
addrs: [0x808C35E0, 0x808C38B0]
|
||||
itemName_hukubukuro:
|
||||
addrs: [0x808C38B0, 0x808C38D0]
|
||||
itemName_kabu:
|
||||
addrs: [0x808C38D0, 0x808C3910]
|
||||
ftrName_table:
|
||||
addrs: [0x808C3910, 0x808C7910]
|
||||
ftrName2_table:
|
||||
addrs: [0x808C7910, 0x808C8830]
|
||||
|
||||
|
||||
@@ -426,6 +426,10 @@ ac_haniwa.c:
|
||||
.text: [0x80427624, 0x80428F64]
|
||||
.rodata: [0x806440B8, 0x806440F8]
|
||||
.data: [0x80683D08, 0x80683E98]
|
||||
ac_mbg.c:
|
||||
.text: [0x8042DCA0, 0x8042DEC8]
|
||||
.rodata: [0x80644218, 0x80644238]
|
||||
.data: [0x80684BB0, 0x80684CB8]
|
||||
ac_museum_fossil.c:
|
||||
.text: [0x8042EDC0, 0x8042F170]
|
||||
.rodata: [0x806442A0, 0x806442D0]
|
||||
|
||||
+10
-1
@@ -8,6 +8,16 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct mbg_actor_s MBG_ACTOR;
|
||||
|
||||
struct mbg_actor_s {
|
||||
ACTOR actor;
|
||||
mCoBG_bg_regist_c move_bg_regist;
|
||||
int move_bg_regist_idx;
|
||||
xyz_t original_pos;
|
||||
f32 move_counter;
|
||||
};
|
||||
|
||||
extern ACTOR_PROFILE Mbg_Profile;
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -15,4 +25,3 @@ extern ACTOR_PROFILE Mbg_Profile;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -267,6 +267,10 @@ extern f32 mCoBG_GetBalloonGroundY(const xyz_t* pos);
|
||||
extern void mCoBG_MakeBoatCollision(ACTOR* actor, xyz_t* pos, s16* angle_y);
|
||||
extern void mCoBG_DeleteBoatCollision(ACTOR* actor);
|
||||
extern void mCoBG_WaveCos2BgCheck(f32 wave_cos);
|
||||
extern int mCoBG_RegistMoveBg(mCoBG_bg_regist_c* bg_regist, xyz_t* wpos, xyz_t* last_wpos, s16* angle_y, f32 height,
|
||||
mCoBG_bg_size_c* bg_size, f32* scale_percent, mCoBG_bg_contact_c* bg_contact, xyz_t* ofs,
|
||||
int type, u32 attribute, f32 check_dist);
|
||||
extern void mCoBG_CrossOffMoveBg(int move_bg_idx);
|
||||
|
||||
extern void mCoBG_InitMoveBgData();
|
||||
extern void mCoBG_InitBlockBgCheckMode();
|
||||
|
||||
@@ -2249,6 +2249,7 @@ extern int mNT_check_unknown(mActor_name_t item_no);
|
||||
#define ETC_START 0x8000
|
||||
#define ETC_AIRPLANE ETC_START
|
||||
#define ETC_BALL (ETC_START + 1)
|
||||
#define ETC_MBG (ETC_START + 3)
|
||||
#define ETC_BOXTRICK (ETC_START + 4)
|
||||
#define ETC_BOXMANAGER (ETC_START + 5)
|
||||
#define ETC_SNOWMAN_BALL_A (ETC_START + 13)
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
#include "ac_mbg.h"
|
||||
|
||||
#include "m_collision_bg.h"
|
||||
#include "m_rcp.h"
|
||||
#include "sys_matrix.h"
|
||||
#include "m_name_table.h"
|
||||
|
||||
static Vtx mbg_v[] = {
|
||||
#include "assets/mbg_v.inc"
|
||||
};
|
||||
|
||||
static Gfx mbg_model[] = {
|
||||
gsDPPipeSync(),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_SURF2),
|
||||
gsDPSetCombineLERP(PRIMITIVE, 0, SHADE, 0, 0, 0, 0, 1, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED),
|
||||
gsDPSetPrimColor(0, 128, 255, 255, 0, 255),
|
||||
gsSPLoadGeometryMode(G_ZBUFFER | G_SHADE | G_FOG | G_LIGHTING | G_SHADING_SMOOTH),
|
||||
gsSPVertex(&mbg_v[0], 8, 0),
|
||||
gsSP2Triangles(5, 6, 7, 0, 4, 5, 7, 0),
|
||||
gsSP2Triangles(7, 6, 2, 0, 7, 2, 3, 0),
|
||||
gsSP2Triangles(5, 1, 6, 0, 6, 1, 2, 0),
|
||||
gsSP2Triangles(4, 0, 5, 0, 5, 0, 1, 0),
|
||||
gsSP2Triangles(4, 7, 0, 0, 0, 7, 3, 0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
static void Mbg_Actor_ct(ACTOR* actorx, GAME* game);
|
||||
static void Mbg_Actor_dt(ACTOR* actorx, GAME* game);
|
||||
static void Mbg_Actor_draw(ACTOR* actorx, GAME* game);
|
||||
static void Mbg_Actor_move(ACTOR* actorx, GAME* game);
|
||||
|
||||
// clang-format off
|
||||
ACTOR_PROFILE Mbg_Profile = {
|
||||
mAc_PROFILE_MBG,
|
||||
ACTOR_PART_ITEM,
|
||||
ACTOR_STATE_NONE,
|
||||
ETC_MBG,
|
||||
ACTOR_OBJ_BANK_KEEP,
|
||||
sizeof(MBG_ACTOR),
|
||||
&Mbg_Actor_ct,
|
||||
&Mbg_Actor_dt,
|
||||
&Mbg_Actor_move,
|
||||
&Mbg_Actor_draw,
|
||||
NULL
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
static void Mbg_Actor_ct(ACTOR* actorx, GAME* game) {
|
||||
MBG_ACTOR* mbg = (MBG_ACTOR*)actorx;
|
||||
|
||||
mbg->move_bg_regist_idx = 0;
|
||||
mbg->original_pos = actorx->world.position;
|
||||
mbg->move_counter = 0.0f;
|
||||
actorx->shape_info.rotation.y = DEG2SHORT_ANGLE(60.0f); // 0x2AAA
|
||||
mbg->move_bg_regist_idx = mCoBG_RegistMoveBg(&mbg->move_bg_regist, &actorx->world.position,
|
||||
&actorx->last_world_position, &actorx->shape_info.rotation.y, 40.0f,
|
||||
NULL, NULL, NULL, NULL, 0, mCoBG_ATTRIBUTE_STONE, 80.0f);
|
||||
}
|
||||
|
||||
static void Mbg_Actor_dt(ACTOR* actorx, GAME* game) {
|
||||
MBG_ACTOR* mbg = (MBG_ACTOR*)actorx;
|
||||
|
||||
mCoBG_CrossOffMoveBg(mbg->move_bg_regist_idx);
|
||||
}
|
||||
|
||||
static void Mbg_Actor_draw(ACTOR* actorx, GAME* game) {
|
||||
xyz_t pos = actorx->world.position;
|
||||
s16 angle_y = actorx->shape_info.rotation.y;
|
||||
GRAPH* graph = game->graph;
|
||||
|
||||
OPEN_DISP(graph);
|
||||
|
||||
_texture_z_light_fog_prim(graph);
|
||||
Matrix_translate(pos.x, pos.y, pos.z, 0);
|
||||
Matrix_RotateY(angle_y, 1);
|
||||
|
||||
gSPMatrix(NEXT_POLY_OPA_DISP, _Matrix_to_Mtx_new(game->graph), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(NEXT_POLY_OPA_DISP, mbg_model);
|
||||
|
||||
CLOSE_DISP(graph);
|
||||
}
|
||||
|
||||
static void Mbg_Actor_move(ACTOR* actorx, GAME* game) {
|
||||
MBG_ACTOR* mbg = (MBG_ACTOR*)actorx;
|
||||
f32 x_shift = sinf_table(DEG2RAD(mbg->move_counter)) * 60.0f;
|
||||
|
||||
mbg->move_counter += 2.0f;
|
||||
|
||||
while (mbg->move_counter > 360.0f) {
|
||||
mbg->move_counter -= 360.0f;
|
||||
}
|
||||
|
||||
actorx->world.position.x = mbg->original_pos.x + x_shift;
|
||||
actorx->shape_info.rotation.y += DEG2SHORT_ANGLE(0.258179f); // 0x002F
|
||||
}
|
||||
+1
-1
@@ -247,7 +247,7 @@ def update_asset_slice_config(tu_name: str, binary_slice_file_path: str, asset_s
|
||||
else:
|
||||
asset_commented_map = CommentedMap()
|
||||
binary_commented_map.insert(len(binary_commented_map), asset_symbol.symbol_name, asset_commented_map)
|
||||
binary_commented_map.ca.insert(asset_symbol.symbol_name, asset_symbol.symbol_name)
|
||||
binary_commented_map.ca.items[asset_symbol.symbol_name] = [None, asset_symbol.symbol_name, None, None]
|
||||
|
||||
# Add in the address range
|
||||
address_commented_seq: CommentedSeq = None
|
||||
|
||||
Reference in New Issue
Block a user