Rename libhzd/unknown.c to libhzd/collide.c
Add HZD_LineCheck, HZD_PointCheck functions and associated flags. Rename CONTROL flags based on use.
This commit is contained in:
parent
21393abab4
commit
8e49f0eb6d
|
|
@ -448,9 +448,9 @@
|
|||
80026BC4 164 GV_NearTimePV
|
||||
80026C68 1656 HZD_80026C68
|
||||
800272E0 164 HZD_800272E0
|
||||
80027384 408 HZD_80027384
|
||||
8002751C 140 HZD_8002751C
|
||||
800275A8 268 HZD_800275A8
|
||||
80027384 408 ComputeDirection
|
||||
8002751C 140 ComputeBounds
|
||||
800275A8 268 CheckWallBounds
|
||||
800276B4 412 HZD_800276B4
|
||||
80027850 332 HZD_80027850
|
||||
8002799C 248 HZD_8002799C
|
||||
|
|
@ -459,17 +459,17 @@
|
|||
80027C64 284 HZD_80027C64
|
||||
80027D80 400 HZD_80027D80
|
||||
80027F10 1348 HZD_80027F10
|
||||
80028454 972 HZD_80028454
|
||||
80028454 972 HZD_LineCheck
|
||||
80028820 16 HZD_80028820
|
||||
80028830 16 HZD_80028830
|
||||
80028840 80 HZD_GetSpadVectorDiff
|
||||
80028890 44 HZD_GetSpadVector
|
||||
80028840 80 HZD_80028840
|
||||
80028890 44 HZD_80028890
|
||||
800288BC 36 HZD_CopyVector
|
||||
800288E0 80 HZD_800288E0
|
||||
80028930 968 HZD_80028930
|
||||
80028CF8 180 HZD_80028CF8
|
||||
80028DAC 748 HZD_80028DAC
|
||||
80029098 588 HZD_80029098
|
||||
80029098 588 HZD_PointCheck
|
||||
800292E4 32 HZD_800292E4
|
||||
80029304 32 HZD_80029304
|
||||
80029324 60 HZD_80029324
|
||||
|
|
@ -614,7 +614,7 @@
|
|||
8002FCF0 148 sub_8002FCF0
|
||||
8002FD84 24 GM_SetCameraCallbackFunc_8002FD84
|
||||
8002FD9C 892 ChangeCamera
|
||||
80030118 312 CheckMessages
|
||||
80030118 312 CheckMessage
|
||||
80030250 400 CheckEvents
|
||||
800303E0 188 sub_800303E0
|
||||
8003049C 256 sub_8003049C
|
||||
|
|
|
|||
|
|
@ -65,12 +65,12 @@
|
|||
|
||||
;game
|
||||
include "{{OBJ_DIR}}\game\control.obj" ;control.c
|
||||
|
||||
;libgv
|
||||
include "{{OBJ_DIR}}\libgv\math_near.obj" ;math_near.c
|
||||
|
||||
;libhzd
|
||||
;may be some things in game such as game/trap.c in between
|
||||
include "{{OBJ_DIR}}\libhzd\unknown.obj" ;unknown.c ? needs to be split up further
|
||||
include "{{OBJ_DIR}}\libhzd\collide.obj" ;collide.c
|
||||
include "{{OBJ_DIR}}\libhzd\level.obj" ;level.c
|
||||
include "{{OBJ_DIR}}\libhzd\event.obj" ;event.c
|
||||
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ static void Act(Work *work)
|
|||
result = CheckMessage();
|
||||
|
||||
// this is probably also an inline
|
||||
if (work->control.field_58 <= 0 && !work->control.field_57)
|
||||
if (work->control.touch_flag <= 0 && !work->control.field_57)
|
||||
{
|
||||
if (++work->field_120 != 90 &&
|
||||
!GM_Target_8002E1B8(&control->mov, &addition, work->control.map->index, &addition, 1) &&
|
||||
|
|
@ -402,7 +402,7 @@ static int GetResources(Work *work, MATRIX *world, int side)
|
|||
body = &work->body;
|
||||
|
||||
control->skip_flag |= CTRL_SKIP_NEAR_CHECK;
|
||||
control->field_59 = 8;
|
||||
control->exclude_flag = 8;
|
||||
|
||||
GM_InitObjectNoRots(body, STINGER_MODEL, BODY_FLAG, 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -441,13 +441,13 @@ static void rmissile_act_helper_8006C114(Work *work)
|
|||
position = &work->control.mov;
|
||||
result = CheckMessage();
|
||||
|
||||
if (work->control.field_58 <= 0 && !(work->control.field_57 & 2))
|
||||
if (work->control.touch_flag <= 0 && !(work->control.field_57 & 2))
|
||||
{
|
||||
if (position->vy - work->field_108_svector.vy < 200)
|
||||
{
|
||||
if (++work->field_118 != 1000 && !GM_PowerTarget(&work->target) && !dword_8009F480 && !result)
|
||||
{
|
||||
if (!HZD_80029098(work->control.map->hzd, position, 250, 15, 8))
|
||||
if (!HZD_PointCheck(work->control.map->hzd, position, 250, HZD_CHECK_ALL, 0x8))
|
||||
{
|
||||
if (abs(position->vx) <= 30000 &&
|
||||
abs(position->vy) <= 30000 &&
|
||||
|
|
@ -943,7 +943,7 @@ static int GetResources(Work *work, MATRIX *world, int side)
|
|||
svector_8009F478 = GM_PlayerPosition;
|
||||
|
||||
GM_ConfigControlHazard(ctrl, 400, 0xC8, 0xC8);
|
||||
ctrl->field_59 = GetEight();
|
||||
ctrl->exclude_flag = GetEight();
|
||||
GM_ConfigControlTrapCheck(ctrl);
|
||||
|
||||
object = &work->object;
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ static void Act(Work *work)
|
|||
work->step.vy -= 16;
|
||||
}
|
||||
|
||||
if (control->field_58 > 0 && GM_CheckControlTouches(control, 300))
|
||||
if (control->touch_flag > 0 && GM_CheckControlTouches(control, 300))
|
||||
{
|
||||
HZD_800272E0(control->field_70[0], &vec);
|
||||
DG_ReflectVector(&vec, &work->step, &work->step);
|
||||
|
|
@ -236,7 +236,7 @@ static int GetResources(Work *work, SVECTOR *pos, SVECTOR *step, int type, int m
|
|||
{
|
||||
GM_ConfigControlHazard(control, 100, -1, -1);
|
||||
}
|
||||
control->field_59 = 4;
|
||||
control->exclude_flag = 4;
|
||||
if (side == PLAYER_SIDE)
|
||||
{
|
||||
control->mov = GM_PlayerPosition;
|
||||
|
|
|
|||
|
|
@ -6986,7 +6986,7 @@ static inline int sna_init_main_logic_helper_helper_800596FC(SnaInitWork *work)
|
|||
pCtrl = &work->control;
|
||||
pPosition = &pCtrl->mov;
|
||||
|
||||
if (pCtrl->field_58 == 1)
|
||||
if (pCtrl->touch_flag == 1)
|
||||
{
|
||||
if (!(pCtrl->field_5A[0] & 0x40))
|
||||
{
|
||||
|
|
@ -7075,7 +7075,7 @@ static inline void sna_init_main_logic_helper_800596FC(SnaInitWork *work)
|
|||
dir = gSnaMoveDir_800ABBA4;
|
||||
|
||||
work->field_79C = 0;
|
||||
cVar4 = work->control.field_58;
|
||||
cVar4 = work->control.touch_flag;
|
||||
|
||||
if ((cVar4 <= 0) || sna_sub_8004E358(work, SNA_FLAG2_UNK5))
|
||||
{
|
||||
|
|
@ -8481,7 +8481,7 @@ static inline int sna_LoadSnake(SnaInitWork *work, int scriptData, int scriptBin
|
|||
GM_ConfigControlHazard(pCtrl, 0, 450, 450);
|
||||
|
||||
tmp = 1;
|
||||
pCtrl->field_59 = tmp;
|
||||
pCtrl->exclude_flag = tmp;
|
||||
|
||||
GM_ConfigControlAttribute(pCtrl, tmp);
|
||||
GM_ConfigControlTrapCheck(pCtrl);
|
||||
|
|
|
|||
|
|
@ -216,11 +216,11 @@ int sub_8004E4C0(SnaInitWork *work, int param_2)
|
|||
|
||||
int sub_8004E51C(SVECTOR *param_1, void *param_2, int param_3, int param_4)
|
||||
{
|
||||
if (HZD_80028454(param_2, param_1, ¶m_1[1], param_3, param_4) == 0)
|
||||
if (HZD_LineCheck(param_2, param_1, ¶m_1[1], param_3, param_4) == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
HZD_GetSpadVector(¶m_1[1]);
|
||||
HZD_80028890(¶m_1[1]);
|
||||
GV_SubVec3(¶m_1[1], param_1, param_1);
|
||||
return GV_VecLen3(param_1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6674,7 +6674,7 @@ static inline int sna_init_main_logic_helper_helper_800596FC(SnaInitWork *work)
|
|||
pCtrl = &work->control;
|
||||
pPosition = &pCtrl->mov;
|
||||
|
||||
if (pCtrl->field_58 == 1)
|
||||
if (pCtrl->touch_flag == 1)
|
||||
{
|
||||
if (!(pCtrl->field_5A[0] & 0x40))
|
||||
{
|
||||
|
|
@ -6763,7 +6763,7 @@ static inline void sna_init_main_logic_helper_800596FC(SnaInitWork *work)
|
|||
dir = gSnaMoveDir_800ABBA4;
|
||||
|
||||
work->field_79C = 0;
|
||||
cVar4 = work->control.field_58;
|
||||
cVar4 = work->control.touch_flag;
|
||||
|
||||
if (cVar4 <= 0)
|
||||
{
|
||||
|
|
@ -8048,7 +8048,7 @@ static inline int sna_LoadSnake(SnaInitWork *work, int scriptData, int scriptBin
|
|||
GM_ConfigControlHazard(pCtrl, 0, 450, 450);
|
||||
|
||||
tmp = 1;
|
||||
pCtrl->field_59 = tmp;
|
||||
pCtrl->exclude_flag = tmp;
|
||||
|
||||
GM_ConfigControlAttribute(pCtrl, tmp);
|
||||
GM_ConfigControlTrapCheck(pCtrl);
|
||||
|
|
|
|||
|
|
@ -52,10 +52,10 @@ static int CheckMessage(Work *work)
|
|||
int n_msgs;
|
||||
u_short code;
|
||||
|
||||
control->field_56 = GV_ReceiveMessage(control->name, &control->field_5C_mesg);
|
||||
msg = control->field_5C_mesg;
|
||||
control->n_messages = GV_ReceiveMessage(control->name, &control->messages);
|
||||
msg = control->messages;
|
||||
|
||||
for (n_msgs = control->field_56; n_msgs > 0; n_msgs--)
|
||||
for (n_msgs = control->n_messages; n_msgs > 0; n_msgs--)
|
||||
{
|
||||
if (CB_BOX_MSG == msg->message[0])
|
||||
{
|
||||
|
|
|
|||
|
|
@ -583,9 +583,9 @@ static int JpegcamGetZoomLimit(Work *work)
|
|||
DG_PutVector(dword_8009F3AC, &vector1, 2);
|
||||
|
||||
cond = 0;
|
||||
if (HZD_80028454(work->map->hzd, &vector1, &vector2, 0x0f, 0x81) != 0)
|
||||
if (HZD_LineCheck(work->map->hzd, &vector1, &vector2, HZD_CHECK_ALL, 0x81) != 0)
|
||||
{
|
||||
HZD_GetSpadVector(&vector2);
|
||||
HZD_80028890(&vector2);
|
||||
cond = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,9 +103,9 @@ static int GetZoomLimit(Work *work)
|
|||
DG_SetPos(eye);
|
||||
DG_PutVector(svecs_8009F2C8, vecs, 2);
|
||||
bCalcLen = 0;
|
||||
if ( HZD_80028454(work->map->hzd, vecs, &vecs[1], 15, 129) )
|
||||
if ( HZD_LineCheck(work->map->hzd, vecs, &vecs[1], HZD_CHECK_ALL, 0x81) )
|
||||
{
|
||||
HZD_GetSpadVector(&vecs[1]);
|
||||
HZD_80028890(&vecs[1]);
|
||||
bCalcLen = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -784,7 +784,7 @@ STATIC void ChangeCamera(int new, int old)
|
|||
}
|
||||
}
|
||||
|
||||
STATIC void CheckMessages(GV_ACT *work)
|
||||
STATIC void CheckMessage(GV_ACT *work)
|
||||
{
|
||||
GV_MSG *msg;
|
||||
int n_msg;
|
||||
|
|
@ -970,7 +970,7 @@ STATIC void camera_act_8003059C(GV_ACT *work)
|
|||
{
|
||||
if (GV_PauseLevel == 0)
|
||||
{
|
||||
CheckMessages(work);
|
||||
CheckMessage(work);
|
||||
changed = CheckEvents(work);
|
||||
|
||||
camera_act_helper3_8002F64C();
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ int GM_InitControl(CONTROL *control, int scriptData, int scriptBinds)
|
|||
control->hzd_height = -32767;
|
||||
control->field_38 = 450;
|
||||
control->field_36 = 450;
|
||||
control->field_59 = 2;
|
||||
control->exclude_flag = 2;
|
||||
control->skip_flag = CTRL_SKIP_TRAP;
|
||||
control->levels[0] = -32000;
|
||||
control->levels[1] = 32000;
|
||||
|
|
@ -118,10 +118,7 @@ int GM_InitControl(CONTROL *control, int scriptData, int scriptBinds)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
extern SVECTOR DG_ZeroVector;
|
||||
|
||||
static inline void GM_ActControl_helper(CONTROL *control)
|
||||
static inline void CheckMessage(CONTROL *control)
|
||||
{
|
||||
int scriptData;
|
||||
int count;
|
||||
|
|
@ -133,10 +130,10 @@ static inline void GM_ActControl_helper(CONTROL *control)
|
|||
|
||||
if ((scriptData != 0) && !(control->skip_flag & CTRL_SKIP_MESSAGE))
|
||||
{
|
||||
count = GV_ReceiveMessage(scriptData, &control->field_5C_mesg);
|
||||
control->field_56 = count;
|
||||
count = GV_ReceiveMessage(scriptData, &control->messages);
|
||||
control->n_messages = count;
|
||||
|
||||
pMsg = control->field_5C_mesg;
|
||||
pMsg = control->messages;
|
||||
|
||||
map_msg = HASH_MAP;
|
||||
move_msg = HASH_MOVE2;
|
||||
|
|
@ -164,7 +161,7 @@ static inline void GM_ActControl_helper(CONTROL *control)
|
|||
}
|
||||
}
|
||||
|
||||
static inline void GM_ActControl_helper2(CONTROL *control, HZD_HDL *pHzd)
|
||||
static inline void CheckCollide(CONTROL *control, HZD_HDL *hzd)
|
||||
{
|
||||
SVECTOR vec;
|
||||
int vx;
|
||||
|
|
@ -193,13 +190,13 @@ static inline void GM_ActControl_helper2(CONTROL *control, HZD_HDL *pHzd)
|
|||
{
|
||||
GV_AddVec3(&control->mov, &control->step, &vec);
|
||||
|
||||
if (HZD_80028454(pHzd, &control->mov, &vec, 15, control->field_59))
|
||||
if (HZD_LineCheck(hzd, &control->mov, &vec, HZD_CHECK_ALL, control->exclude_flag))
|
||||
{
|
||||
control->field_58 = 0x1;
|
||||
control->touch_flag = 0x1;
|
||||
control->field_70[0] = HZD_80028820();
|
||||
control->field_5A[0] = HZD_80028830();
|
||||
|
||||
HZD_GetSpadVectorDiff(control->field_60_vecs_ary);
|
||||
HZD_80028840(control->field_60_vecs_ary);
|
||||
|
||||
len = GV_VecLen3(control->field_60_vecs_ary);
|
||||
diff = len - new_var;
|
||||
|
|
@ -220,7 +217,7 @@ static inline void GM_ActControl_helper2(CONTROL *control, HZD_HDL *pHzd)
|
|||
}
|
||||
}
|
||||
|
||||
static inline void GM_ActControl_helper3(CONTROL *control, HZD_HDL *pHzd)
|
||||
static inline void CheckNear(CONTROL *control, HZD_HDL *hzd)
|
||||
{
|
||||
SVECTOR vec;
|
||||
SVECTOR vec2;
|
||||
|
|
@ -235,14 +232,14 @@ static inline void GM_ActControl_helper3(CONTROL *control, HZD_HDL *pHzd)
|
|||
}
|
||||
|
||||
retry:
|
||||
i = HZD_80029098(pHzd,&control->mov, 500, 12, control->field_59);
|
||||
i = HZD_PointCheck(hzd,&control->mov, 500, ( HZD_CHECK_DYNSEG | HZD_CHECK_SEG ), control->exclude_flag);
|
||||
|
||||
if (i <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
control->field_58 = i;
|
||||
control->touch_flag = i;
|
||||
|
||||
HZD_800292E4(control->field_70);
|
||||
HZD_80029304(control->field_5A);
|
||||
|
|
@ -263,7 +260,7 @@ retry:
|
|||
}
|
||||
}
|
||||
|
||||
static inline void GM_ActControl_helper4(CONTROL *control, HZD_HDL *pHzd)
|
||||
static inline void CheckHeight(CONTROL *control, HZD_HDL *hzd)
|
||||
{
|
||||
int levels[2];
|
||||
int vy, vz;
|
||||
|
|
@ -276,7 +273,7 @@ static inline void GM_ActControl_helper4(CONTROL *control, HZD_HDL *pHzd)
|
|||
vz = control->height;
|
||||
|
||||
control->field_57 = 0;
|
||||
uVar14 = HZD_LevelTestHazard(pHzd, &control->mov, 3);
|
||||
uVar14 = HZD_LevelTestHazard(hzd, &control->mov, 3);
|
||||
HZD_LevelMinMaxHeights(levels);
|
||||
control->field_60_vecs_ary[0].pad = HZD_LevelMaxHeight();
|
||||
uVar15 = uVar14 & 1;
|
||||
|
|
@ -331,19 +328,19 @@ static inline void GM_ActControl_helper4(CONTROL *control, HZD_HDL *pHzd)
|
|||
|
||||
void GM_ActControl(CONTROL *control)
|
||||
{
|
||||
HZD_HDL *pHzd;
|
||||
HZD_HDL *hzd;
|
||||
int vy;
|
||||
int time;
|
||||
|
||||
pHzd = control->map->hzd;
|
||||
hzd = control->map->hzd;
|
||||
|
||||
GM_ActControl_helper(control);
|
||||
CheckMessage(control);
|
||||
|
||||
GM_CurrentMap = control->map->index;
|
||||
|
||||
if (control->field_36 > 0)
|
||||
{
|
||||
control->field_58 = 0;
|
||||
control->touch_flag = 0;
|
||||
|
||||
if (control->hzd_height != -0x7fff)
|
||||
{
|
||||
|
|
@ -351,12 +348,12 @@ void GM_ActControl(CONTROL *control)
|
|||
control->mov.vy = control->hzd_height;
|
||||
}
|
||||
|
||||
GM_ActControl_helper2(control, pHzd);
|
||||
CheckCollide(control, hzd);
|
||||
|
||||
control->mov.vx += control->step.vx;
|
||||
control->mov.vz += control->step.vz;
|
||||
|
||||
GM_ActControl_helper3(control, pHzd);
|
||||
CheckNear(control, hzd);
|
||||
|
||||
if (control->hzd_height != -0x7fff)
|
||||
{
|
||||
|
|
@ -375,11 +372,11 @@ void GM_ActControl(CONTROL *control)
|
|||
control->field_54 = time - 1;
|
||||
}
|
||||
|
||||
GM_ActControl_helper4(control, pHzd);
|
||||
CheckHeight(control, hzd);
|
||||
}
|
||||
else if (control->field_36 < 0)
|
||||
{
|
||||
control->field_58 = 0;
|
||||
control->touch_flag = 0;
|
||||
|
||||
time = control->field_54;
|
||||
|
||||
|
|
@ -398,7 +395,7 @@ void GM_ActControl(CONTROL *control)
|
|||
|
||||
if (control->field_36 >= -1)
|
||||
{
|
||||
GM_ActControl_helper4(control, pHzd);
|
||||
CheckHeight(control, hzd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -406,7 +403,7 @@ void GM_ActControl(CONTROL *control)
|
|||
{
|
||||
control->event.field_14_vec = control->mov;
|
||||
control->event.field_14_vec.pad = control->rot.vy;
|
||||
HZD_8002A538(pHzd, &control->event);
|
||||
HZD_8002A538(hzd, &control->event);
|
||||
}
|
||||
|
||||
DG_SetPos2(&control->mov, &control->rot);
|
||||
|
|
@ -479,12 +476,12 @@ void GM_ConfigControlInterp(CONTROL *control, char f5a)
|
|||
|
||||
int GM_CheckControlTouches(CONTROL *control, int param_2)
|
||||
{
|
||||
if (control->field_58 == 0)
|
||||
if (control->touch_flag == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (control->field_58 == 2)
|
||||
if (control->touch_flag == 2)
|
||||
{
|
||||
if (control->field_70[1]->b1.h < 0 || GV_VecLen3(&control->field_60_vecs_ary[1]) <= param_2)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,9 +59,9 @@ typedef struct CONTROL
|
|||
// During normal gameplay, controlled by 800269A0() @ 0x80026a08.
|
||||
SVECTOR rot;
|
||||
|
||||
HZD_EVT event;
|
||||
MAP *map;
|
||||
unsigned short name;
|
||||
HZD_EVT event;
|
||||
MAP *map;
|
||||
u_short name;
|
||||
|
||||
// Base height, written to by 800596FC() and read by 80025A7C() as an offset to determine the position vector's vy
|
||||
// component.
|
||||
|
|
@ -72,25 +72,22 @@ typedef struct CONTROL
|
|||
short field_36;
|
||||
short field_38;
|
||||
|
||||
unsigned short radar_atr;
|
||||
RADAR_CONE radar_cone;
|
||||
u_short radar_atr;
|
||||
RADAR_CONE radar_cone;
|
||||
|
||||
// Movement vector, added to the position vector each frame to determine Snake's new position.
|
||||
// 800356FC() @ 0x80035974 (vx) and 0x8003597c (vz) seems to be the main function responsible for calculating the
|
||||
// movement vector, since it is the only writing function which if disabled prevents Snake from moving entirely.
|
||||
SVECTOR step;
|
||||
SVECTOR turn;
|
||||
signed char field_54;
|
||||
unsigned char skip_flag; // CTRL_...
|
||||
signed char field_56; //n_messages
|
||||
signed char field_57;
|
||||
|
||||
// Appears to indicate proximity to a wall, where 1 is close and 0 is far.
|
||||
// Going up against a wall requires a 0->1 write by 80025A7C() @ 0x80025d1c and a read by 800596FC() @ 0x80059858.
|
||||
signed char field_58;
|
||||
char field_59;
|
||||
char field_5A[2];
|
||||
GV_MSG *field_5C_mesg;
|
||||
SVECTOR step;
|
||||
SVECTOR turn;
|
||||
signed char field_54;
|
||||
char skip_flag; // CTRL_...
|
||||
signed char n_messages;
|
||||
signed char field_57;
|
||||
signed char touch_flag; // > 0 if collision detected
|
||||
char exclude_flag; // exclude all surfaces where (flag & exclude_flag) != 0
|
||||
char field_5A[2];
|
||||
GV_MSG *messages;
|
||||
|
||||
// The first of these two vectors is heavily used in collision detection.
|
||||
SVECTOR field_60_vecs_ary[2];
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ void HZD_800272E0(HZD_FLR *floor, SVECTOR *out)
|
|||
}
|
||||
}
|
||||
|
||||
int HZD_80027384(void)
|
||||
STATIC int ComputeDirection(void)
|
||||
{
|
||||
HZD_VEC *pVec1 = &SPAD->vec[3];
|
||||
HZD_VEC *pVec2 = &SPAD->vec[2];
|
||||
|
|
@ -207,7 +207,7 @@ int HZD_80027384(void)
|
|||
return area;
|
||||
}
|
||||
|
||||
void HZD_8002751C(SVECTOR *svec1, SVECTOR *svec2)
|
||||
STATIC void ComputeBounds(SVECTOR *svec1, SVECTOR *svec2)
|
||||
{
|
||||
SVECTOR *scratchvec1, *scratchvec2;
|
||||
int coord1, coord2, coord1_copy;
|
||||
|
|
@ -251,7 +251,7 @@ void HZD_8002751C(SVECTOR *svec1, SVECTOR *svec2)
|
|||
scratchvec2->vz = coord2;
|
||||
}
|
||||
|
||||
int HZD_800275A8(void)
|
||||
STATIC int CheckWallBounds(void)
|
||||
{
|
||||
int z1, z2;
|
||||
int y1, y2;
|
||||
|
|
@ -297,7 +297,7 @@ int HZD_800275A8(void)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int HZD_800276B4(void)
|
||||
STATIC int HZD_800276B4(void)
|
||||
{
|
||||
long a;
|
||||
|
||||
|
|
@ -368,7 +368,7 @@ int HZD_800276B4(void)
|
|||
}
|
||||
|
||||
|
||||
int HZD_80027850(int mult)
|
||||
STATIC int HZD_80027850(int mult)
|
||||
{
|
||||
short x, y, z;
|
||||
short *scratch1, *scratch2, *scratch3, *scratch4;
|
||||
|
|
@ -407,7 +407,7 @@ int HZD_80027850(int mult)
|
|||
}
|
||||
}
|
||||
|
||||
void HZD_8002799C(int a0)
|
||||
STATIC void HZD_8002799C(int a0)
|
||||
{
|
||||
int v1;
|
||||
int v0;
|
||||
|
|
@ -437,7 +437,7 @@ void HZD_8002799C(int a0)
|
|||
gte_stsv((SVECTOR *)0x1F800038);
|
||||
}
|
||||
|
||||
void HZD_80027A94(HZD_SEG *seg, int a2, int a3)
|
||||
STATIC void HZD_80027A94(HZD_SEG *seg, int a2, int a3)
|
||||
{
|
||||
struct copier
|
||||
{
|
||||
|
|
@ -456,7 +456,7 @@ void HZD_80027A94(HZD_SEG *seg, int a2, int a3)
|
|||
short tmp6;
|
||||
|
||||
*((HZD_SEG *)0x1F800034) = *seg;
|
||||
if (HZD_800275A8())
|
||||
if (CheckWallBounds())
|
||||
{
|
||||
tmp1 = HZD_800276B4();
|
||||
tmp4 = HZD_80027850(tmp1);
|
||||
|
|
@ -497,7 +497,7 @@ void HZD_80027A94(HZD_SEG *seg, int a2, int a3)
|
|||
}
|
||||
}
|
||||
|
||||
int HZD_80027BF8(SVECTOR *svec)
|
||||
STATIC int HZD_80027BF8(SVECTOR *svec)
|
||||
{
|
||||
int z;
|
||||
int y;
|
||||
|
|
@ -528,7 +528,7 @@ int HZD_80027BF8(SVECTOR *svec)
|
|||
return x + y;
|
||||
}
|
||||
|
||||
int HZD_80027C64(void)
|
||||
STATIC int HZD_80027C64(void)
|
||||
{
|
||||
int dividend;
|
||||
int val;
|
||||
|
|
@ -551,7 +551,7 @@ int HZD_80027C64(void)
|
|||
return *getScratchAddr(0x1E);
|
||||
}
|
||||
|
||||
int HZD_80027D80(HZD_FLR *floor)
|
||||
STATIC int HZD_80027D80(HZD_FLR *floor)
|
||||
{
|
||||
long sxy_0;
|
||||
long sxy_1;
|
||||
|
|
@ -665,7 +665,7 @@ static inline int sub_helper2_80027F10(void)
|
|||
//todo: include proper
|
||||
#define UNTAG_PTR(_type, _ptr) (_type *)((unsigned int)_ptr & 0x7fffffff)
|
||||
|
||||
void HZD_80027F10(HZD_FLR *floor)
|
||||
STATIC void HZD_80027F10(HZD_FLR *floor)
|
||||
{
|
||||
int flags;
|
||||
int length;
|
||||
|
|
@ -769,7 +769,7 @@ static inline void CopySvectorToSpad(int offset, SVECTOR *svec)
|
|||
spad_top[offset + 1] = svec->vz;
|
||||
}
|
||||
|
||||
int HZD_80028454(HZD_HDL *hdl, SVECTOR *a2, SVECTOR *a3, int flags, int flag)
|
||||
int HZD_LineCheck(HZD_HDL *hzd, SVECTOR *from, SVECTOR *to, int flag, int exclude)
|
||||
{
|
||||
int count;
|
||||
int n_areas, n_areas2;
|
||||
|
|
@ -789,31 +789,31 @@ int HZD_80028454(HZD_HDL *hdl, SVECTOR *a2, SVECTOR *a3, int flags, int flag)
|
|||
|
||||
current_group = HZD_CurrentGroup;
|
||||
|
||||
CopySvectorToSpad(6, a2);
|
||||
CopySvectorToSpad(6, from);
|
||||
|
||||
*((int *)0x1F800064) = (*((int *)0x1F80006C) = 0);
|
||||
|
||||
CopySvectorToSpad(10, a3);
|
||||
CopySvectorToSpad(10, to);
|
||||
CopySvector((SVECTOR *)0x1F800054, (SVECTOR *)0x1F800014);
|
||||
|
||||
*((int *)0x1F80008C) = 0;
|
||||
|
||||
HZD_8002751C((SVECTOR *)0x1F80000C, (SVECTOR *)0x1F800054);
|
||||
ComputeBounds((SVECTOR *)0x1F80000C, (SVECTOR *)0x1F800054);
|
||||
|
||||
*((int *)0x1F80005C) = HZD_80027384();
|
||||
*((int *)0x1F80005C) = ComputeDirection();
|
||||
|
||||
if (!(*(int *)0x1F80005C))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (flags & 4)
|
||||
if (flag & HZD_CHECK_SEG)
|
||||
{
|
||||
char *scratchpad;
|
||||
|
||||
bit2 = 1;
|
||||
pArea = hdl->header->groups;
|
||||
for (n_areas2 = hdl->header->n_groups; n_areas2 > 0; n_areas2--, bit2 <<= 1, pArea++)
|
||||
pArea = hzd->header->groups;
|
||||
for (n_areas2 = hzd->header->n_groups; n_areas2 > 0; n_areas2--, bit2 <<= 1, pArea++)
|
||||
{
|
||||
if (current_group & bit2)
|
||||
{
|
||||
|
|
@ -833,7 +833,7 @@ int HZD_80028454(HZD_HDL *hdl, SVECTOR *a2, SVECTOR *a3, int flags, int flag)
|
|||
|
||||
for (count = pArea->n_walls; count > 0; count--, pWall++, pFlags++)
|
||||
{
|
||||
if (!((*pFlags) & flag))
|
||||
if (!((*pFlags) & exclude))
|
||||
{
|
||||
HZD_80027A94(pWall, count, *pFlags);
|
||||
}
|
||||
|
|
@ -842,7 +842,7 @@ int HZD_80028454(HZD_HDL *hdl, SVECTOR *a2, SVECTOR *a3, int flags, int flag)
|
|||
}
|
||||
}
|
||||
|
||||
if (flags & 8)
|
||||
if (flag & HZD_CHECK_DYNSEG)
|
||||
{
|
||||
char *scratchpad;
|
||||
|
||||
|
|
@ -863,29 +863,29 @@ int HZD_80028454(HZD_HDL *hdl, SVECTOR *a2, SVECTOR *a3, int flags, int flag)
|
|||
|
||||
pFlagsEnd2 = (pFlags + queue_size) + idx;
|
||||
*((char **)(scratchpad + 0x70)) = pFlagsEnd2;
|
||||
} while (0); // TODO: Is it the same macro as above in "if (flags & 4)" case?
|
||||
} while (0); // TODO: Is it the same macro as above in "if (flag & HZD_CHECK_SEG)" case?
|
||||
|
||||
count = pNextMap->dynamic_queue_index;
|
||||
*((int *)0x1F800060) = 0;
|
||||
|
||||
for (; count > 0; count--, ppWall++, pFlags++)
|
||||
{
|
||||
if (!((*pFlags) & flag))
|
||||
if (!((*pFlags) & exclude))
|
||||
{
|
||||
HZD_80027A94(*ppWall, count, *pFlags);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
HZD_8002751C((SVECTOR *)0x1F80000C, (SVECTOR *)0x1F800054);
|
||||
ComputeBounds((SVECTOR *)0x1F80000C, (SVECTOR *)0x1F800054);
|
||||
*((int *)0x1F80005C) = HZD_80027BF8((SVECTOR *)0x1F800054);
|
||||
*((int *)0x1F800074) = 0xF4240;
|
||||
|
||||
if (flags & 1)
|
||||
if (flag & HZD_CHECK_FLR)
|
||||
{
|
||||
bit1 = 1;
|
||||
pArea = hdl->header->groups;
|
||||
for (n_areas = hdl->header->n_groups; n_areas > 0; n_areas--, bit1 <<= 1, pArea++)
|
||||
pArea = hzd->header->groups;
|
||||
for (n_areas = hzd->header->n_groups; n_areas > 0; n_areas--, bit1 <<= 1, pArea++)
|
||||
{
|
||||
if (current_group & bit1)
|
||||
{
|
||||
|
|
@ -899,7 +899,7 @@ int HZD_80028454(HZD_HDL *hdl, SVECTOR *a2, SVECTOR *a3, int flags, int flag)
|
|||
}
|
||||
}
|
||||
|
||||
if (flags & 2)
|
||||
if (flag & HZD_CHECK_DYNFLR)
|
||||
{
|
||||
pNextMap = NULL;
|
||||
while ((pNextMap = GM_IterHazard(pNextMap)))
|
||||
|
|
@ -938,7 +938,7 @@ int HZD_80028830(void)
|
|||
return spad_top[0x68 / sizeof(short)];
|
||||
}
|
||||
|
||||
void HZD_GetSpadVectorDiff(SVECTOR *out)
|
||||
void HZD_80028840(SVECTOR *out)
|
||||
{
|
||||
SVECTOR *vec1, *vec2;
|
||||
vec2 = getScratchAddr2(SVECTOR, 0x54);
|
||||
|
|
@ -949,7 +949,7 @@ void HZD_GetSpadVectorDiff(SVECTOR *out)
|
|||
out->vz = vec2->vy - vec1->vy;
|
||||
}
|
||||
|
||||
void HZD_GetSpadVector(SVECTOR *out)
|
||||
void HZD_80028890(SVECTOR *out)
|
||||
{
|
||||
SVECTOR *vec = getScratchAddr2(SVECTOR, 0x54);
|
||||
|
||||
|
|
@ -958,14 +958,14 @@ void HZD_GetSpadVector(SVECTOR *out)
|
|||
out->vz = vec->vy;
|
||||
}
|
||||
|
||||
void HZD_CopyVector(SVECTOR *src, SVECTOR *dst)
|
||||
STATIC void HZD_CopyVector(SVECTOR *src, SVECTOR *dst)
|
||||
{
|
||||
dst->vx = src->vx;
|
||||
dst->vz = src->vy;
|
||||
dst->vy = src->vz;
|
||||
}
|
||||
|
||||
void HZD_800288E0(SVECTOR *vec, int delta)
|
||||
STATIC void HZD_800288E0(SVECTOR *vec, int delta)
|
||||
{
|
||||
int iVar;
|
||||
short sVar;
|
||||
|
|
@ -997,7 +997,7 @@ static inline int ReadOpz(void)
|
|||
return scr_top[2];
|
||||
}
|
||||
|
||||
int HZD_80028930(void)
|
||||
STATIC int HZD_80028930(void)
|
||||
{
|
||||
int lzcnt;
|
||||
int num;
|
||||
|
|
@ -1087,7 +1087,7 @@ int HZD_80028930(void)
|
|||
return *(int *)0x1F800008;
|
||||
}
|
||||
|
||||
void HZD_80028CF8(void)
|
||||
STATIC void HZD_80028CF8(void)
|
||||
{
|
||||
gte_lddp((*(int *)0x1F8000A8 * 4096) / (*(int *)0x1F8000AC));
|
||||
gte_ld_intpol_sv0((SVECTOR *)0x1F800030);
|
||||
|
|
@ -1148,7 +1148,7 @@ static inline int HZD_80028DAC_inline(HZD_SEG *wall)
|
|||
return 1;
|
||||
}
|
||||
|
||||
void HZD_80028DAC(HZD_SEG *wall, int index, int flags)
|
||||
STATIC void HZD_80028DAC(HZD_SEG *wall, int index, int flags)
|
||||
{
|
||||
int *ptr;
|
||||
int opz;
|
||||
|
|
@ -1239,7 +1239,7 @@ static inline void sub_helper_80029098(void)
|
|||
*(int *)0x1F800048 = 1;
|
||||
}
|
||||
|
||||
int HZD_80029098(HZD_HDL *hdl, SVECTOR *pos, int delta, int flags, unsigned int mask)
|
||||
int HZD_PointCheck(HZD_HDL *hzd, SVECTOR *point, int range, int flag, int exclude)
|
||||
{
|
||||
HZD_GRP *pArea;
|
||||
int n_unknown;
|
||||
|
|
@ -1253,19 +1253,19 @@ int HZD_80029098(HZD_HDL *hdl, SVECTOR *pos, int delta, int flags, unsigned int
|
|||
int idx;
|
||||
int queue_size;
|
||||
|
||||
pArea = hdl->group;
|
||||
pArea = hzd->group;
|
||||
|
||||
HZD_CopyVector(pos, (SVECTOR *)0x1F80000C);
|
||||
HZD_800288E0((SVECTOR *)0x1F80000C, delta);
|
||||
HZD_CopyVector(point, (SVECTOR *)0x1F80000C);
|
||||
HZD_800288E0((SVECTOR *)0x1F80000C, range);
|
||||
|
||||
*(int *)0x1F800048 = 0;
|
||||
|
||||
if (flags & 0x4)
|
||||
if (flag & HZD_CHECK_SEG)
|
||||
{
|
||||
n_unknown = pArea->n_flat_walls;
|
||||
|
||||
*(int *)0x1F800088 = delta * delta;
|
||||
*(int *)0x1F80006C = delta * delta;
|
||||
*(int *)0x1F800088 = range * range;
|
||||
*(int *)0x1F80006C = range * range;
|
||||
|
||||
do {} while (0);
|
||||
|
||||
|
|
@ -1281,19 +1281,19 @@ int HZD_80029098(HZD_HDL *hdl, SVECTOR *pos, int delta, int flags, unsigned int
|
|||
|
||||
for (i = pArea->n_walls; i > 0; i--, pWalls++, pFlags++)
|
||||
{
|
||||
if ((*pFlags & mask) == 0)
|
||||
if ((*pFlags & exclude) == 0)
|
||||
{
|
||||
HZD_80028DAC(pWalls, i, *pFlags);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & 0x8)
|
||||
if (flag & HZD_CHECK_DYNSEG)
|
||||
{
|
||||
ppWalls = hdl->dynamic_segments;
|
||||
pFlags = hdl->dynamic_flags;
|
||||
queue_size = hdl->max_dynamic_segments;
|
||||
idx = hdl->dynamic_queue_index;
|
||||
ppWalls = hzd->dynamic_segments;
|
||||
pFlags = hzd->dynamic_flags;
|
||||
queue_size = hzd->max_dynamic_segments;
|
||||
idx = hzd->dynamic_queue_index;
|
||||
|
||||
ptr2 = (char **)SCRPAD_ADDR;
|
||||
ptr2[0x2C] = (char *)0x80;
|
||||
|
|
@ -1301,9 +1301,9 @@ int HZD_80029098(HZD_HDL *hdl, SVECTOR *pos, int delta, int flags, unsigned int
|
|||
|
||||
*(int *)0x1F800044 = 0;
|
||||
|
||||
for (i = hdl->dynamic_queue_index; i > 0; i--, ppWalls++, pFlags++)
|
||||
for (i = hzd->dynamic_queue_index; i > 0; i--, ppWalls++, pFlags++)
|
||||
{
|
||||
if ((*pFlags & mask) == 0)
|
||||
if ((*pFlags & exclude) == 0)
|
||||
{
|
||||
HZD_80028DAC(*ppWalls, i, *pFlags);
|
||||
}
|
||||
|
|
@ -110,35 +110,23 @@ int HZD_8005D288(HZD_HDL *hzd, int mesh_idx, int a3);
|
|||
|
||||
#define HZD_NO_ZONE (0xFF)
|
||||
|
||||
/* unknown.c */
|
||||
int HZD_80026C68(SVECTOR *vectors, int param_2, int param_3, SVECTOR *param_4);
|
||||
void HZD_800272E0(HZD_FLR *floor, SVECTOR *out);
|
||||
int HZD_80027384(void);
|
||||
void HZD_8002751C(SVECTOR *svec1, SVECTOR *svec2);
|
||||
int HZD_800275A8(void);
|
||||
int HZD_800276B4(void);
|
||||
int HZD_80027850(int mult);
|
||||
void HZD_8002799C(int a0);
|
||||
void HZD_80027A94(HZD_SEG *seg, int a2, int a3);
|
||||
int HZD_80027BF8(SVECTOR *svec);
|
||||
int HZD_80027C64(void);
|
||||
int HZD_80027D80(HZD_FLR *floor);
|
||||
void HZD_80027F10(HZD_FLR *floor);
|
||||
int HZD_80028454(HZD_HDL *hzd, SVECTOR *a2, SVECTOR *a3, int flags, int flag);
|
||||
/* collide.c */
|
||||
int HZD_80026C68(SVECTOR *vectors, int param_2, int param_3, SVECTOR *param_4);
|
||||
void HZD_800272E0(HZD_FLR *floor, SVECTOR *out); // projectile related
|
||||
int HZD_LineCheck(HZD_HDL *hzd, SVECTOR *from, SVECTOR *to, int flag, int exclude);
|
||||
HZD_FLR *HZD_80028820(void); // line check related
|
||||
int HZD_80028830(void); // line check related
|
||||
void HZD_80028840(SVECTOR *out); // line check related
|
||||
void HZD_80028890(SVECTOR *out); // line check related
|
||||
int HZD_PointCheck(HZD_HDL *hzd, SVECTOR *point, int range, int flag, int exclude);
|
||||
void HZD_800292E4(HZD_FLR **floors); // point check related
|
||||
void HZD_80029304(char *char_arr); // point check related
|
||||
void HZD_80029324(SVECTOR *vectors); // point check related
|
||||
|
||||
HZD_FLR *HZD_80028820(void);
|
||||
int HZD_80028830(void);
|
||||
void HZD_GetSpadVectorDiff(SVECTOR *out);
|
||||
void HZD_GetSpadVector(SVECTOR *out);
|
||||
void HZD_CopyVector(SVECTOR *src, SVECTOR *dst);
|
||||
void HZD_800288E0(SVECTOR *vec, int delta);
|
||||
int HZD_80028930(void);
|
||||
void HZD_80028CF8(void);
|
||||
void HZD_80028DAC(HZD_SEG *wall, int index, int flags);
|
||||
int HZD_80029098(HZD_HDL *hzd, SVECTOR *pos, int delta, int flags, unsigned int mask);
|
||||
|
||||
void HZD_800292E4(HZD_FLR **floors);
|
||||
void HZD_80029304(char *char_arr);
|
||||
void HZD_80029324(SVECTOR *vectors);
|
||||
#define HZD_CHECK_FLR (0x1)
|
||||
#define HZD_CHECK_DYNFLR (0x2)
|
||||
#define HZD_CHECK_SEG (0x4)
|
||||
#define HZD_CHECK_DYNSEG (0x8)
|
||||
#define HZD_CHECK_ALL (HZD_CHECK_SEG|HZD_CHECK_FLR|HZD_CHECK_DYNSEG|HZD_CHECK_DYNFLR)
|
||||
|
||||
#endif // _LIBHZD_H_
|
||||
|
|
|
|||
|
|
@ -341,9 +341,9 @@ skip_clamp_z:
|
|||
{
|
||||
f168 = work->field_168;
|
||||
|
||||
if (f168 == 1 && HZD_80028454(map->hzd, &svec1, &svec2, 15, 4))
|
||||
if (f168 == 1 && HZD_LineCheck(map->hzd, &svec1, &svec2, HZD_CHECK_ALL, 0x4))
|
||||
{
|
||||
HZD_GetSpadVector(&work->field_118);
|
||||
HZD_80028890(&work->field_118);
|
||||
work->field_130 = HZD_80028820();
|
||||
work->field_16C = HZD_80028830();
|
||||
|
||||
|
|
|
|||
|
|
@ -191,9 +191,9 @@ STATIC int claymore_loader_helper_800735A0(ClaymoreWork *work, SVECTOR *arg1, SV
|
|||
|
||||
var_s2 = 0;
|
||||
|
||||
if (HZD_80028454(claymore_MAP_800bdf08->hzd, &vec, &vec2, 15, 4))
|
||||
if (HZD_LineCheck(claymore_MAP_800bdf08->hzd, &vec, &vec2, HZD_CHECK_ALL, 0x4))
|
||||
{
|
||||
HZD_GetSpadVector(&vec2);
|
||||
HZD_80028890(&vec2);
|
||||
floor = HZD_80028820();
|
||||
|
||||
if ((int)floor < 0)
|
||||
|
|
|
|||
|
|
@ -165,10 +165,10 @@ int Demodoll_800DE320(DollWork *work)
|
|||
int n_msgs;
|
||||
|
||||
control = &work->control;
|
||||
control->field_56 = GV_ReceiveMessage(control->name, &control->field_5C_mesg);
|
||||
control->n_messages = GV_ReceiveMessage(control->name, &control->messages);
|
||||
|
||||
msg = control->field_5C_mesg;
|
||||
n_msgs = control->field_56;
|
||||
msg = control->messages;
|
||||
n_msgs = control->n_messages;
|
||||
|
||||
while (n_msgs > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ void s01a_doll_800DBE0C(DollWork *work)
|
|||
int n_msgs;
|
||||
|
||||
control = &work->control;
|
||||
control->field_56 = GV_ReceiveMessage(control->name, &control->field_5C_mesg);
|
||||
control->n_messages = GV_ReceiveMessage(control->name, &control->messages);
|
||||
|
||||
msg = control->field_5C_mesg;
|
||||
n_msgs = control->field_56;
|
||||
msg = control->messages;
|
||||
n_msgs = control->n_messages;
|
||||
|
||||
while (n_msgs > 0)
|
||||
{
|
||||
|
|
@ -274,7 +274,7 @@ int s01a_doll_800DC1AC(DollWork *work, int name, int map)
|
|||
control->field_36 = -1;
|
||||
GM_ConfigControlInterp(control, 4);
|
||||
GM_ConfigControlTrapCheck(control);
|
||||
control->field_59 = 1;
|
||||
control->exclude_flag = 1;
|
||||
|
||||
work->fE58 |= 0x1;
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ void s07c_meryl72_unk1_800C86EC( Meryl72Work* work, int time )
|
|||
|
||||
if ( dir >= 0 )
|
||||
{
|
||||
s0 = ctrl->field_58;
|
||||
s0 = ctrl->touch_flag;
|
||||
if ( s0 > 0 )
|
||||
{
|
||||
dist = GV_VecDir2( svec );
|
||||
|
|
|
|||
|
|
@ -53,10 +53,10 @@ int RootFlagCheck_800C6B5C( Meryl72Work *work )
|
|||
int i;
|
||||
|
||||
control = &work->control;
|
||||
control->field_56 = GV_ReceiveMessage( control->name, &control->field_5C_mesg );
|
||||
control->n_messages = GV_ReceiveMessage( control->name, &control->messages );
|
||||
|
||||
msg = control->field_5C_mesg;
|
||||
for ( i = control->field_56; i > 0; i-- )
|
||||
msg = control->messages;
|
||||
for ( i = control->n_messages; i > 0; i-- )
|
||||
{
|
||||
if ( msg->message[0] == GV_StrCode( "ルート変更" ) )
|
||||
{
|
||||
|
|
@ -219,7 +219,7 @@ int s07c_meryl72_800C6F8C( Meryl72Work *work, int name, int map )
|
|||
GM_ConfigControlString( control, pos, dir );
|
||||
GM_ConfigControlAttribute( control, RADAR_ALL_MAP | RADAR_SIGHT | RADAR_VISIBLE );
|
||||
GM_ConfigControlInterp( control, 4 );
|
||||
control->field_59 = 2;
|
||||
control->exclude_flag = 2;
|
||||
GM_ConfigControlTrapCheck( control );
|
||||
|
||||
body = &work->body;
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ void s07c_meryl72_unk1_800CBA9C(Meryl72Work* work)
|
|||
}
|
||||
|
||||
map = work->control.map;
|
||||
if (HZD_80028454(map->hzd, &GM_PlayerPosition, mov, 0xF, 0x4) ||
|
||||
if (HZD_LineCheck(map->hzd, &GM_PlayerPosition, mov, HZD_CHECK_ALL, 0x4) ||
|
||||
sub_8002E2A8(mov, &GM_PlayerPosition, map->index, &sn_diff))
|
||||
{
|
||||
work->vision.field_06 = 0;
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ int s11e_zako11e_800D3990( ZakoWork* work, int name, int where )
|
|||
GM_ConfigControlAttribute( ctrl, 13 );
|
||||
GM_ConfigControlInterp( ctrl, 4 );
|
||||
|
||||
ctrl->field_59 = 2;
|
||||
ctrl->exclude_flag = 2;
|
||||
|
||||
GM_ConfigControlTrapCheck( ctrl );
|
||||
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ void s11e_zk11ecom_800D4DD4( ZakoWork* work, int time )
|
|||
|
||||
if ( dir >= 0 )
|
||||
{
|
||||
s0 = ctrl->field_58;
|
||||
s0 = ctrl->touch_flag;
|
||||
if ( s0 > 0 )
|
||||
{
|
||||
dist = GV_VecDir2( svec );
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ void s11e_zk11ecom_800D8668( ZakoWork* work )
|
|||
if ( dis < 500 || GV_DiffDirAbs( work->vision.facedir, dir ) < work->vision.angle )
|
||||
{
|
||||
map = work->control.map;
|
||||
if ( !( HZD_80028454( map->hzd, pos, &ctrl->mov, 0xF, 0x4 ) ) )
|
||||
if ( !( HZD_LineCheck( map->hzd, pos, &ctrl->mov, HZD_CHECK_ALL, 0x4 ) ) )
|
||||
{
|
||||
if ( !( sub_8002E2A8( &ctrl->mov, pos, map->index, &svec ) ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -575,7 +575,7 @@ void s11i_asiato_800CA25C( Zako11FWork *work, int time )
|
|||
|
||||
if ( dir >= 0 )
|
||||
{
|
||||
near = control->field_58;
|
||||
near = control->touch_flag;
|
||||
|
||||
if ( near > 0 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ int s11i_zako11f_800C8B98( Zako11FWork* work, int name, int where )
|
|||
GM_ConfigControlAttribute( ctrl, 13 );
|
||||
GM_ConfigControlInterp( ctrl, 4 );
|
||||
|
||||
ctrl->field_59 = 2;
|
||||
ctrl->exclude_flag = 2;
|
||||
|
||||
GM_ConfigControlTrapCheck( ctrl );
|
||||
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ void s11i_asiato_800CDD64( Zako11FWork *work )
|
|||
}
|
||||
|
||||
map = work->control.map;
|
||||
if ( HZD_80028454( map->hzd, pos, mov, 0xF, 0x4 ) )
|
||||
if ( HZD_LineCheck( map->hzd, pos, mov, HZD_CHECK_ALL, 0x4 ) )
|
||||
{
|
||||
work->vision.field_B92 = 0;
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -136,9 +136,9 @@ int HdBul2_800C5C68( HdBul2Work *work, SVECTOR *arg1 )
|
|||
sp18 = work->control.mov;
|
||||
sp20 = *arg1;
|
||||
|
||||
if ( HZD_80028454( work->control.map->hzd, &sp18, &sp20, 0x5, 0x4 ) )
|
||||
if ( HZD_LineCheck( work->control.map->hzd, &sp18, &sp20, ( HZD_CHECK_SEG | HZD_CHECK_FLR ), 0x4 ) )
|
||||
{
|
||||
HZD_GetSpadVector( &sp20 );
|
||||
HZD_80028890( &sp20 );
|
||||
hit = 1;
|
||||
work->pos = sp20;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -504,13 +504,13 @@ void Hind2_800C5274( Hind2Work *work )
|
|||
int n_msgs;
|
||||
GV_MSG *msg;
|
||||
|
||||
if ( work->control.field_56 == 0 )
|
||||
if ( work->control.n_messages == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
n_msgs = work->control.field_56;
|
||||
msg = &work->control.field_5C_mesg[ n_msgs ] - 1;
|
||||
n_msgs = work->control.n_messages;
|
||||
msg = &work->control.messages[ n_msgs ] - 1;
|
||||
|
||||
for ( ; n_msgs > 0; n_msgs--, msg-- )
|
||||
{
|
||||
|
|
@ -646,7 +646,7 @@ int Hind2GetResources( Hind2Work *work, int name, int map )
|
|||
GM_ConfigControlTrapCheck( control );
|
||||
GM_ConfigControlHazard( control, 0, -2, -2 );
|
||||
|
||||
control->field_59 = 2;
|
||||
control->exclude_flag = 2;
|
||||
|
||||
model = GCL_GetOption( 'm' );
|
||||
if ( !model )
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ typedef struct _BedWork
|
|||
#define EXEC_LEVEL GV_ACTOR_LEVEL5
|
||||
#define BODY_FLAG ( DG_FLAG_TEXT | DG_FLAG_TRANS | DG_FLAG_GBOUND | DG_FLAG_SHADE | DG_FLAG_ONEPIECE )
|
||||
|
||||
static inline int BedCheckMessages(BedWork *work)
|
||||
static inline int BedCheckMessage(BedWork *work)
|
||||
{
|
||||
int found;
|
||||
GV_MSG *msg;
|
||||
|
|
@ -25,8 +25,8 @@ static inline int BedCheckMessages(BedWork *work)
|
|||
|
||||
found = 0;
|
||||
|
||||
msg = &work->control.field_5C_mesg[work->control.field_56] - 1;
|
||||
for (i = work->control.field_56; i > 0; i--)
|
||||
msg = &work->control.messages[work->control.n_messages] - 1;
|
||||
for (i = work->control.n_messages; i > 0; i--)
|
||||
{
|
||||
if (msg->message[0] == HASH_TURN)
|
||||
{
|
||||
|
|
@ -48,13 +48,13 @@ void BedAct_800C6EA8(BedWork *work)
|
|||
{
|
||||
int found;
|
||||
|
||||
if (work->control.field_56 == 0)
|
||||
if (work->control.n_messages == 0)
|
||||
{
|
||||
found = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
found = BedCheckMessages(work);
|
||||
found = BedCheckMessage(work);
|
||||
}
|
||||
|
||||
GM_ActControl(&work->control);
|
||||
|
|
|
|||
|
|
@ -155,12 +155,12 @@ int Johnny_800C4194(JohnnyWork *work)
|
|||
|
||||
player_pos = GM_PlayerPosition;
|
||||
control_mov = work->control.mov;
|
||||
if (HZD_80028454(work->control.map->hzd, &player_pos, &control_mov, 0xC, 0) == 0)
|
||||
if (HZD_LineCheck(work->control.map->hzd, &player_pos, &control_mov, ( HZD_CHECK_DYNSEG | HZD_CHECK_SEG ), 0) == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
HZD_GetSpadVector(&control_mov);
|
||||
HZD_80028890(&control_mov);
|
||||
GV_SubVec3(&control_mov, &player_pos, &player_pos);
|
||||
return GV_VecLen3(&player_pos);
|
||||
}
|
||||
|
|
@ -3183,13 +3183,13 @@ void Johnny_800C9644(JohnnyWork *work)
|
|||
int message_len;
|
||||
GV_MSG *msgs;
|
||||
|
||||
if (work->control.field_56 == 0)
|
||||
if (work->control.n_messages == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
msgs = &work->control.field_5C_mesg[work->control.field_56] - 1;
|
||||
for (i = work->control.field_56; i > 0; i--, msgs--)
|
||||
msgs = &work->control.messages[work->control.n_messages] - 1;
|
||||
for (i = work->control.n_messages; i > 0; i--, msgs--)
|
||||
{
|
||||
message_len = msgs->message_len;
|
||||
if (message_len >= 2 && msgs->message[0] == 0x10BA)
|
||||
|
|
@ -3800,7 +3800,7 @@ int JohnnyGetResources_800CA664(JohnnyWork *work, int scriptData, int scriptBind
|
|||
{
|
||||
GM_ConfigControlString(control, GCL_GetOption('p'), GCL_GetOption('d'));
|
||||
GM_ConfigControlHazard(control, control->mov.vy, 450, 450);
|
||||
control->field_59 = 2;
|
||||
control->exclude_flag = 2;
|
||||
GM_ConfigControlAttribute(control, 5);
|
||||
|
||||
cone = &work->control.radar_cone;
|
||||
|
|
|
|||
|
|
@ -1154,13 +1154,13 @@ void s03b_revolver_800C89C8(RevolverWork *work)
|
|||
int code;
|
||||
int action;
|
||||
|
||||
n_msgs = work->control.field_56;
|
||||
n_msgs = work->control.n_messages;
|
||||
if (n_msgs == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
msg = &work->control.field_5C_mesg[n_msgs] - 1;
|
||||
msg = &work->control.messages[n_msgs] - 1;
|
||||
for (i = n_msgs; i > 0; i--, msg--)
|
||||
{
|
||||
flag = 1;
|
||||
|
|
@ -1437,7 +1437,7 @@ int RevolverGetResources_800C8FD4(RevolverWork *work, int arg1, int arg2)
|
|||
|
||||
GM_ConfigControlString(control, GCL_GetOption('p'), GCL_GetOption('d'));
|
||||
GM_ConfigControlHazard(control, control->mov.vy, -1, -1);
|
||||
control->field_59 = 2;
|
||||
control->exclude_flag = 2;
|
||||
GM_ConfigControlAttribute(control, 1);
|
||||
|
||||
object = &work->field_9C;
|
||||
|
|
|
|||
|
|
@ -472,13 +472,13 @@ void s03b_torture_800C4654(TortureWork *work)
|
|||
int n_msgs;
|
||||
GV_MSG *msg;
|
||||
|
||||
if (work->control.field_56 == 0)
|
||||
if (work->control.n_messages == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
n_msgs = work->control.field_56;
|
||||
msg = &work->control.field_5C_mesg[n_msgs] - 1;
|
||||
n_msgs = work->control.n_messages;
|
||||
msg = &work->control.messages[n_msgs] - 1;
|
||||
|
||||
for (; n_msgs > 0; n_msgs--, msg--)
|
||||
{
|
||||
|
|
@ -1462,13 +1462,13 @@ void s03b_torture_800C5EC4(TortureWork *work)
|
|||
return;
|
||||
}
|
||||
|
||||
if (work->control.field_56 == 0)
|
||||
if (work->control.n_messages == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
n_msgs = work->control.field_56;
|
||||
msg = &work->control.field_5C_mesg[n_msgs] - 1;
|
||||
n_msgs = work->control.n_messages;
|
||||
msg = &work->control.messages[n_msgs] - 1;
|
||||
|
||||
for (; n_msgs > 0; n_msgs--, msg--)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ void s00a_command_800C5E48( WatcherWork* work, int time )
|
|||
|
||||
if ( dir >= 0 )
|
||||
{
|
||||
s0 = ctrl->field_58;
|
||||
s0 = ctrl->touch_flag;
|
||||
if ( s0 > 0 )
|
||||
{
|
||||
dist = GV_VecDir2( svec );
|
||||
|
|
@ -1231,7 +1231,7 @@ void s00a_command_800C7E28( WatcherWork* work, int time )
|
|||
}
|
||||
else
|
||||
{
|
||||
if ( !ctrl->field_58 )
|
||||
if ( !ctrl->touch_flag )
|
||||
{
|
||||
ctrl->step = work->target->field_2C_vec;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ int NextAsiato_800D12D0(HZD_HDL *hdl, int idx, SVECTOR *svec2)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (HZD_80028454(hdl, svec2, vec, 15, 2))
|
||||
if (HZD_LineCheck(hdl, svec2, vec, HZD_CHECK_ALL, 0x2))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -254,7 +254,7 @@ int SearchNearAsiato_800D13B0(HZD_HDL* hzd, SVECTOR* mov, int facedir, int visio
|
|||
svec.vy = 0;
|
||||
len = GV_VecLen3( &svec );
|
||||
|
||||
if ( len < max_len && len < length && GV_DiffDirAbs( facedir, GV_VecDir2(&svec) ) < vision_unk && !HZD_80028454(hzd, mov, &AsiatoPositions[i], 0xF, 2) )
|
||||
if ( len < max_len && len < length && GV_DiffDirAbs( facedir, GV_VecDir2(&svec) ) < vision_unk && !HZD_LineCheck(hzd, mov, &AsiatoPositions[i], 0xF, 0x2) )
|
||||
{
|
||||
max_len = len;
|
||||
s4 = i;
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ int s01a_camera_800D4E08(CameraWork *work)
|
|||
}
|
||||
if (work->field_1C8 != 0)
|
||||
{
|
||||
if (HZD_80028454(ctrl->map->hzd, &ctrl->mov, &GM_PlayerPosition, 15, 2) != 0)
|
||||
if (HZD_LineCheck(ctrl->map->hzd, &ctrl->mov, &GM_PlayerPosition, HZD_CHECK_ALL, 0x2) != 0)
|
||||
{
|
||||
work->field_1DC = 0;
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ void s00a_command_800C9E68( WatcherWork* work )
|
|||
if ( dis < 500 || GV_DiffDirAbs( work->vision.facedir, dir ) < work->vision.angle )
|
||||
{
|
||||
map = work->control.map;
|
||||
if ( !( HZD_80028454( map->hzd, pos, &ctrl->mov, 0xF, 0x4 ) ) )
|
||||
if ( !( HZD_LineCheck( map->hzd, pos, &ctrl->mov, HZD_CHECK_ALL, 0x4 ) ) )
|
||||
{
|
||||
if ( !( sub_8002E2A8( &ctrl->mov, pos, map->index, &svec ) ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ typedef struct _KikenWork
|
|||
|
||||
#define EXEC_LEVEL GV_ACTOR_LEVEL4
|
||||
|
||||
int KikenCheckMessages_800D6C64(KikenWork *work)
|
||||
int KikenCheckMessage_800D6C64(KikenWork *work)
|
||||
{
|
||||
GV_MSG *msg;
|
||||
int code;
|
||||
|
|
@ -40,7 +40,7 @@ int KikenCheckMessages_800D6C64(KikenWork *work)
|
|||
|
||||
void KikenAct_800D6CC8(KikenWork *work)
|
||||
{
|
||||
KikenCheckMessages_800D6C64(work);
|
||||
KikenCheckMessage_800D6C64(work);
|
||||
|
||||
if (work->active != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ int s07a_meryl7_800D50F8( WatcherWork* work )
|
|||
CONTROL *ctrl;
|
||||
|
||||
ctrl = &work->control;
|
||||
ctrl->field_56 = GV_ReceiveMessage( ctrl->name, &work->control.field_5C_mesg );
|
||||
count = ctrl->field_56;
|
||||
msg = ctrl->field_5C_mesg;
|
||||
ctrl->n_messages = GV_ReceiveMessage( ctrl->name, &work->control.messages );
|
||||
count = ctrl->n_messages;
|
||||
msg = ctrl->messages;
|
||||
|
||||
if ( count <= 0 ) return 0 ;
|
||||
|
||||
|
|
@ -348,7 +348,7 @@ int s07a_meryl7_800D5908( WatcherWork* work, int name, int where )
|
|||
GM_ConfigControlAttribute( ctrl, 13 );
|
||||
GM_ConfigControlInterp( ctrl, 4 );
|
||||
|
||||
ctrl->field_59 = 2;
|
||||
ctrl->exclude_flag = 2;
|
||||
|
||||
GM_ConfigControlTrapCheck( ctrl );
|
||||
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ void s07a_meryl_unk_800D71B0( WatcherWork* work, int time )
|
|||
|
||||
if ( dir >= 0 )
|
||||
{
|
||||
s0 = ctrl->field_58;
|
||||
s0 = ctrl->touch_flag;
|
||||
if ( s0 > 0 )
|
||||
{
|
||||
dist = GV_VecDir2( svec );
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ void s07a_meryl_unk_800DAFD8( WatcherWork* work )
|
|||
if ( dis < 500 || GV_DiffDirAbs( work->vision.facedir, dir ) < work->vision.angle )
|
||||
{
|
||||
map = work->control.map;
|
||||
if ( !( HZD_80028454( map->hzd, pos, &ctrl->mov, 0xF, 0x4 ) ) )
|
||||
if ( !( HZD_LineCheck( map->hzd, pos, &ctrl->mov, HZD_CHECK_ALL, 0x4 ) ) )
|
||||
{
|
||||
if ( !( sub_8002E2A8( &ctrl->mov, pos, map->index, &svec ) ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ int s07a_meryl_unk_800DB484( WatcherWork *work, int addr, int addr2 )
|
|||
svec2.vy = zone2->y + 500;
|
||||
svec2.vz = zone2->z;
|
||||
|
||||
if ( HZD_80028454( hzd, &svec, &svec2, 0x8, 0x2 ) != 0 )
|
||||
if ( HZD_LineCheck( hzd, &svec, &svec2, HZD_CHECK_DYNSEG, 0x2 ) != 0 )
|
||||
{
|
||||
printf((char *)s07a_aOkokokodd_800E2FB0, addr, addr2);
|
||||
return 1;
|
||||
|
|
@ -1090,8 +1090,8 @@ int s07a_meryl_unk_800DCB24( WatcherWork* work )
|
|||
GV_MSG *msg;
|
||||
|
||||
ctrl = &work->control;
|
||||
len = ctrl->field_56;
|
||||
msg = ctrl->field_5C_mesg;
|
||||
len = ctrl->n_messages;
|
||||
msg = ctrl->messages;
|
||||
|
||||
for ( ; len > 0 ; len--, msg++ )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ int s00a_command_800CACA0( WatcherWork *work, int addr, int addr2 )
|
|||
svec2.vy = zone2->y + 500;
|
||||
svec2.vz = zone2->z;
|
||||
|
||||
return HZD_80028454( hzd, &svec, &svec2, 0x8, 0x2 ) != 0;
|
||||
return HZD_LineCheck( hzd, &svec, &svec2, HZD_CHECK_DYNSEG, 0x2 ) != 0;
|
||||
}
|
||||
|
||||
int s00a_command_800CEA9C( int addr );
|
||||
|
|
@ -919,8 +919,8 @@ int s00a_command_800CBD2C( WatcherWork* work )
|
|||
GV_MSG *msg;
|
||||
|
||||
ctrl = &work->control;
|
||||
len = ctrl->field_56;
|
||||
msg = ctrl->field_5C_mesg;
|
||||
len = ctrl->n_messages;
|
||||
msg = ctrl->messages;
|
||||
|
||||
for ( ; len > 0 ; len--, msg++ )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -52,9 +52,9 @@ int RootFlagCheck_800C3EE8( WatcherWork* work )
|
|||
CONTROL *ctrl;
|
||||
|
||||
ctrl = &work->control;
|
||||
ctrl->field_56 = GV_ReceiveMessage( ctrl->name, &work->control.field_5C_mesg );
|
||||
count = ctrl->field_56;
|
||||
msg = ctrl->field_5C_mesg;
|
||||
ctrl->n_messages = GV_ReceiveMessage( ctrl->name, &work->control.messages );
|
||||
count = ctrl->n_messages;
|
||||
msg = ctrl->messages;
|
||||
|
||||
if ( count <= 0 ) return 0 ;
|
||||
|
||||
|
|
@ -301,7 +301,7 @@ int s00a_watcher_800C45D4( WatcherWork* work, int name, int where )
|
|||
GM_ConfigControlAttribute( ctrl, 13 );
|
||||
GM_ConfigControlInterp( ctrl, 4 );
|
||||
|
||||
ctrl->field_59 = 2;
|
||||
ctrl->exclude_flag = 2;
|
||||
|
||||
GM_ConfigControlTrapCheck( ctrl );
|
||||
|
||||
|
|
|
|||
|
|
@ -25,14 +25,14 @@ static void Act(Work *work)
|
|||
int message;
|
||||
|
||||
control = &work->control;
|
||||
n_msgs = GV_ReceiveMessage(control->name, &control->field_5C_mesg);
|
||||
n_msgs = GV_ReceiveMessage(control->name, &control->messages);
|
||||
|
||||
if (n_msgs <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
msg = control->field_5C_mesg;
|
||||
msg = control->messages;
|
||||
while (--n_msgs >= 0)
|
||||
{
|
||||
message = msg->message[0];
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ int FlrSpaGetSvecs_800D09A4(char *opt, SVECTOR *out)
|
|||
return count;
|
||||
}
|
||||
|
||||
int FlrSpaCheckMessages_800D09F8(unsigned short name, int n_hashes, unsigned short *hashes)
|
||||
int FlrSpaCheckMessage_800D09F8(unsigned short name, int n_hashes, unsigned short *hashes)
|
||||
{
|
||||
GV_MSG *msg;
|
||||
int n_msgs;
|
||||
|
|
@ -167,7 +167,7 @@ void FlrSpaAct_800D0E24(FlrSpaWork *work)
|
|||
hashes[0] = GV_StrCode("はじめ");
|
||||
hashes[1] = GV_StrCode("やめ");
|
||||
|
||||
switch (FlrSpaCheckMessages_800D09F8(work->name, 2, hashes))
|
||||
switch (FlrSpaCheckMessage_800D09F8(work->name, 2, hashes))
|
||||
{
|
||||
case 0:
|
||||
work->enable = 1;
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ int GunCame_800C7224(GunCameWork *work)
|
|||
if ((work->field_368 >= dx) &&
|
||||
(work->field_368 >= dy) &&
|
||||
(work->field_364 >= GV_DiffVec3(&work->control.mov, &work->field_3AC[index])) &&
|
||||
!HZD_80028454(work->control.map->hzd, &work->control.mov, &work->field_3AC[index], 15, 0))
|
||||
!HZD_LineCheck(work->control.map->hzd, &work->control.mov, &work->field_3AC[index], HZD_CHECK_ALL, 0))
|
||||
{
|
||||
success = 1;
|
||||
work->field_39C = index;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ typedef struct _ItemDotWork
|
|||
|
||||
#define EXEC_LEVEL GV_ACTOR_LEVEL4
|
||||
|
||||
int ItemDotCheckMessages_800CC4C8(unsigned short name, int n_hashes, unsigned short *hashes)
|
||||
int ItemDotCheckMessage_800CC4C8(unsigned short name, int n_hashes, unsigned short *hashes)
|
||||
{
|
||||
GV_MSG *msg;
|
||||
int nmsgs;
|
||||
|
|
@ -48,7 +48,7 @@ void ItemDotAct_800CC560(ItemDotWork *work)
|
|||
unsigned short hash[1];
|
||||
|
||||
hash[0] = GV_StrCode("kill");
|
||||
if (ItemDotCheckMessages_800CC4C8(work->name, 1, hash) == 0)
|
||||
if (ItemDotCheckMessage_800CC4C8(work->name, 1, hash) == 0)
|
||||
{
|
||||
work->fA8 = 1;
|
||||
work->control.skip_flag |= CTRL_SKIP_TRAP;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ void * AN_Unknown_800CA1EC(MATRIX *pos, int mark);
|
|||
|
||||
#define EXEC_LEVEL GV_ACTOR_LEVEL4
|
||||
|
||||
int ScnMarkCheckMessages_800C93CC(unsigned short name, int n_hashes, unsigned short *hashes)
|
||||
int ScnMarkCheckMessage_800C93CC(unsigned short name, int n_hashes, unsigned short *hashes)
|
||||
{
|
||||
GV_MSG *msg;
|
||||
int n_msgs;
|
||||
|
|
@ -57,7 +57,7 @@ void ScnMarkAct_800C9464(ScnMarkWork *work)
|
|||
hashes[4] = GV_StrCode("BW_MARK");
|
||||
hashes[5] = GV_StrCode("QW_MARK");
|
||||
hashes[6] = GV_StrCode("HEART_MARK");
|
||||
found = ScnMarkCheckMessages_800C93CC(work->name, 7, hashes);
|
||||
found = ScnMarkCheckMessage_800C93CC(work->name, 7, hashes);
|
||||
|
||||
if (found != -1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ void UjiAct_800C3B74(UjiWork *work)
|
|||
}
|
||||
}
|
||||
|
||||
int UjiCheckMessages_800C3EEC(UjiWork *work)
|
||||
int UjiCheckMessage_800C3EEC(UjiWork *work)
|
||||
{
|
||||
char *opt;
|
||||
|
||||
|
|
@ -294,7 +294,7 @@ int UjiGetResources_800C3FC8(UjiWork *work, int map)
|
|||
work->map = map;
|
||||
GM_CurrentMap = map;
|
||||
|
||||
UjiCheckMessages_800C3EEC(work);
|
||||
UjiCheckMessage_800C3EEC(work);
|
||||
|
||||
sp30[0].vx = -5;
|
||||
sp30[0].vy = 0;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ int WallSpaGetSvecs_800CB080(char *opt, SVECTOR *out)
|
|||
return count;
|
||||
}
|
||||
|
||||
int WallSpaCheckMessages_800CB0D4(unsigned short name, int n_hashes, unsigned short *hashes)
|
||||
int WallSpaCheckMessage_800CB0D4(unsigned short name, int n_hashes, unsigned short *hashes)
|
||||
{
|
||||
GV_MSG *msg;
|
||||
int n_msgs;
|
||||
|
|
@ -105,7 +105,7 @@ void WallSpaAct_800CB300(WallSpaWork *work)
|
|||
hashes[0] = GV_StrCode("はじめ");
|
||||
hashes[1] = GV_StrCode("やめ");
|
||||
|
||||
switch (WallSpaCheckMessages_800CB0D4(work->name, 2, hashes))
|
||||
switch (WallSpaCheckMessage_800CB0D4(work->name, 2, hashes))
|
||||
{
|
||||
case 0:
|
||||
work->enable = 1;
|
||||
|
|
|
|||
|
|
@ -149,9 +149,9 @@ int s04c_revbullt_800D274C(RevbulltWork *work, MATRIX *world)
|
|||
DG_PutVector(s04c_dword_800C35D0, sp18, 2);
|
||||
|
||||
ret = 0;
|
||||
if (HZD_80028454(GM_GetMap(work->map)->hzd, &sp18[0], &sp18[1], 15, 2))
|
||||
if (HZD_LineCheck(GM_GetMap(work->map)->hzd, &sp18[0], &sp18[1], HZD_CHECK_ALL, 0x2))
|
||||
{
|
||||
HZD_GetSpadVector(&sp18[1]);
|
||||
HZD_80028890(&sp18[1]);
|
||||
|
||||
floor = HZD_80028820();
|
||||
if (((int)floor & 0x80000000) != 0)
|
||||
|
|
|
|||
|
|
@ -889,9 +889,9 @@ int Valcan_800DA558(ValcanWork *work, int arg1)
|
|||
var_s0 = 0;
|
||||
if (dword_8009F46C[0] == 1 || amissile_alive_8009F490 == 1)
|
||||
{
|
||||
if (HZD_80028454(work->control.map->hzd, &svec1, &work->field_51C, 12, 2) == 0)
|
||||
if (HZD_LineCheck(work->control.map->hzd, &svec1, &work->field_51C, ( HZD_CHECK_DYNSEG | HZD_CHECK_SEG ), 0x2) == 0)
|
||||
{
|
||||
if (HZD_80028454(work->control.map->hzd, &svec1, &GM_PlayerPosition, 12, 2) == 0)
|
||||
if (HZD_LineCheck(work->control.map->hzd, &svec1, &GM_PlayerPosition, ( HZD_CHECK_DYNSEG | HZD_CHECK_SEG ), 0x2) == 0)
|
||||
{
|
||||
var_s0 = Valcan_800D9DC0(work, 1);
|
||||
if (var_s0 < work->field_68C)
|
||||
|
|
@ -906,7 +906,7 @@ int Valcan_800DA558(ValcanWork *work, int arg1)
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
else if (HZD_80028454(work->control.map->hzd, &svec1, &GM_PlayerPosition, 12, 2) == 0)
|
||||
else if (HZD_LineCheck(work->control.map->hzd, &svec1, &GM_PlayerPosition, ( HZD_CHECK_DYNSEG | HZD_CHECK_SEG ), 0x2) == 0)
|
||||
{
|
||||
var_s0 = Valcan_800D9DC0(work, 1);
|
||||
flag = 1;
|
||||
|
|
@ -918,7 +918,7 @@ int Valcan_800DA558(ValcanWork *work, int arg1)
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
else if (HZD_80028454(work->control.map->hzd, &svec1, &GM_PlayerPosition, 12, 2) != 0)
|
||||
else if (HZD_LineCheck(work->control.map->hzd, &svec1, &GM_PlayerPosition, ( HZD_CHECK_DYNSEG | HZD_CHECK_SEG ), 0x2) != 0)
|
||||
{
|
||||
work->field_788 = 0;
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -150,10 +150,10 @@ static int PollMessages(Work *work)
|
|||
int var_v0;
|
||||
|
||||
control = &work->control;
|
||||
control->field_56 = GV_ReceiveMessage(control->name, &control->field_5C_mesg);
|
||||
control->n_messages = GV_ReceiveMessage(control->name, &control->messages);
|
||||
|
||||
// Process door close messages:
|
||||
for (i = control->field_56, msg = control->field_5C_mesg; i > 0; i--, msg++)
|
||||
for (i = control->n_messages, msg = control->messages; i > 0; i--, msg++)
|
||||
{
|
||||
message_type = msg->message[0];
|
||||
|
||||
|
|
@ -219,7 +219,7 @@ static int PollMessages(Work *work)
|
|||
}
|
||||
|
||||
// Process other door messages:
|
||||
for (i = control->field_56, msg = control->field_5C_mesg; i > 0; i--, msg++)
|
||||
for (i = control->n_messages, msg = control->messages; i > 0; i--, msg++)
|
||||
{
|
||||
message_type = msg->message[0];
|
||||
temp_s1_2 = msg->message[1];
|
||||
|
|
|
|||
|
|
@ -77,9 +77,9 @@ static int GetZoomLimit(void)
|
|||
|
||||
var_s2 = 0;
|
||||
|
||||
if (HZD_80028454(GM_PlayerControl->map->hzd, &vec[0], &vec[1], 15, 4))
|
||||
if (HZD_LineCheck(GM_PlayerControl->map->hzd, &vec[0], &vec[1], HZD_CHECK_ALL, 0x4))
|
||||
{
|
||||
HZD_GetSpadVector(&vec[1]);
|
||||
HZD_80028890(&vec[1]);
|
||||
var_s2 = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -205,9 +205,9 @@ static int socom_act_helper_80065408( Work *work )
|
|||
DG_SetPos( &work->parent->objs->objs[ work->num_parent ].world );
|
||||
DG_PutVector( stru_8009F3D4, vecs, 2 );
|
||||
map = work->control->map;
|
||||
if ( HZD_80028454( map->hzd, vecs, &vecs[ 1 ], 15, 4 ) )
|
||||
if ( HZD_LineCheck( map->hzd, vecs, &vecs[ 1 ], HZD_CHECK_ALL, 0x4 ) )
|
||||
{
|
||||
HZD_GetSpadVector( &vecs[ 1 ] );
|
||||
HZD_80028890( &vecs[ 1 ] );
|
||||
bCalcLen = 1;
|
||||
}
|
||||
if ( GM_Target_8002E1B8( vecs, &vecs[ 1 ], map->index, &vecs[ 1 ], 1 ) )
|
||||
|
|
|
|||
Loading…
Reference in New Issue