// Mechwarrior: Vengeance // Copyright ?1999-2000 // gs_idle.script // Paolo Malabuyo // July 11, 2000 // jcem begin #include "Content\\ShellScripts\\ctcl_params.h" // jcem end #include "Content\\ShellScripts\\stddefs.h" #include "Content\\ShellScripts\\MechLabHeaders.h" #include "Content\\ShellScripts\\ScriptStrings.h" #include "Content\\ShellScripts\\ShellFunctionHeaders.hpp" #include "Content\\ShellScripts\\buttons.script" #include "Content\\ShellScripts\\common_shell.script" #include "Content\\ShellScripts\\c_MoviePlayer.script" #define MAX_BGMUSIC 45000 // 45 sec - sync w/ shell.script main { GUI_CREATE { setresource("ScriptStrings.dll") object screen = o_IdleScreen initialize(screen) focus(screen.o_fscreen) mail(15, @shell@volumn_control) } } o_IdleScreen { GUI_CREATE { // jcem - CTCL_IsConsoleX: -ctcltype 2/3, CTCL_IsConsole -ctcltype 1 if callback($$CTCL_CheckUseJPD$$) setpointer(0) if callback($$CTCL_CheckCOOP$$) { callback($$CTCL_SetDispStateCOOP$$, 0, 1, 0) callback($$CTCL_SetDispStateCOOP$$, 1, 1, 0) callback($$CTCL_SetDispStateCOOP$$, 2, 1, 0) callback($$CTCL_SetDispStateCOOP$$, 3, 1, 0) object o_fscreen = s_fscreen o_fscreen.playHorz = 1 o_fscreen.playVert = 1 initialize(o_fscreen) } if callback($$CTCL_GetType$$) == _ECTCL_CameraShip { object o_invite_check = s_invite_check } framerate = 10 object play_movies = s_play_movies } GUI_MAILBOX { if sender == o_fscreen { //int kEvent = getmessage(1) if (@SHELL@currentScreen = 203) { @SHELL@currentScreen = MAINMENU @SHELL@lastScreenDepth-- } } } GUI_EXECUTE { if callback($$CTCL_GetType$$) == _ECTCL_CameraShip { if 0 < o_invite_check.nDoChallenge { o_invite_check.nDoChallenge = -1 // no reentrantable... unfocus @SHELL@lastScreen[@SHELL@lastScreenDepth] = MAINMENU @SHELL@id_type_is_single = 0 int uPlayerID_Cam = 0 string strTyped_Cam = "@Observer" callback($$CTCL_SetPlayerName$$, strTyped_Cam, uPlayerID_Cam) callback($$SetShellCommand$$, StartNetworkShellsCommand) @SHELL@currentScreen = LAUNCHGAME @SHELL@lastScreenDepth-- } } } } s_play_movies { GUI_CREATE { if (@shell@music_time_cutoff <= gettimex()) { @shell@music_time_cutoff = gettimex() + MAX_BGMUSIC string musicfile if (callback($$CTCL_GetType$$) == _ECTCL_None) musicfile = FILEPATH "StutterShark_music.wav" else callback($$CTCL_MiscFile$$, 1, 1, musicfile) @shell@music = musicfile,st_streamed assign 0, @shell@music loop @shell@music, 0 } location = 0, 0, 10000 string moviefile //moviefile = szPATH_MOVIES "Burnloop_lr_15.avi" callback($$CTCL_MiscFile$$, 0, 1, moviefile) movie mymovie = moviefile scale(mymovie) = 100, 100 play mymovie } GUI_EXECUTE { if (@SHELL@currentScreen = 203) { int nTmpCoinCount callback($$CTCL_CheckCoinCounts$$, nTmpCoinCount) if (0 < nTmpCoinCount) || (getstatus(mymovie) == 3) { @SHELL@currentScreen = MAINMENU @SHELL@lastScreenDepth-- } } } GUI_DRAW { render mymovie, location } }