mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-30 00:41:24 +00:00
- initial framework for scriptification of screen jobs.
This commit is contained in:
parent
4a7430c8e4
commit
1022564cab
10 changed files with 289 additions and 2 deletions
|
@ -49,6 +49,7 @@
|
|||
#include "s_music.h"
|
||||
#include "i_interface.h"
|
||||
#include "base_sbar.h"
|
||||
#include "image.h"
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
@ -477,6 +478,20 @@ DEFINE_ACTION_FUNCTION_NATIVE(_TexMan, OkForLocalization, OkForLocalization_)
|
|||
ACTION_RETURN_INT(OkForLocalization_(name, subst));
|
||||
}
|
||||
|
||||
static int UseGamePalette(int index)
|
||||
{
|
||||
auto tex = TexMan.GameByIndex(index, false);
|
||||
if (!tex) return false;
|
||||
auto image = tex->GetTexture()->GetImage();
|
||||
return image ? image->UseGamePalette() : false;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_TexMan, UseGamePalette, UseGamePalette)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(texid);
|
||||
ACTION_RETURN_INT(UseGamePalette(texid));
|
||||
}
|
||||
|
||||
//=====================================================================================
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue