Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/SB/Core/x/xDecal.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct xDecalEmitter
struct config
{
U32 flags;
F32 life_time;
F32 life_time; // 0x2ec
U32 blend_src;
U32 blend_dst;
struct
Expand Down
35 changes: 20 additions & 15 deletions src/SB/Core/x/xLaserBolt.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,6 @@ enum fx_orient_enum
FORCE_INT_FX_ORIENT = 0xffffffff
};

struct bolt
{
xVec3 origin;
xVec3 dir;
xVec3 loc;
xVec3 hit_norm;
F32 dist;
F32 hit_dist;
F32 prev_dist;
F32 prev_check_dist;
xEnt* hit_ent;
F32 emitted;
void* context;
};

struct xLaserBoltEmitter
{
struct config
Expand All @@ -75,6 +60,8 @@ struct xLaserBoltEmitter
F32 damage;
};

struct bolt;

struct static_queue
{
U32 _first;
Expand Down Expand Up @@ -104,6 +91,21 @@ struct xLaserBoltEmitter
F32 irate;
};

struct bolt
{
xVec3 origin;
xVec3 dir;
xVec3 loc;
xVec3 hit_norm;
F32 dist;
F32 hit_dist;
F32 prev_dist;
F32 prev_check_dist;
xEnt* hit_ent;
F32 emitted;
void* context;
};

config cfg;
static_queue bolts;
F32 ialpha;
Expand All @@ -112,6 +114,7 @@ struct xLaserBoltEmitter
effect_data* fx[7];
U32 fxsize[7];

void init(U32 max_bolts, const char*);
void set_texture(char* name);
void set_texture(U32 aid);
void set_texture(RwTexture* tex);
Expand All @@ -128,6 +131,8 @@ struct xLaserBoltEmitter
RxObjSpace3DVertex* get_vert_buffer(S32& dat);
void applyDamage(bolt& b);
void reset_fx(fx_when_enum when);

U32 visible() const;
};

#endif
29 changes: 29 additions & 0 deletions src/SB/Game/zEntPlayerOOBState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ namespace oob_state
tagFixed fixed;
xMat4x3 shared_target;

static void reset_camera()
{
// xMat4x3 ma, is not correct. This is a major placeholder.
// Simply have not figured out what the data/global is supposed to be
// FIXME: Correct this function

xMat4x3* ma = xEntGetFrame(&(xEnt)globals.player.ent);

zCameraEnableInput();
zCameraEnableTracking(CO_OOB);
xCameraDoCollisions(1, 6);
zCameraTweakGlobal_Init();
}

static bool assume_player_is_stupid()
{
shared.tutorial = (ztalkbox*)zSceneFindObject(xStrHash("OUT_OF_BOUNDS_TLKBX"));
Expand Down Expand Up @@ -74,6 +88,21 @@ namespace oob_state
{
}

static void set_rect_vert(rwGameCube2DVertex&, F32, F32, F32, iColor_tag, F32)
{
}

drop_state_type::substate_enum drop_state_type::supdate_fade_in(drop_state_type&,
xScene& scn, F32& unk0)
{
return drop_state_type::update_fade_in();
}

drop_state_type::substate_enum drop_state_type::update_fade_in(xScene&, float&)
{
return SS_MOVING_IN;
}

} // namespace
} // namespace oob_state

Expand Down
32 changes: 32 additions & 0 deletions src/SB/Game/zEntPlayerOOBState.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include "xserializer.h"
#include "zTalkBox.h"
#include "zTaskBox.h"
#include "zCamera.h"
#include "zCameraTweak.h"

extern bool oob_player_teleported;

Expand Down Expand Up @@ -109,6 +111,36 @@ namespace oob_state
void stop();
};

struct drop_state_type : state_type
{
enum substate_enum
{
SS_MOVING_IN,
SS_STOPPING,
SS_STOPPED,
SS_STARTING,
SS_MOVING_OUT,
SS_START_FADE_IN,
SS_FADE_IN,
MAX_SS,
SS_INVALID = 0xffffffff,
};

substate_enum move_substate;
substate_enum fade_substate;
xVec3 player_start;
F32 stop_time;
F32 fade_start_time;
F32 fade_time;
substate_enum (*updatess)(drop_state_type&, xScene&, F32&)[7];

void start();
state_enum update(xScene& s, F32& dt);
substate_enum supdate_fade_in(drop_state_type&, xScene&, F32&);
substate_enum update_fade_in();
substate_enum update_fade_in(xScene&, F32&);
};

struct _class_9
{
int flags;
Expand Down
Loading