Files
firestorm/Gameleap/mw4/Content/ShellScripts/OM_Multi.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

680 lines
18 KiB
Plaintext

#include "Content\\ShellScripts\\stddefs.h"
#include "Content\\ShellScripts\\common_shell.script"
#include "Content\\ShellScripts\\ScriptStrings.h"
#include "Content\\ShellScripts\\listboxes.script"
#include "Content\\ShellScripts\\mc_listboxes.script"
#include "Content\\ShellScripts\\buttons.script"
#include "Content\\ShellScripts\\editbox.script"
#include "Content\\ShellScripts\\c_Pane.script"
#include "Content\\ShellScripts\\c_Text.script"
#include "Content\\ShellScripts\\c_Toggles.script"
#include "Content\\ShellScripts\\c_InfoRegion.script"
#include "Content\\ShellScripts\\ErrorScreen.script"
#include "Content\\ShellScripts\\c_rollover.script"
main
{
GUI_CREATE
{
location.z = 10
int XIndent = 37
int YIndent = 77
int TextX = 35
int TextY = 50
int IconTX = 71
int IconTY = 90
int TextYOff= 50
int TextW = 200
int TextH = 30
string szName
string szTeam
string szPass
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)
int nInsigTotal = 1
nInsigTotal = callback($$GetDecalCount$$)
string szInsiginia[nInsigTotal]
string szInsigniaFullName[nInsigTotal]
callback($$GetDecalNames$$, szInsiginia[], szInsigniaFullName[])
int nPlayerI = 0
int nTeamI = 0
int nPassToggle = 1
int nAllowToggle = 0
// Error box for empty or invalid names
object oErrorBox
int nErrorActivated = 0
//Text
object oNameTitle = s_Text
oNameTitle.location = XIndent + TextX,YIndent + TextY + (0 * TextYOff),nZ_TEXT
oNameTitle.nFontID = IDS_F_OM_LABEL
oNameTitle.nResID = IDS_OM_M_NAME_TITLE
oNameTitle.cTextColor = cWhite
oNameTitle.nJustify = 0
oNameTitle.nLayoutWidth = TextW
oNameTitle.nLayoutHeight = TextH
initialize(oNameTitle)
object oTeamTitle = s_Text
oTeamTitle.location = XIndent + TextX,YIndent + TextY + (2 * TextYOff),nZ_TEXT
oTeamTitle.nFontID = IDS_F_OM_LABEL
oTeamTitle.nResID = IDS_OM_M_TEAM_TITLE
oTeamTitle.cTextColor = cWhite
oTeamTitle.nJustify = 0
oTeamTitle.nLayoutWidth = TextW
oTeamTitle.nLayoutHeight = TextH
initialize(oTeamTitle)
object oServerTitle = s_Text
oServerTitle.location = XIndent + TextX,YIndent + TextY + (4 * TextYOff),nZ_TEXT
oServerTitle.nFontID = IDS_F_OM_LABEL
oServerTitle.nResID = IDS_OM_M_RANK_TITLE
oServerTitle.cTextColor = cWhite
oServerTitle.nJustify = 0
oServerTitle.nLayoutWidth = TextW
oServerTitle.nLayoutHeight = TextH
initialize(oServerTitle)
object oPassTitle = s_Text
oPassTitle.location = XIndent + TextX + 50,YIndent + TextY + (5 * TextYOff),nZ_TEXT
oPassTitle.nFontID = IDS_F_OM_LABEL
oPassTitle.nResID = IDS_OM_M_PASSWORD_TITLE
oPassTitle.cTextColor = cWhite
oPassTitle.nJustify = 0
oPassTitle.nLayoutWidth = TextW
oPassTitle.nLayoutHeight = TextH
initialize(oPassTitle)
object oPlayerITitle = s_Text
oPlayerITitle.location = XIndent + 400,YIndent + TextY + (0 * TextYOff),nZ_TEXT
oPlayerITitle.nFontID = IDS_F_OM_LABEL
oPlayerITitle.nResID = IDS_OM_M_PLAYERI_TITLE
oPlayerITitle.cTextColor = cWhite
oPlayerITitle.nJustify = 0
oPlayerITitle.nLayoutWidth = TextW
oPlayerITitle.nLayoutHeight = TextH
initialize(oPlayerITitle)
object oTeamITitle = s_Text
oTeamITitle.location = XIndent + 400,YIndent + TextY + (3 * TextYOff),nZ_TEXT
oTeamITitle.nFontID = IDS_F_OM_LABEL
oTeamITitle.nResID = IDS_OM_M_TEAMI_TITLE
oTeamITitle.cTextColor = cWhite
oTeamITitle.nJustify = 0
oTeamITitle.nLayoutWidth = TextW
oTeamITitle.nLayoutHeight = TextH
initialize(oTeamITitle)
object oAllowTitle = s_Text
oAllowTitle.location = XIndent + 425,YIndent + TextY + (5 * TextYOff + 30),nZ_TEXT
oAllowTitle.nFontID = IDS_F_OM_LABEL
oAllowTitle.nResID = IDS_OM_M_ALLOW
oAllowTitle.cTextColor = cWhite
oAllowTitle.nJustify = 0
oAllowTitle.nLayoutWidth = TextW
oAllowTitle.nLayoutHeight = TextH
initialize(oAllowTitle)
//Info Regions
int IR_X = 5
int IR_Y = 5
int IR_Z = 25
int IR_W = 225
int IR_H = 25
object oNameDesc = s_InfoRegion
oNameDesc.location = oNameTitle.location.x - IR_X,oNameTitle.location.y - IR_Y,IR_Z
oNameDesc.nWidth = IR_W + 85
oNameDesc.nHeight = IR_H
oNameDesc.nHelpID = IDS_HELP_OM_M_NAME
initialize(oNameDesc)
object oTeamDesc = s_InfoRegion
oTeamDesc.location = oTeamTitle.location.x - IR_X,oTeamTitle.location.y - IR_Y,IR_Z
oTeamDesc.nWidth = IR_W + 85
oTeamDesc.nHeight = IR_H
oTeamDesc.nHelpID = IDS_HELP_OM_M_TEAM
initialize(oTeamDesc)
object oServerDesc = s_InfoRegion
oServerDesc.location = oServerTitle.location.x - IR_X,oServerTitle.location.y - IR_Y,IR_Z
oServerDesc.nWidth = IR_W
oServerDesc.nHeight = IR_H
oServerDesc.nHelpID = IDS_HELP_OM_M_PLAY_RANKED
initialize(oServerDesc)
object oPassDesc = s_InfoRegion
oPassDesc.location = oPassTitle.location.x - IR_X,oPassTitle.location.y - IR_Y,IR_Z
oPassDesc.nWidth = IR_W + 85
oPassDesc.nHeight = IR_H
oPassDesc.nHelpID = IDS_HELP_OM_M_PASSWORD
initialize(oPassDesc)
object oPlayerIDesc = s_InfoRegion
oPlayerIDesc.location = oPlayerITitle.location.x - IR_X,oPlayerITitle.location.y - IR_Y,IR_Z
oPlayerIDesc.nWidth = IR_W - 100
oPlayerIDesc.nHeight = IR_H
oPlayerIDesc.nHelpID = IDS_HELP_OM_M_PLAYER_INSIGNIA
initialize(oPlayerIDesc)
object oTeamIDesc = s_InfoRegion
oTeamIDesc.location = oTeamITitle.location.x - IR_X,oTeamITitle.location.y - IR_Y,IR_Z
oTeamIDesc.nWidth = IR_W - 100
oTeamIDesc.nHeight = IR_H
oTeamIDesc.nHelpID = IDS_HELP_OM_M_TEAM_INSIGNIA
initialize(oTeamIDesc)
object oAllowDesc = s_InfoRegion
oAllowDesc.location = oAllowTitle.location.x - IR_X,oAllowTitle.location.y - IR_Y,IR_Z
oAllowDesc.nWidth = IR_W - 100
oAllowDesc.nHeight = IR_H
oAllowDesc.nHelpID = IDS_HELP_OM_M_ALLOW
initialize(oAllowDesc)
//Buttons
int Pane_X = 585
int Pane_B_X = 8
object oBPreviousP = s_multistatepane
oBPreviousP.file = szPATH_GRAPHICS "CM_VidBack.tga"
oBPreviousP.text = ""
oBPreviousP.total_states= 3
oBPreviousP.location = oPlayerITitle.location.x + 25, oPlayerITitle.location.y + 40, nZ_BUTTON
oBPreviousP.nRollover = 1
oBPreviousP.nHelpID = IDS_HELP_OM_M_PLAYER_INSIGNIA_BACK
initialize (oBPreviousP)
object oBAdvanceP = s_multistatepane
oBAdvanceP.file = szPATH_GRAPHICS "CM_VidForward.tga"
oBAdvanceP.text = ""
oBAdvanceP.total_states = 3
oBAdvanceP.location = oBPreviousP.location.x + 100, oBPreviousP.location.y, nZ_BUTTON
oBAdvanceP.nRollover = 1
oBAdvanceP.nHelpID = IDS_HELP_OM_M_PLAYER_INSIGNIA_FORWARD
initialize (oBAdvanceP)
object oBPreviousT = s_multistatepane
oBPreviousT.file = szPATH_GRAPHICS "CM_VidBack.tga"
oBPreviousT.text = ""
oBPreviousT.total_states= 3
oBPreviousT.location = oTeamITitle.location.x + 25, oTeamITitle.location.y + 40, nZ_BUTTON
oBPreviousT.nRollover = 1
oBPreviousT.nHelpID = IDS_HELP_OM_M_PLAYER_INSIGNIA_BACK
initialize (oBPreviousT)
object oBAdvanceT = s_multistatepane
oBAdvanceT.file = szPATH_GRAPHICS "CM_VidForward.tga"
oBAdvanceT.text = ""
oBAdvanceT.total_states = 3
oBAdvanceT.location = oBPreviousT.location.x + 100, oBPreviousT.location.y, nZ_BUTTON
oBAdvanceT.nRollover = 1
oBAdvanceT.nHelpID = IDS_HELP_OM_M_PLAYER_INSIGNIA_FORWARD
initialize (oBAdvanceT)
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_M_DEFAULT
oBDefault.location = XIndent + 513,YIndent + 351, nZ_BUTTON
initialize (oBDefault)
//Edit Boxs
int nEditW = 150
int nEditH = 16
int EditX = TextX + TextW + 30
int EditY = TextY + 2
object oEName = s_editbox
oEName.location = oNameTitle.location.x + 25, oNameTitle.location.y + 20, oNameTitle.location.z
oEName.boxWidth = nEditW
oEName.boxHeight = nEditH
oEName.boxtextlimit = 16
oEName.boxTextOffset= 3,3
oEName.offset = 0,-20
oEName.Auto_Update = TRUE
object oETeam = s_editbox
oETeam.location = oTeamTitle.location.x + 25, oTeamTitle.location.y + 20, oTeamTitle.location.z
oETeam.boxWidth = nEditW
oETeam.boxHeight = nEditH
oETeam.boxtextlimit = 22
oETeam.boxTextOffset= 3,3
oETeam.offset = 0,-20
int Epass_Y = 260
object oEPass = s_editbox
oEPass.location = oPassTitle.location.x + 25, oPassTitle.location.y + 20, oPassTitle.location.z
oEPass.boxWidth = nEditW
oEPass.boxHeight = nEditH
oEPass.boxtextlimit = 22
oEPass.boxTextOffset= 3,3
oEPass.offset = 0,-20
//Toggle Button
object oPassToggle = s_multistatepanetoggle
oPassToggle.location = oServerTitle.location.x + 25, oServerTitle.location.y + 25, nZ_BUTTON
oPassToggle.file = WPATH "checkbox_15x15_4state.tga"
oPassToggle.total_states = 4
oPassToggle.text = ""
initialize(oPassToggle)
object oAllowToggle = s_multistatepanetoggle
oAllowToggle.location = XIndent + 400,YIndent + TextY + (5 * TextYOff + 30),nZ_BUTTON
oAllowToggle.file = WPATH "checkbox_15x15_4state.tga"
oAllowToggle.total_states = 4
oAllowToggle.text = ""
initialize(oAllowToggle)
//Pane
object oPPlayer = s_Pane
oPPlayer.location = oPlayerITitle.location.x + 55, oPlayerITitle.location.y + 25,nZ_PANE
oPPlayer.nFrames = 1
oPPlayer.nCurrFrame = 0
oPPlayer.nMode = 1
oPPlayer.fVolatile = 1
oPPlayer.fRegion = 1
oPPlayer.nHelpID = IDS_HELP_OM_M_PLAYER_INSIGNIA
object oPTeam = s_Pane
oPTeam.location = oTeamITitle.location.x + 55, oTeamITitle.location.y + 25,nZ_PANE
oPTeam.nFrames = 1
oPTeam.nCurrFrame = 0
oPTeam.nMode = 1
oPTeam.fVolatile = 1
oPTeam.fRegion = 1
oPTeam.nHelpID = IDS_HELP_OM_M_TEAM_INSIGNIA
font3d regfont = FPATH localize$(IDS_F_OM_LABEL)
int showpassword = false
int first_time = true
string dName
string dTeam
int dPassToggle
string dPass
int dPlayerI
int dTeamI
int dInsigTotal = nInsigTotal
string dInsiginia[dInsigTotal]
string dInsigniaFullName[dInsigTotal]
int dAllowToggle
initialize(this)
}
GUI_INIT
{
callback($$EnterMultiplayerOptionsScreen$$,szName,szTeam,nPassToggle,szPass,nPlayerI,nTeamI, szInsiginia[], szInsigniaFullName[], nInsigTotal,nAllowToggle)
nPassToggle = nPassToggle + 1
nAllowToggle= nAllowToggle+ 1
if (!equal$(szName, ""))
oEName.boxValue = szName
else
oEName.boxValue = localize$(IDS_OM_DEFAULT_NAME)
initialize (oEName)
oETeam.boxValue = szTeam
initialize (oETeam)
if (nPassToggle == 1)
{
szPass = ""
}
else
{
activate(oEPass)
activate(oPassTitle)
}
oEPass.boxValue = szPass
initialize (oEPass)
oPPlayer.szBitmap = szInsigniaFullName[nPlayerI]
initialize(oPPlayer)
if (oPPlayer.nWidth == 32)
{
oPPlayer.nScaleX = 200
oPPlayer.nScaleY = 200
}
else
if (oPPlayer.nWidth == 64)
{
oPPlayer.nScaleX = 100
oPPlayer.nScaleY = 100
}
initialize(oPPlayer)
oPTeam.szBitmap = szInsigniaFullName[nTeamI]
initialize(oPTeam)
if (oPTeam.nWidth == 32)
{
oPTeam.nScaleX = 200
oPTeam.nScaleY = 200
}
else
if (oPTeam.nWidth == 64)
{
oPTeam.nScaleX = 100
oPTeam.nScaleY = 100
}
initialize(oPTeam)
if (nPassToggle == 1)
{
deactivate(oPassTitle)
deactivate(oEPass)
// activate(oPDisable)
}
mail(nPassToggle, oPassToggle)
mail(nAllowToggle, oAllowToggle)
if (first_time)
{
dName = szName
dTeam = szTeam
dPassToggle = nPassToggle
dPass = szPass
dPlayerI = nPlayerI
dTeamI = nTeamI
dInsigTotal = nInsigTotal
for (int i = 0; i < dInsigTotal; i++)
{
dInsiginia[i] = szInsiginia[i]
dInsigniaFullName[i] = szInsigniaFullName[i]
}
dAllowToggle = nAllowToggle
first_time = false
}
}
GUI_EXECUTE
{
if (!nErrorActivated)
{
if ((!gotfocus(oEName)) && (!gotfocus(oETeam)) && (!gotfocus(oEPass)))
{
if (exists(@Options@))
{
if (gotfocus(@Options@o_ok_button))
{
return
}
}
focus(oEName)
}
}
}
GUI_DRAW
{
print3d_attributes = regfont, 0xffffffff, 1, 1, 1, 0, 0
print3d_margins = oPassToggle.location.x + 25, oPassToggle.location.y to oPassToggle.location.x + 25 + getprint3dwidth(localize$(IDS_OM_M_TRACK)), oPassToggle.location.y + 20
print3d_position = oPassToggle.location.x + 25, oPassToggle.location.y
print3d localize$(IDS_OM_M_TRACK)
}
GUI_MAILBOX
{
switch(sender)
{
case oBDefault:
{
dPassToggle = dPassToggle - 1
dAllowToggle= dAllowToggle - 1
callback($$LeaveMultiplayerOptionsScreen$$,dName,dTeam,dPassToggle,dPass,dPlayerI,dTeamI, szInsiginia[], szInsigniaFullName[], dInsigTotal,dAllowToggle)
dPassToggle = dPassToggle + 1
dAllowToggle= dAllowToggle + 1
initialize(this)
return
}
case oBAdvanceP:
{
nPlayerI++
if (nPlayerI == nInsigTotal)
{
nPlayerI = 0
}
oPPlayer.szBitmap = szInsigniaFullName[nPlayerI]
initialize(oPPlayer)
if (oPPlayer.nWidth == 32)
{
oPPlayer.nScaleX = 200
oPPlayer.nScaleY = 200
}
else
if (oPPlayer.nWidth == 64)
{
oPPlayer.nScaleX = 100
oPPlayer.nScaleY = 100
}
initialize(oPPlayer)
mail(MSG_SETOPTIONS,this)
return
}
break
case oBPreviousP:
{
nPlayerI--
if (nPlayerI < 0)
{
nPlayerI = nInsigTotal - 1
}
oPPlayer.szBitmap = szInsigniaFullName[nPlayerI]
initialize(oPPlayer)
if (oPPlayer.nWidth == 32)
{
oPPlayer.nScaleX = 200
oPPlayer.nScaleY = 200
}
else
if (oPPlayer.nWidth == 64)
{
oPPlayer.nScaleX = 100
oPPlayer.nScaleY = 100
}
initialize(oPPlayer)
mail(MSG_SETOPTIONS,this)
return
}
break
case oBAdvanceT:
{
nTeamI++
if (nTeamI == nInsigTotal)
{
nTeamI = 0
}
oPTeam.szBitmap = szInsigniaFullName[nTeamI]
initialize(oPTeam)
if (oPTeam.nWidth == 32)
{
oPTeam.nScaleX = 200
oPTeam.nScaleY = 200
}
else
if (oPTeam.nWidth == 64)
{
oPTeam.nScaleX = 100
oPTeam.nScaleY = 100
}
initialize(oPTeam)
mail(MSG_SETOPTIONS,this)
return
}
break
case oBPreviousT:
{
nTeamI--
if (nTeamI < 0)
{
nTeamI = nInsigTotal - 1
}
oPTeam.szBitmap = szInsigniaFullName[nTeamI]
initialize(oPTeam)
if (oPTeam.nWidth == 32)
{
oPTeam.nScaleX = 200
oPTeam.nScaleY = 200
}
else
if (oPTeam.nWidth == 64)
{
oPTeam.nScaleX = 100
oPTeam.nScaleY = 100
}
initialize(oPTeam)
mail(MSG_SETOPTIONS,this)
return
}
break
case oPassToggle:
{
if (nPassToggle == 1)
{
nPassToggle = 2
activate(oEPass)
activate(oPassTitle)
// deactivate(oPDisable)
focus(oEPass)
}
else
if (nPassToggle == 2)
{
nPassToggle = 1
deactivate(oEPass)
deactivate(oPassTitle)
// activate(oPDisable)
unfocus(oEPass)
}
mail(nPassToggle, oPassToggle)
mail(MSG_SETOPTIONS,this)
return
}
break
case oAllowToggle:
{
if (nAllowToggle != 2)
{
nAllowToggle = 2
}
else
if (nAllowToggle == 2)
{
nAllowToggle = 1
}
mail(nAllowToggle, oAllowToggle)
mail(MSG_SETOPTIONS,this)
return
}
break
case oEName:
{
if (getmessage() == 1)
{
if (!equal$(oEName.boxValue, ""))
{
mail(MSG_SETOPTIONS,this)
if (!nErrorActivated)
focus(oETeam)
}
else
{
nErrorActivated = 1
oErrorBox = o_ErrorScreen
oErrorBox.error_message = localize$(IDS_ERROR_OM_M_NAME_MSG)
initialize(oErrorBox)
activate(oErrorBox)
}
}
return
}
break
case oETeam
{
mail(MSG_SETOPTIONS,this)
if (getmessage() == 1)
{
if (exists(@Options@))
focus(@Options@o_ok_button)
}
return
}
break
case oEPass
{
mail(MSG_SETOPTIONS,this)
if (getmessage() == 1)
{
if (exists(@Options@))
focus(@Options@o_ok_button)
}
return
}
break
case oErrorBox
{
nErrorActivated = 0
callback($$EnterMultiplayerOptionsScreen$$,szName,szTeam,nPassToggle,szPass,nPlayerI,nTeamI, szInsiginia[], szInsigniaFullName[], nInsigTotal,nAllowToggle)
oEName.boxValue = szName
focus(oEName)
return
}
break
}
switch(getmessage())
{
case MSG_SETOPTIONS:
{
szName = oEName.boxValue
szTeam = oETeam.boxValue
szPass = oEPass.boxValue
nPassToggle = nPassToggle - 1
nAllowToggle= nAllowToggle - 1
if (callback($$LeaveMultiplayerOptionsScreen$$,szName,szTeam,nPassToggle,szPass,nPlayerI,nTeamI, szInsiginia[], szInsigniaFullName[], nInsigTotal,nAllowToggle) == -1)
{
nErrorActivated = 1
oErrorBox = o_ErrorScreen
oErrorBox.error_message = localize$(IDS_ERROR_OM_M_CHAR_MSG)
initialize(oErrorBox)
activate(oErrorBox)
}
nPassToggle = nPassToggle + 1
nAllowToggle= nAllowToggle + 1
}
break
case MSG_SETDEFAULT:
{
szName = localize$(IDS_OM_DEFAULT_NAME)
szTeam = ""
szPass = ""
nPassToggle = 0
nAllowToggle = 0
callback($$LeaveMultiplayerOptionsScreen$$,szName,szTeam,nPassToggle,szPass,nPlayerI,nTeamI, szInsiginia[], szInsigniaFullName[], nInsigTotal,nAllowToggle)
focus(oEName)
initialize(this)
}
break
}
}
}