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.
213 lines
6.1 KiB
Plaintext
213 lines
6.1 KiB
Plaintext
#include "Content\\ShellScripts\\stddefs.h"
|
|
#include "Content\\ShellScripts\\common_shell.script"
|
|
#include "Content\\ShellScripts\\ScriptStrings.h"
|
|
#include "Content\\ShellScripts\\ShellFunctionHeaders.hpp"
|
|
|
|
#include "Content\\ShellScripts\\listboxes.script"
|
|
#include "Content\\ShellScripts\\mc_listboxes.script"
|
|
#include "Content\\ShellScripts\\buttons.script"
|
|
#include "Content\\ShellScripts\\c_Pane.script"
|
|
#include "Content\\ShellScripts\\c_Text.script"
|
|
#include "Content\\ShellScripts\\c_Toggles.script"
|
|
#include "Content\\ShellScripts\\Slider.script"
|
|
#include "Content\\ShellScripts\\c_OM_Slider.script"
|
|
#include "Content\\ShellScripts\\c_InfoRegion.script"
|
|
#include "Content\\ShellScripts\\c_rollover.script"
|
|
|
|
main
|
|
{
|
|
GUI_CREATE
|
|
{
|
|
int XIndent = 37
|
|
int YIndent = 77
|
|
int TextX = 35
|
|
int TextY = 50
|
|
int TextYOff = 50
|
|
int TextW = 200
|
|
int TextH = 30
|
|
|
|
object oRollover = s_HelpRegion
|
|
oRollover.nFontID = IDS_F_ROLLOVER_INFO
|
|
oRollover.cTextColor= 0xFFff7200
|
|
oRollover.location = 31,516,255
|
|
oRollover.nWidth = 538
|
|
oRollover.nHeight = 56
|
|
initialize(oRollover)
|
|
|
|
//Text
|
|
object oMusicTitle = s_Text
|
|
oMusicTitle.location = XIndent + TextX,YIndent + TextY + (0 * TextYOff),nZ_TEXT
|
|
oMusicTitle.nFontID = IDS_F_OM_LABEL
|
|
oMusicTitle.nResID = IDS_OM_A_MUSIC_TITLE
|
|
oMusicTitle.cTextColor = cWhite
|
|
oMusicTitle.nJustify = 0
|
|
oMusicTitle.nLayoutWidth = TextW
|
|
oMusicTitle.nLayoutHeight = TextH
|
|
initialize(oMusicTitle)
|
|
|
|
object oEffectsTitle = s_Text
|
|
oEffectsTitle.location = XIndent + TextX,YIndent + TextY + (2 * TextYOff),nZ_TEXT
|
|
oEffectsTitle.nFontID = IDS_F_OM_LABEL
|
|
oEffectsTitle.nResID = IDS_OM_A_EFFECTS_TITLE
|
|
oEffectsTitle.cTextColor = cWhite
|
|
oEffectsTitle.nJustify = 0
|
|
oEffectsTitle.nLayoutWidth = TextW
|
|
oEffectsTitle.nLayoutHeight = TextH
|
|
initialize(oEffectsTitle)
|
|
|
|
object oBettyTitle = s_Text
|
|
oBettyTitle.location = XIndent + TextX,YIndent + TextY + (4 * TextYOff),nZ_TEXT
|
|
oBettyTitle.nFontID = IDS_F_OM_LABEL
|
|
oBettyTitle.nResID = IDS_OM_A_BETTY_TITLE
|
|
oBettyTitle.cTextColor = cWhite
|
|
oBettyTitle.nJustify = 0
|
|
oBettyTitle.nLayoutWidth = TextW
|
|
oBettyTitle.nLayoutHeight = TextH
|
|
initialize(oBettyTitle)
|
|
|
|
//Info Regions
|
|
int IR_X = 5
|
|
int IR_Y = 5
|
|
int IR_Z = 25
|
|
int IR_W = 330
|
|
int IR_H = 25
|
|
|
|
object oMusicDesc = s_InfoRegion
|
|
oMusicDesc.location = oMusicTitle.location.x - IR_X,oMusicTitle.location.y - IR_Y,IR_Z
|
|
oMusicDesc.nWidth = IR_W
|
|
oMusicDesc.nHeight = IR_H
|
|
oMusicDesc.nHelpID = IDS_HELP_OM_A_MUSIC
|
|
initialize(oMusicDesc)
|
|
|
|
object oEffectsDesc = s_InfoRegion
|
|
oEffectsDesc.location = oEffectsTitle.location.x - IR_X,oEffectsTitle.location.y - IR_Y,IR_Z
|
|
oEffectsDesc.nWidth = IR_W
|
|
oEffectsDesc.nHeight = IR_H
|
|
oEffectsDesc.nHelpID = IDS_HELP_OM_A_EFFECTS
|
|
initialize(oEffectsDesc)
|
|
|
|
object oBettyDesc = s_InfoRegion
|
|
oBettyDesc.location = oBettyTitle.location.x - IR_X,oBettyTitle.location.y - IR_Y,IR_Z
|
|
oBettyDesc.nWidth = IR_W
|
|
oBettyDesc.nHeight = IR_H
|
|
oBettyDesc.nHelpID = IDS_HELP_OM_A_BETTY
|
|
initialize(oBettyDesc)
|
|
|
|
//Buttons
|
|
object oBDefault = s_multistatepane
|
|
oBDefault.file = WPATH "button_reg_200x27m_4state.tga"
|
|
oBDefault.text = localize$(IDS_OM_C_RESET)
|
|
oBDefault.total_states = 4
|
|
oBDefault.nRollover = 1
|
|
oBDefault.nHelpID = IDS_HELP_OM_A_DEFAULT
|
|
oBDefault.location = XIndent + 513,YIndent + 351, nZ_BUTTON
|
|
initialize (oBDefault)
|
|
|
|
//Sliders
|
|
int nMusic
|
|
int nEffects
|
|
|
|
int SlidX = TextX + TextW + 20
|
|
int SlidY = TextY + 2
|
|
int T_X = TextX + TextW + 30
|
|
int T_Y = TextY + 2
|
|
|
|
object oSMusic = s_OMSlider
|
|
oSMusic.location = oMusicTitle.location.x + 40, oMusicTitle.location.y + 25,nZ_SLIDER
|
|
oSMusic.nHelpId = IDS_HELP_OM_A_MUSIC
|
|
|
|
object oSEffects = s_OMSlider
|
|
oSEffects.location = oEffectsTitle.location.x + 40, oEffectsTitle.location.y + 25,nZ_SLIDER
|
|
oSEffects.nHelpId = IDS_HELP_OM_A_EFFECTS
|
|
|
|
//Toggle
|
|
int nBetty = 1
|
|
int nHardware = 0
|
|
object oTBetty = s_OnOff
|
|
oTBetty.location = oBettyDesc.location.x + 30,oBettyDesc.location.y + 25,oBettyDesc.location.z
|
|
initialize(oTBetty)
|
|
|
|
sound effect = "Content\\Audio\\sfx_gauss_usfire.wav",st_cached
|
|
|
|
int first_time = true
|
|
int dMusic
|
|
int dEffects
|
|
int dBetty
|
|
|
|
initialize(this)
|
|
}
|
|
GUI_INIT
|
|
{
|
|
callback($$Shell_CallbackHandler$$,ShellOptionsGetSliderValue,MWO_MUSICVOLUME,nMusic)
|
|
oSMusic.nSelected = nMusic
|
|
initialize(oSMusic)
|
|
setvolume (0,nMusic)
|
|
|
|
callback($$Shell_CallbackHandler$$,ShellOptionsGetSliderValue,MWO_SFXVOLUME,nEffects)
|
|
oSEffects.nSelected = nEffects
|
|
initialize(oSEffects)
|
|
|
|
callback($$Shell_CallbackHandler$$,ShellOptionsGetToggleValue,MWO_BETTYSOUND,nBetty)
|
|
mail(nMSG_UPDATETOGGLE,nBetty,oTBetty)
|
|
|
|
if (first_time)
|
|
{
|
|
dMusic = nMusic
|
|
dEffects = nEffects
|
|
dBetty = nBetty
|
|
first_time = false
|
|
}
|
|
}
|
|
GUI_MAILBOX
|
|
{
|
|
switch(sender)
|
|
{
|
|
case oBDefault:
|
|
{
|
|
callback($$Shell_CallbackHandler$$,ShellOptionsSetSliderValue,MWO_MUSICVOLUME,dMusic)
|
|
callback($$Shell_CallbackHandler$$,ShellOptionsSetSliderValue,MWO_SFXVOLUME,dEffects)
|
|
callback($$Shell_CallbackHandler$$,ShellOptionsSetToggleValue,MWO_BETTYSOUND,dBetty)
|
|
initialize(this)
|
|
return
|
|
}
|
|
case oSMusic:
|
|
{
|
|
nMusic = oSMusic.nSelected
|
|
if (getvolume(0) == 0 && (nMusic != 0))
|
|
{
|
|
loop 0
|
|
}
|
|
else
|
|
if (nMusic = 0)
|
|
{
|
|
stop 0
|
|
}
|
|
setvolume (0,nMusic)
|
|
callback($$Shell_CallbackHandler$$,ShellOptionsSetSliderValue,MWO_MUSICVOLUME,nMusic)
|
|
}
|
|
break
|
|
case oSEffects:
|
|
{
|
|
nEffects = oSEffects.nSelected
|
|
play effect, 1
|
|
setvolume (1,nEffects)
|
|
callback($$Shell_CallbackHandler$$,ShellOptionsSetSliderValue,MWO_SFXVOLUME,nEffects)
|
|
}
|
|
break
|
|
case oTBetty:
|
|
{
|
|
if (getmessage() == nMSG_OPTIONON)
|
|
{
|
|
nBetty = 1
|
|
}
|
|
else
|
|
if (getmessage() == nMSG_OPTIONOFF)
|
|
{
|
|
nBetty = 0
|
|
}
|
|
callback($$Shell_CallbackHandler$$,ShellOptionsSetToggleValue,MWO_BETTYSOUND,nBetty)
|
|
}
|
|
break
|
|
}
|
|
}
|
|
} |