mirror of
https://github.com/korenkonder/ReDIVA.git
synced 2026-10-06 21:58:09 +03:00
Various stuff
This commit is contained in:
+52
-33
@@ -454,9 +454,9 @@ public:
|
||||
|
||||
class AetLyo : public AetObj {
|
||||
public:
|
||||
std::map<std::string, aet_layer_object_data>* data;
|
||||
AetComp* comp;
|
||||
|
||||
AetLyo(std::map<std::string, aet_layer_object_data>* data);
|
||||
AetLyo(AetComp* comp);
|
||||
virtual ~AetLyo() override;
|
||||
|
||||
virtual void CtrlLayer(const aet_layer* layer, float_t frame) override;
|
||||
@@ -482,7 +482,7 @@ public:
|
||||
virtual void Unload();
|
||||
virtual bool Load();
|
||||
|
||||
const aet_marker* GetLayerMarker(const aet_layer* layer, const char* name);
|
||||
const aet_marker* GetLayerMarker(const aet_layer* layer, const char* marker_name);
|
||||
void GetLayerMarkerNames(std::vector<std::string>& vec, const aet_layer* layer);
|
||||
const aet_scene* GetSceneByInfo(aet_info info);
|
||||
void GetSceneCompLayerNames(std::vector<std::string>& vec, const aet_scene* scene);
|
||||
@@ -529,7 +529,7 @@ public:
|
||||
const char* GetSetSceneName(aet_info info);
|
||||
float_t GetSetSceneStartTime(aet_info info);
|
||||
uint32_t GetSetScenesCount(int32_t index);
|
||||
void InitAetLayout(std::map<std::string, aet_layer_object_data>* data, AetArgs& args);
|
||||
void InitAetLayout(AetComp* comp, AetArgs& args);
|
||||
bool InitAetObj(AetObj& obj, AetArgs& args);
|
||||
uint32_t InitAetObject(AetArgs& args);
|
||||
bool LoadFile(int32_t index);
|
||||
@@ -591,7 +591,26 @@ AetArgs::~AetArgs() {
|
||||
|
||||
}
|
||||
|
||||
aet_layer_object_data::aet_layer_object_data() : width(), height() {
|
||||
AetComp::AetComp() {
|
||||
|
||||
}
|
||||
|
||||
AetComp::~AetComp() {
|
||||
|
||||
}
|
||||
|
||||
void AetComp::Add(const char* name, aet_layout_data& data) {
|
||||
this->data.insert({ name, data });
|
||||
}
|
||||
|
||||
aet_layout_data* AetComp::Find(const char* name) {
|
||||
auto elem = data.find(name);
|
||||
if (elem != data.end())
|
||||
return &elem->second;
|
||||
return 0;
|
||||
}
|
||||
|
||||
aet_layout_data::aet_layout_data() : width(), height() {
|
||||
mat = mat4_identity;
|
||||
opacity = 1.0f;
|
||||
color = { 0xFF, 0xFF, 0xFF, 0xFF };
|
||||
@@ -692,13 +711,13 @@ bool aet_manager_get_set_ready(uint32_t set_id, const aet_database* aet_db) {
|
||||
return aet_manager->GetSetReady(aet_db->get_aet_set_by_id(set_id)->index);
|
||||
};
|
||||
|
||||
void aet_manager_init_aet_layout(std::map<std::string, aet_layer_object_data>* data,
|
||||
void aet_manager_init_aet_layout(AetComp* comp,
|
||||
AetArgs args, const aet_database* aet_db) {
|
||||
args.id.info = aet_db->get_aet_by_id(args.id.id)->info;
|
||||
aet_manager->InitAetLayout(data, args);
|
||||
aet_manager->InitAetLayout(comp, args);
|
||||
}
|
||||
|
||||
void aet_manager_init_aet_layout(std::map<std::string, aet_layer_object_data>* data,
|
||||
void aet_manager_init_aet_layout(AetComp* comp,
|
||||
uint32_t aet_id, const char* layer_name, AetFlags flags, resolution_mode mode,
|
||||
const char* start_marker, float_t start_time, const aet_database* aet_db) {
|
||||
AetArgs args;
|
||||
@@ -708,7 +727,7 @@ void aet_manager_init_aet_layout(std::map<std::string, aet_layer_object_data>* d
|
||||
args.mode = mode;
|
||||
args.start_marker = start_marker;
|
||||
args.start_time = start_time;
|
||||
aet_manager->InitAetLayout(data, args);
|
||||
aet_manager->InitAetLayout(comp, args);
|
||||
}
|
||||
|
||||
uint32_t aet_manager_init_aet_object(AetArgs args, const aet_database* aet_db) {
|
||||
@@ -796,8 +815,8 @@ void aet_manager_set_obj_end_time(uint32_t id, float_t value) {
|
||||
aet_manager->SetObjEndTime(id, value);
|
||||
}
|
||||
|
||||
void aet_manager_set_obj_frame(uint32_t id, float_t frame) {
|
||||
aet_manager->SetObjFrame(id, frame);
|
||||
void aet_manager_set_obj_frame(uint32_t id, float_t value) {
|
||||
aet_manager->SetObjFrame(id, value);
|
||||
}
|
||||
|
||||
void aet_manager_set_obj_play(uint32_t id, bool value) {
|
||||
@@ -808,8 +827,8 @@ void aet_manager_set_obj_position(uint32_t id, const vec3& value) {
|
||||
aet_manager->SetObjPosition(id, value);
|
||||
}
|
||||
|
||||
void aet_manager_set_obj_prio(uint32_t id, spr::SprPrio prio) {
|
||||
aet_manager->SetObjPrio(id, prio);
|
||||
void aet_manager_set_obj_prio(uint32_t id, spr::SprPrio value) {
|
||||
aet_manager->SetObjPrio(id, value);
|
||||
}
|
||||
|
||||
void aet_manager_set_obj_rotation(uint32_t id, const vec3& value) {
|
||||
@@ -1496,8 +1515,8 @@ void AetObj::CalcMat(mat4& mat, const aet_layer* layer, float_t frame) {
|
||||
mat4_translate_mult(&mat, -anchor_x, -anchor_y, -anchor_z, &mat);
|
||||
}
|
||||
|
||||
AetLyo::AetLyo(std::map<std::string, aet_layer_object_data>* data) {
|
||||
this->data = data;
|
||||
AetLyo::AetLyo(AetComp* comp) {
|
||||
this->comp = comp;
|
||||
}
|
||||
|
||||
AetLyo::~AetLyo() {
|
||||
@@ -1524,25 +1543,25 @@ void AetLyo::DispLayer(const mat4& mat, const aet_layer* layer,
|
||||
frame = (frame - layer->start_time) * layer->time_scale + layer->offset_time;
|
||||
|
||||
if (layer->item_type == AET_ITEM_TYPE_VIDEO) {
|
||||
aet_layer_object_data obj_data;
|
||||
aet_layout_data data;
|
||||
const aet_layer_video* layer_video = layer->video;
|
||||
obj_data.anchor.x = layer_video->anchor_x.interpolate(frame);
|
||||
obj_data.anchor.y = layer_video->anchor_y.interpolate(frame);
|
||||
data.anchor.x = layer_video->anchor_x.interpolate(frame);
|
||||
data.anchor.y = layer_video->anchor_y.interpolate(frame);
|
||||
const aet_layer_video_3d* layer_video_3d = layer_video->_3d;
|
||||
if (layer_video_3d)
|
||||
obj_data.anchor.z = layer_video_3d->anchor_z.interpolate(frame);
|
||||
obj_data.mat = m;
|
||||
mat4_mult_vec3_trans(&m, &obj_data.anchor, &obj_data.position);
|
||||
data.anchor.z = layer_video_3d->anchor_z.interpolate(frame);
|
||||
data.mat = m;
|
||||
mat4_mult_vec3_trans(&m, &data.anchor, &data.position);
|
||||
|
||||
const aet_video* video = layer->item.video;
|
||||
obj_data.width = (float_t)video->width;
|
||||
obj_data.height = (float_t)video->height;
|
||||
obj_data.color.x = video->color[0];
|
||||
obj_data.color.y = video->color[1];
|
||||
obj_data.color.z = video->color[2];;
|
||||
obj_data.opacity = opacity;
|
||||
obj_data.mode = dst_mode;
|
||||
data->insert({ layer->name, obj_data });
|
||||
data.width = (float_t)video->width;
|
||||
data.height = (float_t)video->height;
|
||||
data.color.x = video->color[0];
|
||||
data.color.y = video->color[1];
|
||||
data.color.z = video->color[2];;
|
||||
data.opacity = opacity;
|
||||
data.mode = dst_mode;
|
||||
comp->Add(layer->name, data);
|
||||
}
|
||||
else if (layer->item_type == AET_ITEM_TYPE_COMPOSITION)
|
||||
DispComp(m, layer->item.comp, frame, opacity, spr_db);
|
||||
@@ -1626,13 +1645,13 @@ void AetSet::Unload() {
|
||||
load_count = 0;
|
||||
}
|
||||
|
||||
const aet_marker* AetSet::GetLayerMarker(const aet_layer* layer, const char* name) {
|
||||
const aet_marker* AetSet::GetLayerMarker(const aet_layer* layer, const char* marker_name) {
|
||||
if (!layer->markers_count)
|
||||
return 0;
|
||||
|
||||
const aet_marker* marker = layer->markers;
|
||||
for (uint32_t i = layer->markers_count; i; i--, marker++)
|
||||
if (!str_utils_compare(marker->name, name))
|
||||
if (!str_utils_compare(marker->name, marker_name))
|
||||
return marker;
|
||||
return 0;
|
||||
}
|
||||
@@ -1865,8 +1884,8 @@ float_t AetMgr::GetSetSceneStartTime(aet_info info) {
|
||||
return GetSet(info.set_index)->GetSceneStartTime(info.index);
|
||||
}
|
||||
|
||||
void AetMgr::InitAetLayout(std::map<std::string, aet_layer_object_data>* data, AetArgs& args) {
|
||||
AetLyo layout(data);
|
||||
void AetMgr::InitAetLayout(AetComp* comp, AetArgs& args) {
|
||||
AetLyo layout(comp);
|
||||
InitAetObj(layout, args);
|
||||
layout.Disp();
|
||||
}
|
||||
|
||||
+16
-6
@@ -69,7 +69,7 @@ struct AetArgs {
|
||||
~AetArgs();
|
||||
};
|
||||
|
||||
struct aet_layer_object_data {
|
||||
struct aet_layout_data {
|
||||
mat4 mat;
|
||||
vec3 position;
|
||||
vec3 anchor;
|
||||
@@ -79,7 +79,17 @@ struct aet_layer_object_data {
|
||||
vec4u8 color;
|
||||
resolution_mode mode;
|
||||
|
||||
aet_layer_object_data();
|
||||
aet_layout_data();
|
||||
};
|
||||
|
||||
struct AetComp {
|
||||
std::map<std::string, aet_layout_data> data;
|
||||
|
||||
AetComp();
|
||||
~AetComp();
|
||||
|
||||
void Add(const char* name, aet_layout_data& data);
|
||||
aet_layout_data* Find(const char* name);
|
||||
};
|
||||
|
||||
extern void aet_manager_init();
|
||||
@@ -108,9 +118,9 @@ extern const char* aet_manager_get_scene_name(uint32_t aet_id, const aet_databas
|
||||
extern float_t aet_manager_get_scene_start_time(uint32_t aet_id, const aet_database* aet_db);
|
||||
extern uint32_t aet_manager_get_scenes_count(uint32_t set_id, const aet_database* aet_db);
|
||||
extern bool aet_manager_get_set_ready(uint32_t set_id, const aet_database* aet_db);
|
||||
extern void aet_manager_init_aet_layout(std::map<std::string, aet_layer_object_data>* data,
|
||||
extern void aet_manager_init_aet_layout(AetComp* composition,
|
||||
AetArgs args, const aet_database* aet_db);
|
||||
extern void aet_manager_init_aet_layout(std::map<std::string, aet_layer_object_data>* data,
|
||||
extern void aet_manager_init_aet_layout(AetComp* composition,
|
||||
uint32_t aet_id, const char* layer_name, AetFlags flags, resolution_mode mode,
|
||||
const char* start_marker, float_t start_time, const aet_database* aet_db);
|
||||
extern uint32_t aet_manager_init_aet_object(AetArgs args, const aet_database* aet_db);
|
||||
@@ -129,10 +139,10 @@ extern void aet_manager_remove_aet_sets(const aet_database* aet_db);
|
||||
extern void aet_manager_set_obj_alpha(uint32_t id, float_t value);
|
||||
extern void aet_manager_set_obj_color(uint32_t id, const vec4& value);
|
||||
extern void aet_manager_set_obj_end_time(uint32_t id, float_t value);
|
||||
extern void aet_manager_set_obj_frame(uint32_t id, float_t frame);
|
||||
extern void aet_manager_set_obj_frame(uint32_t id, float_t value);
|
||||
extern void aet_manager_set_obj_play(uint32_t id, bool value);
|
||||
extern void aet_manager_set_obj_position(uint32_t id, const vec3& value);
|
||||
extern void aet_manager_set_obj_prio(uint32_t id, spr::SprPrio prio);
|
||||
extern void aet_manager_set_obj_prio(uint32_t id, spr::SprPrio value);
|
||||
extern void aet_manager_set_obj_rotation(uint32_t id, const vec3& value);
|
||||
extern void aet_manager_set_obj_scale(uint32_t id, const vec3& value);
|
||||
extern void aet_manager_set_obj_sprite_discard(uint32_t id, std::map<uint32_t, uint32_t>& value);
|
||||
|
||||
@@ -537,6 +537,16 @@ void OggFileHandler::Reset(bool reset) {
|
||||
}
|
||||
}
|
||||
|
||||
void OggFileHandler::SetChannelPairVolume(size_t channel_pair, int32_t value) {
|
||||
if (channel_pair < 0 || channel_pair >= 4)
|
||||
return;
|
||||
|
||||
value = clamp_def(value, -10000, 0);
|
||||
|
||||
std::unique_lock<std::mutex> u_lock(volume_mtx);
|
||||
channel_pair_volume[channel_pair] = value;
|
||||
}
|
||||
|
||||
void OggFileHandler::SetChannelPairVolumePan(size_t src_channel_pair,
|
||||
int32_t src_channel, int32_t dst_channel, int32_t value) {
|
||||
if (src_channel_pair < 0 || src_channel_pair >= 4 || src_channel < 0
|
||||
@@ -673,6 +683,11 @@ float_t p_OggFileHandler::GetTime() {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
void p_OggFileHandler::SetChannelPairVolume(size_t channel_pair, int32_t value) {
|
||||
if (ptr)
|
||||
ptr->SetChannelPairVolume(channel_pair, value);
|
||||
}
|
||||
|
||||
void p_OggFileHandler::SetChannelPairVolumePan(size_t src_channel_pair,
|
||||
int32_t src_channel, int32_t dst_channel, int32_t value) {
|
||||
if (ptr)
|
||||
@@ -754,6 +769,13 @@ void OggPlayback::Reset() {
|
||||
ogg_file_handler = 0;
|
||||
}
|
||||
|
||||
void OggPlayback::SetChannelPairVolume(size_t channel_pair, int32_t value) {
|
||||
if (state != 1 || !ogg_file_handler)
|
||||
return;
|
||||
|
||||
ogg_file_handler->SetChannelPairVolume(channel_pair, value);
|
||||
}
|
||||
|
||||
void OggPlayback::SetChannelPairVolumePan(size_t src_channel_pair,
|
||||
int32_t src_channel, int32_t dst_channel, int32_t value) {
|
||||
if (state != 1 || !ogg_file_handler)
|
||||
@@ -808,6 +830,11 @@ void OggPlayback::SetPlaybackState(OggFileHandlerPlaybackState value) {
|
||||
ogg_file_handler->SetPlaybackState(value);
|
||||
}
|
||||
|
||||
void OggPlayback::Stop() {
|
||||
if (state == 1 && ogg_file_handler && ogg_file_handler->ptr)
|
||||
ogg_file_handler->SetPlaybackState(OGG_FILE_HANDLER_PLAYBACK_STATE_UNLOAD);
|
||||
}
|
||||
|
||||
bool OggPlayback::LoadFile(void* data, const char* path, const char* file, uint32_t hash) {
|
||||
OggPlayback* op = (OggPlayback*)data;
|
||||
|
||||
|
||||
@@ -143,6 +143,7 @@ struct OggFileHandler {
|
||||
void ReadBuffer(sound_buffer_data* buffer, size_t samples_count);
|
||||
void ReadBufferProt(sound_buffer_data* buffer, size_t samples_count);
|
||||
void Reset(bool reset = false);
|
||||
void SetChannelPairVolume(size_t channel_pair, int32_t value);
|
||||
void SetChannelPairVolumePan(size_t src_channel_pair,
|
||||
int32_t src_channel, int32_t dst_channel, int32_t value);
|
||||
void SetFileState(OggFileHandlerFileState state);
|
||||
@@ -169,6 +170,7 @@ struct p_OggFileHandler {
|
||||
OggFileHandlerFileState GetFileState();
|
||||
OggFileHandlerPauseState GetPauseState();
|
||||
float_t GetTime();
|
||||
void SetChannelPairVolume(size_t channel_pair, int32_t value);
|
||||
void SetChannelPairVolumePan(size_t src_channel_pair,
|
||||
int32_t src_channel, int32_t dst_channel, int32_t value);
|
||||
void SetLoadTimeSeek(float_t value);
|
||||
@@ -194,6 +196,7 @@ struct OggPlayback {
|
||||
OggFileHandlerPauseState GetPauseState();
|
||||
float_t GetTime();
|
||||
void Reset();
|
||||
void SetChannelPairVolume(size_t channel_pair, int32_t value);
|
||||
void SetChannelPairVolumePan(size_t src_channel_pair,
|
||||
int32_t src_channel, int32_t dst_channel, int32_t value);
|
||||
void SetLoadTimeSeek(float_t value);
|
||||
@@ -202,6 +205,7 @@ struct OggPlayback {
|
||||
void SetPath(std::string&& path);
|
||||
void SetPauseState(OggFileHandlerPauseState value);
|
||||
void SetPlaybackState(OggFileHandlerPlaybackState value);
|
||||
void Stop();
|
||||
|
||||
static bool LoadFile(void* data, const char* path, const char* file, uint32_t hash);
|
||||
static void SetChannelPairVolumePan(OggPlayback* op);
|
||||
|
||||
+10
-10
@@ -54,14 +54,14 @@ struct struc_189 {
|
||||
};
|
||||
|
||||
static const struc_189 stru_140A24420[] = {
|
||||
{ GL_TEXTURE_2D, 0x200, 0x100, 0, GL_RGBA8, GL_DEPTH_COMPONENT24 },
|
||||
{ GL_TEXTURE_2D, 0x200, 0x100, 0, GL_RGBA8 , GL_DEPTH_COMPONENT24 },
|
||||
{ GL_TEXTURE_2D, 0x200, 0x100, 0, GL_RGBA16F, GL_DEPTH_COMPONENT24 },
|
||||
{ GL_TEXTURE_2D, 0x400, 0x400, 0, GL_RGBA8, GL_ZERO },
|
||||
{ GL_TEXTURE_2D, 0x400, 0x400, 0, GL_RGBA8, GL_ZERO },
|
||||
{ GL_TEXTURE_2D, 0x400, 0x400, 0, GL_RGBA8, GL_ZERO },
|
||||
{ GL_TEXTURE_2D, 0x100, 0x100, 0, GL_RGBA8, GL_ZERO },
|
||||
{ GL_TEXTURE_2D, 0x400, 0x400, 0, GL_RGBA8 , GL_ZERO },
|
||||
{ GL_TEXTURE_2D, 0x400, 0x400, 0, GL_RGBA8 , GL_ZERO },
|
||||
{ GL_TEXTURE_2D, 0x400, 0x400, 0, GL_RGBA8 , GL_ZERO },
|
||||
{ GL_TEXTURE_2D, 0x100, 0x100, 0, GL_RGBA8 , GL_ZERO },
|
||||
{ GL_TEXTURE_2D, 0x100, 0x100, 0, GL_RGBA32F, GL_ZERO },
|
||||
{ GL_TEXTURE_2D, 0x100, 0x100, 0, GL_RGBA8, GL_ZERO },
|
||||
{ GL_TEXTURE_2D, 0x100, 0x100, 0, GL_RGBA8 , GL_ZERO },
|
||||
{ GL_TEXTURE_2D, 0x200, 0x100, 0, GL_RGBA16F, GL_ZERO }, // Extra for buf
|
||||
};
|
||||
|
||||
@@ -3069,10 +3069,10 @@ int32_t shadow::init_data() {
|
||||
{ 0x800, 0x800, 0, GL_RGBA8, GL_DEPTH_COMPONENT32F },
|
||||
{ 0x200, 0x200, 3, GL_RGBA8, GL_ZERO },
|
||||
{ 0x200, 0x200, 3, GL_RGBA8, GL_ZERO },
|
||||
{ 0x800, 0x800, 0, GL_R32F, GL_ZERO },
|
||||
{ 0x800, 0x800, 0, GL_R32F, GL_ZERO },
|
||||
{ 0x200, 0x200, 0, GL_R32F, GL_ZERO },
|
||||
{ 0x200, 0x200, 0, GL_R32F, GL_ZERO },
|
||||
{ 0x800, 0x800, 0, GL_R32F , GL_ZERO },
|
||||
{ 0x800, 0x800, 0, GL_R32F , GL_ZERO },
|
||||
{ 0x200, 0x200, 0, GL_R32F , GL_ZERO },
|
||||
{ 0x200, 0x200, 0, GL_R32F , GL_ZERO },
|
||||
{ 0x200, 0x200, 3, GL_RGBA8, GL_ZERO }, // Extra for buf
|
||||
};
|
||||
|
||||
|
||||
@@ -504,7 +504,7 @@ namespace rndr {
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
gl_state_bind_framebuffer(0);
|
||||
}
|
||||
else if (false/*field_128*/) {
|
||||
else if (true/*field_128*/) {
|
||||
pp->set_render_texture();
|
||||
|
||||
vec4 clear_color = get_clear_color();
|
||||
|
||||
+6
-7
@@ -63,7 +63,6 @@ struct sound_stream {
|
||||
static void sound_stream_array_init();
|
||||
static void sound_stream_array_ctrl();
|
||||
static sound_stream* sound_stream_array_get(int32_t index);
|
||||
static void sound_stream_array_reset();
|
||||
static void sound_stream_array_free();
|
||||
|
||||
SoundWork* sound_work;
|
||||
@@ -1535,6 +1534,11 @@ void sound_free() {
|
||||
}
|
||||
}
|
||||
|
||||
void sound_stream_array_reset() {
|
||||
for (size_t i = 0; i < SOUND_WORK_STREAM_COUNT; i++)
|
||||
sound_stream_array[i].reset();
|
||||
}
|
||||
|
||||
bool sound_work_check_stream_state(int32_t index) {
|
||||
if (index < 0 || index >= SOUND_WORK_STREAM_COUNT || !sound_work->stream_enable[index])
|
||||
return false;
|
||||
@@ -2117,7 +2121,7 @@ bool sound_stream::stop_playback() {
|
||||
if (!ogg_playback)
|
||||
return false;
|
||||
|
||||
ogg_playback->SetPlaybackState(OGG_FILE_HANDLER_PLAYBACK_STATE_UNLOAD);
|
||||
ogg_playback->Stop();
|
||||
ogg_playback->SetPauseState(OGG_FILE_HANDLER_PAUSE_STATE_PLAY);
|
||||
return true;
|
||||
}
|
||||
@@ -2138,11 +2142,6 @@ static sound_stream* sound_stream_array_get(int32_t index) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sound_stream_array_reset() {
|
||||
for (size_t i = 0; i < SOUND_WORK_STREAM_COUNT; i++)
|
||||
sound_stream_array[i].reset();
|
||||
}
|
||||
|
||||
static void sound_stream_array_free() {
|
||||
if (sound_stream_array) {
|
||||
delete[] sound_stream_array;
|
||||
|
||||
@@ -336,6 +336,8 @@ extern void sound_free();
|
||||
extern float_t sound_cue_queue_volume_array_get_max(int32_t queue_index);
|
||||
extern float_t sound_cue_queue_volume_array_get_min(int32_t queue_index);
|
||||
|
||||
extern void sound_stream_array_reset();
|
||||
|
||||
extern bool sound_work_check_stream_state(int32_t index);
|
||||
extern bool sound_work_cue_release(int32_t queue_index, const char* name, bool force_release = true);
|
||||
extern SoundCue* sound_work_get_cue(int32_t queue_index, const char* name);
|
||||
|
||||
+9
-18
@@ -203,7 +203,7 @@ namespace spr {
|
||||
sprite_size = 0.0f;
|
||||
field_CC = 0;
|
||||
texture_pos = 0.0f;
|
||||
texture_size = 0.0f;
|
||||
texture_size = 1.0f;
|
||||
next = 0;
|
||||
}
|
||||
|
||||
@@ -496,7 +496,7 @@ namespace spr {
|
||||
glGenBuffers(1, &vbo);
|
||||
gl_state_bind_array_buffer(vbo, true);
|
||||
|
||||
vbo_vertex_count = 1024;
|
||||
vbo_vertex_count = 4096;
|
||||
|
||||
static const GLsizei buffer_size = sizeof(sprite_draw_vertex);
|
||||
|
||||
@@ -702,21 +702,6 @@ namespace spr {
|
||||
gl_state_active_bind_texture_2d(7, tex->tex);
|
||||
|
||||
gl_state_bind_vertex_array(vao);
|
||||
gl_state_bind_array_buffer(vbo);
|
||||
|
||||
glEnableVertexAttribArray(0);
|
||||
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, buffer_size,
|
||||
(void*)offsetof(sprite_draw_vertex, pos));
|
||||
glEnableVertexAttribArray(1);
|
||||
glVertexAttribPointer(1, 4, GL_UNSIGNED_BYTE, GL_TRUE, buffer_size,
|
||||
(void*)offsetof(sprite_draw_vertex, color));
|
||||
glEnableVertexAttribArray(2);
|
||||
glVertexAttribPointer(2, 2, GL_FLOAT, GL_FALSE, buffer_size,
|
||||
(void*)offsetof(sprite_draw_vertex, uv[0]));
|
||||
glEnableVertexAttribArray(3);
|
||||
glVertexAttribPointer(3, 2, GL_FLOAT, GL_FALSE, buffer_size,
|
||||
(void*)offsetof(sprite_draw_vertex, uv[1]));
|
||||
|
||||
for (sprite_draw_param& j : draw_param_buffer) {
|
||||
if (j.blend) {
|
||||
gl_state_enable_blend();
|
||||
@@ -753,7 +738,6 @@ namespace spr {
|
||||
shaders_ft.set(j.shader);
|
||||
shaders_ft.draw_arrays(j.mode, j.first, j.count);
|
||||
}
|
||||
gl_state_bind_vertex_array(0);
|
||||
gl_state_bind_array_buffer(0);
|
||||
}
|
||||
|
||||
@@ -1572,11 +1556,18 @@ namespace spr {
|
||||
static void draw_sprite_begin() {
|
||||
gl_state_disable_blend();
|
||||
gl_state_active_bind_texture_2d(0, 0);
|
||||
gl_state_bind_sampler(0, 0);
|
||||
gl_state_active_bind_texture_2d(1, 0);
|
||||
gl_state_bind_sampler(1, 0);
|
||||
gl_state_set_blend_func_separate(GL_ONE, GL_ZERO, GL_ONE, GL_ZERO);
|
||||
}
|
||||
|
||||
static void draw_sprite_end() {
|
||||
gl_state_disable_blend();
|
||||
gl_state_active_bind_texture_2d(0, 0);
|
||||
gl_state_bind_sampler(0, 0);
|
||||
gl_state_active_bind_texture_2d(1, 0);
|
||||
gl_state_bind_sampler(1, 0);
|
||||
gl_state_set_blend_func_separate(GL_ONE, GL_ZERO, GL_ONE, GL_ZERO);
|
||||
shader::unbind();
|
||||
}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
#define IDR_VERSION2 101
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 102
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
#include "winres.h"
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,1,3,1
|
||||
PRODUCTVERSION 0,1,3,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x0L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "000904b0"
|
||||
BEGIN
|
||||
VALUE "FileDescription", "DivaGL plugin for PDAFT 7.10"
|
||||
VALUE "FileVersion", "0.1.3.1"
|
||||
VALUE "InternalName", "DivaGL"
|
||||
VALUE "LegalCopyright", "korenkonder (C) 2020-2023"
|
||||
VALUE "OriginalFilename", "DivaGL.dll"
|
||||
VALUE "ProductName", "DivaGL"
|
||||
VALUE "ProductVersion", "0.1.3.1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x9, 1200
|
||||
END
|
||||
END
|
||||
@@ -1,519 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="DebugDev|x64">
|
||||
<Configuration>DebugDev</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="DebugOpt|x64">
|
||||
<Configuration>DebugOpt</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="DebugOptDev|x64">
|
||||
<Configuration>DebugOptDev</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="ReleaseDev|x64">
|
||||
<Configuration>ReleaseDev</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="ReleaseLTCG|x64">
|
||||
<Configuration>ReleaseLTCG</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="ReleaseLTCGDev|x64">
|
||||
<Configuration>ReleaseLTCGDev</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<ProjectGuid>{4D949362-9095-4113-9423-7E0492618F16}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDev|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugOpt|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugOptDev|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDev|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLTCG|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLTCGDev|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugDev|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugOpt|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugOptDev|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDev|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLTCG|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLTCGDev|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetName>DivaGL</TargetName>
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\debug\DivaGL\</IntDir>
|
||||
<TargetExt>.dva</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDev|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetName>DivaGL</TargetName>
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\debug\DivaGLDev\</IntDir>
|
||||
<TargetExt>.dva</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugOpt|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>DivaGL</TargetName>
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\debugopt\DivaGL\</IntDir>
|
||||
<TargetExt>.dva</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugOptDev|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>DivaGL</TargetName>
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\debugopt\DivaGLDev\</IntDir>
|
||||
<TargetExt>.dva</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>DivaGL</TargetName>
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\release\DivaGL\</IntDir>
|
||||
<TargetExt>.dva</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDev|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>DivaGL</TargetName>
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\release\DivaGLDev\</IntDir>
|
||||
<TargetExt>.dva</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLTCG|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>DivaGL</TargetName>
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\releaseltcg\DivaGL\</IntDir>
|
||||
<TargetExt>.dva</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLTCGDev|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>DivaGL</TargetName>
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\releaseltcg\DivaGLDev\</IntDir>
|
||||
<TargetExt>.dva</TargetExt>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)extern\src</AdditionalIncludeDirectories>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<CallingConvention>FastCall</CallingConvention>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<ObjectFileName>$(IntDir)/%(RelativeDir)</ObjectFileName>
|
||||
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)extern\lib;$(SolutionDir)lib\debug\</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>glad.lib;KKdLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/ignore:4098 /ignore:4099 /ignore:4286 %(AdditionalOptions)</AdditionalOptions>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /Y "$(SolutionDir)bin\$(TargetName).dva" "N:\DUMP\plugins\$(TargetName).dva"
|
||||
copy /Y "$(SolutionDir)bin\$(TargetName).pdb" "N:\DUMP\plugins\$(TargetName).pdb"
|
||||
del "$(SolutionDir)bin\$(TargetName).exp"
|
||||
del "$(SolutionDir)bin\$(TargetName).lib"</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDev|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;DEBUG;DIVAGL_DEV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)extern\src</AdditionalIncludeDirectories>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<CallingConvention>FastCall</CallingConvention>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<ObjectFileName>$(IntDir)/%(RelativeDir)</ObjectFileName>
|
||||
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)extern\lib;$(SolutionDir)lib\debug\</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>glad.lib;KKdLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/ignore:4098 /ignore:4099 /ignore:4286 %(AdditionalOptions)</AdditionalOptions>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_UNICODE;UNICODE;DIVAGL_DEV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /Y "$(SolutionDir)bin\$(TargetName).dva" "N:\DUMP\plugins\$(TargetName).dva"
|
||||
copy /Y "$(SolutionDir)bin\$(TargetName).pdb" "N:\DUMP\plugins\$(TargetName).pdb"
|
||||
del "$(SolutionDir)bin\$(TargetName).exp"
|
||||
del "$(SolutionDir)bin\$(TargetName).lib"</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugOpt|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Full</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)extern\src</AdditionalIncludeDirectories>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<CallingConvention>FastCall</CallingConvention>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<AdditionalOptions>/Gw %(AdditionalOptions)</AdditionalOptions>
|
||||
<ObjectFileName>$(IntDir)/%(RelativeDir)</ObjectFileName>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<UseFullPaths>false</UseFullPaths>
|
||||
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)extern\lib;$(SolutionDir)lib\debugopt\</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>glad.lib;KKdLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/ignore:4098 /ignore:4099 /ignore:4286 %(AdditionalOptions)</AdditionalOptions>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /Y "$(SolutionDir)bin\$(TargetName).dva" "N:\DUMP\plugins\$(TargetName).dva"
|
||||
copy /Y "$(SolutionDir)bin\$(TargetName).pdb" "N:\DUMP\plugins\$(TargetName).pdb"
|
||||
del "$(SolutionDir)bin\$(TargetName).exp"
|
||||
del "$(SolutionDir)bin\$(TargetName).lib"</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugOptDev|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Full</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;DEBUG;DIVAGL_DEV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)extern\src</AdditionalIncludeDirectories>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<CallingConvention>FastCall</CallingConvention>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<AdditionalOptions>/Gw %(AdditionalOptions)</AdditionalOptions>
|
||||
<ObjectFileName>$(IntDir)/%(RelativeDir)</ObjectFileName>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<UseFullPaths>false</UseFullPaths>
|
||||
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)extern\lib;$(SolutionDir)lib\debugopt\</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>glad.lib;KKdLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/ignore:4098 /ignore:4099 /ignore:4286 %(AdditionalOptions)</AdditionalOptions>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_UNICODE;UNICODE;DIVAGL_DEV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /Y "$(SolutionDir)bin\$(TargetName).dva" "N:\DUMP\plugins\$(TargetName).dva"
|
||||
copy /Y "$(SolutionDir)bin\$(TargetName).pdb" "N:\DUMP\plugins\$(TargetName).pdb"
|
||||
del "$(SolutionDir)bin\$(TargetName).exp"
|
||||
del "$(SolutionDir)bin\$(TargetName).lib"</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)extern\src</AdditionalIncludeDirectories>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<CallingConvention>FastCall</CallingConvention>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<AdditionalOptions>/Gw %(AdditionalOptions)</AdditionalOptions>
|
||||
<ObjectFileName>$(IntDir)/%(RelativeDir)</ObjectFileName>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<UseFullPaths>false</UseFullPaths>
|
||||
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)extern\lib;$(SolutionDir)lib\release\</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>glad.lib;KKdLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalOptions>/ignore:4098 /ignore:4099 /ignore:4286 %(AdditionalOptions)</AdditionalOptions>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /Y "$(SolutionDir)bin\$(TargetName).dva" "N:\DUMP\plugins\$(TargetName).dva"
|
||||
copy /Y "$(SolutionDir)bin\$(TargetName).pdb" "N:\DUMP\plugins\$(TargetName).pdb"
|
||||
del "$(SolutionDir)bin\$(TargetName).exp"
|
||||
del "$(SolutionDir)bin\$(TargetName).lib"</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDev|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;DIVAGL_DEV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)extern\src</AdditionalIncludeDirectories>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<CallingConvention>FastCall</CallingConvention>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<AdditionalOptions>/Gw %(AdditionalOptions)</AdditionalOptions>
|
||||
<ObjectFileName>$(IntDir)/%(RelativeDir)</ObjectFileName>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<UseFullPaths>false</UseFullPaths>
|
||||
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)extern\lib;$(SolutionDir)lib\release\</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>glad.lib;KKdLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalOptions>/ignore:4098 /ignore:4099 /ignore:4286 %(AdditionalOptions)</AdditionalOptions>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_UNICODE;UNICODE;DIVAGL_DEV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /Y "$(SolutionDir)bin\$(TargetName).dva" "N:\DUMP\plugins\$(TargetName).dva"
|
||||
copy /Y "$(SolutionDir)bin\$(TargetName).pdb" "N:\DUMP\plugins\$(TargetName).pdb"
|
||||
del "$(SolutionDir)bin\$(TargetName).exp"
|
||||
del "$(SolutionDir)bin\$(TargetName).lib"</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLTCG|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)extern\src</AdditionalIncludeDirectories>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<CallingConvention>FastCall</CallingConvention>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<AdditionalOptions>/Gw %(AdditionalOptions)</AdditionalOptions>
|
||||
<ObjectFileName>$(IntDir)/%(RelativeDir)</ObjectFileName>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<UseFullPaths>false</UseFullPaths>
|
||||
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)extern\lib;$(SolutionDir)lib\releaseltcg\</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>glad.lib;KKdLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalOptions>/ignore:4098 /ignore:4099 /ignore:4286 %(AdditionalOptions)</AdditionalOptions>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /Y "$(SolutionDir)bin\$(TargetName).dva" "N:\DUMP\plugins\$(TargetName).dva"
|
||||
copy /Y "$(SolutionDir)bin\$(TargetName).pdb" "N:\DUMP\plugins\$(TargetName).pdb"
|
||||
del "$(SolutionDir)bin\$(TargetName).exp"
|
||||
del "$(SolutionDir)bin\$(TargetName).lib"</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLTCGDev|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;DIVAGL_DEV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)extern\src</AdditionalIncludeDirectories>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<CallingConvention>FastCall</CallingConvention>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<AdditionalOptions>/Gw %(AdditionalOptions)</AdditionalOptions>
|
||||
<ObjectFileName>$(IntDir)/%(RelativeDir)</ObjectFileName>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<UseFullPaths>false</UseFullPaths>
|
||||
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)extern\lib;$(SolutionDir)lib\releaseltcg\</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>glad.lib;KKdLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalOptions>/ignore:4098 /ignore:4099 /ignore:4286 %(AdditionalOptions)</AdditionalOptions>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_UNICODE;UNICODE;DIVAGL_DEV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /Y "$(SolutionDir)bin\$(TargetName).dva" "N:\DUMP\plugins\$(TargetName).dva"
|
||||
copy /Y "$(SolutionDir)bin\$(TargetName).pdb" "N:\DUMP\plugins\$(TargetName).pdb"
|
||||
del "$(SolutionDir)bin\$(TargetName).exp"
|
||||
del "$(SolutionDir)bin\$(TargetName).lib"</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bone_data.cpp" />
|
||||
<ClCompile Include="dllmain.cpp" />
|
||||
<ClCompile Include="gl.cpp" />
|
||||
<ClCompile Include="inject.cpp" />
|
||||
<ClCompile Include="print.cpp" />
|
||||
<ClCompile Include="shader_table.cpp" />
|
||||
<ClCompile Include="string.cpp" />
|
||||
<ClCompile Include="vector.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="DivaGL.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="bone_data.hpp" />
|
||||
<ClInclude Include="gl.hpp" />
|
||||
<ClInclude Include="inject.hpp" />
|
||||
<ClInclude Include="print.hpp" />
|
||||
<ClInclude Include="shader_table.hpp" />
|
||||
<ClInclude Include="string.hpp" />
|
||||
<ClInclude Include="vector.hpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
</Project>
|
||||
@@ -1,51 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerCommand>N:\DUMP\diva.exe</LocalDebuggerCommand>
|
||||
<LocalDebuggerCommandArguments>--launch -w</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerWorkingDirectory>N:\DUMP</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDev|x64'">
|
||||
<LocalDebuggerCommand>N:\DUMP\diva.exe</LocalDebuggerCommand>
|
||||
<LocalDebuggerCommandArguments>--launch -w</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerWorkingDirectory>N:\DUMP</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugOpt|x64'">
|
||||
<LocalDebuggerCommand>N:\DUMP\diva.exe</LocalDebuggerCommand>
|
||||
<LocalDebuggerCommandArguments>--launch -w</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerWorkingDirectory>N:\DUMP</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugOptDev|x64'">
|
||||
<LocalDebuggerCommand>N:\DUMP\diva.exe</LocalDebuggerCommand>
|
||||
<LocalDebuggerCommandArguments>--launch -w</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerWorkingDirectory>N:\DUMP</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LocalDebuggerCommand>N:\DUMP\diva.exe</LocalDebuggerCommand>
|
||||
<LocalDebuggerWorkingDirectory>N:\DUMP</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>--launch -w</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDev|x64'">
|
||||
<LocalDebuggerCommand>N:\DUMP\diva.exe</LocalDebuggerCommand>
|
||||
<LocalDebuggerWorkingDirectory>N:\DUMP</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>--launch -w</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLTCG|x64'">
|
||||
<LocalDebuggerCommand>N:\DUMP\diva.exe</LocalDebuggerCommand>
|
||||
<LocalDebuggerWorkingDirectory>N:\DUMP</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>--launch -w</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseLTCGDev|x64'">
|
||||
<LocalDebuggerCommand>N:\DUMP\diva.exe</LocalDebuggerCommand>
|
||||
<LocalDebuggerWorkingDirectory>N:\DUMP</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommandArguments>--launch -w</LocalDebuggerCommandArguments>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
+74
-60
@@ -11,15 +11,16 @@
|
||||
#include "str_utils.hpp"
|
||||
|
||||
static void pvsr_auth_3d_read(pvsr_auth_3d* a3d, stream& s);
|
||||
static void pvsr_auth_2d_read(pvsr_auth_2d* aet_entry, stream& s);
|
||||
static void pvsr_auth_2d_read(pvsr_auth_2d* a2d, stream& s);
|
||||
static void pvsr_effect_read(pvsr_effect* eff, stream& s);
|
||||
static void pvsr_glitter_read(pvsr_glitter* glt, stream& s);
|
||||
static void pvsr_read_inner(pvsr* sr, stream& s);
|
||||
static void pvsr_stage_change_effect_read(pvsr_stage_change_effect* stg_chg_eff, stream& s);
|
||||
static void pvsr_stage_effect_read(pvsr_stage_effect* stg_eff, stream& s);
|
||||
static void pvsr_stage_effect_env_read(pvsr_stage_effect_env* aet, stream& s, int32_t x00);
|
||||
static bool pvsr_stage_effect_env_sub1_read(pvsr_stage_effect_env_sub1* aet_sub1, stream& s, int64_t offset);
|
||||
static bool pvsr_stage_effect_env_sub2_read(pvsr_stage_effect_env_sub2* aet_sub2, stream& s, int64_t offset);
|
||||
static void pvsr_stage_effect_env_read(pvsr_stage_effect_env* env, stream& s, int32_t x00);
|
||||
static bool pvsr_stage_effect_env_light_read(pvsr_stage_effect_env_light* env_light, stream& s, int64_t offset);
|
||||
static bool pvsr_stage_effect_env_post_process_read(
|
||||
pvsr_stage_effect_env_post_process* env_post_process, stream& s, int64_t offset);
|
||||
|
||||
pvsr_auth_2d::pvsr_auth_2d() {
|
||||
bright_scale = 1.0f;
|
||||
@@ -69,18 +70,29 @@ pvsr_stage_effect::~pvsr_stage_effect() {
|
||||
|
||||
}
|
||||
|
||||
pvsr_stage_effect_env_sub1::pvsr_stage_effect_env_sub1() : stage_light() {
|
||||
pvsr_stage_effect_env_light::pvsr_stage_effect_env_light() : stage_light() {
|
||||
|
||||
}
|
||||
|
||||
pvsr_stage_effect_env_sub1::~pvsr_stage_effect_env_sub1() {
|
||||
pvsr_stage_effect_env_light::~pvsr_stage_effect_env_light() {
|
||||
|
||||
}
|
||||
|
||||
pvsr_stage_effect_env::pvsr_stage_effect_env() : u48(), u4a(), u4c(), u4e(), u50(), u52(), u54(), u56(), u58(), u5a(),
|
||||
u5c(), u5e(), u60(), sub1_data(), sub1_data_init(), sub2a_data(), sub2a_data_init(),
|
||||
sub2b_data(), sub2b_data_init(), sub2c_data(), sub2c_data_init(), sub2d_data(), sub2d_data_init() {
|
||||
|
||||
pvsr_stage_effect_env::pvsr_stage_effect_env() : light(), light_init(), fog(),
|
||||
fog_init(), bloom(), bloom_init(), cct(), cct_init(), shimmer(), shimmer_init() {
|
||||
chara_light = -1;
|
||||
chara_shadow_light = -1;
|
||||
shadow_light = -1;
|
||||
item_light = -1;
|
||||
common_light = -1;
|
||||
u52 = -1;
|
||||
ibl_color_light = -1;
|
||||
u56 = -1;
|
||||
cat = -1;
|
||||
u5a = -1;
|
||||
u5c = -1;
|
||||
reflection = -1;
|
||||
effect_light = -1;
|
||||
}
|
||||
|
||||
pvsr_stage_effect_env::~pvsr_stage_effect_env() {
|
||||
@@ -149,10 +161,10 @@ bool pvsr::load_file(void* data, const char* path, const char* file, uint32_t ha
|
||||
return sr->ready;
|
||||
}
|
||||
|
||||
static void pvsr_auth_2d_read(pvsr_auth_2d* aet_entry, stream& s) {
|
||||
aet_entry->name = s.read_string_null_terminated_offset(s.read_offset_x());
|
||||
static void pvsr_auth_2d_read(pvsr_auth_2d* a2d, stream& s) {
|
||||
a2d->name = s.read_string_null_terminated_offset(s.read_offset_x());
|
||||
s.read_uint32_t_reverse_endianness();
|
||||
aet_entry->bright_scale = s.read_float_t_reverse_endianness();
|
||||
a2d->bright_scale = s.read_float_t_reverse_endianness();
|
||||
}
|
||||
|
||||
static void pvsr_auth_3d_read(pvsr_auth_3d* a3d, stream& s) {
|
||||
@@ -354,29 +366,29 @@ static void pvsr_stage_effect_read(pvsr_stage_effect* stg_eff, stream& s) {
|
||||
}
|
||||
}
|
||||
|
||||
static void pvsr_stage_effect_env_read(pvsr_stage_effect_env* aet, stream& s, int32_t x00) {
|
||||
static void pvsr_stage_effect_env_read(pvsr_stage_effect_env* env, stream& s, int32_t x00) {
|
||||
int64_t set_name_offset = s.read_offset_x();
|
||||
int64_t aet_front_offset = s.read_offset_x();
|
||||
int64_t aet_front_low_offset = s.read_offset_x();
|
||||
int64_t aet_back_offset = s.read_offset_x();
|
||||
int64_t sub1_offset = s.read_offset_x();
|
||||
int64_t sub2a_offset = s.read_offset_x();
|
||||
int64_t sub2b_offset = s.read_offset_x();
|
||||
int64_t sub2c_offset = s.read_offset_x();
|
||||
int64_t sub2d_offset = s.read_offset_x();
|
||||
aet->u48 = s.read_uint16_t_reverse_endianness();
|
||||
aet->u4a = s.read_uint16_t_reverse_endianness();
|
||||
aet->u4c = s.read_uint16_t_reverse_endianness();
|
||||
aet->u4e = s.read_uint16_t_reverse_endianness();
|
||||
aet->u50 = s.read_uint16_t_reverse_endianness();
|
||||
aet->u52 = s.read_uint16_t_reverse_endianness();
|
||||
aet->u54 = s.read_uint16_t_reverse_endianness();
|
||||
aet->u56 = s.read_uint16_t_reverse_endianness();
|
||||
aet->u58 = s.read_uint16_t_reverse_endianness();
|
||||
aet->u5a = s.read_uint16_t_reverse_endianness();
|
||||
aet->u5c = s.read_uint16_t_reverse_endianness();
|
||||
aet->u5e = s.read_uint16_t_reverse_endianness();
|
||||
aet->u60 = s.read_uint16_t_reverse_endianness();
|
||||
int64_t light_offset = s.read_offset_x();
|
||||
int64_t fog_offset = s.read_offset_x();
|
||||
int64_t bloom_offset = s.read_offset_x();
|
||||
int64_t cct_offset = s.read_offset_x();
|
||||
int64_t shimmer_offset = s.read_offset_x();
|
||||
env->chara_light = s.read_int16_t_reverse_endianness();
|
||||
env->chara_shadow_light = s.read_int16_t_reverse_endianness();
|
||||
env->shadow_light = s.read_int16_t_reverse_endianness();
|
||||
env->item_light = s.read_int16_t_reverse_endianness();
|
||||
env->common_light = s.read_int16_t_reverse_endianness();
|
||||
env->u52 = s.read_int16_t_reverse_endianness();
|
||||
env->ibl_color_light = s.read_int16_t_reverse_endianness();
|
||||
env->u56 = s.read_int16_t_reverse_endianness();
|
||||
env->cat = s.read_int16_t_reverse_endianness();
|
||||
env->u5a = s.read_int16_t_reverse_endianness();
|
||||
env->u5c = s.read_int16_t_reverse_endianness();
|
||||
env->reflection = s.read_int16_t_reverse_endianness();
|
||||
env->effect_light = s.read_int16_t_reverse_endianness();
|
||||
int8_t aet_front_count = s.read_int8_t();
|
||||
int8_t aet_front_low_count = s.read_int8_t();
|
||||
int8_t aet_back_count = s.read_int8_t();
|
||||
@@ -393,87 +405,89 @@ static void pvsr_stage_effect_env_read(pvsr_stage_effect_env* aet, stream& s, in
|
||||
s.align_read(0x08);
|
||||
}
|
||||
|
||||
aet->set_name = s.read_string_null_terminated_offset(set_name_offset);
|
||||
env->set_name = s.read_string_null_terminated_offset(set_name_offset);
|
||||
|
||||
if (aet_front_offset > 0) {
|
||||
aet->aet_front.resize(aet_front_count);
|
||||
env->aet_front.resize(aet_front_count);
|
||||
|
||||
s.position_push(aet_front_offset, SEEK_SET);
|
||||
for (pvsr_auth_2d& i : aet->aet_front)
|
||||
for (pvsr_auth_2d& i : env->aet_front)
|
||||
pvsr_auth_2d_read(&i, s);
|
||||
s.position_pop();
|
||||
}
|
||||
|
||||
if (aet_front_low_offset > 0) {
|
||||
aet->aet_front_low.resize(aet_front_low_count);
|
||||
env->aet_front_low.resize(aet_front_low_count);
|
||||
|
||||
s.position_push(aet_front_low_offset, SEEK_SET);
|
||||
for (pvsr_auth_2d& i : aet->aet_front_low)
|
||||
for (pvsr_auth_2d& i : env->aet_front_low)
|
||||
pvsr_auth_2d_read(&i, s);
|
||||
s.position_pop();
|
||||
}
|
||||
|
||||
if (aet_back_offset > 0) {
|
||||
aet->aet_back.resize(aet_back_count);
|
||||
env->aet_back.resize(aet_back_count);
|
||||
|
||||
s.position_push(aet_back_offset, SEEK_SET);
|
||||
for (pvsr_auth_2d& i : aet->aet_back)
|
||||
for (pvsr_auth_2d& i : env->aet_back)
|
||||
pvsr_auth_2d_read(&i, s);
|
||||
s.position_pop();
|
||||
}
|
||||
|
||||
aet->sub1_data_init = pvsr_stage_effect_env_sub1_read(&aet->sub1_data, s, sub1_offset);
|
||||
aet->sub2a_data_init = pvsr_stage_effect_env_sub2_read(&aet->sub2a_data, s, sub2a_offset);
|
||||
aet->sub2b_data_init = pvsr_stage_effect_env_sub2_read(&aet->sub2b_data, s, sub2b_offset);
|
||||
aet->sub2c_data_init = pvsr_stage_effect_env_sub2_read(&aet->sub2c_data, s, sub2c_offset);
|
||||
aet->sub2d_data_init = pvsr_stage_effect_env_sub2_read(&aet->sub2d_data, s, sub2d_offset);
|
||||
env->light_init = pvsr_stage_effect_env_light_read(&env->light, s, light_offset);
|
||||
env->fog_init = pvsr_stage_effect_env_post_process_read(&env->fog, s, fog_offset);
|
||||
env->bloom_init = pvsr_stage_effect_env_post_process_read(&env->bloom, s, bloom_offset);
|
||||
env->cct_init = pvsr_stage_effect_env_post_process_read(&env->cct, s, cct_offset);
|
||||
env->shimmer_init = pvsr_stage_effect_env_post_process_read(&env->shimmer, s, shimmer_offset);
|
||||
|
||||
if (x00 & 0x100) {
|
||||
if (aet_back_offset > 0) {
|
||||
aet->unk03.resize(u78);
|
||||
if (o68 > 0) {
|
||||
env->unk03.resize(u78);
|
||||
|
||||
s.position_push(o68, SEEK_SET);
|
||||
for (pvsr_auth_2d& i : aet->unk03)
|
||||
for (pvsr_auth_2d& i : env->unk03)
|
||||
pvsr_auth_2d_read(&i, s);
|
||||
s.position_pop();
|
||||
}
|
||||
|
||||
if (o70 > 0) {
|
||||
aet->unk04.resize(u79);
|
||||
env->unk04.resize(u79);
|
||||
|
||||
s.position_push(o70, SEEK_SET);
|
||||
for (pvsr_auth_2d& i : aet->unk04)
|
||||
for (pvsr_auth_2d& i : env->unk04)
|
||||
pvsr_auth_2d_read(&i, s);
|
||||
s.position_pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static bool pvsr_stage_effect_env_sub1_read(pvsr_stage_effect_env_sub1* aet_sub1, stream& s, int64_t offset) {
|
||||
static bool pvsr_stage_effect_env_light_read(
|
||||
pvsr_stage_effect_env_light* env_light, stream& s, int64_t offset) {
|
||||
if (offset <= 0)
|
||||
return false;
|
||||
|
||||
s.position_push(offset, SEEK_SET);
|
||||
aet_sub1->name = s.read_string_null_terminated_offset(s.read_offset_x());
|
||||
env_light->auth_3d_name = s.read_string_null_terminated_offset(s.read_offset_x());
|
||||
s.read_uint32_t_reverse_endianness();
|
||||
aet_sub1->stage_light = s.read_uint16_t_reverse_endianness();
|
||||
env_light->stage_light = s.read_int16_t_reverse_endianness();
|
||||
s.align_read(0x08);
|
||||
s.position_pop();
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool pvsr_stage_effect_env_sub2_read(pvsr_stage_effect_env_sub2* aet_sub2, stream& s, int64_t offset) {
|
||||
static bool pvsr_stage_effect_env_post_process_read(
|
||||
pvsr_stage_effect_env_post_process* env_post_process, stream& s, int64_t offset) {
|
||||
if (offset <= 0)
|
||||
return false;
|
||||
|
||||
s.position_push(offset, SEEK_SET);
|
||||
aet_sub2->u00 = s.read_uint16_t_reverse_endianness();
|
||||
aet_sub2->u02 = s.read_uint16_t_reverse_endianness();
|
||||
aet_sub2->u04 = s.read_uint16_t_reverse_endianness();
|
||||
aet_sub2->u06 = s.read_uint16_t_reverse_endianness();
|
||||
aet_sub2->u08 = s.read_uint16_t_reverse_endianness();
|
||||
aet_sub2->u0a = s.read_uint16_t_reverse_endianness();
|
||||
aet_sub2->u0c = s.read_uint16_t_reverse_endianness();
|
||||
env_post_process->index0 = s.read_int16_t_reverse_endianness();
|
||||
env_post_process->start0 = s.read_int16_t_reverse_endianness();
|
||||
env_post_process->trans0 = s.read_int16_t_reverse_endianness();
|
||||
env_post_process->index1 = s.read_int16_t_reverse_endianness();
|
||||
env_post_process->start1 = s.read_int16_t_reverse_endianness();
|
||||
env_post_process->trans1 = s.read_int16_t_reverse_endianness();
|
||||
env_post_process->index2 = s.read_int16_t_reverse_endianness();
|
||||
s.align_read(0x08);
|
||||
s.position_pop();
|
||||
return true;
|
||||
|
||||
+36
-36
@@ -72,53 +72,53 @@ struct pvsr_stage_effect {
|
||||
~pvsr_stage_effect();
|
||||
};
|
||||
|
||||
struct pvsr_stage_effect_env_sub1 {
|
||||
string_hash name;
|
||||
uint16_t stage_light;
|
||||
struct pvsr_stage_effect_env_light {
|
||||
string_hash auth_3d_name;
|
||||
int16_t stage_light;
|
||||
|
||||
pvsr_stage_effect_env_sub1();
|
||||
~pvsr_stage_effect_env_sub1();
|
||||
pvsr_stage_effect_env_light();
|
||||
~pvsr_stage_effect_env_light();
|
||||
};
|
||||
|
||||
struct pvsr_stage_effect_env_sub2 {
|
||||
uint16_t u00;
|
||||
uint16_t u02;
|
||||
uint16_t u04;
|
||||
uint16_t u06;
|
||||
uint16_t u08;
|
||||
uint16_t u0a;
|
||||
uint16_t u0c;
|
||||
struct pvsr_stage_effect_env_post_process {
|
||||
int16_t index0;
|
||||
int16_t start0;
|
||||
int16_t trans0;
|
||||
int16_t index1;
|
||||
int16_t start1;
|
||||
int16_t trans1;
|
||||
int16_t index2;
|
||||
};
|
||||
|
||||
struct pvsr_stage_effect_env {
|
||||
uint16_t u48;
|
||||
uint16_t u4a;
|
||||
uint16_t u4c;
|
||||
uint16_t u4e;
|
||||
uint16_t u50;
|
||||
uint16_t u52;
|
||||
uint16_t u54;
|
||||
uint16_t u56;
|
||||
uint16_t u58;
|
||||
uint16_t u5a;
|
||||
uint16_t u5c;
|
||||
uint16_t u5e;
|
||||
uint16_t u60;
|
||||
int16_t chara_light;
|
||||
int16_t chara_shadow_light;
|
||||
int16_t shadow_light;
|
||||
int16_t item_light;
|
||||
int16_t common_light;
|
||||
int16_t u52;
|
||||
int16_t ibl_color_light;
|
||||
int16_t u56;
|
||||
int16_t cat;
|
||||
int16_t u5a;
|
||||
int16_t u5c;
|
||||
int16_t reflection;
|
||||
int16_t effect_light;
|
||||
|
||||
std::string set_name;
|
||||
std::vector<pvsr_auth_2d> aet_front;
|
||||
std::vector<pvsr_auth_2d> aet_front_low;
|
||||
std::vector<pvsr_auth_2d> aet_back;
|
||||
pvsr_stage_effect_env_sub1 sub1_data;
|
||||
bool sub1_data_init;
|
||||
pvsr_stage_effect_env_sub2 sub2a_data;
|
||||
bool sub2a_data_init;
|
||||
pvsr_stage_effect_env_sub2 sub2b_data;
|
||||
bool sub2b_data_init;
|
||||
pvsr_stage_effect_env_sub2 sub2c_data;
|
||||
bool sub2c_data_init;
|
||||
pvsr_stage_effect_env_sub2 sub2d_data;
|
||||
bool sub2d_data_init;
|
||||
pvsr_stage_effect_env_light light;
|
||||
bool light_init;
|
||||
pvsr_stage_effect_env_post_process fog;
|
||||
bool fog_init;
|
||||
pvsr_stage_effect_env_post_process bloom;
|
||||
bool bloom_init;
|
||||
pvsr_stage_effect_env_post_process cct;
|
||||
bool cct_init;
|
||||
pvsr_stage_effect_env_post_process shimmer;
|
||||
bool shimmer_init;
|
||||
std::vector<pvsr_auth_2d> unk03;
|
||||
std::vector<pvsr_auth_2d> unk04;
|
||||
|
||||
|
||||
@@ -185,8 +185,8 @@ bool DtmAet::Ctrl() {
|
||||
layer_name = comp_layers[layer_index - 1].c_str();
|
||||
|
||||
if (type) {
|
||||
data.clear();
|
||||
aet_manager_init_aet_layout(&data, aet_id, layer_name,
|
||||
comp.data.clear();
|
||||
aet_manager_init_aet_layout(&comp, aet_id, layer_name,
|
||||
(AetFlags)0, RESOLUTION_MODE_HD, 0, frame, aft_aet_db);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
uint32_t marker_index;
|
||||
uint8_t type;
|
||||
std::vector<std::string> comp_layers;
|
||||
std::map<std::string, aet_layer_object_data> data;
|
||||
AetComp comp;
|
||||
std::vector<std::string> markers;
|
||||
float_t frame;
|
||||
float_t start_time;
|
||||
|
||||
@@ -992,6 +992,7 @@ bool SubGameState::DataInitialize::Dest() {
|
||||
}
|
||||
|
||||
bool SubGameState::SystemStartup::Init() {
|
||||
task_system_startup_init();
|
||||
task_system_startup_add_task();
|
||||
task_pv_db_add_task();
|
||||
return true;
|
||||
@@ -1003,6 +1004,7 @@ bool SubGameState::SystemStartup::Ctrl() {
|
||||
|
||||
bool SubGameState::SystemStartup::Dest() {
|
||||
task_system_startup_del_task();
|
||||
task_system_startup_free();
|
||||
game_state_set_sub_game_state_next(SUB_GAME_STATE_WARNING);
|
||||
return true;
|
||||
}
|
||||
|
||||
+646
-61
@@ -11,8 +11,10 @@
|
||||
#include "../CRE/rob/rob.hpp"
|
||||
#include "../CRE/data.hpp"
|
||||
#include "../CRE/object.hpp"
|
||||
#include "../CRE/ogg_vorbis.hpp"
|
||||
#include "../CRE/pv_expression.hpp"
|
||||
#include "../CRE/pv_param.hpp"
|
||||
#include "../CRE/sound.hpp"
|
||||
#include "../KKdLib/farc.hpp"
|
||||
#include "../KKdLib/sort.hpp"
|
||||
#include "imgui_helper.hpp"
|
||||
@@ -128,11 +130,120 @@ enum dsc_ft_func {
|
||||
DSC_FT_MAX,
|
||||
};
|
||||
|
||||
pv_game _pv_game;
|
||||
TaskPvGame task_pv_game;
|
||||
enum pv_game_music_action {
|
||||
PV_GAME_MUSIC_ACTION_NONE = 0,
|
||||
PV_GAME_MUSIC_ACTION_STOP,
|
||||
PV_GAME_MUSIC_ACTION_PAUSE,
|
||||
PV_GAME_MUSIC_ACTION_PLAY,
|
||||
PV_GAME_MUSIC_ACTION_MAX,
|
||||
};
|
||||
|
||||
enum pv_game_music_flags : uint8_t {
|
||||
PV_GAME_MUSIC_OGG = 0x04,
|
||||
PV_GAME_MUSIC_ALL = 0xFF,
|
||||
};
|
||||
|
||||
struct pv_game_music_fade {
|
||||
int32_t start;
|
||||
int32_t value;
|
||||
float_t time;
|
||||
float_t remain;
|
||||
pv_game_music_action action;
|
||||
bool enable;
|
||||
|
||||
void reset();
|
||||
};
|
||||
|
||||
struct pv_game_music_args {
|
||||
int32_t type;
|
||||
std::string file_path;
|
||||
float_t start;
|
||||
bool field_2C;
|
||||
|
||||
pv_game_music_args();
|
||||
~pv_game_music_args();
|
||||
};
|
||||
|
||||
struct pv_game_music_ogg {
|
||||
OggPlayback* playback;
|
||||
std::string file_path;
|
||||
|
||||
pv_game_music_ogg();
|
||||
~pv_game_music_ogg();
|
||||
};
|
||||
|
||||
struct pv_game_music {
|
||||
pv_game_music_flags flags;
|
||||
bool pause;
|
||||
int32_t volume;
|
||||
int32_t master_volume;
|
||||
int32_t channel_pair_volume[4];
|
||||
pv_game_music_fade fade_in;
|
||||
pv_game_music_fade fade_out;
|
||||
bool no_fade;
|
||||
float_t no_fade_remain;
|
||||
float_t fade_out_time_req;
|
||||
pv_game_music_action fade_out_action_req;
|
||||
int32_t type;
|
||||
std::string file_path;
|
||||
float_t start;
|
||||
float_t end;
|
||||
bool play_on_end;
|
||||
float_t fade_in_time;
|
||||
float_t fade_out_time;
|
||||
bool field_9C;
|
||||
pv_game_music_args args;
|
||||
bool loaded;
|
||||
pv_game_music_ogg* ogg;
|
||||
|
||||
pv_game_music();
|
||||
~pv_game_music();
|
||||
|
||||
bool check_args(int32_t type, std::string& file_path, float_t start);
|
||||
void ctrl(float_t delta_time);
|
||||
void exclude_flags(pv_game_music_flags flags);
|
||||
void fade_in_end();
|
||||
void fade_out_end();
|
||||
void file_load(int32_t type, std::string& file_path, bool play_on_end,
|
||||
float_t start, float end, float fade_in_time, float_t fade_out_time, bool a9);
|
||||
int32_t get_master_volume(int32_t index);
|
||||
int32_t get_volume(int32_t index);
|
||||
int32_t include_flags(pv_game_music_flags flags);
|
||||
int32_t load(int32_t type, std::string& file_path, bool wait_load, float_t time, bool a6);
|
||||
void ogg_free();
|
||||
int32_t ogg_init();
|
||||
int32_t ogg_load(std::string& file_path, float_t start);
|
||||
int32_t ogg_reset();
|
||||
int32_t ogg_stop();
|
||||
int32_t play();
|
||||
int32_t play(int32_t type, std::string& file_path, bool play_on_end,
|
||||
float_t start, float end, float fade_in_time, float_t fade_out_time, bool a9);
|
||||
void play(int32_t type, std::string& file_path, float_t start,
|
||||
float_t end, bool play_on_end, bool a7, float_t fade_out_time, bool a10);
|
||||
int32_t play_or_stop();
|
||||
void reset();
|
||||
void reset_args();
|
||||
void set_args(int32_t type, std::string& file_path, float_t start, bool a5);
|
||||
int32_t set_channel_pair_volume(int32_t channel_pair, int32_t value);
|
||||
int32_t set_channel_pair_volume_map(int32_t channel_pair, int32_t value);
|
||||
int32_t set_fade_out(float_t fadeout_time, uint8_t stop);
|
||||
int32_t set_master_volume(int32_t value);
|
||||
int32_t set_ogg_args(std::string& file_path, float_t start, bool wait_load);
|
||||
int32_t set_ogg_pause_state(uint8_t pause_state);
|
||||
int32_t set_pause(int32_t pause);
|
||||
void set_volume_map(int32_t index, int32_t value);
|
||||
int32_t stop();
|
||||
void stop_reset_flags();
|
||||
};
|
||||
|
||||
pv_game* _pv_game;
|
||||
TaskPvGame* task_pv_game;
|
||||
pv_game_music* pv_game_music_data;
|
||||
|
||||
extern render_context* rctx_ptr;
|
||||
|
||||
static pv_game_music* pv_game_music_get();
|
||||
|
||||
pv_play_data_motion_data::pv_play_data_motion_data() : rob_chr(), current_time(),
|
||||
duration(), start_pos(), end_pos(), start_rot(), end_rot() {
|
||||
mot_smooth_len = 12.0f;
|
||||
@@ -269,8 +380,15 @@ pv_game_data::~pv_game_data() {
|
||||
|
||||
}
|
||||
|
||||
pv_game::pv_game() : loaded(), field_1(), field_2(), end_pv(), field_4(),
|
||||
state(), field_C(), pv_id(), field_14(), modules(), items(), field_90() {
|
||||
pv_game_item_mask::pv_game_item_mask() {
|
||||
arr[0] = true;
|
||||
arr[1] = true;
|
||||
arr[2] = true;
|
||||
arr[3] = true;
|
||||
}
|
||||
|
||||
pv_game::pv_game() : loaded(), field_1(), field_2(), end_pv(),
|
||||
field_4(), state(), field_C(), pv_id(), field_14(), modules(), items() {
|
||||
|
||||
}
|
||||
|
||||
@@ -278,6 +396,11 @@ pv_game::~pv_game() {
|
||||
|
||||
}
|
||||
|
||||
pv_game_init_data::pv_game_init_data() : pv_id(), difficulty(), field_C(), score_percentage_clear(),
|
||||
life_gauge_safety_time(), life_gauge_border(), field_18(), modules(), items() {
|
||||
|
||||
}
|
||||
|
||||
void pv_game_init_data::reset() {
|
||||
pv_id = 0;
|
||||
difficulty = 0;
|
||||
@@ -290,31 +413,31 @@ void pv_game_init_data::reset() {
|
||||
i = 0;
|
||||
for (rob_chara_pv_data_item& i : items)
|
||||
i = {};
|
||||
for (struc_653& i : field_94)
|
||||
for (pv_game_item_mask& i : items_mask)
|
||||
i = {};
|
||||
}
|
||||
|
||||
TaskPvGame::InitData::InitData() : data(), field_190(), field_191(), no_fail(),
|
||||
field_193(), field_194(), field_195(), field_196(), field_197(), field_198(), field_19C() {
|
||||
TaskPvGame::Args::Args() : init_data(), field_190(), field_191(), no_fail(),
|
||||
field_193(), field_194(), field_195(), field_196(), field_197(), test_pv(), option() {
|
||||
Reset();
|
||||
}
|
||||
|
||||
TaskPvGame::InitData::~InitData() {
|
||||
TaskPvGame::Args::~Args() {
|
||||
|
||||
}
|
||||
|
||||
void TaskPvGame::InitData::Clear() {
|
||||
field_B0.clear();
|
||||
field_D0.clear();
|
||||
field_F0.clear();
|
||||
field_110.clear();
|
||||
field_130.clear();
|
||||
field_150.clear();
|
||||
field_170.clear();
|
||||
void TaskPvGame::Args::Clear() {
|
||||
se_name.clear();
|
||||
slide_se_name.clear();
|
||||
chainslide_first_name.clear();
|
||||
chainslide_sub_name.clear();
|
||||
chainslide_success_name.clear();
|
||||
chainslide_failure_name.clear();
|
||||
slidertouch_name.clear();
|
||||
}
|
||||
|
||||
void TaskPvGame::InitData::Reset() {
|
||||
data.reset();
|
||||
void TaskPvGame::Args::Reset() {
|
||||
init_data.reset();
|
||||
Clear();
|
||||
field_190 = false;
|
||||
field_191 = true;
|
||||
@@ -324,12 +447,12 @@ void TaskPvGame::InitData::Reset() {
|
||||
field_195 = false;
|
||||
field_196 = false;
|
||||
field_197 = false;
|
||||
field_198 = false;
|
||||
field_19C = 0;
|
||||
test_pv = false;
|
||||
option = 0;
|
||||
}
|
||||
|
||||
TaskPvGame::Data::Data() : field_0(), data(), field_190(), field_191(), no_fail(),
|
||||
field_193(), field_194(), field_195(), field_196(), field_198() {
|
||||
TaskPvGame::Data::Data() : field_0(), init_data(), field_190(), field_191(), no_fail(),
|
||||
field_193(), field_194(), field_195(), field_196(), option() {
|
||||
Reset();
|
||||
}
|
||||
|
||||
@@ -338,18 +461,18 @@ TaskPvGame::Data::~Data() {
|
||||
}
|
||||
|
||||
void TaskPvGame::Data::Clear() {
|
||||
field_B0.clear();
|
||||
field_D0.clear();
|
||||
field_F0.clear();
|
||||
field_110.clear();
|
||||
field_130.clear();
|
||||
field_150.clear();
|
||||
field_170.clear();
|
||||
se_name.clear();
|
||||
slide_se_name.clear();
|
||||
chainslide_first_name.clear();
|
||||
chainslide_sub_name.clear();
|
||||
chainslide_success_name.clear();
|
||||
chainslide_failure_name.clear();
|
||||
slidertouch_name.clear();
|
||||
}
|
||||
|
||||
void TaskPvGame::Data::Reset() {
|
||||
field_0 = 1;
|
||||
data.reset();
|
||||
init_data.reset();
|
||||
Clear();
|
||||
field_190 = false;
|
||||
field_191 = true;
|
||||
@@ -358,7 +481,7 @@ void TaskPvGame::Data::Reset() {
|
||||
field_194 = false;
|
||||
field_195 = false;
|
||||
field_196 = false;
|
||||
field_198 = 0;
|
||||
option = 0;
|
||||
}
|
||||
|
||||
TaskPvGame::TaskPvGame() {
|
||||
@@ -370,12 +493,13 @@ TaskPvGame::~TaskPvGame() {
|
||||
}
|
||||
|
||||
bool TaskPvGame::Init() {
|
||||
//Load(data);
|
||||
//touch_util::touch_reaction_set_enable(0);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TaskPvGame::Ctrl() {
|
||||
return true;
|
||||
//return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool TaskPvGame::Dest() {
|
||||
@@ -386,46 +510,507 @@ void TaskPvGame::Disp() {
|
||||
|
||||
}
|
||||
|
||||
bool task_pv_game_add_task(TaskPvGame::InitData* init_data) {
|
||||
task_pv_game.data.Reset();
|
||||
bool task_pv_game_add_task(TaskPvGame::Args& args) {
|
||||
task_pv_game->data.Reset();
|
||||
|
||||
task_pv_game.data.field_0 = 1;
|
||||
task_pv_game.data.data = init_data->data;
|
||||
task_pv_game.data.field_B0 = init_data->field_B0;
|
||||
task_pv_game.data.field_D0 = init_data->field_D0;
|
||||
task_pv_game.data.field_F0 = init_data->field_F0;
|
||||
task_pv_game.data.field_110 = init_data->field_110;
|
||||
task_pv_game.data.field_130 = init_data->field_130;
|
||||
task_pv_game.data.field_150 = init_data->field_150;
|
||||
task_pv_game.data.field_170 = init_data->field_170;
|
||||
task_pv_game.data.field_190 = init_data->field_190;
|
||||
task_pv_game.data.field_191 = !init_data->field_195;
|
||||
task_pv_game.data.no_fail = init_data->no_fail;
|
||||
if (init_data->field_191) {
|
||||
task_pv_game.data.field_0 = 2;
|
||||
task_pv_game.data.field_193 = init_data->field_193;
|
||||
task_pv_game->data.field_0 = 1;
|
||||
task_pv_game->data.init_data = args.init_data;
|
||||
task_pv_game->data.se_name.assign(args.se_name);
|
||||
task_pv_game->data.slide_se_name.assign(args.slide_se_name);
|
||||
task_pv_game->data.chainslide_first_name.assign(args.chainslide_first_name);
|
||||
task_pv_game->data.chainslide_sub_name.assign(args.chainslide_sub_name);
|
||||
task_pv_game->data.chainslide_success_name.assign(args.chainslide_success_name);
|
||||
task_pv_game->data.chainslide_failure_name.assign(args.chainslide_failure_name);
|
||||
task_pv_game->data.slidertouch_name.assign(args.slidertouch_name);
|
||||
task_pv_game->data.field_190 = args.field_190;
|
||||
task_pv_game->data.field_191 = !args.field_195;
|
||||
task_pv_game->data.no_fail = args.no_fail;
|
||||
if (args.field_191) {
|
||||
task_pv_game->data.field_0 = 2;
|
||||
task_pv_game->data.field_193 = args.field_193;
|
||||
}
|
||||
else
|
||||
task_pv_game.data.field_193 = 1;
|
||||
task_pv_game.data.field_194 = init_data->field_195;
|
||||
task_pv_game.data.field_195 = init_data->field_196;
|
||||
task_pv_game.data.field_196 = init_data->field_197;
|
||||
task_pv_game.data.field_198 = init_data->field_19C;
|
||||
task_pv_game->data.field_193 = 1;
|
||||
task_pv_game->data.field_194 = args.field_195;
|
||||
task_pv_game->data.field_195 = args.field_196;
|
||||
task_pv_game->data.field_196 = args.field_197;
|
||||
task_pv_game->data.option = args.option;
|
||||
|
||||
if (init_data->field_198)
|
||||
return app::TaskWork::AddTask(&task_pv_game, "PVGAME");
|
||||
if (args.test_pv)
|
||||
return app::TaskWork::AddTask(task_pv_game, "PVGAME");
|
||||
else
|
||||
return app::TaskWork::AddTask(&task_pv_game, 0, "PVGAME");
|
||||
return app::TaskWork::AddTask(task_pv_game, 0, "PVGAME");
|
||||
}
|
||||
|
||||
bool task_pv_game_check_task_ready() {
|
||||
return app::TaskWork::CheckTaskReady(&task_pv_game);
|
||||
return app::TaskWork::CheckTaskReady(task_pv_game);
|
||||
}
|
||||
|
||||
bool task_pv_game_del_task() {
|
||||
if (!app::TaskWork::CheckTaskReady(&task_pv_game))
|
||||
if (!app::TaskWork::CheckTaskReady(task_pv_game))
|
||||
return true;
|
||||
|
||||
task_pv_game.DelTask();
|
||||
task_pv_game->DelTask();
|
||||
return false;
|
||||
}
|
||||
|
||||
void pv_game_music_fade::reset() {
|
||||
start = 0;
|
||||
value = 0;
|
||||
time = 0.0f;
|
||||
remain = 0.0f;
|
||||
action = PV_GAME_MUSIC_ACTION_NONE;
|
||||
enable = false;
|
||||
}
|
||||
|
||||
pv_game_music_args::pv_game_music_args() : type(), start(), field_2C() {
|
||||
|
||||
}
|
||||
|
||||
pv_game_music_args::~pv_game_music_args() {
|
||||
|
||||
}
|
||||
|
||||
pv_game_music_ogg::pv_game_music_ogg() : playback() {
|
||||
|
||||
}
|
||||
|
||||
pv_game_music_ogg::~pv_game_music_ogg() {
|
||||
|
||||
}
|
||||
|
||||
pv_game_music::pv_game_music() : flags(), pause(), fade_in(), fade_out(), no_fade(),
|
||||
no_fade_remain(), fade_out_time_req(), fade_out_action_req(), type(), start(), end(),
|
||||
play_on_end(), fade_in_time(), fade_out_time(), field_9C(), loaded(), ogg() {
|
||||
volume = 100;
|
||||
master_volume = 100;
|
||||
channel_pair_volume[0] = 100;
|
||||
channel_pair_volume[1] = 100;
|
||||
channel_pair_volume[2] = 100;
|
||||
channel_pair_volume[3] = 100;
|
||||
reset();
|
||||
}
|
||||
|
||||
pv_game_music::~pv_game_music() {
|
||||
|
||||
}
|
||||
|
||||
bool pv_game_music::check_args(int32_t type, std::string& file_path, float_t start) {
|
||||
bool ret = true;
|
||||
if (args.type != type)
|
||||
ret = false;
|
||||
if (args.file_path.compare(file_path))
|
||||
ret = false;
|
||||
if (args.start != start)
|
||||
ret = false;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void pv_game_music::ctrl(float_t delta_time) {
|
||||
if (no_fade && !pause) {
|
||||
no_fade_remain -= delta_time;
|
||||
if (no_fade_remain <= 0.0f) {
|
||||
fade_out.enable = true;
|
||||
fade_out.start = get_volume(0);
|
||||
fade_out.value = 0;
|
||||
fade_out.time = fade_out_time_req;
|
||||
fade_out.remain = fade_out_time_req;
|
||||
fade_out.action = fade_out_action_req;
|
||||
no_fade = false;
|
||||
no_fade_remain = 0.0f;
|
||||
fade_out_time_req = 0.0f;
|
||||
fade_out_action_req = PV_GAME_MUSIC_ACTION_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
if (fade_in.enable && !pause) {
|
||||
fade_in.remain -= delta_time;
|
||||
if (fade_in.remain > 0.0f) {
|
||||
int32_t value = fade_in.value;
|
||||
if (fade_in.time > 0.0f)
|
||||
value = (int32_t)((float_t)value - (float_t)(value - fade_in.start) * (fade_in.remain / fade_in.time));
|
||||
set_volume_map(0, value);
|
||||
}
|
||||
else
|
||||
fade_in_end();
|
||||
}
|
||||
|
||||
if (fade_out.enable && !pause) {
|
||||
fade_out.remain -= delta_time;
|
||||
if (fade_out.remain > 0.0f) {
|
||||
int32_t value = fade_out.value;
|
||||
if (fade_out.time > 0.0f)
|
||||
value = (int32_t)((float_t)value - (float_t)(value - fade_out.start) * (fade_out.remain / fade_out.time));
|
||||
set_volume_map(0, value);
|
||||
}
|
||||
else
|
||||
fade_out_end();
|
||||
}
|
||||
|
||||
if (flags & PV_GAME_MUSIC_OGG) {
|
||||
if (ogg->playback->GetFileState() == OGG_FILE_HANDLER_FILE_STATE_STOPPED)
|
||||
ogg->playback->Stop();
|
||||
if (ogg->playback->GetFileState() == OGG_FILE_HANDLER_FILE_STATE_STOPPED)
|
||||
play_or_stop();
|
||||
OggPlayback::SetChannelPairVolumePan(ogg->playback);
|
||||
}
|
||||
}
|
||||
|
||||
void pv_game_music::exclude_flags(pv_game_music_flags flags) {
|
||||
if ((this->flags & PV_GAME_MUSIC_OGG) && (flags & PV_GAME_MUSIC_OGG))
|
||||
ogg_free();
|
||||
enum_and(flags, ~flags);
|
||||
}
|
||||
|
||||
void pv_game_music::fade_in_end() {
|
||||
if (!fade_in.enable)
|
||||
return;
|
||||
|
||||
fade_in.enable = false;
|
||||
fade_in.remain = 0.0f;
|
||||
set_volume_map(0, fade_in.value);
|
||||
|
||||
switch (fade_in.action) {
|
||||
case PV_GAME_MUSIC_ACTION_STOP:
|
||||
stop();
|
||||
break;
|
||||
case PV_GAME_MUSIC_ACTION_PAUSE:
|
||||
set_pause(true);
|
||||
break;
|
||||
case PV_GAME_MUSIC_ACTION_PLAY:
|
||||
play();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void pv_game_music::fade_out_end() {
|
||||
if (!fade_out.enable)
|
||||
return;
|
||||
|
||||
fade_out.enable = false;
|
||||
fade_out.remain = 0.0f;
|
||||
set_volume_map(0, fade_out.value);
|
||||
|
||||
switch (fade_out.action) {
|
||||
case PV_GAME_MUSIC_ACTION_STOP:
|
||||
stop();
|
||||
break;
|
||||
case PV_GAME_MUSIC_ACTION_PAUSE:
|
||||
set_pause(true);
|
||||
break;
|
||||
case PV_GAME_MUSIC_ACTION_PLAY:
|
||||
play();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void pv_game_music::file_load(int32_t type, std::string& file_path, bool play_on_end,
|
||||
float_t start, float end, float fade_in_time, float_t fade_out_time, bool a9) {
|
||||
this->type = type;
|
||||
this->file_path.assign(file_path);
|
||||
this->start = start;
|
||||
this->end = end;
|
||||
this->play_on_end = play_on_end;
|
||||
this->fade_out_time = fade_out_time;
|
||||
this->fade_in_time = fade_in_time;
|
||||
field_9C = a9;
|
||||
|
||||
if (fade_in_time > 0.0f) {
|
||||
fade_in.start = 0;
|
||||
fade_in.value = 100;
|
||||
fade_in.time = fade_in_time;
|
||||
fade_in.remain = fade_in_time;
|
||||
fade_in.enable = true;
|
||||
fade_in.action = PV_GAME_MUSIC_ACTION_NONE;
|
||||
}
|
||||
|
||||
if (end <= 0.0f) {
|
||||
fade_out.start = get_volume(0);
|
||||
fade_out.value = 0;
|
||||
fade_out.time = 0.0f;
|
||||
fade_out.remain = 0.0f;
|
||||
fade_out.action = play_on_end ? PV_GAME_MUSIC_ACTION_PLAY : PV_GAME_MUSIC_ACTION_STOP;
|
||||
}
|
||||
else {
|
||||
no_fade = true;
|
||||
no_fade_remain = end + fade_in_time;
|
||||
fade_out_time_req = fade_out_time;
|
||||
fade_out_action_req = play_on_end ? PV_GAME_MUSIC_ACTION_PLAY : PV_GAME_MUSIC_ACTION_STOP;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int32_t pv_game_music::get_master_volume(int32_t index) {
|
||||
if (index)
|
||||
return 0;
|
||||
return master_volume;
|
||||
}
|
||||
|
||||
int32_t pv_game_music::get_volume(int32_t index) {
|
||||
if (index)
|
||||
return 0;
|
||||
return volume;
|
||||
}
|
||||
|
||||
int32_t pv_game_music::include_flags(pv_game_music_flags flags) {
|
||||
if (!(this->flags & PV_GAME_MUSIC_OGG) && (flags & PV_GAME_MUSIC_OGG))
|
||||
ogg_init();
|
||||
enum_or(this->flags, flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t pv_game_music::load(int32_t type, std::string& file_path, bool wait_load, float_t time, bool a6) {
|
||||
if (type == 4 && (set_ogg_args(file_path, time, wait_load) < 0))
|
||||
return -6;
|
||||
|
||||
reset();
|
||||
reset_args();
|
||||
set_args(type, file_path, time, a6);
|
||||
pause = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void pv_game_music::ogg_free() {
|
||||
if (!ogg)
|
||||
return;
|
||||
|
||||
pv_game_music_ogg* ogg = this->ogg;
|
||||
if (ogg->playback) {
|
||||
ogg->playback->Reset();
|
||||
ogg->playback = 0;
|
||||
}
|
||||
delete ogg;
|
||||
this->ogg = 0;
|
||||
}
|
||||
|
||||
int32_t pv_game_music::ogg_init() {
|
||||
if (ogg)
|
||||
return 0;
|
||||
|
||||
ogg = new pv_game_music_ogg;
|
||||
ogg->playback = ogg_playback_data_get(0);
|
||||
if (ogg->playback)
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int32_t pv_game_music::ogg_load(std::string& file_path, float_t start) {
|
||||
if (!(flags & PV_GAME_MUSIC_OGG))
|
||||
return -2;
|
||||
|
||||
start = max_def(start, 0.0f);
|
||||
|
||||
OggFileHandlerFileState file_state = ogg->playback->GetFileState();
|
||||
OggFileHandlerPauseState pause_state = ogg->playback->GetPauseState();
|
||||
|
||||
if (!check_args(4, file_path, start)
|
||||
|| file_state != OGG_FILE_HANDLER_FILE_STATE_PLAYING
|
||||
|| pause_state != OGG_FILE_HANDLER_PAUSE_STATE_PAUSE) {
|
||||
ogg->playback->Stop();
|
||||
ogg->playback->SetLoadTimeSeek(start);
|
||||
ogg->playback->SetPath(file_path);;
|
||||
}
|
||||
|
||||
ogg->playback->SetPauseState(OGG_FILE_HANDLER_PAUSE_STATE_PLAY);
|
||||
ogg->file_path.assign(file_path);
|
||||
loaded = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t pv_game_music::ogg_reset() {
|
||||
sound_stream_array_reset();
|
||||
include_flags(PV_GAME_MUSIC_OGG);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t pv_game_music::ogg_stop() {
|
||||
if (!(flags & PV_GAME_MUSIC_OGG))
|
||||
return -2;
|
||||
|
||||
ogg->playback->Stop();
|
||||
ogg->file_path.clear();
|
||||
loaded = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t pv_game_music::play() {
|
||||
return play(type, file_path, play_on_end, start, end, fade_in_time, fade_out_time, false);
|
||||
}
|
||||
|
||||
int32_t pv_game_music::play(int32_t type, std::string& file_path, bool play_on_end,
|
||||
float_t start, float end, float fade_in_time, float_t fade_out_time, bool a9) {
|
||||
set_volume_map(0, 100);
|
||||
if (type == 4 && (ogg_load(file_path, start) < 0))
|
||||
return -7;
|
||||
|
||||
reset();
|
||||
reset_args();
|
||||
file_load(type, file_path, play_on_end, start, end, fade_in_time, fade_out_time, a9);
|
||||
pause = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void pv_game_music::play(int32_t type, std::string& file_path, float_t start,
|
||||
float_t end, bool play_on_end, bool a7, float_t fade_out_time, bool a10) {
|
||||
play(type, file_path, play_on_end, start, end, 0.0f, fade_out_time, a10);
|
||||
}
|
||||
|
||||
int32_t pv_game_music::play_or_stop() {
|
||||
if (play_on_end)
|
||||
return play();
|
||||
else
|
||||
return stop();
|
||||
}
|
||||
|
||||
void pv_game_music::reset() {
|
||||
fade_in.reset();
|
||||
fade_out.reset();
|
||||
no_fade = false;
|
||||
no_fade_remain = 0.0f;
|
||||
fade_out_time_req = 0.0f;
|
||||
fade_out_action_req = PV_GAME_MUSIC_ACTION_NONE;
|
||||
type = 0;
|
||||
file_path.clear();
|
||||
start = 0.0f;
|
||||
end = 0.0f;
|
||||
play_on_end = false;
|
||||
fade_in_time = 0.0f;
|
||||
fade_out_time = 3.0f;
|
||||
field_9C = false;
|
||||
}
|
||||
|
||||
void pv_game_music::reset_args() {
|
||||
args.type = 0;
|
||||
args.file_path.clear();
|
||||
args.start = 0.0f;
|
||||
args.field_2C = false;
|
||||
}
|
||||
|
||||
void pv_game_music::set_args(int32_t type, std::string& file_path, float_t start, bool a5) {
|
||||
args.type = type;
|
||||
args.file_path.assign(file_path);
|
||||
args.start = start;
|
||||
args.field_2C = a5;
|
||||
}
|
||||
|
||||
int32_t pv_game_music::set_channel_pair_volume(int32_t channel_pair, int32_t value) {
|
||||
if (!(flags & PV_GAME_MUSIC_OGG))
|
||||
return -2;
|
||||
|
||||
ogg->playback->SetChannelPairVolume(channel_pair, ratio_to_db((float_t)value * 0.01f));
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t pv_game_music::set_channel_pair_volume_map(int32_t channel_pair, int32_t value) {
|
||||
if (channel_pair < 0 || channel_pair >= 4)
|
||||
return -1;
|
||||
|
||||
set_channel_pair_volume(channel_pair, value);
|
||||
switch (channel_pair) {
|
||||
case 0:
|
||||
set_channel_pair_volume_map(2, value);
|
||||
break;
|
||||
case 1:
|
||||
set_channel_pair_volume_map(3, value);
|
||||
break;
|
||||
}
|
||||
channel_pair_volume[channel_pair] = value;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t pv_game_music::set_fade_out(float_t fadeout_time, uint8_t stop) {
|
||||
reset();
|
||||
if (fadeout_time == 0.0f) {
|
||||
this->stop();
|
||||
return 0;
|
||||
}
|
||||
|
||||
fade_out.start = get_volume(0);
|
||||
fade_out.value = 0;
|
||||
fade_out.time = fadeout_time;
|
||||
fade_out.remain = fadeout_time;
|
||||
fade_out.action = stop ? PV_GAME_MUSIC_ACTION_STOP : PV_GAME_MUSIC_ACTION_PAUSE;
|
||||
fade_out.enable = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t pv_game_music::set_master_volume(int32_t value) {
|
||||
if (!(flags & PV_GAME_MUSIC_OGG))
|
||||
return -2;
|
||||
|
||||
ogg->playback->SetMasterVolume(ratio_to_db((float)(value * get_master_volume(0) / 100) * 0.01f));
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t pv_game_music::set_ogg_args(std::string& file_path, float_t start, bool wait_load) {
|
||||
if (!(flags & PV_GAME_MUSIC_OGG))
|
||||
return -2;
|
||||
|
||||
start = max_def(start, 0.0f);
|
||||
|
||||
OggFileHandlerFileState file_state = ogg->playback->GetFileState();
|
||||
OggFileHandlerPauseState pause_state = ogg->playback->GetPauseState();
|
||||
|
||||
if (!check_args(4, file_path, start)
|
||||
|| file_state != OGG_FILE_HANDLER_FILE_STATE_PLAYING
|
||||
|| pause_state != OGG_FILE_HANDLER_PAUSE_STATE_PAUSE) {
|
||||
ogg->playback->Stop();
|
||||
ogg->playback->SetLoadTimeSeek(start);
|
||||
ogg->playback->SetPath(file_path);
|
||||
ogg->playback->SetPauseState(OGG_FILE_HANDLER_PAUSE_STATE_PAUSE);
|
||||
ogg->file_path.assign(file_path);
|
||||
|
||||
if (wait_load) {
|
||||
OggFileHandlerFileState file_state = ogg->playback->GetFileState();
|
||||
do {
|
||||
if ((unsigned int)(file_state - 5) <= 1)
|
||||
break;
|
||||
file_state = ogg->playback->GetFileState();
|
||||
} while (file_state != OGG_FILE_HANDLER_FILE_STATE_PLAYING);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t pv_game_music::set_ogg_pause_state(uint8_t pause_state) {
|
||||
if ((flags & PV_GAME_MUSIC_OGG) == 0)
|
||||
return -2;
|
||||
|
||||
if (ogg->playback->GetFileState() == OGG_FILE_HANDLER_FILE_STATE_PLAYING)
|
||||
ogg->playback->SetPauseState((OggFileHandlerPauseState)pause_state);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t pv_game_music::set_pause(int32_t pause) {
|
||||
if ((flags & PV_GAME_MUSIC_OGG) != 0)
|
||||
set_ogg_pause_state(pause != 0);
|
||||
pause = pause == 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void pv_game_music::set_volume_map(int32_t index, int32_t value) {
|
||||
if (index)
|
||||
return;
|
||||
|
||||
if (flags & PV_GAME_MUSIC_OGG)
|
||||
set_master_volume(value);
|
||||
volume = value;
|
||||
}
|
||||
|
||||
int32_t pv_game_music::stop() {
|
||||
if (flags & PV_GAME_MUSIC_OGG)
|
||||
ogg_stop();
|
||||
reset();
|
||||
reset_args();
|
||||
pause = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void pv_game_music::stop_reset_flags() {
|
||||
stop();
|
||||
exclude_flags(PV_GAME_MUSIC_ALL);
|
||||
}
|
||||
|
||||
static pv_game_music* pv_game_music_get() {
|
||||
return pv_game_music_data;
|
||||
}
|
||||
|
||||
+31
-27
@@ -491,8 +491,10 @@ struct pv_game_data {
|
||||
~pv_game_data();
|
||||
};
|
||||
|
||||
struct struc_653 {
|
||||
bool field_0[4];
|
||||
struct pv_game_item_mask {
|
||||
bool arr[4];
|
||||
|
||||
pv_game_item_mask();
|
||||
};
|
||||
|
||||
struct pv_game {
|
||||
@@ -507,7 +509,7 @@ struct pv_game {
|
||||
int32_t field_14;
|
||||
int32_t modules[6];
|
||||
rob_chara_pv_data_item items[6];
|
||||
struc_653 field_90[6];
|
||||
pv_game_item_mask items_mask[6];
|
||||
pv_game_data data;
|
||||
|
||||
pv_game();
|
||||
@@ -524,22 +526,24 @@ struct pv_game_init_data {
|
||||
int32_t field_18;
|
||||
int32_t modules[6];
|
||||
rob_chara_pv_data_item items[6];
|
||||
struc_653 field_94[6];
|
||||
pv_game_item_mask items_mask[6];
|
||||
|
||||
pv_game_init_data();
|
||||
|
||||
void reset();
|
||||
};
|
||||
|
||||
class TaskPvGame : public app::Task {
|
||||
public:
|
||||
struct InitData {
|
||||
pv_game_init_data data;
|
||||
std::string field_B0;
|
||||
std::string field_D0;
|
||||
std::string field_F0;
|
||||
std::string field_110;
|
||||
std::string field_130;
|
||||
std::string field_150;
|
||||
std::string field_170;
|
||||
struct Args {
|
||||
pv_game_init_data init_data;
|
||||
std::string se_name;
|
||||
std::string slide_se_name;
|
||||
std::string chainslide_first_name;
|
||||
std::string chainslide_sub_name;
|
||||
std::string chainslide_success_name;
|
||||
std::string chainslide_failure_name;
|
||||
std::string slidertouch_name;
|
||||
bool field_190;
|
||||
bool field_191;
|
||||
bool no_fail;
|
||||
@@ -548,11 +552,11 @@ public:
|
||||
bool field_195;
|
||||
bool field_196;
|
||||
bool field_197;
|
||||
bool field_198;
|
||||
int32_t field_19C;
|
||||
bool test_pv;
|
||||
int32_t option;
|
||||
|
||||
InitData();
|
||||
~InitData();
|
||||
Args();
|
||||
~Args();
|
||||
|
||||
void Clear();
|
||||
void Reset();
|
||||
@@ -560,14 +564,14 @@ public:
|
||||
|
||||
struct Data {
|
||||
int32_t field_0;
|
||||
pv_game_init_data data;
|
||||
std::string field_B0;
|
||||
std::string field_D0;
|
||||
std::string field_F0;
|
||||
std::string field_110;
|
||||
std::string field_130;
|
||||
std::string field_150;
|
||||
std::string field_170;
|
||||
pv_game_init_data init_data;
|
||||
std::string se_name;
|
||||
std::string slide_se_name;
|
||||
std::string chainslide_first_name;
|
||||
std::string chainslide_sub_name;
|
||||
std::string chainslide_success_name;
|
||||
std::string chainslide_failure_name;
|
||||
std::string slidertouch_name;
|
||||
bool field_190;
|
||||
bool field_191;
|
||||
bool no_fail;
|
||||
@@ -575,7 +579,7 @@ public:
|
||||
bool field_194;
|
||||
bool field_195;
|
||||
bool field_196;
|
||||
int32_t field_198;
|
||||
int32_t option;
|
||||
|
||||
Data();
|
||||
~Data();
|
||||
@@ -593,6 +597,6 @@ public:
|
||||
virtual void Disp() override;
|
||||
};
|
||||
|
||||
bool task_pv_game_add_task(TaskPvGame::InitData* init_data);
|
||||
bool task_pv_game_add_task(TaskPvGame::Args& args);
|
||||
bool task_pv_game_check_task_ready();
|
||||
bool task_pv_game_del_task();
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "game_state.hpp"
|
||||
#include "pv_game.hpp"
|
||||
|
||||
system_startup_detail::TaskSystemStartup task_system_startup;
|
||||
system_startup_detail::TaskSystemStartup* task_system_startup;
|
||||
|
||||
struct system_startup_struct {
|
||||
int32_t state;
|
||||
@@ -101,12 +101,24 @@ namespace system_startup_detail {
|
||||
}
|
||||
}
|
||||
|
||||
void task_system_startup_init() {
|
||||
if (!task_system_startup)
|
||||
task_system_startup = new system_startup_detail::TaskSystemStartup;
|
||||
}
|
||||
|
||||
bool task_system_startup_add_task() {
|
||||
return app::TaskWork::AddTask(&task_system_startup, "SYSTEM_STARTUP");
|
||||
return app::TaskWork::AddTask(task_system_startup, "SYSTEM_STARTUP");
|
||||
}
|
||||
|
||||
bool task_system_startup_del_task() {
|
||||
return task_system_startup.DelTask();
|
||||
return task_system_startup->DelTask();
|
||||
}
|
||||
|
||||
void task_system_startup_free() {
|
||||
if (task_system_startup) {
|
||||
delete task_system_startup;
|
||||
task_system_startup = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static bool system_startup_check_ready() {
|
||||
@@ -124,19 +136,19 @@ static void task_pv_game_init_test_pv() {
|
||||
return;
|
||||
|
||||
task_rob_manager_add_task();
|
||||
TaskPvGame::InitData init_data;
|
||||
init_data.data.pv_id = 999;
|
||||
init_data.data.difficulty = 1;
|
||||
init_data.data.field_C = 0;
|
||||
init_data.data.score_percentage_clear = 50;
|
||||
init_data.data.life_gauge_safety_time = 40;
|
||||
init_data.data.life_gauge_border = 30;
|
||||
init_data.field_190 = false;
|
||||
init_data.field_191 = false;
|
||||
init_data.no_fail = false;
|
||||
init_data.field_193 = true;
|
||||
init_data.field_194 = true;
|
||||
init_data.field_195 = true;
|
||||
init_data.field_198 = true;
|
||||
task_pv_game_add_task(&init_data);
|
||||
TaskPvGame::Args args;
|
||||
args.init_data.pv_id = 999;
|
||||
args.init_data.difficulty = 1;
|
||||
args.init_data.field_C = 0;
|
||||
args.init_data.score_percentage_clear = 50;
|
||||
args.init_data.life_gauge_safety_time = 40;
|
||||
args.init_data.life_gauge_border = 30;
|
||||
args.field_190 = false;
|
||||
args.field_191 = false;
|
||||
args.no_fail = false;
|
||||
args.field_193 = true;
|
||||
args.field_194 = true;
|
||||
args.field_195 = true;
|
||||
args.test_pv = true;
|
||||
task_pv_game_add_task(args);
|
||||
}
|
||||
|
||||
@@ -25,5 +25,7 @@ namespace system_startup_detail {
|
||||
|
||||
extern int32_t system_startup_ready;
|
||||
|
||||
extern void task_system_startup_init();
|
||||
extern bool task_system_startup_add_task();
|
||||
extern bool task_system_startup_del_task();
|
||||
extern void task_system_startup_free();
|
||||
|
||||
Reference in New Issue
Block a user