mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-04 14:05:32 +02:00
Ignore RGSS Linker, fix(?) Essentials mouse
This commit is contained in:
parent
ef7ced8fed
commit
5e41f16851
2 changed files with 24 additions and 2 deletions
|
@ -516,6 +516,19 @@ static void runRMXPScripts(BacktraceData &btData)
|
||||||
btData.scriptNames.insert(buf, scriptName);
|
btData.scriptNames.insert(buf, scriptName);
|
||||||
|
|
||||||
int state;
|
int state;
|
||||||
|
|
||||||
|
#if defined(__WIN32__) && defined(USE_ESSENTIALS_FIXES)
|
||||||
|
// I can hack around RGSS Linker and have it work properly,
|
||||||
|
// but (A) working with essentials is already hacky enough
|
||||||
|
// and (B) we can simply just use F-MOD as MKXP's audio backend
|
||||||
|
// if we absolutely had to.
|
||||||
|
|
||||||
|
// GENERATE WIKI PAGES is just excluded because of a difference
|
||||||
|
// in ruby's regex code from 1.8.1 -> 1.8.7 that I haven't worked out yet
|
||||||
|
if (strcmp(scriptName, "RGSS Linker")
|
||||||
|
&& strcmp(scriptName, "F-mod main script")
|
||||||
|
&& strcmp(scriptName, "GENERATE WIKI PAGES"))
|
||||||
|
#endif
|
||||||
evalString(string, fname, &state);
|
evalString(string, fname, &state);
|
||||||
if (state)
|
if (state)
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -223,12 +223,21 @@ MiniDL_call(int argc, VALUE *argv, VALUE self)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetCursorPos is broken too, apparently
|
// Mouse support
|
||||||
|
|
||||||
else if_func_is("GetCursorPos")
|
else if_func_is("GetCursorPos")
|
||||||
{
|
{
|
||||||
int *output = (int*)params[0];
|
int *output = (int*)params[0];
|
||||||
int x, y;
|
int x, y;
|
||||||
|
SDL_GetGlobalMouseState(&x, &y);
|
||||||
|
output[0] = x;
|
||||||
|
output[1] = y;
|
||||||
|
ret = true;
|
||||||
|
}
|
||||||
|
else if_func_is("ScreenToClient")
|
||||||
|
{
|
||||||
|
int *output = (int*)params[1];
|
||||||
|
int x, y;
|
||||||
SDL_GetMouseState(&x, &y);
|
SDL_GetMouseState(&x, &y);
|
||||||
output[0] = x;
|
output[0] = x;
|
||||||
output[1] = y;
|
output[1] = y;
|
||||||
|
|
Loading…
Add table
Reference in a new issue