mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-31 09:20:59 +00:00
- safety commit
This commit is contained in:
parent
29a4955f79
commit
3dbb8cbb11
16 changed files with 75 additions and 56 deletions
|
@ -83,7 +83,6 @@ struct GameInterface
|
|||
virtual bool DrawSpecialScreen(const DVector2 &origin, int tilenum) { return false; }
|
||||
virtual void DrawCenteredTextScreen(const DVector2& origin, const char* text, int position, bool withbg = true);
|
||||
virtual double SmallFontScale() { return 1; }
|
||||
virtual void DrawMenuCaption(const DVector2& origin, const char* text) {}
|
||||
virtual bool SaveGame(FSaveGameNode*) { return true; }
|
||||
virtual bool LoadGame(FSaveGameNode*) { return true; }
|
||||
virtual void SerializeGameState(FSerializer& arc) {}
|
||||
|
|
|
@ -1194,3 +1194,20 @@ void processSetAnim(const char* cmd, FScriptPosition& pos, SetAnim& imp)
|
|||
|
||||
TileSiz tilesiz;
|
||||
PicAnm picanm;
|
||||
|
||||
#include "vm.h"
|
||||
|
||||
static int GetTexture(int tile, int anim)
|
||||
{
|
||||
if (tile < 0 || tile >= MAXTILES) return 0;
|
||||
auto tex = tileGetTexture(tile, anim);
|
||||
return tex ? tex->GetID().GetIndex() : 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_TileFiles, GetTexture, GetTexture)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(tile);
|
||||
PARAM_BOOL(animate);
|
||||
ACTION_RETURN_INT(GetTexture(tile, animate));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue