Implement & link ac_t_npc_sao

This commit is contained in:
Cuyler36
2023-12-07 17:56:08 -05:00
parent ccdd22a449
commit 246b3e7fda
38 changed files with 215 additions and 103 deletions
+5 -5
View File
@@ -46,15 +46,15 @@ static void aTA1_setupAction(ACTOR*actor, int action){
anrium->proc = process[action];
anrium->current_id = action;
anrium->tools_class.process_id = action;
anrium->tools_class.work0 = action;
}
static void aTA1_actor_move(ACTOR* actor, GAME*){
ANRIUM1_ACTOR* anrium = (ANRIUM1_ACTOR*)actor;
if(anrium->tools_class.process_id != anrium->current_id){
aTA1_setupAction(actor, anrium->tools_class.process_id);
if(anrium->tools_class.work0 != anrium->current_id){
aTA1_setupAction(actor, anrium->tools_class.work0);
}
anrium->proc(actor);
@@ -66,7 +66,7 @@ static void aTA1_actor_draw(ACTOR* actor, GAME* game){
GRAPH* graph;
Gfx* gfxp;
if(anrium->tools_class.enable == 1){
if(anrium->tools_class.init_matrix == 1){
graph = game->graph;
OPEN_DISP(graph);
@@ -74,7 +74,7 @@ static void aTA1_actor_draw(ACTOR* actor, GAME* game){
Matrix_put(&anrium->tools_class.matrix_work);
Matrix_Position_Zero(&anrium->tools_class.actor_class.world.position);
anrium->tools_class.enable = 0;
anrium->tools_class.init_matrix = 0;
_texture_z_light_fog_prim_npc(graph);
+5 -5
View File
@@ -46,15 +46,15 @@ static void aTBG1_setupAction(ACTOR*actor, int action){
bag->proc = process[action];
bag->current_id = action;
bag->tools_class.process_id = action;
bag->tools_class.work0 = action;
}
static void aTBG1_actor_move(ACTOR* actor, GAME*){
BAG1_ACTOR* bag = (BAG1_ACTOR*)actor;
if(bag->tools_class.process_id != bag->current_id){
aTBG1_setupAction(actor, bag->tools_class.process_id);
if(bag->tools_class.work0 != bag->current_id){
aTBG1_setupAction(actor, bag->tools_class.work0);
}
bag->proc(actor);
@@ -66,7 +66,7 @@ static void aTBG1_actor_draw(ACTOR* actor, GAME* game){
GRAPH* graph;
Gfx* gfxp;
if(bag->tools_class.enable == 1){
if(bag->tools_class.init_matrix == 1){
graph = game->graph;
OPEN_DISP(graph);
@@ -74,7 +74,7 @@ static void aTBG1_actor_draw(ACTOR* actor, GAME* game){
Matrix_put(&bag->tools_class.matrix_work);
Matrix_Position_Zero(&bag->tools_class.actor_class.world.position);
bag->tools_class.enable = 0;
bag->tools_class.init_matrix = 0;
_texture_z_light_fog_prim_npc(graph);
+5 -5
View File
@@ -46,15 +46,15 @@ static void aTBG2_setupAction(ACTOR*actor, int action){
bag->proc = process[action];
bag->current_id = action;
bag->tools_class.process_id = action;
bag->tools_class.work0 = action;
}
static void aTBG2_actor_move(ACTOR* actor, GAME*){
BAG2_ACTOR* bag = (BAG2_ACTOR*)actor;
if(bag->tools_class.process_id != bag->current_id){
aTBG2_setupAction(actor, bag->tools_class.process_id);
if(bag->tools_class.work0 != bag->current_id){
aTBG2_setupAction(actor, bag->tools_class.work0);
}
bag->proc(actor);
@@ -66,7 +66,7 @@ static void aTBG2_actor_draw(ACTOR* actor, GAME* game){
GRAPH* graph;
Gfx* gfxp;
if(bag->tools_class.enable == 1){
if(bag->tools_class.init_matrix == 1){
graph = game->graph;
OPEN_DISP(graph);
@@ -74,7 +74,7 @@ static void aTBG2_actor_draw(ACTOR* actor, GAME* game){
Matrix_put(&bag->tools_class.matrix_work);
Matrix_Position_Zero(&bag->tools_class.actor_class.world.position);
bag->tools_class.enable = 0;
bag->tools_class.init_matrix = 0;
_texture_z_light_fog_prim_npc(graph);
+5 -5
View File
@@ -46,15 +46,15 @@ static void aTB1_setupAction(ACTOR*actor, int action){
biscus->proc = process[action];
biscus->current_id = action;
biscus->tools_class.process_id = action;
biscus->tools_class.work0 = 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);
if(biscus->tools_class.work0 != biscus->current_id){
aTB1_setupAction(actor, biscus->tools_class.work0);
}
biscus->proc(actor);
@@ -66,7 +66,7 @@ static void aTB1_actor_draw(ACTOR* actor, GAME* game){
GRAPH* graph;
Gfx* gfxp;
if(biscus->tools_class.enable == 1){
if(biscus->tools_class.init_matrix == 1){
graph = game->graph;
OPEN_DISP(graph);
@@ -74,7 +74,7 @@ static void aTB1_actor_draw(ACTOR* actor, GAME* game){
Matrix_put(&biscus->tools_class.matrix_work);
Matrix_Position_Zero(&biscus->tools_class.actor_class.world.position);
biscus->tools_class.enable = 0;
biscus->tools_class.init_matrix = 0;
_texture_z_light_fog_prim_npc(graph);
+5 -5
View File
@@ -46,15 +46,15 @@ static void aTB2_setupAction(ACTOR*actor, int action){
biscus->proc = process[action];
biscus->current_id = action;
biscus->tools_class.process_id = action;
biscus->tools_class.work0 = 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);
if(biscus->tools_class.work0 != biscus->current_id){
aTB2_setupAction(actor, biscus->tools_class.work0);
}
biscus->proc(actor);
@@ -66,7 +66,7 @@ static void aTB2_actor_draw(ACTOR* actor, GAME* game){
GRAPH* graph;
Gfx* gfxp;
if(biscus->tools_class.enable == 1){
if(biscus->tools_class.init_matrix == 1){
graph = game->graph;
OPEN_DISP(graph);
@@ -74,7 +74,7 @@ static void aTB2_actor_draw(ACTOR* actor, GAME* game){
Matrix_put(&biscus->tools_class.matrix_work);
Matrix_Position_Zero(&biscus->tools_class.actor_class.world.position);
biscus->tools_class.enable = 0;
biscus->tools_class.init_matrix = 0;
_texture_z_light_fog_prim_npc(graph);
+5 -5
View File
@@ -46,15 +46,15 @@ static void aTB3_setupAction(ACTOR*actor, int action){
biscus->proc = process[action];
biscus->current_id = action;
biscus->tools_class.process_id = action;
biscus->tools_class.work0 = 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);
if(biscus->tools_class.work0 != biscus->current_id){
aTB3_setupAction(actor, biscus->tools_class.work0);
}
biscus->proc(actor);
@@ -66,7 +66,7 @@ static void aTB3_actor_draw(ACTOR* actor, GAME* game){
GRAPH* graph;
Gfx* gfxp;
if(biscus->tools_class.enable == 1){
if(biscus->tools_class.init_matrix == 1){
graph = game->graph;
OPEN_DISP(graph);
@@ -74,7 +74,7 @@ static void aTB3_actor_draw(ACTOR* actor, GAME* game){
Matrix_put(&biscus->tools_class.matrix_work);
Matrix_Position_Zero(&biscus->tools_class.actor_class.world.position);
biscus->tools_class.enable = 0;
biscus->tools_class.init_matrix = 0;
_texture_z_light_fog_prim_npc(graph);
+5 -5
View File
@@ -46,15 +46,15 @@ static void aTB4_setupAction(ACTOR*actor, int action){
biscus->proc = process[action];
biscus->current_id = action;
biscus->tools_class.process_id = action;
biscus->tools_class.work0 = 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);
if(biscus->tools_class.work0 != biscus->current_id){
aTB4_setupAction(actor, biscus->tools_class.work0);
}
biscus->proc(actor);
@@ -66,7 +66,7 @@ static void aTB4_actor_draw(ACTOR* actor, GAME* game){
GRAPH* graph;
Gfx* gfxp;
if(biscus->tools_class.enable == 1){
if(biscus->tools_class.init_matrix == 1){
graph = game->graph;
OPEN_DISP(graph);
@@ -74,7 +74,7 @@ static void aTB4_actor_draw(ACTOR* actor, GAME* game){
Matrix_put(&biscus->tools_class.matrix_work);
Matrix_Position_Zero(&biscus->tools_class.actor_class.world.position);
biscus->tools_class.enable = 0;
biscus->tools_class.init_matrix = 0;
_texture_z_light_fog_prim_npc(graph);
+5 -5
View File
@@ -46,15 +46,15 @@ static void aTCB1_setupAction(ACTOR*actor, int action){
cobra->proc = process[action];
cobra->current_id = action;
cobra->tools_class.process_id = action;
cobra->tools_class.work0 = action;
}
static void aTCB1_actor_move(ACTOR* actor, GAME*){
COBRA1_ACTOR* cobra = (COBRA1_ACTOR*)actor;
if(cobra->tools_class.process_id != cobra->current_id){
aTCB1_setupAction(actor, cobra->tools_class.process_id);
if(cobra->tools_class.work0 != cobra->current_id){
aTCB1_setupAction(actor, cobra->tools_class.work0);
}
cobra->proc(actor);
@@ -66,7 +66,7 @@ static void aTCB1_actor_draw(ACTOR* actor, GAME* game){
GRAPH* graph;
Gfx* gfxp;
if(cobra->tools_class.enable == 1){
if(cobra->tools_class.init_matrix == 1){
graph = game->graph;
OPEN_DISP(graph);
@@ -74,7 +74,7 @@ static void aTCB1_actor_draw(ACTOR* actor, GAME* game){
Matrix_put(&cobra->tools_class.matrix_work);
Matrix_Position_Zero(&cobra->tools_class.actor_class.world.position);
cobra->tools_class.enable = 0;
cobra->tools_class.init_matrix = 0;
_texture_z_light_fog_prim_npc(graph);
+4 -4
View File
@@ -69,7 +69,7 @@ static void aTCR_setupAction(ACTOR* actor, int idx){
cracker->proc = process[idx];
cracker->current_id = idx;
cracker->tools_class.process_id = idx;
cracker->tools_class.work0 = idx;
scale = start_scale[idx];
cracker->tools_class.actor_class.scale.x = scale;
@@ -81,7 +81,7 @@ static void aTCR_setupAction(ACTOR* actor, int idx){
static void aTCR_actor_move(ACTOR* actor, GAME* game){
CRACKER_ACTOR* cracker = (CRACKER_ACTOR*)actor;
int t = cracker->tools_class.process_id;
int t = cracker->tools_class.work0;
if(t!= cracker->current_id){
aTCR_setupAction(actor, t);
}
@@ -96,10 +96,10 @@ static void aTCR_actor_draw(ACTOR* actor, GAME* game){
OPEN_DISP(graph);
if(cracker->tools_class.enable == 1){
if(cracker->tools_class.init_matrix == 1){
Matrix_put(&cracker->tools_class.matrix_work);
Matrix_Position_Zero(&cracker->tools_class.actor_class.world.position);
cracker->tools_class.enable = 0;
cracker->tools_class.init_matrix = 0;
}
else{
Matrix_translate(cracker->tools_class.actor_class.world.position.x, cracker->tools_class.actor_class.world.position.y,
+3 -3
View File
@@ -60,7 +60,7 @@ static void aTFL_make_vtx(Vtx* v, ACTOR* actor){
fact = 0;
if(tools->enable == 1){
if(tools->init_matrix == 1){
Matrix_put(&flag->tools_class.matrix_work);
Matrix_translate(0.0f,0.0f,48.0999984741f,1);
Matrix_Position_Zero(&pos);
@@ -114,10 +114,10 @@ static void aTFL_actor_draw(ACTOR* actor, GAME* game){
buf = tol_hata_01_v;
}
if(tools->enable == 1){
if(tools->init_matrix == 1){
Matrix_put(&flag->tools_class.matrix_work);
Matrix_Position_Zero(&actor->world.position);
tools->enable = 0;
tools->init_matrix = 0;
}
else{
Matrix_translate(actor->world.position.x, actor->world.position.y,
+4 -4
View File
@@ -73,7 +73,7 @@ static void aTHB_setupAction(ACTOR* actor, int idx){
hanabi->proc = process[idx];
hanabi->current_id = idx;
hanabi->tools_class.process_id = idx;
hanabi->tools_class.work0 = idx;
scale = start_scale[idx];
hanabi->tools_class.actor_class.scale.x = scale;
@@ -85,7 +85,7 @@ static void aTHB_setupAction(ACTOR* actor, int idx){
static void aTHB_actor_move(ACTOR* actor, GAME* game){
HANABI_ACTOR* hanabi = (HANABI_ACTOR*)actor;
int t = hanabi->tools_class.process_id;
int t = hanabi->tools_class.work0;
if(t!= hanabi->current_id){
aTHB_setupAction(actor, t);
}
@@ -100,10 +100,10 @@ static void aTHB_actor_draw(ACTOR* actor, GAME* game){
OPEN_DISP(graph);
if(hanabi->tools_class.enable == 1){
if(hanabi->tools_class.init_matrix == 1){
Matrix_put(&hanabi->tools_class.matrix_work);
Matrix_Position_Zero(&hanabi->tools_class.actor_class.world.position);
hanabi->tools_class.enable = 0;
hanabi->tools_class.init_matrix = 0;
}
else{
Matrix_translate(hanabi->tools_class.actor_class.world.position.x, hanabi->tools_class.actor_class.world.position.y,
+5 -5
View File
@@ -46,15 +46,15 @@ static void aTHS1_setupAction(ACTOR*actor, int action){
hasu->proc = process[action];
hasu->current_id = action;
hasu->tools_class.process_id = action;
hasu->tools_class.work0 = action;
}
static void aTHS1_actor_move(ACTOR* actor, GAME*){
HASU1_ACTOR* hasu = (HASU1_ACTOR*)actor;
if(hasu->tools_class.process_id != hasu->current_id){
aTHS1_setupAction(actor, hasu->tools_class.process_id);
if(hasu->tools_class.work0 != hasu->current_id){
aTHS1_setupAction(actor, hasu->tools_class.work0);
}
hasu->proc(actor);
@@ -66,7 +66,7 @@ static void aTHS1_actor_draw(ACTOR* actor, GAME* game){
GRAPH* graph;
Gfx* gfxp;
if(hasu->tools_class.enable == 1){
if(hasu->tools_class.init_matrix == 1){
graph = game->graph;
OPEN_DISP(graph);
@@ -74,7 +74,7 @@ static void aTHS1_actor_draw(ACTOR* actor, GAME* game){
Matrix_put(&hasu->tools_class.matrix_work);
Matrix_Position_Zero(&hasu->tools_class.actor_class.world.position);
hasu->tools_class.enable = 0;
hasu->tools_class.init_matrix = 0;
_texture_z_light_fog_prim_npc(graph);
+5 -5
View File
@@ -46,15 +46,15 @@ static void aTHT1_setupAction(ACTOR*actor, int action){
hat->proc = process[action];
hat->current_id = action;
hat->tools_class.process_id = action;
hat->tools_class.work0 = action;
}
static void aTHT1_actor_move(ACTOR* actor, GAME*){
HAT1_ACTOR* hat = (HAT1_ACTOR*)actor;
if(hat->tools_class.process_id != hat->current_id){
aTHT1_setupAction(actor, hat->tools_class.process_id);
if(hat->tools_class.work0 != hat->current_id){
aTHT1_setupAction(actor, hat->tools_class.work0);
}
hat->proc(actor);
@@ -66,7 +66,7 @@ static void aTHT1_actor_draw(ACTOR* actor, GAME* game){
GRAPH* graph;
Gfx* gfxp;
if(hat->tools_class.enable == 1){
if(hat->tools_class.init_matrix == 1){
graph = game->graph;
OPEN_DISP(graph);
@@ -74,7 +74,7 @@ static void aTHT1_actor_draw(ACTOR* actor, GAME* game){
Matrix_put(&hat->tools_class.matrix_work);
Matrix_Position_Zero(&hat->tools_class.actor_class.world.position);
hat->tools_class.enable = 0;
hat->tools_class.init_matrix = 0;
_texture_z_light_fog_prim_npc(graph);
+5 -5
View File
@@ -46,15 +46,15 @@ static void aTHT2_setupAction(ACTOR*actor, int action){
hat->proc = process[action];
hat->current_id = action;
hat->tools_class.process_id = action;
hat->tools_class.work0 = action;
}
static void aTHT2_actor_move(ACTOR* actor, GAME*){
HAT2_ACTOR* hat = (HAT2_ACTOR*)actor;
if(hat->tools_class.process_id != hat->current_id){
aTHT2_setupAction(actor, hat->tools_class.process_id);
if(hat->tools_class.work0 != hat->current_id){
aTHT2_setupAction(actor, hat->tools_class.work0);
}
hat->proc(actor);
@@ -66,7 +66,7 @@ static void aTHT2_actor_draw(ACTOR* actor, GAME* game){
GRAPH* graph;
Gfx* gfxp;
if(hat->tools_class.enable == 1){
if(hat->tools_class.init_matrix == 1){
graph = game->graph;
OPEN_DISP(graph);
@@ -74,7 +74,7 @@ static void aTHT2_actor_draw(ACTOR* actor, GAME* game){
Matrix_put(&hat->tools_class.matrix_work);
Matrix_Position_Zero(&hat->tools_class.actor_class.world.position);
hat->tools_class.enable = 0;
hat->tools_class.init_matrix = 0;
_texture_z_light_fog_prim_npc(graph);
+5 -5
View File
@@ -46,15 +46,15 @@ static void aTHT3_setupAction(ACTOR*actor, int action){
hat->proc = process[action];
hat->current_id = action;
hat->tools_class.process_id = action;
hat->tools_class.work0 = action;
}
static void aTHT3_actor_move(ACTOR* actor, GAME*){
HAT3_ACTOR* hat = (HAT3_ACTOR*)actor;
if(hat->tools_class.process_id != hat->current_id){
aTHT3_setupAction(actor, hat->tools_class.process_id);
if(hat->tools_class.work0 != hat->current_id){
aTHT3_setupAction(actor, hat->tools_class.work0);
}
hat->proc(actor);
@@ -66,7 +66,7 @@ static void aTHT3_actor_draw(ACTOR* actor, GAME* game){
GRAPH* graph;
Gfx* gfxp;
if(hat->tools_class.enable == 1){
if(hat->tools_class.init_matrix == 1){
graph = game->graph;
OPEN_DISP(graph);
@@ -74,7 +74,7 @@ static void aTHT3_actor_draw(ACTOR* actor, GAME* game){
Matrix_put(&hat->tools_class.matrix_work);
Matrix_Position_Zero(&hat->tools_class.actor_class.world.position);
hat->tools_class.enable = 0;
hat->tools_class.init_matrix = 0;
_texture_z_light_fog_prim_npc(graph);
+105
View File
@@ -0,0 +1,105 @@
#include "ac_t_npc_sao.h"
#include "m_name_table.h"
#include "sys_matrix.h"
static void aTNS_setupAction(ACTOR* actorx, u8 action);
ACTOR_PROFILE T_NpcSao_Profile = {
mAc_PROFILE_T_NPCSAO,
ACTOR_PART_BG,
ACTOR_STATE_NO_DRAW_WHILE_CULLED | ACTOR_STATE_NO_MOVE_WHILE_CULLED,
EMPTY_NO,
ACTOR_OBJ_BANK_NPC_SAO,
sizeof(NPC_SAO_TOOL_ACTOR),
&aTNS_actor_ct,
NONE_ACTOR_PROC,
&aTNS_actor_move,
&aTNS_actor_draw,
NULL
};
extern void aTNS_actor_ct(ACTOR* actorx, GAME* game) {
aTNS_setupAction(actorx, 1);
}
static void aTNS_destruct(NPC_SAO_TOOL_ACTOR* npc_sao) {
Actor_delete((ACTOR*)npc_sao);
}
static void aTNS_setupAction(ACTOR* actorx, u8 action) {
NPC_SAO_TOOL_ACTOR* npc_sao = (NPC_SAO_TOOL_ACTOR*)actorx;
static aTNS_ACTION_PROC process[] = {
(aTNS_ACTION_PROC)&none_proc1,
(aTNS_ACTION_PROC)&none_proc1,
(aTNS_ACTION_PROC)&none_proc1,
&aTNS_destruct,
(aTNS_ACTION_PROC)&none_proc1,
NULL
};
npc_sao->action_proc = process[action];
npc_sao->action = action;
npc_sao->tool_class.work0 = action;
}
extern void aTNS_actor_move(ACTOR* actorx, GAME* game) {
NPC_SAO_TOOL_ACTOR* npc_sao = (NPC_SAO_TOOL_ACTOR*)actorx;
s16 rotation_y;
ACTOR* parent_actor;
s16 parent_rotation_y;
int temp;
f32 pos_offset;
if (npc_sao->tool_class.work0 != npc_sao->action) {
aTNS_setupAction(actorx, npc_sao->tool_class.work0);
}
(npc_sao->action_proc)(npc_sao);
parent_actor = actorx->parent_actor;
temp = npc_sao->rotation_y;
parent_rotation_y = parent_actor->shape_info.rotation.y;
rotation_y = temp + ((int)(fqrand() * 6.0f + 2.0f) * 256);
npc_sao->pos_x = parent_actor->world.position.x + sin_s(parent_rotation_y) * 100.0f;
npc_sao->pos_y = parent_actor->world.position.y + -20.0f + sin_s(rotation_y) * 1.5f;
npc_sao->pos_z = parent_actor->world.position.z + cos_s(parent_rotation_y) * 100.0f;
npc_sao->rotation_y = rotation_y;
}
extern Gfx tol_npcsao_1_sao_model[];
extern Gfx tol_npcsao_1_uki_model[];
extern void aTNS_actor_draw(ACTOR* actorx, GAME* game) {
NPC_SAO_TOOL_ACTOR* npc_sao = (NPC_SAO_TOOL_ACTOR*)actorx;
GRAPH* g = game->graph;
Gfx* gfx;
if (npc_sao->tool_class.init_matrix == TRUE) {
Matrix_put(&npc_sao->tool_class.matrix_work);
Matrix_Position_Zero(&actorx->world.position);
npc_sao->tool_class.init_matrix = FALSE;
}
else {
Matrix_translate(actorx->world.position.x, actorx->world.position.y, actorx->world.position.z, FALSE);
Matrix_scale(0.01f, 0.01f, 0.01f, TRUE);
}
_texture_z_light_fog_prim_npc(g);
OPEN_DISP(g);
gfx = NOW_POLY_OPA_DISP;
gSPMatrix(gfx++, _Matrix_to_Mtx_new(g), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gfx++, tol_npcsao_1_sao_model);
Matrix_translate(npc_sao->pos_x, npc_sao->pos_y, npc_sao->pos_z, FALSE);
Matrix_scale(0.01f, 0.01f, 0.01f, 1);
gSPMatrix(gfx++, _Matrix_to_Mtx_new(g), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gfx++, tol_npcsao_1_uki_model);
SET_POLY_OPA_DISP(gfx);
CLOSE_DISP(g);
}
+4 -4
View File
@@ -69,7 +69,7 @@ static void aTPT_setupAction(ACTOR* actor, int idx){
pistol->proc = process[idx];
pistol->current_id = idx;
pistol->tools_class.process_id = idx;
pistol->tools_class.work0 = idx;
scale = start_scale[idx];
pistol->tools_class.actor_class.scale.x = scale;
@@ -81,7 +81,7 @@ static void aTPT_setupAction(ACTOR* actor, int idx){
static void aTPT_actor_move(ACTOR* actor, GAME* game){
PISTOL_ACTOR* pistol = (PISTOL_ACTOR*)actor;
int t = pistol->tools_class.process_id;
int t = pistol->tools_class.work0;
if(t!= pistol->current_id){
aTPT_setupAction(actor, t);
}
@@ -96,10 +96,10 @@ static void aTPT_actor_draw(ACTOR* actor, GAME* game){
OPEN_DISP(graph);
if(pistol->tools_class.enable == 1){
if(pistol->tools_class.init_matrix == 1){
Matrix_put(&pistol->tools_class.matrix_work);
Matrix_Position_Zero(&pistol->tools_class.actor_class.world.position);
pistol->tools_class.enable = 0;
pistol->tools_class.init_matrix = 0;
}
else{
Matrix_translate(pistol->tools_class.actor_class.world.position.x, pistol->tools_class.actor_class.world.position.y,
+3 -3
View File
@@ -59,7 +59,7 @@ static void aTOL_check_data_bank(int id, ACTOR* actor){
}
}
static TOOLS_ACTOR* aTOL_birth_proc(ToolName name, int id, TOOLS_ACTOR* tool,
static TOOLS_ACTOR* aTOL_birth_proc(int name, int id, TOOLS_ACTOR* tool,
GAME_PLAY* play, s16 arg, int* arg5){
static s16 profile_table[] = {
mAc_PROFILE_T_UMBRELLA, mAc_PROFILE_T_UMBRELLA, mAc_PROFILE_T_UMBRELLA, mAc_PROFILE_T_UMBRELLA, mAc_PROFILE_T_UMBRELLA,
@@ -86,7 +86,7 @@ static TOOLS_ACTOR* aTOL_birth_proc(ToolName name, int id, TOOLS_ACTOR* tool,
profile_table[name], 0.0f, 0.0f, 0.0f, 0, 0, 0, -1, 0, arg, -1);
if(child != NULL){
child->process_id = id;
child->work0 = id;
child->tool_name = name;
}
@@ -103,7 +103,7 @@ static int aTOL_chg_request_mode_proc(ACTOR* actor ,TOOLS_ACTOR* tool, int id){
return 0;
}
tool->process_id = id;
tool->work0 = id;
return 1;
}