mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
New feature: Minigames are interactive actions that happen in a dedicated screen. For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=347722&#msg_347722
GameDir >= r2350 is required. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8346 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -74,6 +74,8 @@ extern "C" {
|
||||
#include "Encrypted File.h"
|
||||
|
||||
#include "BriefingRoom_Data.h"
|
||||
#include "MiniGame.h" // added by Flugente
|
||||
|
||||
extern UINT8 gubWaitingForAllMercsToExitCode;
|
||||
|
||||
//-------------------------- UB ------------------------------
|
||||
@@ -864,6 +866,9 @@ static int l_NumNonPlayerTeamInSector( lua_State *L );
|
||||
static int l_SetSamSiteHackStatus( lua_State *L );
|
||||
static int l_GetSamSiteHackStatus( lua_State *L );
|
||||
|
||||
static int l_SetMiniGameType( lua_State *L );
|
||||
static int l_SoldierSpendMoney( lua_State *L );
|
||||
|
||||
using namespace std;
|
||||
|
||||
UINT16 idProfil;
|
||||
@@ -1736,6 +1741,9 @@ void IniFunction(lua_State *L, BOOLEAN bQuests )
|
||||
lua_register( L, "NumNonPlayerTeamInSector", l_NumNonPlayerTeamInSector );
|
||||
lua_register( L, "SetSamSiteHackStatus", l_SetSamSiteHackStatus );
|
||||
lua_register( L, "GetSamSiteHackStatus", l_GetSamSiteHackStatus );
|
||||
|
||||
lua_register( L, "SetMiniGameType", l_SetMiniGameType );
|
||||
lua_register( L, "SoldierSpendMoney", l_SoldierSpendMoney );
|
||||
}
|
||||
#ifdef NEWMUSIC
|
||||
BOOLEAN LetLuaMusicControl(UINT8 Init)
|
||||
@@ -10582,16 +10590,12 @@ static int l_SetPendingNewScreenSEXSCREEN (lua_State *L)
|
||||
|
||||
static int l_SetPendingNewScreen (lua_State *L)
|
||||
{
|
||||
UINT8 n = lua_gettop(L);
|
||||
|
||||
UINT8 scr = 0;
|
||||
int i = 0;
|
||||
for (i= 1; i<=n; i++ )
|
||||
if ( lua_gettop( L ) >= 1 )
|
||||
{
|
||||
if (i == 1 ) scr = lua_tointeger(L,i);
|
||||
}
|
||||
UINT32 scr = lua_tointeger( L, 1 );
|
||||
|
||||
SetPendingNewScreen( scr );
|
||||
SetPendingNewScreen( scr );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -13331,3 +13335,28 @@ static int l_GetSamSiteHackStatus( lua_State *L )
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int l_SetMiniGameType( lua_State *L )
|
||||
{
|
||||
if ( lua_gettop( L ) >= 1 )
|
||||
{
|
||||
UINT32 usMiniGame = lua_tointeger( L, 1 );
|
||||
|
||||
SetNextGame( usMiniGame );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int l_SoldierSpendMoney( lua_State *L )
|
||||
{
|
||||
if ( lua_gettop( L ) >= 2 )
|
||||
{
|
||||
UINT8 usId = lua_tointeger( L, 1 );
|
||||
UINT32 amount = lua_tointeger( L, 2 );
|
||||
|
||||
lua_pushinteger( L, SpendMoney( MercPtrs[usId], amount ) );
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user