- initial framework for scriptification of screen jobs.

This commit is contained in:
Christoph Oelckers 2021-04-22 18:52:39 +02:00
parent 4a7430c8e4
commit 1022564cab
10 changed files with 289 additions and 2 deletions

View file

@ -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));
}
//=====================================================================================
//