mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Interactive actions now allows displaying images.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23144&goto=363478&#msg_363478 GameDir >= r2597 recommended. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9131 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -878,6 +878,7 @@ static int l_SetSamSiteHackStatus( lua_State *L );
|
||||
static int l_GetSamSiteHackStatus( lua_State *L );
|
||||
|
||||
static int l_SetMiniGameType( lua_State *L );
|
||||
static int l_DisplayPictureTactical( lua_State *L );
|
||||
static int l_SoldierSpendMoney( lua_State *L );
|
||||
|
||||
static int l_SetAdditionalDialogue( lua_State *L );
|
||||
@@ -1772,6 +1773,7 @@ void IniFunction(lua_State *L, BOOLEAN bQuests )
|
||||
lua_register( L, "GetSamSiteHackStatus", l_GetSamSiteHackStatus );
|
||||
|
||||
lua_register( L, "SetMiniGameType", l_SetMiniGameType );
|
||||
lua_register( L, "DisplayPictureTactical", l_DisplayPictureTactical );
|
||||
lua_register( L, "SoldierSpendMoney", l_SoldierSpendMoney );
|
||||
|
||||
lua_register( L, "SetAdditionalDialogue", l_SetAdditionalDialogue );
|
||||
@@ -13247,6 +13249,27 @@ static int l_SetMiniGameType( lua_State *L )
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int l_DisplayPictureTactical( lua_State *L )
|
||||
{
|
||||
if ( lua_gettop( L ) >= 2 )
|
||||
{
|
||||
size_t len = 0;
|
||||
const char* str = lua_tolstring( L, 1, &len );
|
||||
bool stretch = lua_tointeger( L, 2 );
|
||||
|
||||
if ( guiCurrentScreen == GAME_SCREEN
|
||||
&& (std::strstr(str, ".png") != NULL || std::strstr( str, ".PNG" ) != NULL ) )
|
||||
{
|
||||
SetInteractivePicture( str, stretch );
|
||||
|
||||
SetNextGame( PICTURE );
|
||||
SetPendingNewScreen( MINIGAME_SCREEN );
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int l_SoldierSpendMoney( lua_State *L )
|
||||
{
|
||||
if ( lua_gettop( L ) >= 2 )
|
||||
|
||||
Reference in New Issue
Block a user