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.
206 lines
3.9 KiB
Plaintext
206 lines
3.9 KiB
Plaintext
// jcem - start
|
|
#include "Content\\ShellScripts\\ctcl_params.h"
|
|
// jcem - end
|
|
#include "Content\\ShellScripts\\stddefs.h"
|
|
#include "Content\\Shellscripts\\ShellFunctionHeaders.hpp"
|
|
#include "Content\\ShellScripts\\NetParams.h"
|
|
#include "Content\\GameTypes.h"
|
|
#include "Content\\ShellScripts\\buttons.script"
|
|
#include "Content\\ShellScripts\\listboxes.script"
|
|
#include "Content\\ShellScripts\\Multiplayer\\lobby_listbox.script"
|
|
#include "Content\\ShellScripts\\Multiplayer\\chatbox.script"
|
|
#include "Content\\ShellScripts\\editbox.script"
|
|
#define SCRIPTPATH "content\\Shellscripts\\Multiplayer\\"
|
|
|
|
main
|
|
{
|
|
|
|
GUI_CREATE
|
|
{
|
|
location = 0,0,255
|
|
if (!exists(@mouse@))
|
|
script_run "Content\\ShellScripts\\mouse.script", 0x1700
|
|
|
|
if !callback($$CTCL_IsConsole$$) // jcem - start
|
|
script_run SCRIPTPATH "waitmessage.script", 0x1500
|
|
|
|
//listboxes is a bit whacked, if you start mech lab and net scripts with it it totaly weirds out
|
|
// chill prevents any overlap while one shuts down and the other starts
|
|
int chill = 0
|
|
int currentScreen = MULTIPLAYER_SCREEN
|
|
object netScrn = network_scrn
|
|
object mechBayScrn = mechbay_scrn
|
|
object cinemaScrn = cinema_scrn
|
|
|
|
// mdm - used for ensuring error dialog is shown only once per error occurence
|
|
// NoErrorDialog=1 if no error dialog has been shown
|
|
// NoErrorDialog=0 if an error dialog has been shown
|
|
int NoErrorDialog = 1
|
|
}
|
|
|
|
GUI_DESTROY
|
|
{
|
|
if exists(@waitmessage@)
|
|
script_end "waitmessage.script"
|
|
}
|
|
|
|
GUI_DRAW
|
|
{
|
|
if exists(@waitmessage@)
|
|
{
|
|
setpencolor(0,0,0,255)
|
|
drawrect 0,0 to getresx(),getresy()
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
|
|
mechbay_scrn
|
|
{
|
|
GUI_CREATE
|
|
{
|
|
int scriptIsRunning = 0
|
|
}
|
|
|
|
GUI_EXECUTE
|
|
{
|
|
if (currentScreen == MECHBAY_SCREEN)
|
|
{
|
|
if (scriptIsRunning == 0)
|
|
{
|
|
|
|
if (chill > 2)
|
|
{
|
|
chill = 0
|
|
|
|
scriptIsRunning = 1
|
|
|
|
callback($$Shell_CallbackHandler$$, ShellInitMechLabScreen)
|
|
script_run "Content\\ShellScripts\\MechBay\\MechBay.script", 0x100
|
|
}
|
|
else
|
|
{
|
|
chill++
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (scriptIsRunning > 0)
|
|
{
|
|
scriptIsRunning = 0
|
|
script_end "MechBay.script"
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
network_scrn
|
|
{
|
|
GUI_CREATE
|
|
{
|
|
int scriptIsRunning = 0
|
|
|
|
}
|
|
|
|
GUI_EXECUTE
|
|
{
|
|
if (currentScreen == MULTIPLAYER_SCREEN)
|
|
{
|
|
if (scriptIsRunning == 0)
|
|
{
|
|
int connected_to_server
|
|
|
|
// jcem - begin
|
|
if callback($$CTCL_IsConsole$$)
|
|
connected_to_server = TRUE
|
|
else
|
|
// jcem - end
|
|
connected_to_server = callback($$NetConnectedToServer$$)
|
|
if (chill > 2 && connected_to_server == TRUE)
|
|
{
|
|
if exists(@waitmessage@)
|
|
script_end "waitmessage.script"
|
|
|
|
chill = 0
|
|
scriptIsRunning = 1
|
|
if callback($$CTCL_IsConsole$$)
|
|
{
|
|
script_run "Content\\ShellScripts\\ConLobby.script", 0x1000
|
|
}
|
|
else
|
|
{
|
|
script_run "Content\\ShellScripts\\NetLobby.script", 0x1000
|
|
}
|
|
}
|
|
else
|
|
{
|
|
chill++
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (scriptIsRunning > 0)
|
|
{
|
|
scriptIsRunning = 0
|
|
if exists(@NetLobby@)
|
|
script_end "NetLobby.script"
|
|
if exists(@ConLobby@)
|
|
script_end "ConLobby.script"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
cinema_scrn
|
|
{
|
|
GUI_CREATE
|
|
{
|
|
int scriptIsRunning = 0
|
|
}
|
|
|
|
GUI_EXECUTE
|
|
{
|
|
if (currentScreen == CINEMAOPTIONS)
|
|
{
|
|
if (scriptIsRunning == 0)
|
|
{
|
|
|
|
if (chill > 2)
|
|
{
|
|
chill = 0
|
|
|
|
scriptIsRunning = 1
|
|
|
|
unfocus
|
|
spew "START CIN SCRIPT"
|
|
script_run "Content\\ShellScripts\\VWECreditsCinema.script", 0x1000
|
|
|
|
|
|
}
|
|
else
|
|
{
|
|
chill++
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (scriptIsRunning > 0)
|
|
{
|
|
spew "STOP CIN SCRIPT"
|
|
|
|
scriptIsRunning = 0
|
|
script_end "VWECreditsCinema.script"
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|