mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-06-08 03:37:05 -04:00
link ac_biscus
This commit is contained in:
@@ -312,6 +312,18 @@ ac_t_bag1.c:
|
||||
ac_t_bag2.c:
|
||||
.text: [0x804A79F8, 0x804A7B4C]
|
||||
.data: [0x8068EA48, 0x8068EA88]
|
||||
ac_t_biscus1.c:
|
||||
.text: [0x804A7B4C, 0x804A7CA0]
|
||||
.data: [0x8068EA88, 0x8068EAC8]
|
||||
ac_t_biscus2.c:
|
||||
.text: [0x804A7CA0, 0x804A7DF4]
|
||||
.data: [0x8068EAC8, 0x8068EB08]
|
||||
ac_t_biscus3.c:
|
||||
.text: [0x804A7DF4, 0x804A7F48]
|
||||
.data: [0x8068EB08, 0x8068EB48]
|
||||
ac_t_biscus4.c:
|
||||
.text: [0x804A7F48, 0x804A809C]
|
||||
.data: [0x8068EB48, 0x8068EB88]
|
||||
ac_t_pistol.c:
|
||||
.text: [0x804A95F4, 0x804A9858]
|
||||
.rodata: [0x80645EF8, 0x80645F00]
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor.h"
|
||||
#include "ac_tools.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -10,6 +11,15 @@ extern "C" {
|
||||
|
||||
extern ACTOR_PROFILE T_Biscus1_Profile;
|
||||
|
||||
typedef void (*BISCUS1_PROC)(ACTOR*);
|
||||
|
||||
typedef struct t_biscus1_s{
|
||||
TOOLS_ACTOR tools_class;
|
||||
u8 pad2[0x8];
|
||||
BISCUS1_PROC proc;
|
||||
int current_id;
|
||||
}BISCUS1_ACTOR;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor.h"
|
||||
#include "ac_tools.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -10,6 +11,15 @@ extern "C" {
|
||||
|
||||
extern ACTOR_PROFILE T_Biscus2_Profile;
|
||||
|
||||
typedef void (*BISCUS2_PROC)(ACTOR*);
|
||||
|
||||
typedef struct t_biscus2_s{
|
||||
TOOLS_ACTOR tools_class;
|
||||
u8 pad2[0x8];
|
||||
BISCUS2_PROC proc;
|
||||
int current_id;
|
||||
}BISCUS2_ACTOR;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor.h"
|
||||
#include "ac_tools.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -10,6 +11,15 @@ extern "C" {
|
||||
|
||||
extern ACTOR_PROFILE T_Biscus3_Profile;
|
||||
|
||||
typedef void (*BISCUS3_PROC)(ACTOR*);
|
||||
|
||||
typedef struct t_biscus3_s{
|
||||
TOOLS_ACTOR tools_class;
|
||||
u8 pad2[0x8];
|
||||
BISCUS3_PROC proc;
|
||||
int current_id;
|
||||
}BISCUS3_ACTOR;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "m_actor.h"
|
||||
#include "ac_tools.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -10,6 +11,17 @@ extern "C" {
|
||||
|
||||
extern ACTOR_PROFILE T_Biscus4_Profile;
|
||||
|
||||
|
||||
typedef void (*BISCUS4_PROC)(ACTOR*);
|
||||
|
||||
typedef struct t_biscus4_s{
|
||||
TOOLS_ACTOR tools_class;
|
||||
u8 pad2[0x8];
|
||||
BISCUS4_PROC proc;
|
||||
int current_id;
|
||||
}BISCUS4_ACTOR;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
#include "ac_t_biscus1.h"
|
||||
|
||||
#include "m_name_table.h"
|
||||
#include "sys_matrix.h"
|
||||
#include "m_lib.h"
|
||||
#include "m_rcp.h"
|
||||
|
||||
|
||||
static void aTB1_actor_ct(ACTOR* actor, GAME*);
|
||||
static void aTB1_actor_move(ACTOR* actor, GAME*);
|
||||
static void aTB1_actor_draw(ACTOR* actor, GAME*);
|
||||
static void aTB1_setupAction(ACTOR*, int);
|
||||
|
||||
ACTOR_PROFILE T_Biscus1_Profile = {
|
||||
mAc_PROFILE_T_BISCUS1,
|
||||
ACTOR_PART_BG,
|
||||
ACTOR_STATE_NO_DRAW_WHILE_CULLED | ACTOR_STATE_NO_MOVE_WHILE_CULLED,
|
||||
EMPTY_NO,
|
||||
ACTOR_OBJ_BANK_16,
|
||||
sizeof(BISCUS1_ACTOR),
|
||||
&aTB1_actor_ct,
|
||||
NONE_ACTOR_PROC,
|
||||
&aTB1_actor_move,
|
||||
&aTB1_actor_draw,
|
||||
NULL
|
||||
};
|
||||
|
||||
extern Gfx crw_biscus1_body_model[];
|
||||
|
||||
static void aTB1_actor_ct(ACTOR* actor, GAME*){
|
||||
|
||||
aTB1_setupAction(actor,4);
|
||||
}
|
||||
|
||||
static void aTB1_destruct(ACTOR* actor){
|
||||
|
||||
Actor_delete(actor);
|
||||
}
|
||||
|
||||
|
||||
static void aTB1_setupAction(ACTOR*actor, int action){
|
||||
BISCUS1_ACTOR* biscus = (BISCUS1_ACTOR*)actor;
|
||||
static BISCUS1_PROC process[] = {
|
||||
(BISCUS1_PROC)none_proc1,(BISCUS1_PROC)none_proc1,(BISCUS1_PROC)none_proc1,aTB1_destruct,(BISCUS1_PROC)none_proc1,NULL
|
||||
};
|
||||
|
||||
biscus->proc = process[action];
|
||||
biscus->current_id = action;
|
||||
biscus->tools_class.process_id = action;
|
||||
|
||||
}
|
||||
|
||||
static void aTB1_actor_move(ACTOR* actor, GAME*){
|
||||
BISCUS1_ACTOR* biscus = (BISCUS1_ACTOR*)actor;
|
||||
|
||||
if(biscus->tools_class.process_id != biscus->current_id){
|
||||
aTB1_setupAction(actor, biscus->tools_class.process_id);
|
||||
}
|
||||
|
||||
biscus->proc(actor);
|
||||
}
|
||||
|
||||
static void aTB1_actor_draw(ACTOR* actor, GAME* game){
|
||||
BISCUS1_ACTOR* biscus = (BISCUS1_ACTOR*)actor;
|
||||
|
||||
GRAPH* graph;
|
||||
Gfx* gfxp;
|
||||
|
||||
if(biscus->tools_class.enable == 1){
|
||||
graph = game->graph;
|
||||
|
||||
OPEN_DISP(graph);
|
||||
|
||||
Matrix_put(&biscus->tools_class.matrix_work);
|
||||
Matrix_Position_Zero(&biscus->tools_class.actor_class.world.position);
|
||||
|
||||
biscus->tools_class.enable = 0;
|
||||
|
||||
_texture_z_light_fog_prim_npc(graph);
|
||||
|
||||
gfxp = NOW_POLY_OPA_DISP;
|
||||
gSPMatrix(gfxp++, _Matrix_to_Mtx_new(graph),G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(gfxp++, crw_biscus1_body_model);
|
||||
SET_POLY_OPA_DISP(gfxp);
|
||||
|
||||
CLOSE_DISP(graph);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
#include "ac_t_biscus2.h"
|
||||
|
||||
#include "m_name_table.h"
|
||||
#include "sys_matrix.h"
|
||||
#include "m_lib.h"
|
||||
#include "m_rcp.h"
|
||||
|
||||
|
||||
static void aTB2_actor_ct(ACTOR* actor, GAME*);
|
||||
static void aTB2_actor_move(ACTOR* actor, GAME*);
|
||||
static void aTB2_actor_draw(ACTOR* actor, GAME*);
|
||||
static void aTB2_setupAction(ACTOR*, int);
|
||||
|
||||
ACTOR_PROFILE T_Biscus2_Profile = {
|
||||
mAc_PROFILE_T_BISCUS2,
|
||||
ACTOR_PART_BG,
|
||||
ACTOR_STATE_NO_DRAW_WHILE_CULLED | ACTOR_STATE_NO_MOVE_WHILE_CULLED,
|
||||
EMPTY_NO,
|
||||
ACTOR_OBJ_BANK_16,
|
||||
sizeof(BISCUS2_ACTOR),
|
||||
&aTB2_actor_ct,
|
||||
NONE_ACTOR_PROC,
|
||||
&aTB2_actor_move,
|
||||
&aTB2_actor_draw,
|
||||
NULL
|
||||
};
|
||||
|
||||
extern Gfx crw_biscus2_body_model[];
|
||||
|
||||
static void aTB2_actor_ct(ACTOR* actor, GAME*){
|
||||
|
||||
aTB2_setupAction(actor,4);
|
||||
}
|
||||
|
||||
static void aTB2_destruct(ACTOR* actor){
|
||||
|
||||
Actor_delete(actor);
|
||||
}
|
||||
|
||||
|
||||
static void aTB2_setupAction(ACTOR*actor, int action){
|
||||
BISCUS2_ACTOR* biscus = (BISCUS2_ACTOR*)actor;
|
||||
static BISCUS2_PROC process[] = {
|
||||
(BISCUS2_PROC)none_proc1,(BISCUS2_PROC)none_proc1,(BISCUS2_PROC)none_proc1,aTB2_destruct,(BISCUS2_PROC)none_proc1,NULL
|
||||
};
|
||||
|
||||
biscus->proc = process[action];
|
||||
biscus->current_id = action;
|
||||
biscus->tools_class.process_id = action;
|
||||
|
||||
}
|
||||
|
||||
static void aTB2_actor_move(ACTOR* actor, GAME*){
|
||||
BISCUS2_ACTOR* biscus = (BISCUS2_ACTOR*)actor;
|
||||
|
||||
if(biscus->tools_class.process_id != biscus->current_id){
|
||||
aTB2_setupAction(actor, biscus->tools_class.process_id);
|
||||
}
|
||||
|
||||
biscus->proc(actor);
|
||||
}
|
||||
|
||||
static void aTB2_actor_draw(ACTOR* actor, GAME* game){
|
||||
BISCUS2_ACTOR* biscus = (BISCUS2_ACTOR*)actor;
|
||||
|
||||
GRAPH* graph;
|
||||
Gfx* gfxp;
|
||||
|
||||
if(biscus->tools_class.enable == 1){
|
||||
graph = game->graph;
|
||||
|
||||
OPEN_DISP(graph);
|
||||
|
||||
Matrix_put(&biscus->tools_class.matrix_work);
|
||||
Matrix_Position_Zero(&biscus->tools_class.actor_class.world.position);
|
||||
|
||||
biscus->tools_class.enable = 0;
|
||||
|
||||
_texture_z_light_fog_prim_npc(graph);
|
||||
|
||||
gfxp = NOW_POLY_OPA_DISP;
|
||||
gSPMatrix(gfxp++, _Matrix_to_Mtx_new(graph),G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(gfxp++, crw_biscus2_body_model);
|
||||
SET_POLY_OPA_DISP(gfxp);
|
||||
|
||||
CLOSE_DISP(graph);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
#include "ac_t_biscus3.h"
|
||||
|
||||
#include "m_name_table.h"
|
||||
#include "sys_matrix.h"
|
||||
#include "m_lib.h"
|
||||
#include "m_rcp.h"
|
||||
|
||||
|
||||
static void aTB3_actor_ct(ACTOR* actor, GAME*);
|
||||
static void aTB3_actor_move(ACTOR* actor, GAME*);
|
||||
static void aTB3_actor_draw(ACTOR* actor, GAME*);
|
||||
static void aTB3_setupAction(ACTOR*, int);
|
||||
|
||||
ACTOR_PROFILE T_Biscus3_Profile = {
|
||||
mAc_PROFILE_T_BISCUS3,
|
||||
ACTOR_PART_BG,
|
||||
ACTOR_STATE_NO_DRAW_WHILE_CULLED | ACTOR_STATE_NO_MOVE_WHILE_CULLED,
|
||||
EMPTY_NO,
|
||||
ACTOR_OBJ_BANK_16,
|
||||
sizeof(BISCUS3_ACTOR),
|
||||
&aTB3_actor_ct,
|
||||
NONE_ACTOR_PROC,
|
||||
&aTB3_actor_move,
|
||||
&aTB3_actor_draw,
|
||||
NULL
|
||||
};
|
||||
|
||||
extern Gfx crw_biscus3_body_model[];
|
||||
|
||||
static void aTB3_actor_ct(ACTOR* actor, GAME*){
|
||||
|
||||
aTB3_setupAction(actor,4);
|
||||
}
|
||||
|
||||
static void aTB3_destruct(ACTOR* actor){
|
||||
|
||||
Actor_delete(actor);
|
||||
}
|
||||
|
||||
|
||||
static void aTB3_setupAction(ACTOR*actor, int action){
|
||||
BISCUS3_ACTOR* biscus = (BISCUS3_ACTOR*)actor;
|
||||
static BISCUS3_PROC process[] = {
|
||||
(BISCUS3_PROC)none_proc1,(BISCUS3_PROC)none_proc1,(BISCUS3_PROC)none_proc1,aTB3_destruct,(BISCUS3_PROC)none_proc1,NULL
|
||||
};
|
||||
|
||||
biscus->proc = process[action];
|
||||
biscus->current_id = action;
|
||||
biscus->tools_class.process_id = action;
|
||||
|
||||
}
|
||||
|
||||
static void aTB3_actor_move(ACTOR* actor, GAME*){
|
||||
BISCUS3_ACTOR* biscus = (BISCUS3_ACTOR*)actor;
|
||||
|
||||
if(biscus->tools_class.process_id != biscus->current_id){
|
||||
aTB3_setupAction(actor, biscus->tools_class.process_id);
|
||||
}
|
||||
|
||||
biscus->proc(actor);
|
||||
}
|
||||
|
||||
static void aTB3_actor_draw(ACTOR* actor, GAME* game){
|
||||
BISCUS3_ACTOR* biscus = (BISCUS3_ACTOR*)actor;
|
||||
|
||||
GRAPH* graph;
|
||||
Gfx* gfxp;
|
||||
|
||||
if(biscus->tools_class.enable == 1){
|
||||
graph = game->graph;
|
||||
|
||||
OPEN_DISP(graph);
|
||||
|
||||
Matrix_put(&biscus->tools_class.matrix_work);
|
||||
Matrix_Position_Zero(&biscus->tools_class.actor_class.world.position);
|
||||
|
||||
biscus->tools_class.enable = 0;
|
||||
|
||||
_texture_z_light_fog_prim_npc(graph);
|
||||
|
||||
gfxp = NOW_POLY_OPA_DISP;
|
||||
gSPMatrix(gfxp++, _Matrix_to_Mtx_new(graph),G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(gfxp++, crw_biscus3_body_model);
|
||||
SET_POLY_OPA_DISP(gfxp);
|
||||
|
||||
CLOSE_DISP(graph);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
#include "ac_t_biscus4.h"
|
||||
|
||||
#include "m_name_table.h"
|
||||
#include "sys_matrix.h"
|
||||
#include "m_lib.h"
|
||||
#include "m_rcp.h"
|
||||
|
||||
|
||||
static void aTB4_actor_ct(ACTOR* actor, GAME*);
|
||||
static void aTB4_actor_move(ACTOR* actor, GAME*);
|
||||
static void aTB4_actor_draw(ACTOR* actor, GAME*);
|
||||
static void aTB4_setupAction(ACTOR*, int);
|
||||
|
||||
ACTOR_PROFILE T_Biscus4_Profile = {
|
||||
mAc_PROFILE_T_BISCUS4,
|
||||
ACTOR_PART_BG,
|
||||
ACTOR_STATE_NO_DRAW_WHILE_CULLED | ACTOR_STATE_NO_MOVE_WHILE_CULLED,
|
||||
EMPTY_NO,
|
||||
ACTOR_OBJ_BANK_16,
|
||||
sizeof(BISCUS4_ACTOR),
|
||||
&aTB4_actor_ct,
|
||||
NONE_ACTOR_PROC,
|
||||
&aTB4_actor_move,
|
||||
&aTB4_actor_draw,
|
||||
NULL
|
||||
};
|
||||
|
||||
extern Gfx crw_biscus4_body_model[];
|
||||
|
||||
static void aTB4_actor_ct(ACTOR* actor, GAME*){
|
||||
|
||||
aTB4_setupAction(actor,4);
|
||||
}
|
||||
|
||||
static void aTB4_destruct(ACTOR* actor){
|
||||
|
||||
Actor_delete(actor);
|
||||
}
|
||||
|
||||
|
||||
static void aTB4_setupAction(ACTOR*actor, int action){
|
||||
BISCUS4_ACTOR* biscus = (BISCUS4_ACTOR*)actor;
|
||||
static BISCUS4_PROC process[] = {
|
||||
(BISCUS4_PROC)none_proc1,(BISCUS4_PROC)none_proc1,(BISCUS4_PROC)none_proc1,aTB4_destruct,(BISCUS4_PROC)none_proc1,NULL
|
||||
};
|
||||
|
||||
biscus->proc = process[action];
|
||||
biscus->current_id = action;
|
||||
biscus->tools_class.process_id = action;
|
||||
|
||||
}
|
||||
|
||||
static void aTB4_actor_move(ACTOR* actor, GAME*){
|
||||
BISCUS4_ACTOR* biscus = (BISCUS4_ACTOR*)actor;
|
||||
|
||||
if(biscus->tools_class.process_id != biscus->current_id){
|
||||
aTB4_setupAction(actor, biscus->tools_class.process_id);
|
||||
}
|
||||
|
||||
biscus->proc(actor);
|
||||
}
|
||||
|
||||
static void aTB4_actor_draw(ACTOR* actor, GAME* game){
|
||||
BISCUS4_ACTOR* biscus = (BISCUS4_ACTOR*)actor;
|
||||
|
||||
GRAPH* graph;
|
||||
Gfx* gfxp;
|
||||
|
||||
if(biscus->tools_class.enable == 1){
|
||||
graph = game->graph;
|
||||
|
||||
OPEN_DISP(graph);
|
||||
|
||||
Matrix_put(&biscus->tools_class.matrix_work);
|
||||
Matrix_Position_Zero(&biscus->tools_class.actor_class.world.position);
|
||||
|
||||
biscus->tools_class.enable = 0;
|
||||
|
||||
_texture_z_light_fog_prim_npc(graph);
|
||||
|
||||
gfxp = NOW_POLY_OPA_DISP;
|
||||
gSPMatrix(gfxp++, _Matrix_to_Mtx_new(graph),G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(gfxp++, crw_biscus4_body_model);
|
||||
SET_POLY_OPA_DISP(gfxp);
|
||||
|
||||
CLOSE_DISP(graph);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user