mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-19 13:51:16 +00:00
Fixes
This commit is contained in:
parent
602c3eafc8
commit
9e42ee1236
@ -354,6 +354,9 @@ MxResult LegoOmni::Create(MxOmniCreateParam& p_param)
|
|||||||
else {
|
else {
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to create MxTransitionManager");
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to create MxTransitionManager");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Extension<SiLoader>::Call(Load);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
return result;
|
return result;
|
||||||
// LINE: BETA10 0x1008e35d
|
// LINE: BETA10 0x1008e35d
|
||||||
|
|||||||
@ -200,22 +200,6 @@ inline MxS32 MxVideoPresenter::PrepareRects(RECT& p_rectDest, RECT& p_rectSrc)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_rectDest.bottom > 480) {
|
|
||||||
p_rectDest.bottom = 480;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (p_rectDest.right > 640) {
|
|
||||||
p_rectDest.right = 640;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (p_rectSrc.bottom > 480) {
|
|
||||||
p_rectSrc.bottom = 480;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (p_rectSrc.right > 640) {
|
|
||||||
p_rectSrc.right = 640;
|
|
||||||
}
|
|
||||||
|
|
||||||
int height, width;
|
int height, width;
|
||||||
if ((height = (p_rectDest.bottom - p_rectDest.top) + 1) <= 1 ||
|
if ((height = (p_rectDest.bottom - p_rectDest.top) + 1) <= 1 ||
|
||||||
(width = (p_rectDest.right - p_rectDest.left) + 1) <= 1) {
|
(width = (p_rectDest.right - p_rectDest.left) + 1) <= 1) {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
#include <object.h>
|
#include <object.h>
|
||||||
|
|
||||||
si::Interleaf::Version version = si::Interleaf::Version2_2;
|
si::Interleaf::Version version = si::Interleaf::Version2_2;
|
||||||
uint32_t bufferSize = 65535;
|
uint32_t bufferSize = 65536;
|
||||||
uint32_t bufferCount = 8;
|
uint32_t bufferCount = 8;
|
||||||
|
|
||||||
std::string out;
|
std::string out;
|
||||||
|
|||||||
@ -14,6 +14,7 @@ class SiLoader {
|
|||||||
typedef std::pair<MxAtomId, MxU32> StreamObject;
|
typedef std::pair<MxAtomId, MxU32> StreamObject;
|
||||||
|
|
||||||
static void Initialize();
|
static void Initialize();
|
||||||
|
static bool Load();
|
||||||
static bool StartWith(StreamObject p_object);
|
static bool StartWith(StreamObject p_object);
|
||||||
static bool RemoveWith(StreamObject p_object, LegoWorld* world);
|
static bool RemoveWith(StreamObject p_object, LegoWorld* world);
|
||||||
|
|
||||||
@ -29,9 +30,11 @@ class SiLoader {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef EXTENSIONS
|
#ifdef EXTENSIONS
|
||||||
|
constexpr auto Load = &SiLoader::Load;
|
||||||
constexpr auto StartWith = &SiLoader::StartWith;
|
constexpr auto StartWith = &SiLoader::StartWith;
|
||||||
constexpr auto RemoveWith = &SiLoader::RemoveWith;
|
constexpr auto RemoveWith = &SiLoader::RemoveWith;
|
||||||
#else
|
#else
|
||||||
|
constexpr decltype(&SiLoader::Load) Load = nullptr;
|
||||||
constexpr decltype(&SiLoader::StartWith) StartWith = nullptr;
|
constexpr decltype(&SiLoader::StartWith) StartWith = nullptr;
|
||||||
constexpr decltype(&SiLoader::RemoveWith) RemoveWith = nullptr;
|
constexpr decltype(&SiLoader::RemoveWith) RemoveWith = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -15,6 +15,10 @@ std::vector<std::pair<SiLoader::StreamObject, SiLoader::StreamObject>> SiLoader:
|
|||||||
bool SiLoader::enabled = false;
|
bool SiLoader::enabled = false;
|
||||||
|
|
||||||
void SiLoader::Initialize()
|
void SiLoader::Initialize()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SiLoader::Load()
|
||||||
{
|
{
|
||||||
char* files = SDL_strdup(options["si loader:files"].c_str());
|
char* files = SDL_strdup(options["si loader:files"].c_str());
|
||||||
char* saveptr;
|
char* saveptr;
|
||||||
@ -24,6 +28,7 @@ void SiLoader::Initialize()
|
|||||||
}
|
}
|
||||||
|
|
||||||
SDL_free(files);
|
SDL_free(files);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SiLoader::StartWith(StreamObject p_object)
|
bool SiLoader::StartWith(StreamObject p_object)
|
||||||
@ -56,12 +61,18 @@ bool SiLoader::LoadFile(const char* p_file)
|
|||||||
si::Interleaf si;
|
si::Interleaf si;
|
||||||
MxStreamController* controller;
|
MxStreamController* controller;
|
||||||
|
|
||||||
if (si.Read(p_file) != si::Interleaf::ERROR_SUCCESS) {
|
MxString path = MxString(MxOmni::GetHD()) + p_file;
|
||||||
SDL_Log("Could not parse SI file %s", p_file);
|
path.MapPathToFilesystem();
|
||||||
return false;
|
if (si.Read(path.GetData()) != si::Interleaf::ERROR_SUCCESS) {
|
||||||
|
path = MxString(MxOmni::GetCD()) + p_file;
|
||||||
|
path.MapPathToFilesystem();
|
||||||
|
if (si.Read(path.GetData()) != si::Interleaf::ERROR_SUCCESS) {
|
||||||
|
SDL_Log("Could not parse SI file %s", p_file);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((controller = Streamer()->Open(p_file, MxStreamer::e_diskStream)) != SUCCESS) {
|
if (!(controller = Streamer()->Open(p_file, MxStreamer::e_diskStream))) {
|
||||||
SDL_Log("Could not load SI file %s", p_file);
|
SDL_Log("Could not load SI file %s", p_file);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -75,7 +86,7 @@ bool SiLoader::LoadFile(const char* p_file)
|
|||||||
uint32_t id;
|
uint32_t id;
|
||||||
|
|
||||||
if ((directive = SDL_strstr(extra.c_str(), "StartWith:"))) {
|
if ((directive = SDL_strstr(extra.c_str(), "StartWith:"))) {
|
||||||
if (SDL_sscanf(extra.c_str(), "StartWith:%255[^;];%d", atom, &id) == 2) {
|
if (SDL_sscanf(directive, "StartWith:%255[^;];%d", atom, &id) == 2) {
|
||||||
startWith.emplace_back(
|
startWith.emplace_back(
|
||||||
StreamObject{MxAtomId{atom, e_lowerCase2}, id},
|
StreamObject{MxAtomId{atom, e_lowerCase2}, id},
|
||||||
StreamObject{controller->GetAtom(), object->id_}
|
StreamObject{controller->GetAtom(), object->id_}
|
||||||
@ -84,7 +95,7 @@ bool SiLoader::LoadFile(const char* p_file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((directive = SDL_strstr(extra.c_str(), "RemoveWith:"))) {
|
if ((directive = SDL_strstr(extra.c_str(), "RemoveWith:"))) {
|
||||||
if (SDL_sscanf(extra.c_str(), "RemoveWith:%255[^;];%d", atom, &id) == 2) {
|
if (SDL_sscanf(directive, "RemoveWith:%255[^;];%d", atom, &id) == 2) {
|
||||||
removeWith.emplace_back(
|
removeWith.emplace_back(
|
||||||
StreamObject{MxAtomId{atom, e_lowerCase2}, id},
|
StreamObject{MxAtomId{atom, e_lowerCase2}, id},
|
||||||
StreamObject{controller->GetAtom(), object->id_}
|
StreamObject{controller->GetAtom(), object->id_}
|
||||||
@ -95,5 +106,10 @@ bool SiLoader::LoadFile(const char* p_file)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto& x = startWith;
|
||||||
|
const auto& y = removeWith;
|
||||||
|
|
||||||
|
assert(false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user