7#include "btactstatus.hpp"
8#include "collision.hpp"
9#include "dataalloc.hpp"
10#include "dun/gameloop.hpp"
12#include "editloop3.hpp"
15#include "monstorunit.hpp"
16#include "runscript.hpp"
17#include "shot_freefuncs.hpp"
19#include "userstatus.hpp"
29int PUSH_INT_DATA[16][8];
42 if (argument->
type == RS_FLOAT) {
43 return (
int) argument->
f;
53 if (argument->
type == RS_INT) {
54 return (
float) argument->
i;
71 if (argument->
type == RS_PTR) {
72 argument->
p->
i = value;
79static void SetStack(
RS_STACKDATA *argument,
float value) {
80 if (argument->
type == RS_PTR) {
81 argument->
p->
f = value;
90 motion_id = GetStackInt(stack++);
101 float speed = NowMonstorUnit->
chara[monster_no][0].motion_type.motion_info[motion_id].speed;
107 NowMonstorUnit->
chara[monster_no][0].SetMotion(motion_id, 0);
108 NowMonstorUnit->
chara[monster_no][0].SetMotionSpeed(speed);
114 NowMonstorUnit->
chara[monster_no][i + 1].SetMotion(motion_id, 0);
115 NowMonstorUnit->
chara[monster_no][i + 1].SetMotionSpeed(speed);
120 float speed = GetStackFloat(stack++);
126 NowMonstorUnit->
chara[monster_no][0].SetMotion(motion_id, 0);
127 NowMonstorUnit->
chara[monster_no][0].SetMotionSpeed(speed);
133 NowMonstorUnit->
chara[monster_no][i + 1].SetMotion(motion_id, 0);
134 NowMonstorUnit->
chara[monster_no][i + 1].SetMotionSpeed(speed);
139 float speed = GetStackFloat(stack++);
145 int mode = GetStackInt(stack++);
146 NowMonstorUnit->
chara[monster_no][0].SetMotion(motion_id, mode);
147 NowMonstorUnit->
chara[monster_no][0].SetMotionSpeed(speed);
153 NowMonstorUnit->
chara[monster_no][i + 1].SetMotion(motion_id, mode);
154 NowMonstorUnit->
chara[monster_no][i + 1].SetMotionSpeed(speed);
163 float current_frame = NowMonstorUnit->
chara[monster_no][0].motion_type.state.time;
164 int motion_no = NowMonstorUnit->
chara[monster_no][0].motion_no;
165 float end_frame = (float) NowMonstorUnit->
chara[monster_no][0].motion_type.motion_info[motion_no].end;
168 if (!(current_frame < end_frame - 1.0f) && current_frame < end_frame) {
172 SetStack(stack++, done);
175 SetStack(stack, current_frame);
184 SetStack(stack, NowMonstorUnit->
chara[monster_no][0].motion_type.state.time);
191 NowMonstorUnit->
chara[monster_no][0].motion_type.state.time = GetStackFloat(stack);
197 float monster_position[4];
198 float target_position[4];
200 NowMonstorUnit->
chara[monster_no][0].GetPosition(monster_position);
203 sceVu0CopyVector(target_position, CharaMain.
pos);
205 target_position[0] = GetStackFloat(stack++);
206 target_position[1] = GetStackFloat(stack++);
207 target_position[2] = GetStackFloat(stack++);
210 SetStack(stack, DistVector(monster_position, target_position));
216 int target = (int) GetStackFloat(stack++);
220 NowMonstorUnit->
chara[monster_no][0].GetPosition(position);
224 sceVu0CopyVector(position, CharaMain.
pos);
227 SetStack(stack++, position[0]);
228 SetStack(stack++, position[1]);
229 SetStack(stack, position[2]);
246 NowMonstorUnit->
chara[monster_no][0].GetPosition(position);
247 NowMonstorUnit->
chara[monster_no][0].GetRotation(rotation);
248 sceVu0SubVector(direction, NowMonstorUnit->
monster[monster_no].
turn_target, position);
249 rotation[1] = atan2f(direction[0], direction[2]);
250 NowMonstorUnit->
chara[monster_no][0].SetRotation(rotation);
265 SetStack(stack, done);
277 SetStack(stack++, done);
282 NowMonstorUnit->
chara[monster_no][0].GetPosition(position);
283 SetStack(stack, DistVector(NowMonstorUnit->
monster[monster_no].
movement, position));
297 float away_from_player[4];
300 min_cosine = 1.0f - 0.011111111f * GetStackInt(stack++);
301 max_distance = 100000;
304 max_distance = GetStackFloat(stack++);
307 sceVu0CopyVector(player, CharaMain.
pos);
308 NowMonstorUnit->
chara[monster_no][0].GetPosition(position);
309 NowMonstorUnit->
chara[monster_no][0].GetRotation(rotation);
310 float direction[4] = {0.0f, 0.0f, 1.0f, 1.0f};
311 float identity[4][4];
312 float facing_matrix[4][4];
314 sceVu0UnitMatrix(identity);
315 sceVu0RotMatrixY(facing_matrix, identity, rotation[1]);
316 sceVu0ApplyMatrix(direction, facing_matrix, direction);
317 sceVu0Normalize(direction, direction);
318 away_from_player[0] = position[0] - player[0];
319 away_from_player[2] = position[2] - player[2];
320 away_from_player[1] = 0.0f;
321 away_from_player[3] = 1.0f;
322 sceVu0Normalize(away_from_player, away_from_player);
324 if (sceVu0InnerProduct(direction, away_from_player) >= min_cosine && DistVector(position, player) < max_distance) {
328 SetStack(stack, in_view);
337 float turn_matrix[4][4];
338 float identity[4][4];
340 NowMonstorUnit->
chara[monster_no][0].GetPosition(position);
341 direction[0] = GetStackFloat(stack++);
342 direction[1] = GetStackFloat(stack++);
343 direction[2] = GetStackFloat(stack++);
347 angle = GetStackFloat(stack++);
349 if (angle >= 180.0f) {
353 angle = DEG_TO_RAD * angle;
355 if (angle > TWO_PI) {
364 direction[0] -= position[0];
365 direction[1] -= position[1];
366 direction[2] -= position[2];
367 sceVu0Normalize(direction, direction);
370 sceVu0UnitMatrix(identity);
371 sceVu0RotMatrixY(turn_matrix, identity, angle);
372 sceVu0ApplyMatrix(direction, turn_matrix, direction);
375 SetStack(stack++, direction[0]);
376 SetStack(stack++, direction[1]);
377 SetStack(stack, direction[2]);
383 float facing_matrix[4][4];
384 float identity[4][4];
389 float angle = GetStackFloat(stack++);
391 rotation[1] += DEG_TO_RAD * angle;
393 if (rotation[1] > PI) {
394 rotation[1] -= TWO_PI;
397 if (rotation[1] < -PI) {
398 rotation[1] += TWO_PI;
402 float direction[4] = {0.0f, 0.0f, 1.0f, 0.0f};
403 sceVu0UnitMatrix(identity);
404 sceVu0RotMatrixY(facing_matrix, identity, rotation[1]);
405 sceVu0ApplyMatrix(direction, facing_matrix, direction);
407 sceVu0Normalize(direction, direction);
408 SetStack(stack++, direction[0]);
409 SetStack(stack++, direction[1]);
410 SetStack(stack, direction[2]);
420 NowMonstorUnit->
chara[monster_no][0].GetPosition(position);
421 direction[0] = GetStackFloat(stack++);
422 direction[1] = GetStackFloat(stack++);
423 direction[2] = GetStackFloat(stack++);
424 direction[0] -= position[0];
425 direction[1] -= position[1];
426 direction[2] -= position[2];
428 sceVu0Normalize(NowMonstorUnit->
monster[monster_no].
movement, direction);
429 speed = GetStackFloat(stack);
447 NowMonstorUnit->
chara[monster_no][0].GetPosition(from);
448 to[0] = GetStackFloat(stack++);
449 to[1] = GetStackFloat(stack++);
450 to[2] = GetStackFloat(stack++);
458 SetStack(stack, clear);
474 float x = GetStackFloat(stack++);
475 float y = GetStackFloat(stack++);
476 float z = GetStackFloat(stack);
478 NowMonstorUnit->
chara[monster_no][0].SetPosition(x, y, z);
485 NowMonstorUnit->
monster[monster_no].
falls = GetStackInt(stack);
491 int invincible = GetStackInt(stack);
524 fading_in = GetStackInt(stack++);
527 if (fading_in == 0) {
535 SetStack(stack, done);
554 printf(
"run script !!\n");
568 float hp = NowMonstorUnit->
monster[monster_no].
hp;
570 SetStack(stack, 100.0f * (hp / max_hp));
580 normalize = GetStackInt(stack++);
584 angle += DEG_TO_RAD * GetStackFloat(stack++);
594 getCharacterVector(vector, angle);
596 if (normalize != 0) {
597 sceVu0Normalize(vector, vector);
600 SetStack(stack++, vector[0]);
601 SetStack(stack++, vector[1]);
602 SetStack(stack, vector[2]);
612 int bound = GetStackInt(stack++);
614 int roll = (float) bound * rand() / 2147483648.0f;
616 SetStack(stack, roll);
621 float bound = GetStackFloat(stack++);
623 SetStack(stack, (
float) (
int) (bound * rand() / 2147483648.0f));
628 float angle = GetStackFloat(stack++);
630 angle = DEG_TO_RAD * angle;
631 SetStack(stack, sinf(angle));
636 float angle = GetStackFloat(stack++);
638 angle = DEG_TO_RAD * angle;
639 SetStack(stack, cosf(angle));
644int elmColor[6][3] = {
645 {230, 90, 0}, {0, 200, 255}, {255, 255, 0}, {0, 255, 0}, {255, 200, 255}, {255, 0, 0},
709 float scale_x = 1.0f;
710 float scale_y = scale_x;
713 name = GetStackString(stack++);
716 scale_x = GetStackFloat(stack++);
717 scale_y = GetStackFloat(stack);
720 frame = NowMonstorUnit->
chara[monster_no][0].frame->SearchFrame(name);
723 printf(
"lock:NofFountNull %s\n", name);
734 char *name = GetStackString(stack++);
735 float radius = GetStackFloat(stack);
739 for (i = 0; i < 12; i++) {
740 if (NowMonstorUnit->
effect3[monster_no].
timer[i] == 0) {
741 CFrame *frame = NowMonstorUnit->
chara[monster_no][0].frame->SearchFrame(name);
751 printf(
"[%d]mov col -> %s\n", NowMonstorUnit->
monster[monster_no].
base_model, name);
759 char *name = GetStackString(stack++);
760 float radius = GetStackFloat(stack++);
768 start = GetStackFloat(stack++);
769 end = GetStackFloat(stack);
774 for (i = 0; i < 16; i++) {
775 if (NowMonstorUnit->
effect[monster_no].
timer[i] == 0) {
776 CFrame *frame = NowMonstorUnit->
chara[monster_no][0].frame->SearchFrame(name);
780 NowMonstorUnit->
effect[monster_no].
frame[i] = frame;
785 for (j = 0; j < 5; j++) {
789 for (j = 0; j < 6; j++) {
797 printf(
"[%d]body col -> %s\n", NowMonstorUnit->
monster[monster_no].
base_model, name);
806 int parameter_no = GetStackInt(stack++);
807 int value = GetStackInt(stack);
810 if (bak_ColNo == -1) {
814 if (parameter_no <= 9) {
818 if (parameter_no >= 10) {
819 NowMonstorUnit->
effect[monster_no].
parameter[bak_ColNo][parameter_no - 10] = value;
826 char *name = GetStackString(stack++);
827 float radius = GetStackFloat(stack++);
828 float start = GetStackFloat(stack++);
829 float end = GetStackFloat(stack);
833 for (i = 0; i < 16; i++) {
835 CFrame *frame = NowMonstorUnit->
chara[monster_no][0].frame->SearchFrame(name);
847 printf(
"[%d] dcol -> %s\n", NowMonstorUnit->
monster[monster_no].
base_model, name);
861 NowMonstorUnit->
effect2[monster_no].
damage[slot] = GetStackInt(stack++);
862 NowMonstorUnit->
effect2[monster_no].
flags[slot] = GetStackInt(stack++);
863 NowMonstorUnit->
effect2[monster_no].
kind[slot] = GetStackInt(stack++);
866 if (NowMonstorUnit->
effect2[monster_no].
kind[slot] == 3 && argc == 4) {
867 NowMonstorUnit->
effect2[monster_no].
angle[slot] = GetStackFloat(stack);
882 name = GetStackString(stack++);
888 if (NowMonstorUnit->
event[monster_no].
timer == 0) {
889 CFrame *frame = NowMonstorUnit->
chara[monster_no][0].frame->SearchFrame(name);
892 printf(
"not shot null !!\n");
896 NowMonstorUnit->
event[monster_no].
frame = frame;
918 name = GetStackString(stack++);
924 if (NowMonstorUnit->
event2[monster_no].
timer == 0) {
925 CFrame *frame = NowMonstorUnit->
chara[monster_no][0].frame->SearchFrame(name);
928 printf(
"not shot null !!\n");
952 for (i = 0; i < 16; i++) {
953 if (NowMonstorUnit->
sound[monster_no].
id[i] == -1) {
966 NowMonstorUnit->
sound[monster_no].
start[slot] = GetStackFloat(stack++);
967 NowMonstorUnit->
sound[monster_no].
end[slot] = GetStackFloat(stack++);
968 NowMonstorUnit->
sound[monster_no].
id[slot] = GetStackInt(stack);
986 if (sound_id == -1) {
991 SndSeStop(sound_id, monster_no * 2);
1004 SndSePlay(GetStackInt(stack), -1, 0);
1009 SndSeStop(GetStackInt(stack), 0);
1014 SetStack(stack, (
int) UserStatus->
cur_chara);
1031 NowMonstorUnit->
chara[GetStackInt(stack++)][0].GetPosition(position);
1032 SetStack(stack++, position[0]);
1033 SetStack(stack++, position[1]);
1034 SetStack(stack, position[2]);
1039 int monster_no = GetStackInt(stack++);
1041 float frame = NowMonstorUnit->
chara[monster_no][0].motion_type.state.time;
1043 SetStack(stack, frame);
1048 int monster_no = GetStackInt(stack++);
1051 position[0] = GetStackFloat(stack++);
1052 position[1] = GetStackFloat(stack++);
1053 position[2] = GetStackFloat(stack);
1054 NowMonstorUnit->
chara[monster_no][0].SetPosition(position);
1059 int monster_no = GetStackInt(stack++);
1063 NowMonstorUnit->
chara[monster_no][0].GetPosition(position);
1064 direction[0] = GetStackFloat(stack++);
1065 direction[1] = GetStackFloat(stack++);
1066 direction[2] = GetStackFloat(stack++);
1067 direction[0] -= position[0];
1068 direction[1] -= position[1];
1069 direction[2] -= position[2];
1070 direction[3] = 1.0f;
1071 sceVu0Normalize(NowMonstorUnit->
monster[monster_no].
movement, direction);
1077 int monster_no = GetStackInt(stack++);
1078 int leader_no = GetStackInt(stack);
1086 int monster_no = GetStackInt(stack);
1107 int monster_no = GetStackInt(stack++);
1108 int motion_id = GetStackInt(stack++);
1114 NowMonstorUnit->
chara[monster_no][0].SetMotion(motion_id, 0);
1119 NowMonstorUnit->
chara[monster_no][i + 1].SetMotion(motion_id, 0);
1124 float speed = GetStackFloat(stack++);
1126 NowMonstorUnit->
chara[monster_no][0].SetMotion(motion_id, 0);
1127 NowMonstorUnit->
chara[monster_no][0].SetMotionSpeed(speed);
1133 NowMonstorUnit->
chara[monster_no][i + 1].SetMotion(motion_id, 0);
1134 NowMonstorUnit->
chara[monster_no][i + 1].SetMotionSpeed(speed);
1139 float speed = GetStackFloat(stack++);
1140 int mode = GetStackInt(stack);
1142 NowMonstorUnit->
chara[monster_no][0].SetMotion(motion_id, mode);
1143 NowMonstorUnit->
chara[monster_no][0].SetMotionSpeed(speed);
1149 NowMonstorUnit->
chara[monster_no][i + 1].SetMotion(motion_id, mode);
1150 NowMonstorUnit->
chara[monster_no][i + 1].SetMotionSpeed(speed);
1158 int slot = GetStackInt(stack++);
1160 GL_INT[slot] = GetStackInt(stack);
1165 int slot = GetStackInt(stack++);
1167 SetStack(stack++, GL_INT[slot]);
1174static int _GET_OBJ_POS(
RS_STACKDATA *stack,
int argc) {
1176 CFrame *frame = NowMonstorUnit->
chara[monster_no][0].frame->SearchFrame(GetStackString(stack++));
1180 sceVu0CopyVector(local, frame->
position);
1181 frame->GetWorldPosition(world, local);
1182 SetStack(stack++, world[0]);
1183 SetStack(stack++, world[1]);
1184 SetStack(stack, world[2]);
1197 NowMonstorUnit->
chara[monster_no][0].GetPosition(position);
1198 NowMonstorUnit->
chara[monster_no][0].GetRotation(rotation);
1199 sceVu0SubVector(direction, NowMonstorUnit->
monster[monster_no].
turn_target, position);
1200 rotation[0] = -atan2f(direction[1], direction[2]);
1201 NowMonstorUnit->
chara[monster_no][0].SetRotation(rotation);
1210 sceVu0FMATRIX matrix;
1219 axis = GetStackInt(stack);
1220 sceVu0UnitMatrix(matrix);
1221 NowMonstorUnit->
chara[monster_no][0].GetPosition(position);
1222 NowMonstorUnit->
chara[monster_no][0].GetRotation(rotation);
1223 sceVu0CopyMatrix(matrix, NowMonstorUnit->
chara[monster_no][0].frame->local);
1224 sceVu0SubVector(direction, NowMonstorUnit->
monster[monster_no].
turn_target, position);
1227 sceVu0Normalize(x_axis, direction);
1228 sceVu0OuterProduct(z_axis, x_axis, matrix[1]);
1229 sceVu0OuterProduct(y_axis, x_axis, z_axis);
1230 sceVu0CopyVector(matrix[0], x_axis);
1231 sceVu0CopyVector(matrix[1], y_axis);
1232 sceVu0CopyVector(matrix[2], z_axis);
1233 NowMonstorUnit->
chara[monster_no][0].frame->SetTransMatrix(matrix);
1237 sceVu0Normalize(y_axis, direction);
1238 sceVu0OuterProduct(x_axis, y_axis, matrix[2]);
1239 sceVu0OuterProduct(z_axis, x_axis, z_axis);
1240 sceVu0CopyVector(matrix[0], x_axis);
1241 sceVu0CopyVector(matrix[1], y_axis);
1242 sceVu0CopyVector(matrix[2], z_axis);
1243 NowMonstorUnit->
chara[monster_no][0].frame->SetTransMatrix(matrix);
1247 sceVu0Normalize(z_axis, direction);
1248 sceVu0OuterProduct(x_axis, z_axis, matrix[1]);
1249 sceVu0OuterProduct(y_axis, x_axis, z_axis);
1250 sceVu0CopyVector(matrix[0], x_axis);
1251 sceVu0CopyVector(matrix[1], y_axis);
1252 sceVu0CopyVector(matrix[2], z_axis);
1253 NowMonstorUnit->
chara[monster_no][0].frame->SetTransMatrix(matrix);
1261 float step = GetStackFloat(stack);
1263 NowMonstorUnit->
chara[monster_no][0].motion_type.state.blend_step = step;
1266 NowMonstorUnit->
chara[monster_no][i + 1].motion_type.state.blend_step = step;
1273 int monster_no = GetStackInt(stack++);
1277 float turn_matrix[4][4];
1278 float identity[4][4];
1280 NowMonstorUnit->
chara[monster_no][0].GetPosition(position);
1281 direction[0] = GetStackFloat(stack++);
1282 direction[1] = GetStackFloat(stack++);
1283 direction[2] = GetStackFloat(stack++);
1284 direction[3] = 1.0f;
1287 angle = GetStackFloat(stack++);
1289 if (angle >= 180.0f) {
1293 angle = DEG_TO_RAD * angle;
1295 if (angle > TWO_PI) {
1304 direction[0] -= position[0];
1305 direction[1] -= position[1];
1306 direction[2] -= position[2];
1307 sceVu0Normalize(direction, direction);
1310 sceVu0UnitMatrix(identity);
1311 sceVu0RotMatrixY(turn_matrix, identity, angle);
1312 sceVu0ApplyMatrix(direction, turn_matrix, direction);
1315 SetStack(stack++, direction[0]);
1316 SetStack(stack++, direction[1]);
1317 SetStack(stack, direction[2]);
1323 float rate = GetStackFloat(stack);
1337 int kind = GetStackInt(stack++);
1338 int weight = GetStackInt(stack++);
1339 int monster_no = GetStackInt(stack);
1341 if (monster_no < 0 || monster_no > 15) {
1345 if (kind < 0 || kind > 4) {
1354 int anime_no = GetStackInt(stack++);
1355 int enable = GetStackInt(stack++);
1356 int monster_no = GetStackInt(stack);
1358 if (monster_no < 0 || monster_no > 15) {
1363 NowMonstorUnit->
chara[monster_no][0].TexAnimeOn(anime_no);
1364 printf(
"animOn %d\n", anime_no);
1366 NowMonstorUnit->
chara[monster_no][0].TexAnimeOff(anime_no);
1367 printf(
"animOff %d\n", anime_no);
1378 SetStack(stack, flags);
1393 float nearest = 240.0f;
1395 float other_position[4];
1396 float found_position[4];
1399 NowMonstorUnit->
chara[monster_no][0].GetPosition(position);
1401 for (i = 0; i < 16; i++) {
1402 if (i != monster_no && NowMonstorUnit->
monster[i].
state == 2) {
1403 NowMonstorUnit->
chara[i][0].GetPosition(other_position);
1404 float distance = DistVector(position, other_position);
1406 if (distance < nearest) {
1407 sceVu0CopyVector(found_position, other_position);
1414 SetStack(stack++, found_position[0]);
1415 SetStack(stack++, found_position[1]);
1416 SetStack(stack++, found_position[2]);
1417 SetStack(stack, found);
1423 EdFadeOut(120, 0.0f, 0.0f, 0.0f);
1430 int done = EdFadeOutCheck();
1432 SetStack(stack, done);
1449 start = (int) GetStackFloat(stack++);
1450 end = (int) GetStackFloat(stack);
1453 for (
int i = 0; i < 3; i++) {
1454 if (NowMonstorUnit->
guard[monster_no].
active[i] == 0) {
1464 NowMonstorUnit->
guard[monster_no].
active[slot] = 1;
1477 sceVu0CopyVector(player, CharaMain.
pos);
1478 NowMonstorUnit->
chara[monster_no][0].GetPosition(position);
1479 distance = DistVector(player, position);
1480 direction[0] = position[0] - player[0];
1481 direction[1] = 0.0f;
1482 direction[2] = position[2] - player[2];
1483 direction[3] = 1.0f;
1484 sceVu0Normalize(direction, direction);
1486 if (sceVu0InnerProduct(BtActStatus.
input_direction, direction) >= 0.35) {
1491 SetStack(stack++, distance);
1507 slot = GetStackInt(stack++);
1509 if (slot < 0 || slot > 7) {
1513 PUSH_INT_DATA[monster_no][slot] = GetStackInt(stack);
1521 slot = GetStackInt(stack++);
1523 if (slot < 0 || slot > 7) {
1527 SetStack(stack++, PUSH_INT_DATA[monster_no][slot]);
1532 int kind = GetStackInt(stack++);
1536 if (UserStatus->
ailments[chara] != 0 && kind != 0) {
1540 SetStack(stack, ailment);
1546 int target_no = GetStackInt(stack++);
1547 char *name = GetStackString(stack);
1555 frame = NowMonstorUnit->
chara[monster_no][0].frame;
1556 anchor = NowMonstorUnit->
chara[target_no][0].frame->SearchFrame(name);
1558 if (anchor == NULL) {
1562 frame->SetReference(anchor);
1567 int monster_no = GetStackInt(stack);
1568 CFrame *frame = NowMonstorUnit->
chara[monster_no][0].frame;
1570 if (frame == NULL) {
1574 frame->DeleteReference();
1597 {_GET_DISTANCE, 10 },
1598 {_GET_POSITION, 11 },
1599 {_SET_ROTATION, 12 },
1600 {_CHK_ROTATION, 13 },
1602 {_CHK_USER_INNER_PRODUCT, 15 },
1604 {_GET_DIRECTION, 31 },
1606 {_CHK_MOVE_INFO, 33 },
1607 {_SET_MOVE_CANSEL, 34 },
1608 {_SET_ROT_CANSEL, 35 },
1609 {_SET_POSITION, 36 },
1610 {_STATUS_SET_FALL, 100},
1611 {_STATUS_SET_MUTEKI, 101},
1612 {_STATUS_SET_ALPHA, 102},
1613 {_STATUS_CHK_ALPHA, 103},
1614 {_STATUS_SET_DEAD, 104},
1615 {_STATUS_SET_PALLET, 105},
1620 {_STATUS_SET_CLIPLEVEL, 106},
1621 {_STATUS_SET_EVENT, 107},
1622 {_STATUS_SET_COL_OFF, 108},
1623 {_STATUS_GET_LIFE_RATE, 109},
1624 {_STATUS_GET_HEIGHT, 112},
1625 {_STATUS_GET_HITDMG_VOL, 113},
1626 {_STATUS_GET_MOTION_ID, 114},
1627 {_STATUS_GET_DMG_ID, 115},
1628 {_STATUS_SET_LOCKON_DIST, 116},
1629 {_STATUS_SET_SHADOW_LEN, 117},
1630 {_STATUS_SET_LOCKON_TRG, 118},
1631 {_STATUS_GET_USER_VECTOR, 110},
1632 {_SET_MOV_COL, 136},
1633 {_SET_BODY_COL, 130},
1634 {_SET_BODY_COL_PARA, 134},
1635 {_SET_DMG_COL, 131},
1636 {_SET_DMG_PARA, 132},
1639 {_SET_SND_FRM, 140},
1640 {_SET_LOOP_SND, 230},
1641 {_STOP_LOOP_SND, 231},
1642 {_DEL_LOOP_SND, 232},
1643 {_SET_SND_NOW, 141},
1645 {_CHK_MOTION_FRM, 201},
1646 {_GET_MOTION_FRM, 202},
1647 {_SET_MOTION_FRM, 203},
1649 {_GET_COL_HIT_ID, 211},
1650 {_GET_SCRIPT_ID, 212},
1651 {_GET_MONSTOR_POS, 213},
1653 {_GET_MONSTOR_FRM, 214},
1654 {_SET_MONSTOR_POS, 215},
1655 {_SET_MONSTOR_MOVE, 216},
1656 {_SET_MONSTOR_LINK_MOVE, 217},
1657 {_SET_MONSTOR_MOVE_CANSEL, 218},
1658 {_SET_MONSTOR_MOTION, 219},
1659 {_SET_GLOBAL_INT, 220},
1660 {_GET_GLOBAL_INT, 221},
1661 {_GET_OBJ_POS, 222},
1662 {_SET_ROTATION_X, 223},
1663 {_SET_MOTION_CHANGE_STEP, 224},
1664 {_GET_MONSTOR_VECTOR, 225},
1665 {_SET_LOCKON_DIST, 226},
1666 {_SET_LOCKON_SW, 227},
1667 {_STOP_SND_NOW, 142},
1668 {_STATUS_SET_LIFE, 228},
1670 {_SET_STATUS_CHANGE, 204},
1671 {_SET_TEX_ANIME_SW, 205},
1672 {_GET_STATUS_BIN2, 208},
1673 {_SET_COLLISION_WIDTH, 206},
1674 {_GET_NEAR_MONSTER, 207},
1675 {_BOSS_FADE_OUT, 240},
1676 {_CHEKC_FADE_OUT, 241},
1677 {_SET_GRAVITY, 242},
1678 {_SET_GUARD_FRAME, 244},
1679 {_GUARD_SEARCH, 245},
1680 {_GET_MOVE_VEC, 246},
1681 {_PUSH_IGLOBAL, 247},
1682 {_POP_IGLOBAL, 248},
1683 {_GET_USER_STATUS, 249},
1684 {_SET_REFERENCE, 250},
1685 {_DEL_REFERENCE, 251},
1687 {_SET_SHADOW_FLAG, 253},
1691void BtSetEventExtendTable() {
1694 for (i = 0; i < 256; i++) {
1699 if (ext_func_info[i].function == NULL) {
1705 for (j = 0; j < i; j++) {
1706 if (ext_func_info[i].operation == ext_func_info[j].operation) {
1707 printf(
"same ext_func_no!!!\n");
1714 int operation = ext_func_info[i].
operation;
1716 if (operation < 0 || operation >= 256) {
1717 printf(
"ext func over!!");
1719 ext_func[operation] = ext_func_info[i].
function;
MONSTOR_EVENT_STATE event2[16]
int GetCurrentMonsterIndex()
MONSTOR_EFFECT_STATE effect[16]
MONSTOR_EFFECT_STATE2 effect2[16]
MONSTOR_GUARD_WINDOW guard[16]
MONSTOR_EVENT_STATE event[16]
MONSTOR_EFFECT_STATE3 effect3[16]
void ext_func(int(**table)(RS_STACKDATA *, int), int count)
void load(RS_PROG_HEADER *prog, RS_STACKDATA *stack, int stack_num, RS_CALLDATA *call, int call_num)
sceVu0FVECTOR input_direction
sceVu0FVECTOR script_move_vector
int(* function)(RS_STACKDATA *, int)
s32 body_parameter[16][5]
sceVu0FVECTOR local_position
sceVu0FVECTOR palette_target
float requested_motion_speed
sceVu0FVECTOR turn_target
s16 requested_motion_flags