mirror of
https://github.com/korenkonder/ReDIVA.git
synced 2026-10-12 00:58:20 +03:00
RobOsageTest: Initial stuff
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,136 @@
|
||||
/*
|
||||
by korenkonder
|
||||
GitHub/GitLab: korenkonder
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../../KKdLib/default.hpp"
|
||||
#include "../../CRE/rob/rob.hpp"
|
||||
#include "../../CRE/task.hpp"
|
||||
|
||||
class RobOsageTest : public app::Task {
|
||||
public:
|
||||
struct Node {
|
||||
struct Hinge {
|
||||
float_t ymin;
|
||||
float_t ymax;
|
||||
float_t zmin;
|
||||
float_t zmax;
|
||||
|
||||
inline Hinge() {
|
||||
ymin = -90.0f;
|
||||
ymax = 90.0f;
|
||||
zmin = -90.0f;
|
||||
zmax = 90.0f;
|
||||
}
|
||||
};
|
||||
|
||||
float_t coli_r;
|
||||
float_t weight;
|
||||
float_t inertial_cancel;
|
||||
Hinge hinge;
|
||||
|
||||
inline Node() {
|
||||
coli_r = 0.0f;
|
||||
weight = 1.0f;
|
||||
inertial_cancel = 0.0f;
|
||||
}
|
||||
};
|
||||
|
||||
struct Root {
|
||||
float_t force;
|
||||
float_t gain;
|
||||
float_t air_res;
|
||||
float_t root_y_rot;
|
||||
float_t root_z_rot;
|
||||
float_t fric;
|
||||
float_t wind_afc;
|
||||
SkinParam::RootCollisionType coli_type;
|
||||
float_t init_y_rot;
|
||||
float_t init_z_rot;
|
||||
|
||||
inline Root() {
|
||||
force = 0.0f;
|
||||
gain = 0.0f;
|
||||
air_res = 0.5f;
|
||||
root_y_rot = 0.0f;
|
||||
root_z_rot = 0.0f;
|
||||
fric = 1.0f;
|
||||
wind_afc = 0.5f;
|
||||
coli_type = SkinParam::RootCollisionTypeEnd;
|
||||
init_y_rot = 0.0f;
|
||||
init_z_rot = 0.0f;
|
||||
}
|
||||
};
|
||||
|
||||
bool load;
|
||||
bool save;
|
||||
bool coli;
|
||||
bool line;
|
||||
|
||||
int32_t chara_id;
|
||||
int32_t load_chara_id;
|
||||
::item_id item_id;
|
||||
object_info obj_info;
|
||||
size_t osage_index;
|
||||
size_t collision_index;
|
||||
|
||||
prj::vector_pair<::item_id, object_info> objects;
|
||||
|
||||
Root root;
|
||||
Node node;
|
||||
|
||||
Root root_temp;
|
||||
Node node_temp;
|
||||
std::vector<SkinParam::CollisionParam> cls_list_temp;
|
||||
SkinParam::CollisionParam cls_param_temp;
|
||||
|
||||
bool collision_update;
|
||||
|
||||
RobOsageTest();
|
||||
virtual ~RobOsageTest() override;
|
||||
|
||||
virtual bool init() override;
|
||||
virtual bool ctrl() override;
|
||||
virtual bool dest() override;
|
||||
virtual void disp() override;
|
||||
virtual void basic() override;
|
||||
|
||||
void disp_coli();
|
||||
void disp_line();
|
||||
|
||||
rob_chara_item_equip_object* get_item_equip_object() const;
|
||||
ExOsageBlock* get_osage_block(rob_chara_item_equip_object* itm_eq_obj) const;
|
||||
std::vector<SkinParam::CollisionParam>* get_cls_list(ExOsageBlock* osg) const;
|
||||
SkinParam::CollisionParam* get_cls_param(std::vector<SkinParam::CollisionParam>* cls_list) const;
|
||||
void set_root(skin_param* skp);
|
||||
|
||||
inline ExOsageBlock* get_osage_block() const {
|
||||
return get_osage_block(get_item_equip_object());
|
||||
}
|
||||
|
||||
inline std::vector<SkinParam::CollisionParam>* get_cls_list() const {
|
||||
return get_cls_list(get_osage_block());
|
||||
}
|
||||
|
||||
inline SkinParam::CollisionParam* get_cls_param() const {
|
||||
return get_cls_param(get_cls_list());
|
||||
}
|
||||
|
||||
inline skin_param* get_skin_param() const {
|
||||
ExOsageBlock* osg = get_osage_block();
|
||||
if (osg)
|
||||
return osg->rob.skin_param_ptr;
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline void set_root() {
|
||||
return set_root(get_skin_param());
|
||||
}
|
||||
};
|
||||
|
||||
extern RobOsageTest* rob_osage_test;
|
||||
|
||||
extern void rob_osage_test_init();
|
||||
extern void rob_osage_test_free();
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "data_test/auth_3d_test.hpp"
|
||||
#include "data_test/glitter_test.hpp"
|
||||
#include "data_test/motion_test.hpp"
|
||||
#include "data_test/rob_osage_test.hpp"
|
||||
#include "data_test/selector.hpp"
|
||||
#include "data_test/stage_test.hpp"
|
||||
#include "information/dw_console.hpp"
|
||||
@@ -1580,6 +1581,7 @@ bool SubGameState::DataTestStg::Dest() {
|
||||
|
||||
bool SubGameState::DataTestMot::Init() {
|
||||
app::TaskWork::add_task(data_test_mot, "TASK_DATA_TEST_MOT");
|
||||
app::TaskWork::add_task(rob_osage_test, "ROB_OSAGE_TEST");
|
||||
dtm_stg_load(0);
|
||||
dtw_stg_load(true);
|
||||
return true;
|
||||
@@ -1591,6 +1593,7 @@ bool SubGameState::DataTestMot::Ctrl() {
|
||||
|
||||
bool SubGameState::DataTestMot::Dest() {
|
||||
data_test_mot->del();
|
||||
rob_osage_test->del();
|
||||
dtm_stg_unload();
|
||||
dtw_stg_unload();
|
||||
return true;
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#include "data_test/equip_test.hpp"
|
||||
#include "data_test/glitter_test.hpp"
|
||||
#include "data_test/motion_test.hpp"
|
||||
#include "data_test/rob_osage_test.hpp"
|
||||
#include "data_test/selector.hpp"
|
||||
#include "data_test/stage_test.hpp"
|
||||
#include "information/dw_console.hpp"
|
||||
@@ -459,6 +460,9 @@ static bool render_init(render_init_struct* ris) {
|
||||
width = (int32_t)(width / 2.0f);
|
||||
height = (int32_t)(height / 2.0f);
|
||||
|
||||
width = 1280;
|
||||
height = 720;
|
||||
|
||||
res_window_set(RESOLUTION_MODE_HD);
|
||||
|
||||
#if BAKE_PNG || BAKE_VIDEO
|
||||
@@ -618,6 +622,7 @@ static render_context* render_context_load() {
|
||||
dtm_stg_init();
|
||||
motion_test_init();
|
||||
equip_test_init();
|
||||
rob_osage_test_init();
|
||||
task_data_test_glitter_particle_init();
|
||||
x_pv_game_data_init();
|
||||
|
||||
@@ -1257,6 +1262,7 @@ static void render_context_dispose(render_context* rctx) {
|
||||
|
||||
x_pv_game_data_free();
|
||||
task_data_test_glitter_particle_free();
|
||||
rob_osage_test_free();
|
||||
equip_test_free();
|
||||
motion_test_free();
|
||||
dtm_stg_free();
|
||||
|
||||
Reference in New Issue
Block a user