- the first menu function has been scriptified.

This commit is contained in:
Christoph Oelckers 2017-02-10 00:25:50 +01:00
commit 07ba75762b
12 changed files with 176 additions and 100 deletions

View file

@ -103,6 +103,15 @@ DEFINE_ACTION_FUNCTION(_Screen, GetHeight)
ACTION_RETURN_INT(screen->GetHeight());
}
DEFINE_ACTION_FUNCTION(_Screen, PaletteColor)
{
PARAM_PROLOGUE;
PARAM_INT(index);
if (index < 0 || index > 255) index = 0;
else index = GPalette.BaseColors[index];
ACTION_RETURN_INT(index);
}
static int PalFromRGB(uint32 rgb)
{
if (LastPal >= 0 && LastRGB == rgb)