Files
firestorm/Gameleap/mw4/Content/ShellScripts/gs_single.script
T
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
2026-06-24 21:28:16 -05:00

214 lines
5.2 KiB
Plaintext

#include "Content\\ShellScripts\\stddefs.h"
#include "Content\\ShellScripts\\ScriptStrings.h"
#include "Content\\ShellScripts\\listboxes.script"
#include "Content\\ShellScripts\\mc_listboxes.script"
#include "Content\\ShellScripts\\common_shell.script"
#include "Content\\ShellScripts\\buttons.script"
#include "Content\\ShellScripts\\c_Pane.script"
#include "Content\\ShellScripts\\c_MoviePlayer.script"
#include "Content\\ShellScripts\\c_Text.script"
#include "Content\\ShellScripts\\c_InfoPoint.script"
#include "Content\\ShellScripts\\c_InfoRegion.script"
#include "Content\\ShellScripts\\c_StatLines.script"
#include "Content\\ShellScripts\\c_MissionRegion.script"
#include "Content\\ShellScripts\\ErrorScreen.script"
#include "Content\\ShellScripts\\ShellFunctionHeaders.hpp"
#include "Content\\ShellScripts\\c_rollover.script"
main
{
GUI_CREATE
{
if (@SHELL@init_state4gs_mechbay == -999)
{
@SHELL@init_state4gs_mechbay = 0
callback($$Shell_CallbackHandler$$, ShellInitCampaignScreen)
}
int max_items = 25 // Maximum number of items that can be listed by droplist
//Sets volume of Background Music
int nMusicTmp
callback($$Shell_CallbackHandler$$,ShellOptionsGetSliderValue,MWO_MUSICVOLUME,nMusicTmp)
if nMusicTmp > 25
{
setvolume (0,25)
}
else
{
setvolume (0,nMusicTmp)
}
int i
sound launchSound = SPATH "sfx_mech_explode.WAV"
sound btnTriggeredSound = SPATH "sfx_button5.wav"
int MAX_MCCB_ITEMS = 23
int MAX_MCCB_COLUMNS = 2
int play_opening
int play_closing
play_opening = callback($$Shell_CallbackHandler$$, ShellCampaignPlayIntro)
String closing_movie
play_closing = callback($$Shell_CallbackHandler$$, ShellCampaignPlayEnd, $$m_EndMovieName$$)
if(play_opening == 1)
{
play_opening = 0
//script_run "Content\\ShellScripts\\CampaignCinema.script", 0x1100
//script_pause @CampaignScreen@,2
}
if(play_closing == 1)
{
play_closing = 0
//@SHELL@currentScreen = @SHELL@lastScreen[@SHELL@lastScreenDepth]
//@SHELL@lastScreenDepth--
}
object screen = o_Campaign
}
}
o_Campaign
{
GUI_CREATE
{
object oCampaignMap = s_CampaignScreen
initialize(this)
framerate = 5
}
GUI_INIT
{
callback($$Shell_CallbackHandler$$, ShellTriggerMovie)
//Campaign Map
initialize(oCampaignMap)
}
GUI_DRAW
{
if exists(@SHELL@)
{
if @SHELL@init_state4gs_mechbay != 0 // mech lab
{
int nCamp_Stage
//nCamp_Stage = callback($$CTCL_CheckCampaign$$, 0)
//if 0 < nCamp_Stage
{
int boxcolor = packcolor(0, 0, 0, 255) // black
setpencolor(boxcolor)
drawrect 0, 0 to getresx(), getresy()
}
//else
{
// render @shell@p_bkgnd_4coop, 0, 0, 0
}
}
}
}
GUI_MAILBOX
{
}
GUI_EXECUTE
{
if exists(@SHELL@)
{
if @SHELL@init_state4gs_mechbay == -1 // main menu
{
@SHELL@init_state4gs_mechbay = -999
play btnTriggeredSound,1
callback($$Shell_CallbackHandler$$,ShellOptionsGetSliderValue,MWO_MUSICVOLUME,nMusicTmp)
setvolume (0,nMusicTmp)
unfocus
@SHELL@currentScreen = @SHELL@lastScreen[@SHELL@lastScreenDepth]
@SHELL@lastScreenDepth--
}
if @SHELL@init_state4gs_mechbay == 0 // mech lab
{
@SHELL@init_state4gs_mechbay = -999
unfocus
callback($$Shell_CallbackHandler$$, ShellInitCampaignMechLab)
@SHELL@lastScreenDepth++
@SHELL@lastScreen[@SHELL@lastScreenDepth] = 200 // CAMPAIGNLOBBY
@SHELL@currentScreen = MECHBAY_SCREEN
}
if @SHELL@init_state4gs_mechbay == 1 // launch
{
@SHELL@init_state4gs_mechbay = -999
int nErrorCode = callback($$Shell_CallbackHandler$$, ShellCampaignVerifyLaunchData)
if (nErrorCode == 1)
{
play launchSound,1
if exists(@mouse@)
script_end "mouse.script"
callback($$SetShellCommand$$, StartCampaignGameCommand)
@SHELL@currentScreen = LAUNCHGAME
@SHELL@lastScreenDepth--
unfocus
}
}
}
}
}
s_CampaignScreen
{
GUI_CREATE
{
int i
int nMR_count
int nMRSelected
string szCampMap
string szCampName
//Mission Region Data
callback($$Shell_CallbackHandler$$,ShellCampaignGetMissionRegionCount,nMR_count)
object oMissionRegion[nMR_count]
//Array of Mission Ids to retrieve Mission Map Data
int nMissionIds[nMR_count]
//MR parameters
int nMR_X
int nMR_Y
int nMR_H
int nMR_W
int nMR_status
int nMRNumLance
string szMR_Title
string szMR_Rollover
string szMR_RClick
}
GUI_INIT
{
callback($$Shell_CallbackHandler$$,ShellCampaignGetMissionRegionIDs,nMissionIds[], nMRSelected)
callback($$Shell_CallbackHandler$$,ShellCampaignGetOpData,szCampName,szCampMap)
for (i = 0; i < nMR_count; i++)
{
callback($$Shell_CallbackHandler$$,ShellCampaignGetMissionRegionDATA,nMissionIds[i],nMR_X,nMR_Y,nMR_H,nMR_W,nMR_status, nMRNumLance, szMR_Title,szMR_Rollover, szMR_RClick)
if(nMissionIds[i] = nMRSelected)
{
}
}
}
GUI_ACTIVATE
{
}
GUI_DEACTIVATE
{
}
GUI_MAILBOX
{
}
}