added even more explicit GetChars() calls.
This commit is contained in:
parent
1717ff47b2
commit
48ba63c022
42 changed files with 230 additions and 214 deletions
|
|
@ -148,7 +148,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DStatusBarCore, DrawTexture, SBar_DrawTexture)
|
|||
void SBar_DrawImage(DStatusBarCore* self, const FString& texid, double x, double y, int flags, double alpha, double w, double h, double scaleX, double scaleY, int style, int color, int translation, double clipwidth)
|
||||
{
|
||||
if (!twod->HasBegun2D()) ThrowAbortException(X_OTHER, "Attempt to draw to screen outside a draw function");
|
||||
self->DrawGraphic(TexMan.CheckForTexture(texid, ETextureType::Any), x, y, flags, alpha, w, h, scaleX, scaleY, ERenderStyle(style), color, translation, clipwidth);
|
||||
self->DrawGraphic(TexMan.CheckForTexture(texid.GetChars(), ETextureType::Any), x, y, flags, alpha, w, h, scaleX, scaleY, ERenderStyle(style), color, translation, clipwidth);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(DStatusBarCore, DrawImage, SBar_DrawImage)
|
||||
|
|
@ -174,7 +174,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DStatusBarCore, DrawImage, SBar_DrawImage)
|
|||
void SBar_DrawImageRotated(DStatusBarCore* self, const FString& texid, double x, double y, int flags, double angle, double alpha, double scaleX, double scaleY, int style, int color, int translation)
|
||||
{
|
||||
if (!twod->HasBegun2D()) ThrowAbortException(X_OTHER, "Attempt to draw to screen outside a draw function");
|
||||
self->DrawRotated(TexMan.CheckForTexture(texid, ETextureType::Any), x, y, flags, angle, alpha, scaleX, scaleY, color, translation, (ERenderStyle)style);
|
||||
self->DrawRotated(TexMan.CheckForTexture(texid.GetChars(), ETextureType::Any), x, y, flags, angle, alpha, scaleX, scaleY, color, translation, (ERenderStyle)style);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(DStatusBarCore, DrawImageRotated, SBar_DrawImageRotated)
|
||||
|
|
@ -433,7 +433,7 @@ DEFINE_ACTION_FUNCTION(_TexMan, GetName)
|
|||
|
||||
static int CheckForTexture(const FString& name, int type, int flags)
|
||||
{
|
||||
return TexMan.CheckForTexture(name, static_cast<ETextureType>(type), flags).GetIndex();
|
||||
return TexMan.CheckForTexture(name.GetChars(), static_cast<ETextureType>(type), flags).GetIndex();
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_TexMan, CheckForTexture, CheckForTexture)
|
||||
|
|
@ -560,7 +560,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_TexMan, CheckRealHeight, CheckRealHeight)
|
|||
|
||||
static int OkForLocalization_(int index, const FString& substitute)
|
||||
{
|
||||
return sysCallbacks.OkForLocalization? sysCallbacks.OkForLocalization(FSetTextureID(index), substitute) : false;
|
||||
return sysCallbacks.OkForLocalization? sysCallbacks.OkForLocalization(FSetTextureID(index), substitute.GetChars()) : false;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_TexMan, OkForLocalization, OkForLocalization_)
|
||||
|
|
@ -788,14 +788,14 @@ DEFINE_ACTION_FUNCTION(_Wads, CheckNumForName)
|
|||
PARAM_INT(ns);
|
||||
PARAM_INT(wadnum);
|
||||
PARAM_BOOL(exact);
|
||||
ACTION_RETURN_INT(fileSystem.CheckNumForName(name, ns, wadnum, exact));
|
||||
ACTION_RETURN_INT(fileSystem.CheckNumForName(name.GetChars(), ns, wadnum, exact));
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_Wads, CheckNumForFullName)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_STRING(name);
|
||||
ACTION_RETURN_INT(fileSystem.CheckNumForFullName(name));
|
||||
ACTION_RETURN_INT(fileSystem.CheckNumForFullName(name.GetChars()));
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_Wads, FindLump)
|
||||
|
|
@ -805,7 +805,7 @@ DEFINE_ACTION_FUNCTION(_Wads, FindLump)
|
|||
PARAM_INT(startlump);
|
||||
PARAM_INT(ns);
|
||||
const bool isLumpValid = startlump >= 0 && startlump < fileSystem.GetNumEntries();
|
||||
ACTION_RETURN_INT(isLumpValid ? fileSystem.FindLump(name, &startlump, 0 != ns) : -1);
|
||||
ACTION_RETURN_INT(isLumpValid ? fileSystem.FindLump(name.GetChars(), &startlump, 0 != ns) : -1);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_Wads, FindLumpFullName)
|
||||
|
|
@ -815,7 +815,7 @@ DEFINE_ACTION_FUNCTION(_Wads, FindLumpFullName)
|
|||
PARAM_INT(startlump);
|
||||
PARAM_BOOL(noext);
|
||||
const bool isLumpValid = startlump >= 0 && startlump < fileSystem.GetNumEntries();
|
||||
ACTION_RETURN_INT(isLumpValid ? fileSystem.FindLumpFullName(name, &startlump, noext) : -1);
|
||||
ACTION_RETURN_INT(isLumpValid ? fileSystem.FindLumpFullName(name.GetChars(), &startlump, noext) : -1);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_Wads, GetLumpName)
|
||||
|
|
@ -1023,7 +1023,7 @@ DEFINE_ACTION_FUNCTION(FKeyBindings, SetBind)
|
|||
}
|
||||
|
||||
|
||||
self->SetBind(k, cmd);
|
||||
self->SetBind(k, cmd.GetChars());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1062,7 +1062,7 @@ DEFINE_ACTION_FUNCTION(FKeyBindings, GetAllKeysForCommand)
|
|||
PARAM_SELF_STRUCT_PROLOGUE(FKeyBindings);
|
||||
PARAM_POINTER(array, TArray<int>);
|
||||
PARAM_STRING(cmd);
|
||||
*array = self->GetKeysForCommand(cmd);
|
||||
*array = self->GetKeysForCommand(cmd.GetChars());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1084,7 +1084,7 @@ DEFINE_ACTION_FUNCTION(FKeyBindings, UnbindACommand)
|
|||
I_FatalError("Attempt to unbind key bindings for '%s' outside of menu code", cmd.GetChars());
|
||||
}
|
||||
|
||||
self->UnbindACommand(cmd);
|
||||
self->UnbindACommand(cmd.GetChars());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1102,7 +1102,7 @@ DEFINE_ACTION_FUNCTION(DOptionMenuItemCommand, DoCommand)
|
|||
}
|
||||
|
||||
UnsafeExecutionScope scope(unsafe);
|
||||
AddCommandString(cmd);
|
||||
AddCommandString(cmd.GetChars());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1147,7 +1147,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_System, StopAllSounds, StopAllSounds)
|
|||
|
||||
static int PlayMusic(const FString& musname, int order, int looped)
|
||||
{
|
||||
return S_ChangeMusic(musname, order, !!looped, true);
|
||||
return S_ChangeMusic(musname.GetChars(), order, !!looped, true);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_System, PlayMusic, PlayMusic)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue