Removed Dev suffix. Made Dev main thing

This commit is contained in:
korenkonder
2024-05-30 09:05:31 +03:00
parent f2e8c88025
commit 087babd7af
29 changed files with 19 additions and 347 deletions
-2
View File
@@ -14,7 +14,6 @@ namespace Glitter {
delete i;
}
#if defined(CRE_DEV)
void Animation::AddValue(GLT, double_t val, CurveTypeFlags flags) {
for (int32_t i = CURVE_TRANSLATION_X; i <= CURVE_V_SCROLL_ALPHA_2ND; i++) {
if (!(flags & (1 << (size_t)i)))
@@ -27,7 +26,6 @@ namespace Glitter {
}
}
}
#endif
Animation& Animation::operator=(const Animation& anim) {
for (Curve*& i : curves)
-12
View File
@@ -6,12 +6,10 @@
#include "glitter.hpp"
namespace Glitter {
#if defined(CRE_DEV)
static double_t glitter_curve_add_key(bool has_error,
bool has_error_lerp, bool has_error_hermite, double_t* a, double_t* b, int32_t frame,
const uint8_t step, size_t i, double_t t1, double_t t2, double_t t2_old,
std::vector<Curve::KeyRev>* keys_rev);
#endif
Curve::Key::Key() : type(), frame(), value(), tangent1(), tangent2(), random_range() {
@@ -35,7 +33,6 @@ namespace Glitter {
this->random_range = random_range;
}
#if defined(CRE_DEV)
Curve::KeyRev::KeyRev() : type(), frame(), value(), tangent1(), tangent2(), random_range() {
}
@@ -57,7 +54,6 @@ namespace Glitter {
this->tangent2 = tangent2;
this->random_range = random_range;
}
#endif
Curve::Curve(GLT) : type(), repeat(),
start_time(), end_time(), flags(), random_range() {
@@ -70,13 +66,11 @@ namespace Glitter {
}
#if defined(CRE_DEV)
void Curve::AddValue(GLT, double_t val) {
for (Curve::KeyRev& i : keys_rev)
i.value += val;
Recalculate(GLT_VAL);
}
#endif
bool Curve::F2GetValue(GLT, float_t frame,
float_t* value, int32_t random_value, Random* random) {
@@ -213,7 +207,6 @@ namespace Glitter {
? -key.random_range : 0.0f, key.random_range);
}
#if defined(CRE_DEV)
inline static void key_to_key_rev(Curve::KeyRev& dst,
const Curve::Key& src, bool baked_x = false, bool negate = false) {
dst.type = src.type;
@@ -611,7 +604,6 @@ namespace Glitter {
frame, val, rand_range), baked_x, negate);
}
}
#endif
bool Curve::XGetValue(float_t frame,
float_t* value, int32_t random_value, Random* random) {
@@ -756,9 +748,7 @@ namespace Glitter {
flags = curv.flags;
random_range = curv.random_range;
keys.assign(curv.keys.begin(), curv.keys.end());
#if defined(CRE_DEV)
keys_rev.assign(curv.keys_rev.begin(), curv.keys_rev.end());
#endif
version = curv.version;
keys_version = curv.keys_version;
return *this;
@@ -800,7 +790,6 @@ namespace Glitter {
next %= count;
}
#if defined(CRE_DEV)
static double_t glitter_curve_add_key(bool has_error,
bool has_error_lerp, bool has_error_hermite, double_t* a, double_t* b, int32_t frame,
const uint8_t step, size_t i, double_t t1, double_t t2, double_t t2_old,
@@ -821,5 +810,4 @@ namespace Glitter {
keys_rev->push_back(Curve::KeyRev(KEY_CONSTANT, frame, a[0], b[0]));
return 0.0;
}
#endif
}
-2
View File
@@ -17,7 +17,6 @@ namespace Glitter {
}
EffectGroup::~EffectGroup() {
#if defined(CRE_DEV)
for (Mesh& i : meshes)
if (i.object_set_hash != hash_murmurhash_empty) {
object_storage_unload_set(i.object_set_hash);
@@ -25,7 +24,6 @@ namespace Glitter {
}
meshes.clear();
#endif
if (resources) {
texture_array_free(resources);
-2
View File
@@ -25,9 +25,7 @@ namespace Glitter {
mat = mat4_identity;
flags = (EffectInstFlag)0;
random = 0;
#if defined(CRE_DEV)
req_frame = 0.0f;
#endif
ext_color = 0.0f;
ext_anim_scale = 0.0f;
some_scale = -1.0f;
-6
View File
@@ -77,7 +77,6 @@ namespace Glitter {
ret = true;
}
#if defined(CRE_DEV)
if (type == Glitter::X)
for (Mesh& i : effect_group->meshes)
if (!i.ready && i.object_set_hash != hash_murmurhash_empty && i.object_set_hash != -1)
@@ -85,7 +84,6 @@ namespace Glitter {
ret = true;
else
i.ready = true;
#endif
if (!ret) {
effect_group = 0;
@@ -236,14 +234,12 @@ namespace Glitter {
return true;
}
else if (GPM_VAL->AppendEffectGroup(hash, eff_group, this)) {
#if defined(CRE_DEV)
if (type == Glitter::X)
for (Mesh& i : eff_group->meshes)
if (i.object_set_hash != hash_murmurhash_empty) {
object_storage_load_set_hash(file_handler->ptr->ds, i.object_set_hash);
i.load = true;
}
#endif
if (!init_scene)
return true;
@@ -776,11 +772,9 @@ namespace Glitter {
}
}
#if defined(CRE_DEV)
extern bool glitter_editor_enable;
if (glitter_editor_enable)
c->FitKeysIntoCurve(type);
#endif
}
bool FileReader::UnpackDivaList(f2_struct* st, EffectGroup* eff_group) {
-4
View File
@@ -1890,7 +1890,6 @@ namespace Glitter {
}
bool FileWriter::UnparseCurve(f2_struct* st, Curve* c, bool big_endian) {
#if defined(CRE_DEV)
std::vector<Curve::Key> keys;
extern bool glitter_editor_enable;
@@ -1901,7 +1900,6 @@ namespace Glitter {
keys.assign(c->keys.begin(), c->keys.end());
c->Recalculate(type);
}
#endif
if (c->keys.size() < 1)
return false;
@@ -2038,10 +2036,8 @@ namespace Glitter {
PackCurve(&s, c, big_endian);
st->sub_structs.push_back(s);
#if defined(CRE_DEV)
if (glitter_editor_enable)
c->keys.assign(keys.begin(), keys.end());
#endif
return true;
}
-40
View File
@@ -353,9 +353,7 @@ namespace Glitter {
PARTICLE_MANAGER_NOT_DISP = 0x02,
PARTICLE_MANAGER_RESET_SCENE_COUNTER = 0x04,
PARTICLE_MANAGER_READ_FILES = 0x08,
#if defined(CRE_DEV)
PARTICLE_MANAGER_LOCAL = 0x20,
#endif
};
enum ParticleSubFlag {
@@ -388,10 +386,8 @@ namespace Glitter {
SCENE_FLAG_1 = 0x01,
SCENE_NOT_DISP = 0x02,
SCENE_FLAG_3 = 0x04,
#if defined(CRE_DEV)
SCENE_ENDED = 0x08,
SCENE_EDITOR = 0x80,
#endif
};
enum Type {
@@ -492,9 +488,7 @@ namespace Glitter {
Animation();
~Animation();
#if defined(CRE_DEV)
void AddValue(GLT, double_t val, CurveTypeFlags flags);
#endif
Animation& operator=(const Animation& anim);
};
@@ -537,7 +531,6 @@ namespace Glitter {
float_t tangent1, float_t tangent2, float_t random_range);
};
#if defined(CRE_DEV)
struct KeyRev {
KeyType type;
int32_t frame;
@@ -551,7 +544,6 @@ namespace Glitter {
KeyRev(KeyType type, int32_t frame, double_t value,
double_t tangent1, double_t tangent2, double_t random_range);
};
#endif
CurveType type;
bool repeat;
@@ -560,18 +552,14 @@ namespace Glitter {
CurveFlag flags;
float_t random_range;
std::vector<Key> keys;
#if defined(CRE_DEV)
std::vector<KeyRev> keys_rev;
#endif
uint32_t version;
uint32_t keys_version;
Curve(GLT);
virtual ~Curve();
#if defined(CRE_DEV)
void AddValue(GLT, double_t val);
#endif
bool F2GetValue(GLT, float_t frame,
float_t* value, int32_t random_value, Random* random);
float_t F2Interpolate(GLT, float_t frame, const Curve::Key& curr,
@@ -582,10 +570,8 @@ namespace Glitter {
const Curve::Key& next, float_t frame, Random* random);
float_t F2Randomize(GLT, float_t value, Random* random);
float_t F2RandomizeKey(GLT, const Curve::Key& key, Random* random);
#if defined(CRE_DEV)
void FitKeysIntoCurve(GLT);
void Recalculate(GLT);
#endif
bool XGetValue(float_t frame,
float_t* value, int32_t random_value, Random* random);
float_t XInterpolate(float_t frame, const Curve::Key& curr,
@@ -735,10 +721,8 @@ namespace Glitter {
std::vector<uint64_t> resource_hashes;
txp_set resources_tex;
texture** resources;
#if defined(CRE_DEV)
std::vector<Mesh> meshes;
std::string name;
#endif
bool not_loaded;
bool scene_init;
uint32_t version;
@@ -893,9 +877,7 @@ namespace Glitter {
class EffectInst {
public:
bool init;
#if defined(CRE_DEV)
std::string name;
#endif
Effect* effect;
Effect::Data data;
float_t frame0;
@@ -909,9 +891,7 @@ namespace Glitter {
EffectInstFlag flags;
size_t id;
uint32_t random;
#if defined(CRE_DEV)
float_t req_frame;
#endif
vec4 ext_color;
vec3 ext_anim_scale;
float_t some_scale;
@@ -1565,9 +1545,7 @@ namespace Glitter {
class Scene {
public:
#if defined(CRE_DEV)
std::string name;
#endif
std::vector<SceneEffect> effects;
SceneCounter counter;
uint64_t hash;
@@ -1575,21 +1553,17 @@ namespace Glitter {
float_t emission;
Type type;
EffectGroup* effect_group;
#if defined(CRE_DEV)
float_t fade_frame;
float_t fade_frame_left;
float_t delta_frame_history;
bool skip;
FrameRateControl* frame_rate;
#endif
Scene(SceneCounter counter, uint64_t hash, EffectGroup* eff_group, bool a5);
virtual ~Scene();
void CalcDisp(GPM);
#if defined(CRE_DEV)
bool CanDisp(DispType disp_type, bool a3);
#endif
bool Copy(EffectInst* eff_inst, Scene* dst);
void Ctrl(GPM, float_t delta_frame);
void Disp(GPM, DispType disp_type);
@@ -1606,10 +1580,8 @@ namespace Glitter {
bool ResetEffect(GPM, uint64_t effect_hash, size_t* id = 0);
bool SetExtColor(bool set, uint64_t effect_hash, float_t r, float_t g, float_t b, float_t a);
bool SetExtColorByID(bool set, size_t id, float_t r, float_t g, float_t b, float_t a);
#if defined(CRE_DEV)
void SetFrameRate(FrameRateControl* frame_rate);
void SetReqFrame(size_t id, float_t req_frame);
#endif
};
class GltParticleManager : public app::Task {
@@ -1617,12 +1589,10 @@ namespace Glitter {
std::vector<Scene*> scenes;
std::vector<FileReader*> file_readers;
std::map<uint64_t, EffectGroup*> effect_groups;
#if defined(CRE_DEV)
Scene* selected_scene;
EffectInst* selected_effect;
EmitterInst* selected_emitter;
ParticleInst* selected_particle;
#endif
void* bone_data;
FrameRateControl* frame_rate;
Camera cam;
@@ -1649,14 +1619,10 @@ namespace Glitter {
bool AppendEffectGroup(uint64_t hash, EffectGroup* eff_group, FileReader* file_read);
void BasicEffectGroups();
uint64_t CalculateHash(const char* str);
#if defined(CRE_DEV)
bool CheckHasLocalEffect();
#endif
bool CheckNoFileReaders(uint64_t hash);
bool CheckSceneEnded(SceneCounter scene_counter);
#if defined(CRE_DEV)
void CheckSceneHasLocalEffect(Scene* sc);
#endif
void CtrlScenes();
void DispScenes(DispType disp_type);
void FreeEffects();
@@ -1680,23 +1646,17 @@ namespace Glitter {
float_t emission, bool init_scene, object_database* obj_db = 0, texture_database* tex_db = 0);
SceneCounter LoadScene(uint64_t effect_group_hash, uint64_t effect_hash, bool appear_now = true);
SceneCounter LoadSceneEffect(uint64_t hash, bool appear_now = true, uint8_t load_flags = 0);
#if defined(CRE_DEV)
SceneCounter LoadSceneEffect(uint64_t hash, const char* name,
bool appear_now = true, uint8_t load_flags = 0);
#endif
bool SceneHasNotEnded(SceneCounter load_counter);
#if defined(CRE_DEV)
void SetFrame(EffectGroup* effect_group,
Scene*& scene, float_t curr_frame, float_t prev_frame,
const Counter& counter, const Random& random, bool reset);
#endif
void SetSceneEffectExtColor(SceneCounter scene_counter, bool set,
uint64_t effect_hash, float_t r, float_t g, float_t b, float_t a);
#if defined(CRE_DEV)
void SetSceneEffectReqFrame(SceneCounter scene_counter, float_t req_frame);
void SetSceneFrameRate(SceneCounter scene_counter, FrameRateControl* frame_rate);
void SetSceneName(uint64_t hash, const char* name);
#endif
void SetPause(bool value);
void UnloadEffectGroup(uint64_t hash);
+8 -49
View File
@@ -18,9 +18,7 @@ namespace Glitter {
}
GltParticleManager::GltParticleManager() :
#if defined(CRE_DEV)
selected_scene(), selected_effect(), selected_emitter(), selected_particle(),
#endif
bone_data(), frame_rate(), cam(), flags(),
scene_load_counter(), texture_counter(), draw_selected() {
field_D0 = 20.0f;
@@ -123,7 +121,6 @@ namespace Glitter {
i = effect_groups.erase(i);
}
#if defined(CRE_DEV)
bool local = false;
for (auto i = scenes.begin(); i != scenes.end();) {
Scene* scene = *i;
@@ -163,18 +160,15 @@ namespace Glitter {
enum_or(flags, PARTICLE_MANAGER_LOCAL);
else
enum_and(flags, ~PARTICLE_MANAGER_LOCAL);
#endif
}
uint64_t GltParticleManager::CalculateHash(const char* str) {
return hash_utf8_fnv1a64m(str);
}
#if defined(CRE_DEV)
bool GltParticleManager::CheckHasLocalEffect() {
return!!(flags & PARTICLE_MANAGER_LOCAL);
}
#endif
bool GltParticleManager::CheckNoFileReaders(uint64_t hash) {
auto elem = effect_groups.find(hash);
@@ -194,14 +188,10 @@ namespace Glitter {
for (Scene*& i : scenes)
if (i && i->counter.counter == scene_counter.counter) {
if (!scene_counter.index) {
#if defined(CRE_DEV)
if (i->type == Glitter::X)
return !(i->flags & SCENE_ENDED) && !i->HasEnded(true);
else
return !i->HasEnded(true);
#else
return !i->HasEnded(true);
#endif
}
else
return i->HasEnded(scene_counter.index, true);
@@ -209,7 +199,6 @@ namespace Glitter {
return false;
}
#if defined(CRE_DEV)
void GltParticleManager::CheckSceneHasLocalEffect(Scene* sc) {
if (sc->type != Glitter::X)
return;
@@ -219,7 +208,6 @@ namespace Glitter {
sc->fade_frame = 30.0f;
}
#endif
void GltParticleManager::CtrlScenes() {
camera* c = rctx_ptr->camera;
@@ -233,7 +221,7 @@ namespace Glitter {
for (auto i = scenes.begin(); i != scenes.end();) {
Scene* scene = *i;
#if defined(CRE_DEV)
if (!scene || scene->type != Glitter::X && scene->HasEnded(true)) {
delete scene;
i = scenes.erase(i);
@@ -250,16 +238,15 @@ namespace Glitter {
}
else
i++;
#else
if (!scene || scene->HasEnded(true)) {
/*if (!scene || scene->HasEnded(true)) {
delete scene;
i = scenes.erase(i);
}
else {
scene->Ctrl(this, delta_frame);
i++;
}
#endif
}*/
}
}
@@ -277,13 +264,9 @@ namespace Glitter {
cam.rotation_y = c->rotation.y;
for (Scene*& i : scenes) {
if (!i)
if (!i || draw_selected && selected_scene && selected_scene != i)
continue;
#if defined(CRE_DEV)
if (draw_selected && selected_scene && selected_scene != i)
continue;
#endif
i->Disp(this, disp_type);
}
@@ -316,16 +299,14 @@ namespace Glitter {
}
if (free) {
#if defined(CRE_DEV)
if (!(scene->flags & SCENE_ENDED)) {
enum_or(scene->flags, SCENE_ENDED);
scene->fade_frame_left = scene->fade_frame;
}
i++;
#else
delete scene;
i = scenes.erase(i);
#endif
//delete scene;
//i = scenes.erase(i);
}
break;
}
@@ -500,9 +481,7 @@ namespace Glitter {
size_t id = 0;
for (Scene*& i : scenes) {
if (i && i->ResetEffect(this, effect_hash, &id)) {
#if defined(CRE_DEV)
CheckSceneHasLocalEffect(i);
#endif
SceneCounter counter = i->counter;
if (i->type == Glitter::X)
@@ -561,9 +540,7 @@ namespace Glitter {
}
id++;
}
#if defined(CRE_DEV)
CheckSceneHasLocalEffect(i);
#endif
SceneCounter counter = i->counter;
if (i->type == Glitter::X)
@@ -599,9 +576,7 @@ namespace Glitter {
}
id++;
}
#if defined(CRE_DEV)
CheckSceneHasLocalEffect(scene);
#endif
scenes.push_back(scene);
if (scene->type == Glitter::X)
@@ -682,9 +657,7 @@ namespace Glitter {
for (Effect*& j : eff_group->effects)
if (j)
i->InitEffect(this, j, id++, appear_now);
#if defined(CRE_DEV)
CheckSceneHasLocalEffect(i);
#endif
SceneCounter counter = i->counter;
if (i->type == Glitter::X)
@@ -704,9 +677,7 @@ namespace Glitter {
for (Effect*& i : eff_group->effects)
if (i)
scene->InitEffect(this, i, id++, appear_now);
#if defined(CRE_DEV)
CheckSceneHasLocalEffect(scene);
#endif
scenes.push_back(scene);
return counter;
}
@@ -718,9 +689,7 @@ namespace Glitter {
if (!(load_flags & 0x02) && scenes.size())
for (Scene*& i : scenes)
if (i && i->ResetEffect(this, hash)) {
#if defined(CRE_DEV)
CheckSceneHasLocalEffect(i);
#endif
size_t id = 0;
for (SceneEffect& j : i->effects)
@@ -771,9 +740,7 @@ namespace Glitter {
}
id++;
}
#if defined(CRE_DEV)
CheckSceneHasLocalEffect(j);
#endif
SceneCounter counter = j->counter;
if (j->type == Glitter::X)
@@ -800,9 +767,7 @@ namespace Glitter {
}
id++;
}
#if defined(CRE_DEV)
CheckSceneHasLocalEffect(scene);
#endif
scenes.push_back(scene);
if (scene->type == Glitter::X)
@@ -812,7 +777,6 @@ namespace Glitter {
return 0;
}
#if defined(CRE_DEV)
SceneCounter GltParticleManager::LoadSceneEffect(uint64_t hash,
const char* name, bool appear_now, uint8_t load_flags) {
SceneCounter counter = LoadSceneEffect(hash, appear_now, load_flags);
@@ -829,7 +793,6 @@ namespace Glitter {
}
return counter;
}
#endif
bool GltParticleManager::SceneHasNotEnded(SceneCounter counter) {
for (Scene*& i : scenes)
@@ -845,7 +808,6 @@ namespace Glitter {
enum_and(flags, ~PARTICLE_MANAGER_PAUSE);
}
#if defined(CRE_DEV)
void GltParticleManager::SetFrame(EffectGroup* effect_group,
Scene*& scene, float_t curr_frame, float_t prev_frame,
const Counter& counter, const Random& random, bool reset) {
@@ -893,7 +855,6 @@ namespace Glitter {
s->Ctrl(this, delta_frame);
}
}
#endif
void GltParticleManager::SetSceneEffectExtColor(SceneCounter scene_counter, bool set,
uint64_t effect_hash, float_t r, float_t g, float_t b, float_t a) {
@@ -907,7 +868,6 @@ namespace Glitter {
}
}
#if defined(CRE_DEV)
void GltParticleManager::SetSceneEffectReqFrame(SceneCounter scene_counter, float_t req_frame) {
for (Scene*& i : scenes)
if (i && i->counter.counter == scene_counter.counter) {
@@ -937,7 +897,6 @@ namespace Glitter {
break;
}
}
#endif
void GltParticleManager::UnloadEffectGroup(uint64_t hash) {
for (auto i = file_readers.begin(); i != file_readers.end();)
-53
View File
@@ -157,7 +157,6 @@ namespace Glitter {
disp_locus = 0;
disp_mesh = 0;
#if defined(CRE_DEV)
F2EffectInst* eff = dynamic_cast<F2EffectInst*>(GPM_VAL->selected_effect);
F2EmitterInst* emit = dynamic_cast<F2EmitterInst*>(GPM_VAL->selected_emitter);
F2ParticleInst* ptcl = dynamic_cast<F2ParticleInst*>(GPM_VAL->selected_particle);
@@ -190,18 +189,6 @@ namespace Glitter {
CalcDisp(GPM_VAL, rend_group);
}
}
#else
for (F2RenderGroup*& i : groups) {
if (!i)
continue;
F2RenderGroup* rend_group = i;
if (rend_group->CannotDisp() && !GPM_VAL->draw_all)
continue;
CalcDisp(GPM_VAL, rend_group);
}
#endif
}
void F2RenderScene::CalcDisp(GPM, F2RenderGroup* rend_group) {
@@ -894,7 +881,6 @@ namespace Glitter {
}
void F2RenderScene::Disp(GPM, DispType disp_type) {
#if defined(CRE_DEV)
F2EffectInst* eff = dynamic_cast<F2EffectInst*>(GPM_VAL->selected_effect);
F2EmitterInst* emit = dynamic_cast<F2EmitterInst*>(GPM_VAL->selected_emitter);
F2ParticleInst* ptcl = dynamic_cast<F2ParticleInst*>(GPM_VAL->selected_particle);
@@ -928,19 +914,6 @@ namespace Glitter {
Disp(GPM_VAL, rend_group);
}
}
#else
for (F2RenderGroup*& i : groups) {
if (!i)
continue;
F2RenderGroup* rend_group = i;
if ((rend_group)->disp_type != disp_type
|| (rend_group->CannotDisp() && !GPM_VAL->draw_all))
continue;
Disp(GPM_VAL, rend_group);
}
#endif
}
void F2RenderScene::Disp(GPM, F2RenderGroup* rend_group) {
@@ -1118,7 +1091,6 @@ namespace Glitter {
disp_locus = 0;
disp_mesh = 0;
#if defined(CRE_DEV)
XEffectInst* eff = dynamic_cast<XEffectInst*>(GPM_VAL->selected_effect);
XEmitterInst* emit = dynamic_cast<XEmitterInst*>(GPM_VAL->selected_emitter);
XParticleInst* ptcl = dynamic_cast<XParticleInst*>(GPM_VAL->selected_particle);
@@ -1151,18 +1123,6 @@ namespace Glitter {
CalcDisp(GPM_VAL, rend_group);
}
}
#else
for (XRenderGroup*& i : groups) {
if (!i)
continue;
XRenderGroup* rend_group = i;
if (rend_group->CannotDisp() && !GPM_VAL->draw_all)
continue;
CalcDisp(GPM_VAL, rend_group);
}
#endif
}
void XRenderScene::CalcDisp(GPM, XRenderGroup* rend_group) {
@@ -2039,7 +1999,6 @@ namespace Glitter {
}
void XRenderScene::Disp(GPM, DispType disp_type) {
#if defined(CRE_DEV)
XEffectInst* eff = dynamic_cast<XEffectInst*>(GPM_VAL->selected_effect);
XEmitterInst* emit = dynamic_cast<XEmitterInst*>(GPM_VAL->selected_emitter);
XParticleInst* ptcl = dynamic_cast<XParticleInst*>(GPM_VAL->selected_particle);
@@ -2072,18 +2031,6 @@ namespace Glitter {
Disp(GPM_VAL, rend_group);
}
}
#else
for (XRenderGroup* i : groups) {
if (!i)
continue;
XRenderGroup* rend_group = i;
if ((rend_group)->disp_type != disp_type || rend_group->CannotDisp() && !GPM_VAL->draw_all)
continue;
Disp(GPM_VAL, rend_group);
}
#endif
}
void XRenderScene::Disp(GPM, XRenderGroup* rend_group) {
+5 -20
View File
@@ -13,13 +13,12 @@ namespace Glitter {
emission = 1.0f;
type = eff_group->type;
effect_group = eff_group;
#if defined(CRE_DEV)
delta_frame_history = 0.0f;
skip = false;
fade_frame = -1.0f;
fade_frame_left = -1.0f;
frame_rate = 0;
#endif
if (eff_group) {
effects.reserve(eff_group->effects.size());
emission = eff_group->emission;
@@ -48,16 +47,14 @@ namespace Glitter {
void Scene::CalcDisp(GPM) {
for (SceneEffect& i : effects)
if (i.ptr && i.disp) {
#if defined(CRE_DEV)
if (GPM_VAL->draw_selected && GPM_VAL->selected_effect
&& GPM_VAL->selected_effect != i.ptr)
continue;
#endif
i.ptr->CalcDisp(GPM_VAL);
}
}
#if defined(CRE_DEV)
bool Scene::CanDisp(DispType disp_type, bool a3) {
for (SceneEffect& i : effects)
if (i.ptr && i.disp) {
@@ -67,7 +64,6 @@ namespace Glitter {
}
return false;
}
#endif
void Scene::Ctrl(GPM, float_t delta_frame) {
static int32_t call_count;
@@ -76,7 +72,6 @@ namespace Glitter {
continue;
EffectInst* eff = i.ptr;
#if defined(CRE_DEV)
bool v13 = false;
bool v14 = false;
if (v14)
@@ -108,9 +103,8 @@ namespace Glitter {
_delta_frame = req_frame;
req_frame = -1.0f;
}
#else
eff->Ctrl(GPM_VAL, type, delta_frame, emission);
#endif
//eff->Ctrl(GPM_VAL, type, delta_frame, emission);
}
}
@@ -120,11 +114,10 @@ namespace Glitter {
for (SceneEffect& i : effects)
if (i.ptr && i.disp) {
#if defined(CRE_DEV)
if (GPM_VAL->draw_selected && GPM_VAL->selected_effect
&& GPM_VAL->selected_effect != i.ptr)
continue;
#endif
i.ptr->Disp(GPM_VAL, disp_type);
}
}
@@ -290,10 +283,8 @@ namespace Glitter {
effect.disp = true;
effects.push_back(effect);
#if defined(CRE_DEV)
if (type == Glitter::X)
enum_and(flags, ~SCENE_ENDED);
#endif
}
bool Scene::ResetCheckInit(GPM, float_t* a2) {
@@ -307,7 +298,6 @@ namespace Glitter {
}
bool Scene::ResetEffect(GPM, uint64_t effect_hash, size_t* id) {
#if defined(CRE_DEV)
if (type == Glitter::X) {
if (effect_hash == hash_murmurhash_empty) {
for (SceneEffect& i : effects)
@@ -334,7 +324,6 @@ namespace Glitter {
}
return false;
}
#endif
if (type == Glitter::FT && effect_hash == hash_fnv1a64m_empty
|| type != Glitter::FT && effect_hash == hash_murmurhash_empty) {
@@ -348,9 +337,7 @@ namespace Glitter {
if (i.disp && i.ptr && i.ptr->data.name_hash == effect_hash) {
i.ptr->Reset(GPM_VAL, type, this);
#if defined(CRE_DEV)
enum_and(flags, ~SCENE_ENDED);
#endif
return true;
}
return false;
@@ -389,7 +376,6 @@ namespace Glitter {
return false;
}
#if defined(CRE_DEV)
void Scene::SetFrameRate(FrameRateControl* frame_rate) {
this->frame_rate = frame_rate;
}
@@ -407,7 +393,6 @@ namespace Glitter {
break;
}
}
#endif
SceneCounter::SceneCounter(uint32_t counter) {
this->index = 0;
+1 -27
View File
@@ -17,9 +17,7 @@ static char default_config[] = "#AFT\n\n\n";
static void data_free_inner(data_struct* ds);
static void data_load_inner(stream& s);
#if defined(CRE_DEV)
static void data_load_glitter_list(data_struct* ds, const char* path);
#endif
void data_struct_init() {
data_list = new data_struct[8];
@@ -144,7 +142,6 @@ void data_struct_load_db() {
}
}
#if defined(CRE_DEV)
if (data_list[DATA_F2BE].ready) {
data_struct* ds = &data_list[DATA_F2BE];
}
@@ -199,7 +196,6 @@ void data_struct_load_db() {
"bone_data.bon", bone_database::load_file);
}
}
#endif
}
void data_struct_free() {
@@ -207,7 +203,7 @@ void data_struct_free() {
data_struct* ds = &data_list[DATA_AFT];
data_ft* d = &ds->data_ft;
}
#if defined(CRE_DEV)
if (data_list[DATA_F2BE].ready) {
data_struct* ds = &data_list[DATA_F2BE];
data_f2* d = &ds->data_f2;
@@ -242,7 +238,6 @@ void data_struct_free() {
data_struct* ds = &data_list[DATA_XHD];
data_x* d = &ds->data_x;
}
#endif
for (int32_t i = DATA_AFT; i < DATA_MAX; i++)
data_free_inner(&data_list[i]);
@@ -839,7 +834,6 @@ data_struct_path::~data_struct_path() {
}
#if defined(CRE_DEV)
data_f2::data_f2() {
}
@@ -847,7 +841,6 @@ data_f2::data_f2() {
data_f2::~data_f2() {
}
#endif
data_ft::data_ft() {
@@ -857,7 +850,6 @@ data_ft::~data_ft() {
}
#if defined(CRE_DEV)
data_x::data_x() {
}
@@ -865,13 +857,11 @@ data_x::data_x() {
data_x::~data_x() {
}
#endif
static void data_free_inner(data_struct* ds) {
ds->data_paths.clear();
ds->data_paths.shrink_to_fit();
#if defined(CRE_DEV)
ds->glitter_list_names.clear();
ds->glitter_list_names.shrink_to_fit();
switch (ds->type) {
@@ -890,7 +880,6 @@ static void data_free_inner(data_struct* ds) {
ds->glitter_list_fnv1a64m.shrink_to_fit();
break;
}
#endif
ds->ready = false;
}
@@ -918,7 +907,6 @@ static void data_load_inner(stream& s) {
ds = &data_list[DATA_AFT];
add_data = "mdata";
}
#if defined(CRE_DEV)
else if (!str_utils_compare(s, "#F2BE")) {
ds = &data_list[DATA_F2BE];
add_data = "dlc";
@@ -950,13 +938,11 @@ static void data_load_inner(stream& s) {
main_rom = "cnt_rom";
add_data_rom = "";
}
#endif
else
continue;
data_free_inner(ds);
#if defined(CRE_DEV)
if (i + 2 >= count)
continue;
@@ -968,16 +954,6 @@ static void data_load_inner(stream& s) {
continue;
data_load_glitter_list(ds, glitter_list);
#else
char* data_paths;
if (i + 1 < count)
data_paths = lines[i + 1];
else if (i < count)
data_paths = (char*)".";
else
continue;
i++;
#endif
char* t = data_paths;
size_t count = 1;
@@ -1081,7 +1057,6 @@ static void data_load_inner(stream& s) {
free_def(lines);
}
#if defined(CRE_DEV)
static void data_load_glitter_list(data_struct* ds, const char* path) {
file_stream s;
s.open(path, "rb");
@@ -1138,4 +1113,3 @@ static void data_load_glitter_list(data_struct* ds, const char* path) {
}
free_def(data);
}
#endif
-12
View File
@@ -20,7 +20,6 @@
enum data_type {
DATA_AFT = 0,
#if defined(CRE_DEV)
DATA_F2LE,
DATA_F2BE,
DATA_FT,
@@ -28,7 +27,6 @@ enum data_type {
DATA_VRFL,
DATA_X,
DATA_XHD,
#endif
DATA_MAX,
};
@@ -56,14 +54,12 @@ struct data_struct_path {
~data_struct_path();
};
#if defined(CRE_DEV)
struct data_f2 {
bone_database bone_data;
data_f2();
~data_f2();
};
#endif
struct data_ft {
aet_database aet_db;
@@ -79,31 +75,23 @@ struct data_ft {
~data_ft();
};
#if defined(CRE_DEV)
struct data_x {
bone_database bone_data;
data_x();
~data_x();
};
#endif
struct data_struct {
data_type type;
bool ready;
std::vector<data_struct_path> data_paths;
#if defined(CRE_DEV)
std::vector<std::string> glitter_list_names;
prj::vector_pair<uint64_t, const char*> glitter_list_fnv1a64m;
prj::vector_pair<uint64_t, const char*> glitter_list_murmurhash;
#endif
#if defined(CRE_DEV)
data_f2 data_f2;
#endif
data_ft data_ft;
#if defined(CRE_DEV)
data_x data_x;
#endif
data_struct();
~data_struct();
-4
View File
@@ -883,11 +883,9 @@ namespace rndr {
gl_state_disable_blend();
}
#if defined(CRE_DEV)
gl_state_set_color_mask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE); // X
Glitter::glt_particle_manager->DispScenes(Glitter::DISP_TYPE_2);
gl_state_set_color_mask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
#endif
gl_state_set_depth_mask(GL_TRUE);
draw_pass_3d_translucent(rctx,
@@ -913,7 +911,6 @@ namespace rndr {
mdl::OBJ_TYPE_TRANSPARENT_ALPHA_ORDER_1,
mdl::OBJ_TYPE_TRANSLUCENT_ALPHA_ORDER_1);
#if defined(CRE_DEV)
if (Glitter::glt_particle_manager->CheckHasLocalEffect()) { // X
camera* cam = rctx->camera;
float_t fov = cam->get_fov();
@@ -942,7 +939,6 @@ namespace rndr {
cam->set_fov(fov);
draw_pass_set_camera();
}
#endif
gl_state_active_bind_texture_2d(14, 0);
gl_state_active_bind_texture_2d(15, 0);
-6
View File
@@ -832,7 +832,6 @@ static GLuint shader_compile_shader(GLenum type, const char* data, const char* f
}
printf_debug("%s shader compile error:\nfile: %s\n%s\n", type_str, file, info_log);
#if defined(CRE_DEV)
wchar_t temp_buf[MAX_PATH];
if (SUCCEEDED(SHGetFolderPathW(0, CSIDL_LOCAL_APPDATA, 0, 0, temp_buf))) {
wcscat_s(temp_buf, sizeof(temp_buf) / sizeof(wchar_t), L"\\ReDIVA");
@@ -856,7 +855,6 @@ static GLuint shader_compile_shader(GLenum type, const char* data, const char* f
s.write_utf8_string(info_log);
s.write_utf8_string("*/\n");
}
#endif
free_def(info_log);
glDeleteShader(shader);
@@ -890,7 +888,6 @@ static GLuint shader_compile(const char* vert, const char* frag, const char* vp,
glGetProgramInfoLog(program, length, 0, info_log);
printf_debug("Program Shader Permut linking error:\nvp: %s; fp: %s\n%s\n", vp, fp, info_log);
#if defined(CRE_DEV)
wchar_t temp_buf[MAX_PATH];
if (SUCCEEDED(SHGetFolderPathW(0, CSIDL_LOCAL_APPDATA, 0, 0, temp_buf))) {
wcscat_s(temp_buf, sizeof(temp_buf) / sizeof(wchar_t), L"\\ReDIVA");
@@ -926,7 +923,6 @@ static GLuint shader_compile(const char* vert, const char* frag, const char* vp,
s.write_utf8_string("*/\n");
s.close();
}
#endif
free_def(info_log);
glDeleteProgram(program);
@@ -966,7 +962,6 @@ static GLuint shader_compile_binary(const char* vert, const char* frag, const ch
glGetProgramInfoLog(program, length, 0, info_log);
printf_debug("Program Shader Permut linking error:\nvp: %s; fp: %s\n%s\n", vp, fp, info_log);
#if defined(CRE_DEV)
wchar_t temp_buf[MAX_PATH];
if (SUCCEEDED(SHGetFolderPathW(0, CSIDL_LOCAL_APPDATA, 0, 0, temp_buf))) {
wcscat_s(temp_buf, sizeof(temp_buf) / sizeof(wchar_t), L"\\ReDIVA");
@@ -1002,7 +997,6 @@ static GLuint shader_compile_binary(const char* vert, const char* frag, const ch
s.write_utf8_string("*/\n");
s.close();
}
#endif
free_def(info_log);
glDeleteProgram(program);
-2
View File
@@ -3,7 +3,6 @@
GitHub/GitLab: korenkonder
*/
#if defined(CRE_DEV)
#include "shader_dev.hpp"
#include "../KKdLib/str_utils.hpp"
#include "gl_state.hpp"
@@ -67,4 +66,3 @@ const size_t shader_dev_table_size =
sizeof(shader_dev_table) / sizeof(shader_table);
shader_set_data shaders_dev;
#endif
-2
View File
@@ -5,7 +5,6 @@
#pragma once
#if defined(CRE_DEV)
#include "../KKdLib/default.hpp"
#include "shader.hpp"
@@ -20,4 +19,3 @@ extern const shader_table shader_dev_table[];
extern const size_t shader_dev_table_size;
extern shader_set_data shaders_dev;
#endif
-22
View File
@@ -59,13 +59,8 @@ void data_view_glitter_imgui(class_data* data) {
tree_node_flags |= ImGuiTreeNodeFlags_DefaultOpen;
if (ImGui::TreeNodeEx("Effect Groups", tree_node_flags)) {
#if defined(CRE_DEV)
for (auto& i : Glitter::glt_particle_manager->effect_groups)
ImGui::Text("0x%08X: %s", i.first, i.second->name.c_str());
#else
for (auto& i : Glitter::glt_particle_manager->effect_groups)
ImGui::Text("0x%08X", i.first);
#endif
ImGui::TreePop();
}
@@ -82,13 +77,8 @@ void data_view_glitter_imgui(class_data* data) {
tree_node_flags |= ImGuiTreeNodeFlags_DefaultOpen;
ImGui::PushID(sc_index);
#if defined(CRE_DEV)
if (!ImGui::TreeNodeEx("##Scene", tree_node_flags,
"Scene %d. 0x%08X: %s", sc_index, i->hash, i->name.c_str())) {
#else
if (!ImGui::TreeNodeEx("##Scene", tree_node_flags,
"Scene %d. 0x%08X", sc_index, i->hash)) {
#endif
ImGui::PopID();
sc_index++;
continue;
@@ -106,15 +96,9 @@ void data_view_glitter_imgui(class_data* data) {
ImGui::PushStyleColor(ImGuiCol_Text,
eff_f2->flags & Glitter::EFFECT_INST_FREE ? 0xFF888888 : 0xFFFFFFFF);
ImGui::PushID(eff_index);
#if defined(CRE_DEV)
if (!ImGui::TreeNodeEx("##Effect", tree_node_flags,
"Effect %d. 0x%08X: %s; Frame: %g", eff_index,
eff_f2->data.name_hash, eff_f2->name.c_str(), eff_f2->frame0)) {
#else
if (!ImGui::TreeNodeEx("##Effect", tree_node_flags,
"Effect %d. 0x%08X; Frame: %g", eff_index,
eff_f2->data.name_hash, eff_f2->frame0)) {
#endif
ImGui::PopStyleColor();
ImGui::PopID();
eff_index++;
@@ -169,15 +153,9 @@ void data_view_glitter_imgui(class_data* data) {
ImGui::PushStyleColor(ImGuiCol_Text,
eff_x->flags & Glitter::EFFECT_INST_FREE ? 0xFF888888 : 0xFFFFFFFF);
ImGui::PushID(eff_index);
#if defined(CRE_DEV)
if (!ImGui::TreeNodeEx("##Effect", tree_node_flags,
"Effect %d. 0x%08X: %s; Frame: %g", eff_index,
eff_x->data.name_hash, eff_x->name.c_str(), eff_x->frame0)) {
#else
if (!ImGui::TreeNodeEx("##Effect", tree_node_flags,
"Effect %d. 0x%08X; Frame: %g", eff_index,
eff_x->data.name_hash, eff_x->frame0)) {
#endif
ImGui::PopStyleColor();
ImGui::PopID();
eff_index++;
@@ -39,11 +39,7 @@ void graphics_render_settings_imgui(class_data* data) {
ImFont* font = ImGui::GetFont();
float_t w = 280.0f;
#if defined(ReDIVA_DEV)
float_t h = 140.0f;
#else
float_t h = 86.0f;
#endif
ImGui::SetNextWindowPos({ 0, 0 }, ImGuiCond_Appearing);
ImGui::SetNextWindowSize({ w, h }, ImGuiCond_Appearing);
@@ -72,7 +68,6 @@ void graphics_render_settings_imgui(class_data* data) {
RENDER_SCALE_MAX - 1, buf, ImGuiSliderFlags_NoInput))
render_set_scale_index(scale_index);
#if defined(ReDIVA_DEV)
ImGui::Separator();
double_t render_freq = render_timer->get_freq();
@@ -91,7 +86,6 @@ void graphics_render_settings_imgui(class_data* data) {
ImGui::Text("Render: Target / Current");
ImGui::Text(" freq: %s / %s", render_freq_str, render_freq_hist_str);
ImGui::Text(" ms: %s / %s", render_ms_str, render_ms_hist_str);
#endif
ImGui::Separator();
-2
View File
@@ -3,7 +3,6 @@
GitHub/GitLab: korenkonder
*/
#if defined(ReDIVA_DEV)
#define BAKE_DOF (0)
#define BAKE_PNG (0)
#define BAKE_VIDEO (0)
@@ -29,4 +28,3 @@
#undef BAKE_PNG
#elif BAKE_PNG
#endif
#endif
-2
View File
@@ -3,7 +3,6 @@
GitHub/GitLab: korenkonder
*/
#if defined(ReDIVA_DEV)
#include "data_edit.hpp"
#include "../CRE/rob/motion.hpp"
#include "../CRE/rob/rob.hpp"
@@ -545,4 +544,3 @@ void DataEdit::reset() {
frame_count = 0;
}
#endif
#endif
-2
View File
@@ -3,7 +3,6 @@
GitHub/GitLab: korenkonder
*/
#if defined(ReDIVA_DEV)
#pragma once
#include "config.hpp"
@@ -56,4 +55,3 @@ public:
extern DataEdit data_edit;
#endif
#endif
-26
View File
@@ -72,7 +72,6 @@ struct GameState {
static bool Dest();
};
#if defined(ReDIVA_DEV)
struct GlitterEditor { // Added
static bool Init();
static bool Ctrl();
@@ -85,7 +84,6 @@ struct GameState {
static bool Ctrl();
static bool Dest();
};
#endif
#endif
GameStateEnum game_state;
@@ -352,7 +350,6 @@ struct SubGameState {
static bool Dest();
};
#if defined(ReDIVA_DEV)
struct GlitterEditor { // Added
static bool Init();
static bool Ctrl();
@@ -366,7 +363,6 @@ struct SubGameState {
static bool Dest();
};
#endif
#endif
};
struct GameStateData {
@@ -496,7 +492,6 @@ GameStateData game_state_data_array[] = {
SUB_GAME_STATE_MAX,
},
#if defined(ReDIVA_DEV)
{ // Added
GAME_STATE_GLITTER_EDITOR,
GameState::GlitterEditor::Init,
@@ -524,7 +519,6 @@ GameStateData game_state_data_array[] = {
SUB_GAME_STATE_MAX,
},
#endif
#endif
};
SubGameStateData sub_game_state_data_array[] = {
@@ -816,7 +810,6 @@ SubGameStateData sub_game_state_data_array[] = {
SubGameState::DataTestAppError::Dest,
},
#if defined(ReDIVA_DEV)
{ // Added
SUB_GAME_STATE_GLITTER_EDITOR,
false,
@@ -834,7 +827,6 @@ SubGameStateData sub_game_state_data_array[] = {
SubGameState::DataEdit::Dest,
},
#endif
#endif
};
const char* game_state_names[] = {
@@ -844,11 +836,9 @@ const char* game_state_names[] = {
"DATA_TEST",
"TEST_MODE",
"APP_ERROR",
#if defined(ReDIVA_DEV)
"GLITTER_EDITOR",
#if DATA_EDIT
"DATA_EDIT",
#endif
#endif
"MAX",
};
@@ -895,11 +885,9 @@ const char* sub_game_state_names[] = {
"DATA_TEST_COLLECTION_CARD",
"TEST_MODE_MAIN",
"APP_ERROR",
#if defined(ReDIVA_DEV)
"GLITTER_EDITOR",
#if DATA_EDIT
"DATA_EDIT",
#endif
#endif
"MAX",
};
@@ -1033,7 +1021,6 @@ bool GameState::AppError::Dest() {
return true;
}
#if defined(ReDIVA_DEV)
bool GameState::GlitterEditor::Init() { // Added
return true;
}
@@ -1059,7 +1046,6 @@ bool GameState::DataEdit::Dest() { // Added
return true;
}
#endif
#endif
bool SubGameState::DataInitialize::Init() {
task_data_init_add_task();
@@ -1228,7 +1214,6 @@ bool SubGameState::PhotoModeDemo::Dest() {
}
bool SubGameState::Selector::Init() {
#if defined(CRE_DEV)
#if PV_DEBUG
if (!pv_x) {
pv_game_selector_init();
@@ -1248,7 +1233,6 @@ bool SubGameState::Selector::Init() {
#else
x_pv_game_selector_init();
app::TaskWork::add_task(x_pv_game_selector_get(), "X PVGAME SELECTOR", 0);
#endif
#endif
return true;
}
@@ -1297,7 +1281,6 @@ bool SubGameState::Selector::Ctrl() {
}
#endif
#if defined(CRE_DEV)
#if BAKE_X_PACK
const int32_t pv_ids[] = {
824,
@@ -1355,13 +1338,11 @@ bool SubGameState::Selector::Ctrl() {
game_state_set_game_state_next(GAME_STATE_ADVERTISE);
return true;
}
#endif
#endif
return false;
}
bool SubGameState::Selector::Dest() {
#if defined(CRE_DEV)
#if PV_DEBUG
if (!pv_x) {
PVGameSelector* sel = pv_game_selector_get();
@@ -1397,7 +1378,6 @@ bool SubGameState::Selector::Dest() {
}
x_pv_game_selector_free();
#endif
#endif
return true;
}
@@ -1409,7 +1389,6 @@ bool SubGameState::GameMain::Init() {
}
bool SubGameState::GameMain::Ctrl() {
#if defined(CRE_DEV)
#if PV_DEBUG
if (!pv_x) {
if (!task_pv_game_check_task_ready())
@@ -1419,12 +1398,10 @@ bool SubGameState::GameMain::Ctrl() {
#endif
if (!app::TaskWork::check_task_ready(x_pv_game_get()))
return true;
#endif
return false;
}
bool SubGameState::GameMain::Dest() {
#if defined(CRE_DEV)
bool res;
#if PV_DEBUG
if (!pv_x) {
@@ -1442,7 +1419,6 @@ bool SubGameState::GameMain::Dest() {
XPVGameBaker* baker = x_pv_game_baker_get();
if (baker)
game_state_set_sub_game_state_next(SUB_GAME_STATE_SELECTOR);
#endif
#endif
rctx_ptr->render_manager->set_multisample(true);
@@ -1809,7 +1785,6 @@ bool SubGameState::DataTestModeMain::Dest() {
return true;
}
#if defined(ReDIVA_DEV)
bool SubGameState::GlitterEditor::Init() { // Added
rctx_ptr->render_manager->set_multisample(false);
@@ -1846,7 +1821,6 @@ bool SubGameState::DataEdit::Dest() { // Added
return true;
}
#endif
#endif
bool SubGameState::DataTestAppError::Init() {
return true;
-4
View File
@@ -15,11 +15,9 @@ enum GameStateEnum {
GAME_STATE_DATA_TEST,
GAME_STATE_TEST_MODE,
GAME_STATE_APP_ERROR,
#if defined(ReDIVA_DEV)
GAME_STATE_GLITTER_EDITOR, // Added
#if DATA_EDIT
GAME_STATE_DATA_EDIT, // Added
#endif
#endif
GAME_STATE_MAX,
};
@@ -66,11 +64,9 @@ enum SubGameStateEnum {
SUB_GAME_STATE_DATA_TEST_COLLECTION_CARD,
SUB_GAME_STATE_TEST_MODE_MAIN,
SUB_GAME_STATE_APP_ERROR,
#if defined(ReDIVA_DEV)
SUB_GAME_STATE_GLITTER_EDITOR, // Added
#if DATA_EDIT
SUB_GAME_STATE_DATA_EDIT, // Added
#endif
#endif
SUB_GAME_STATE_MAX,
};
-4
View File
@@ -5,7 +5,6 @@
Curve Editor code based on Animation Timeline code from https://github.com/crash5band/Glitter
*/
#if defined(ReDIVA_DEV)
#include "glitter_editor.hpp"
#include "../KKdLib/io/file_stream.hpp"
#include "../KKdLib/io/path.hpp"
@@ -5304,9 +5303,7 @@ static void glitter_editor_curve_editor_curve_set(GlitterEditor* glt_edt,
curve->flags = (Glitter::CurveFlag)0;
curve->random_range = 0.0f;
curve->keys.clear();
#if defined(ReDIVA_DEV)
curve->keys_rev.clear();
#endif
if (eg && eg->type == Glitter::X) {
curve->version = 2;
curve->keys_version = 3;
@@ -7670,4 +7667,3 @@ static bool glitter_editor_hash_input(GlitterEditor* glt_edt, const char* label,
*hash = h;
return true;
}
#endif
-2
View File
@@ -5,7 +5,6 @@
#pragma once
#if defined(ReDIVA_DEV)
#include "../KKdLib/default.hpp"
#include "../CRE/Glitter/glitter.hpp"
#include "../CRE/data.hpp"
@@ -139,4 +138,3 @@ public:
};
extern GlitterEditor glitter_editor;
#endif
+4 -8
View File
@@ -269,8 +269,7 @@ static void a3da_to_dft_dsc(int32_t pv_id) {
dft_data.dof.write(buf);
}
/*#if defined(ReDIVA_DEV)
struct program_spv {
/*struct program_spv {
size_t size;
size_t spv;
};
@@ -720,8 +719,7 @@ void compile_all_shaders(bool debug) {
farc of;
compile_shaders(&f, &of, shader_ft_table, shader_ft_table_size, debug);
of.write("rom\\ft_shaders_spirv", FARC_FArC, FARC_NONE, false);
}
#endif*/
}*/
/*
void decrypt_x_save_data() {
@@ -1217,12 +1215,10 @@ void process_edit_dsc() {
}*/
int32_t wmain(int32_t argc, wchar_t** argv) {
/*#if defined(ReDIVA_DEV)
if (argc >= 2 && !wcscmp(argv[1], L"--compile-spir-v")) {
/*if (argc >= 2 && !wcscmp(argv[1], L"--compile-spir-v")) {
compile_all_shaders(argc >= 3 && !wcscmp(argv[2], L"-d"));
return 0;
}
#endif*/
}*/
/*process_edit_dsc();
return 0;*/
+1 -22
View File
@@ -145,18 +145,10 @@ const double_t render_scale_table[] = {
};
#if defined(DEBUG)
#if defined(ReDIVA_DEV)
static const char* application_name = "ReDIVADev Debug";
#else
static const char* application_name = "ReDIVA Debug";
#endif
#else
#if defined(ReDIVA_DEV)
static const char* application_name = "ReDIVADev";
#else
static const char* application_name = "ReDIVA";
#endif
#endif
static int32_t old_scale_index;
static int32_t scale_index;
@@ -209,9 +201,7 @@ static void render_shaders_load();
static void render_shaders_free();
static bool render_load_ft_shaders(void* data, const char* path, const char* file, uint32_t hash);
#if ReDIVA_DEV
static bool render_load_dev_shaders(void* data, const char* path, const char* file, uint32_t hash);
#endif
static void render_drop_glfw(GLFWwindow* window, int32_t count, char** paths);
static void render_resize_fb_glfw(GLFWwindow* window, int32_t w, int32_t h);
@@ -645,7 +635,6 @@ static render_context* render_context_load() {
Glitter::glt_particle_manager->bone_data = aft_bone_data;
#if defined(CRE_DEV)
if (false) {
char buf[0x200];
std::vector<uint32_t> obj_set_ids;
@@ -929,7 +918,6 @@ static render_context* render_context_load() {
obj_set_id_name.clear();
}
}
#endif
render_resize_fb(rctx, false);
@@ -1136,13 +1124,11 @@ static void render_context_ctrl(render_context* rctx) {
game_state_set_game_state_next(GAME_STATE_TEST_MODE);
else if (Input::IsKeyTapped(GLFW_KEY_F8))
game_state_set_game_state_next(GAME_STATE_APP_ERROR);
#if ReDIVA_DEV
else if (Input::IsKeyTapped(GLFW_KEY_F9)) // Added
game_state_set_game_state_next(GAME_STATE_GLITTER_EDITOR); // Added
#if DATA_EDIT
else if (Input::IsKeyTapped(GLFW_KEY_F10)) // Added
game_state_set_game_state_next(GAME_STATE_DATA_EDIT); // Added
#endif
#endif
classes_process_ctrl(classes, classes_count);
@@ -1360,16 +1346,13 @@ struct shaders_load_struct {
static void render_shaders_load() {
shaders_load_struct load_ft = { &shaders_ft, "ft" };
data_list[DATA_AFT].load_file(&load_ft, "rom/", "ft_shaders.farc", render_load_ft_shaders);
#if ReDIVA_DEV
shaders_load_struct load_dev = { &shaders_dev, "dev" };
data_list[DATA_AFT].load_file(&load_dev, "rom/", "dev_shaders.farc", render_load_dev_shaders);
#endif
}
static void render_shaders_free() {
#if ReDIVA_DEV
shaders_dev.unload();
#endif
shaders_ft.unload();
}
@@ -1387,7 +1370,6 @@ static bool render_load_ft_shaders(void* data, const char* path, const char* fil
return true;
}
#if ReDIVA_DEV
static bool render_load_dev_shaders(void* data, const char* path, const char* file, uint32_t hash) {
shaders_load_struct* load = (shaders_load_struct*)data;
std::string s;
@@ -1400,18 +1382,15 @@ static bool render_load_dev_shaders(void* data, const char* path, const char* fi
0, 0, 0, 0);
return true;
}
#endif
static void render_drop_glfw(GLFWwindow* window, int32_t count, char** paths) {
if (!count || !paths)
return;
#if ReDIVA_DEV
if (app::TaskWork::has_task(&glitter_editor)) {
glitter_editor.file.assign(paths[0]);
glitter_editor.load_popup = true;
}
#endif
glfwFocusWindow(window);
}
-2
View File
@@ -3,7 +3,6 @@
GitHub/GitLab: korenkonder
*/
#if defined(ReDIVA_DEV)
#include "x_pv_game.hpp"
#include "../CRE/light_param/light.hpp"
#include "../CRE/light_param.hpp"
@@ -11122,4 +11121,3 @@ static uint32_t replace_texture_id(uint32_t id,
return dst_tex_db->get_texture_id(name.c_str());
}
#endif
#endif
-2
View File
@@ -3,7 +3,6 @@
GitHub/GitLab: korenkonder
*/
#if defined(ReDIVA_DEV)
#pragma once
#include <list>
@@ -976,4 +975,3 @@ extern bool x_pv_game_selector_init();
extern XPVGameSelector* x_pv_game_selector_get();
extern bool x_pv_game_selector_free();
#endif
#endif