Files
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

1284 lines
34 KiB
Plaintext

// Mechwarrior: Vengeance
// Copyright © 1999-2000
// Mechbay_main.script
// Paolo Malabuyo
// July 12, 2000
#define SUB_SYSTEM 0
#define SHOW_CAMO FALSE // show camo selection combo?
#define SHOW_MECH FALSE // show mech selection combo?
#define OFFS_X (-160)
#define OFFS_Y (+30)
#if 0 // org
#define OFFS_XL (OFFS_X - 120)
#define OFFS_YL (OFFS_Y + 0)
#define OFFS_XR (OFFS_X + 120)
#define OFFS_YR (OFFS_Y + 0)
#endif
#define OFFS_XL (OFFS_X - 120)
#define OFFS_YL (OFFS_Y - 80)
#define OFFS_XR (OFFS_X + 120)
#define OFFS_YR (OFFS_Y + 260)
#define OFFS_XS (OFFS_X + 430)
#define OFFS_YS (OFFS_Y + 80)
gs_chassis
{
GUI_CREATE
{
int sepx1 = 22
int sepx2 = 308
if $$m_isCampaign$$ == 0
{
int sepy1 = 210
int sepy2 = 270
}
if $$m_isCampaign$$ == 1
{
int sepy1 = 170
int sepy2 = 250
}
int sepy3 = 422
int labelx = OFFS_XL+22
int labely = OFFS_YL+60
int boxx = 170
int boxy = 72
int boxwidth = 84
int noneditx = OFFS_XL+331
int nonedity = OFFS_YL+160
sound btnTriggeredSound = SPATH "sfx_button5.wav"
float acceleration
float deacceleration
float turn_rate
float torso_twist
float twist_speed
int tech_type
float engine_topspeed
float engine_tons
int heatsinks_installed
int heatsinks_tons
int can_have_jump
float jump_tons
int can_have_ecm
float ecm_tons
int can_have_beagle
float beagle_tons
int can_have_light
float light_tons
int can_have_ams
float ams_tons
int can_have_lams
float lams_tons
// MSL ADD MECH
int mech_num = 53
string class[mech_num]
callback($$TBL_GetResNames$$, class[], 3, -1)
string chassis_tech[mech_num]
callback($$TBL_GetResNames$$, chassis_tech[], 4, -1)
int create_limit = 64
int session_create = 0
//object o_create_error
// List box size for o_availmechsdroplist
$$m_listBoxSize$$ = $$m_mechLabCount$$ + create_limit
int __mech_selected // jcem - this will act as o_availmechsdroplist, if SHOW_MECH is FALSE
#if SHOW_MECH
object o_availmechsdroplist = s_droplistbox
if $$m_isCampaign$$ == 0
{
o_availmechsdroplist.location = 22, boxy + 65, 50
o_availmechsdroplist.max_displayed = 17
}
#else // !SHOW_MECH
string __mech_list[100] // guess...^^
#endif // SHOW_MECH
if $$m_isCampaign$$ == 1
{
#if SHOW_MECH
o_availmechsdroplist.location = 22, boxy + 55, 50
o_availmechsdroplist.max_displayed = 19
#endif // SHOW_MECH
int nComID = 0
int nMech_selected = 0
int nComMechID = 0
int nMech_count = $$m_mechCount$$
string szMechName[nMech_count] //ResId For the Mech's Name
int status_array[$$m_mechCount$$]
callback($$Shell_CallbackHandler$$, ShellCampaignGetMechs,nComID, szMechName[], status_array[], nMech_selected, nComMechID, nMech_count)
}
#if SHOW_MECH
o_availmechsdroplist.list_size = $$m_mechLabCount$$
o_availmechsdroplist.label = localize$(IDS_ML_CH_TYPE)
o_availmechsdroplist.itemWidth = 269
o_availmechsdroplist.boxFont3d = FPATH localize$(IDS_F_ML_LABEL)
o_availmechsdroplist.itemHeight = 20
o_availmechsdroplist.labelFont3d = FPATH localize$(IDS_F_ML_LABEL)
o_availmechsdroplist.offsetLabel = -1,-17
o_availmechsdroplist.arrowHeight = 15
o_availmechsdroplist.id = 201
#endif // SHOW_MECH
#if 0 // temp
if $$m_isCampaign$$ == 0
{
// List box size for o_availmechsdroplist2
$$m_listBoxSize$$ = $$m_mechLabCount$$ + create_limit
object o_availmechsdroplist2 = s_droplistbox
o_availmechsdroplist2.location = 22, boxy + 110, 30
o_availmechsdroplist2.max_displayed = 13
o_availmechsdroplist2.list_size = 0
o_availmechsdroplist2.label = localize$(IDS_ML_CH_NAME)
o_availmechsdroplist2.itemWidth = 269
o_availmechsdroplist2.boxFont3d = FPATH localize$(IDS_F_ML_LABEL)
o_availmechsdroplist2.itemHeight = 20
o_availmechsdroplist2.labelFont3d = FPATH localize$(IDS_F_ML_LABEL)
o_availmechsdroplist2.offsetLabel = -1,-17
o_availmechsdroplist2.arrowHeight = 15
o_availmechsdroplist2.id = 201
int count = 0
int last_mech = 0
int last_count = 0
int mech_selected = 0
int stock_mech_selected = 0
int variant_mech_selected = 0
int stock_count[$$m_chassisCount$$]
int stock_array[$$m_chassisCount$$ + 1]
string stock_name[$$m_chassisCount$$]
callback($$ML_CallbackHandler$$, MLDataSetupChassisSelection, stock_name[])
int selected_mech
string mech_name[$$m_mechLabCount$$ + create_limit]
string mech_name2[$$m_mechLabCount$$ + create_limit]
callback($$ML_CallbackHandler$$, MLDataSetupMechSelection, mech_name[], selected_mech)
string mad_cat = localize$(DNL_MADCAT)
string mad_cat2 = localize$(DNL_MADCAT2)
o_availmechsdroplist.list_size = 0
for (int i = 0; i < $$m_chassisCount$$; i++)
{
stock_count[i] = 0
}
for (count = 0; count < $$m_mechLabCount$$; count++)
{
for (i = 0; i < $$m_chassisCount$$; i++)
{
if (equal$(left$(mech_name[count], length$(stock_name[i])), stock_name[i]) == true)
{
// special case for Mad Cat Mark II
if (!((equal$(stock_name[i], mad_cat) == true) && (equal$(left$(mech_name[count], length$(mad_cat2)), mad_cat2) == true)))
{
stock_count[i]++
mech_name2[count] = right$(mech_name[count], length$(mech_name[count]) - (length$(stock_name[i]) + 1))
break
}
}
}
}
for (i = 0; i < $$m_chassisCount$$; i++)
{
if (stock_count[i] != 0)
{
o_availmechsdroplist.list_item[o_availmechsdroplist.list_size] = stock_name[i]
o_availmechsdroplist.list_size++
}
}
initialize(o_availmechsdroplist)
count = 0
if ($$m_mechLabCount$$)
{
stock_array[0] = 0
count = 1
for (i = 0; i < $$m_chassisCount$$; i++)
{
if (stock_count[i] != 0)
{
stock_array[count] = stock_array[count - 1] + stock_count[i]
count++
}
}
stock_mech_selected = 0
while (selected_mech >= stock_array[stock_mech_selected])
{
stock_mech_selected++
}
stock_mech_selected--
last_count = stock_array[stock_mech_selected]
variant_mech_selected = selected_mech - last_count
count = 0
do
{
o_availmechsdroplist2.list_item[count] = mech_name2[last_count]
count++
last_count++
if (last_count == $$m_mechLabCount$$)
break
}
while ((stock_array[stock_mech_selected] + count) != stock_array[stock_mech_selected + 1])
}
o_availmechsdroplist2.list_size = count
initialize(o_availmechsdroplist2)
o_availmechsdroplist.nSelected = stock_mech_selected
o_availmechsdroplist2.nselected = variant_mech_selected
}
else
#endif // temp
{
int selected_mech
#if SHOW_MECH
callback($$ML_CallbackHandler$$, MLDataSetupMechSelection, o_availmechsdroplist.list_item[], selected_mech)
initialize(o_availmechsdroplist)
o_availmechsdroplist.nSelected = selected_mech
#else // !SHOW_MECH
callback($$ML_CallbackHandler$$, MLDataSetupMechSelection, __mech_list[], selected_mech)
__mech_selected = selected_mech
#endif // SHOW_MECH
string mech_name_temp = szMechName[selected_mech + 1]
callback($$Shell_CallbackHandler$$, ShellCampaignSetMech, nComID, mech_name_temp)
}
//object o_deleteconfirm
int skin_num
int __skin_selected // jcem - this will act as o_camodroplist, if SHOW_CAMO is FALSE
string skin_names[100] // jcem - original code: at below, dynamically allocated, but just guess...
#if SHOW_CAMO
object o_camodroplist = s_droplistbox
if $$m_isCampaign$$ == 0
{
o_camodroplist.location = 22, boxy + 165, 25
}
if $$m_isCampaign$$ == 1
{
o_camodroplist.location = 22, boxy + 135, 25
}
o_camodroplist.list_size = skin_num
o_camodroplist.offsetLabel = -1,-17
o_camodroplist.label = localize$(IDS_ML_CH_CAMO)
o_camodroplist.itemWidth = 269
o_camodroplist.max_displayed = 12
o_camodroplist.boxFont3d = FPATH localize$(IDS_F_ML_LABEL)
o_camodroplist.itemHeight = 20
o_camodroplist.labelFont3d = FPATH localize$(IDS_F_ML_LABEL)
o_camodroplist.arrowHeight = 15
o_camodroplist.id = 205
initialize(o_camodroplist)
#endif // SHOW_CAMO
#if SUB_SYSTEM
// heat_sinks spinbox
object o_heat_sinks_spinbox = s_plus_minus_int
o_heat_sinks_spinbox.location = boxx, boxy + 365, 10
o_heat_sinks_spinbox.boxwidth = boxwidth
o_heat_sinks_spinbox.id = 207
initialize(o_heat_sinks_spinbox)
// engine_topspeed spinbox
object o_engine_topspeed_spinbox = s_plus_minus_float
o_engine_topspeed_spinbox.boxwidth = boxwidth
o_engine_topspeed_spinbox.location = boxx, boxy + 395, 10
o_engine_topspeed_spinbox.id = 206
initialize(o_engine_topspeed_spinbox)
object o_ECM = s_aux_equip
o_ECM.location = 20, labely + 236, 10
o_ECM.id = 213
o_ECM.equip_name = localize$(DNL_ECM_SHORT)
initialize(o_ECM)
object o_beagle = s_aux_equip
o_beagle.location = 20, labely + 256, 10
o_beagle.id = 214
o_beagle.equip_name = localize$(DNL_BAP)
initialize(o_beagle)
object o_lightamp = s_aux_equip
o_lightamp.location = 20, labely + 276, 10
o_lightamp.id = 215
o_lightamp.equip_name = localize$(DNL_LA)
initialize(o_lightamp)
object o_jumpjets = s_aux_equip
o_jumpjets.location = 20, labely + 296, 10
o_jumpjets.id = 212
o_jumpjets.equip_name = localize$(DNL_JUMPJETS)
initialize(o_jumpjets)
object o_AMS = s_aux_equip
o_AMS.location = 20, labely + 316, 10
o_AMS.id = 216
o_AMS.equip_name = localize$(DNL_AMS_SHORT)
initialize(o_AMS)
object o_LAMS = s_aux_equip
o_LAMS.location = 20, labely + 335, 10
o_LAMS.id = 217
o_LAMS.equip_name = localize$(DNL_LAMS_SHORT)
initialize(o_LAMS)
#endif // SUB_SYSTEM
if $$m_mechLabCount$$ > 0
{
#if 0 // temp
if ($$m_isCampaign$$ == 0)
{
stock_mech_selected = o_availmechsdroplist.nselected
variant_mech_selected = o_availmechsdroplist2.nselected
mech_selected = stock_array[stock_mech_selected] + variant_mech_selected
callback($$ML_CallbackHandler$$, MLSelectNewMech, mech_Selected, mech_name[mech_selected])
}
else
#endif // temp
{
#if SHOW_MECH
callback($$ML_CallbackHandler$$, MLSelectNewMech, o_availmechsdroplist.nSelected, o_availmechsdroplist.list_item[o_availmechsdroplist.nSelected])
#else // !SHOW_MECH
callback($$ML_CallbackHandler$$, MLSelectNewMech, __mech_selected, __mech_list[__mech_selected])
#endif // SHOW_MECH
}
}
int jumpjets_installed
int ecm_installed
int beagle_installed
int light_installed
int ams_installed
int lams_installed
int previous_mech
int new_mech
// support for not showing group weapons dialog if there are no weapons mounted
int grp_array_size = 30
int grp_typearray[grp_array_size]
int grp_id_array[grp_array_size]
int grp_loc_array[grp_array_size]
int grp_group1_array[grp_array_size]
int grp_group2_array[grp_array_size]
int grp_group3_array[grp_array_size]
int grp_group4_array[grp_array_size]
int grp_group5_array[grp_array_size]
int grp_group6_array[grp_array_size]
int grp_num_weapons
}
GUI_INIT
{
if $$m_mechLabCount$$ > 0
{
#if 0 // temp
if ($$m_isCampaign$$ == 0)
{
stock_mech_selected = o_availmechsdroplist.nselected
variant_mech_selected = o_availmechsdroplist2.nselected
mech_selected = stock_array[stock_mech_selected] + variant_mech_selected
callback($$ML_CallbackHandler$$, MLSelectNewMech, mech_Selected, mech_name[mech_selected])
new_mech = mech_selected
}
else
#endif // temp
{
#if SHOW_MECH
new_mech = o_availmechsdroplist.nSelected
callback($$ML_CallbackHandler$$, MLSelectNewMech, o_availmechsdroplist.nSelected, o_availmechsdroplist.list_item[o_availmechsdroplist.nSelected])
#else // !SHOW_MECH
new_mech = __mech_selected
callback($$ML_CallbackHandler$$, MLSelectNewMech, __mech_selected, __mech_list[__mech_selected])
#endif // SHOW_MECH
}
previous_mech = new_mech
parent.just_saved = true
callback($$ML_CallbackHandler$$, MLDataSetupGetMechNoEditData, acceleration, deacceleration, turn_rate, torso_twist, twist_speed, tech_type)
callback($$ML_CallbackHandler$$, MLDataSetupGetHeatSinks, heatsinks_installed)
callback($$ML_CallbackHandler$$, MLDataSetupGetEngineSpeed, engine_topspeed, engine_tons)
callback($$ML_CallbackHandler$$, MLGetJumpJets, jumpjets_installed, can_have_jump, jump_tons)
callback($$ML_CallbackHandler$$, MLGetECM, ecm_installed, can_have_ecm, ecm_tons)
callback($$ML_CallbackHandler$$, MLGetBeagle, beagle_installed, can_have_beagle, beagle_tons)
callback($$ML_CallbackHandler$$, MLGetLightAmp, light_installed, can_have_light, light_tons)
callback($$ML_CallbackHandler$$, MLGetAMS, ams_installed, can_have_ams, ams_tons)
callback($$ML_CallbackHandler$$, MLGetLAMS, lams_installed, can_have_lams, lams_tons)
callback($$ML_CallbackHandler$$, MLGetSkinListCount, skin_num)
//string skin_names[skin_num]
callback($$ML_CallbackHandler$$, MLDataGetSkinList, skin_names[], __skin_selected)
#if SUB_SYSTEM
if can_have_ecm != 0
{
o_ECM.unmountable = false
if ecm_installed != 0
{
o_ECM.state = 2
}
if ecm_installed == 0
{
o_ECM.state = 0
}
o_ECM.equip_tonnage = ecm_tons
}
else
{
o_ECM.state = 0
o_ECM.equip_tonnage = 0
o_ECM.unmountable = true
}
if can_have_beagle != 0
{
o_beagle.unmountable = false
if beagle_installed != 0
{
o_beagle.state = 2
}
if beagle_installed == 0
{
o_beagle.state = 0
}
o_beagle.equip_tonnage = beagle_tons
}
else
{
o_beagle.state = 0
o_beagle.equip_tonnage = 0
o_beagle.unmountable = true
}
if can_have_light != 0
{
o_lightamp.unmountable = false
if light_installed != 0
{
o_lightamp.state = 2
}
if light_installed == 0
{
o_lightamp.state = 0
}
o_lightamp.equip_tonnage = light_tons
}
else
{
o_lightamp.state = 0
o_lightamp.equip_tonnage = 0
o_lightamp.unmountable = true
}
if can_have_jump != 0
{
o_jumpjets.unmountable = false
if jumpjets_installed != 0
{
o_jumpjets.state = 2
}
if jumpjets_installed == 0
{
o_jumpjets.state = 0
}
o_jumpjets.equip_tonnage = jump_tons
}
else
{
o_jumpjets.state = 0
o_jumpjets.equip_tonnage = 0
o_jumpjets.unmountable = true
}
if can_have_ams != 0
{
o_AMS.unmountable = false
if ams_installed != 0
{
o_AMS.state = 2
}
if ams_installed == 0
{
o_AMS.state = 0
}
o_AMS.equip_tonnage = ams_tons
}
else
{
o_AMS.state = 0
o_AMS.equip_tonnage = 0
o_AMS.unmountable = true
}
if can_have_lams != 0
{
o_LAMS.unmountable = false
if lams_installed != 0
{
o_LAMS.state = 2
}
if lams_installed == 0
{
o_LAMS.state = 0
}
o_LAMS.equip_tonnage = lams_tons
}
else
{
o_LAMS.state = 0
o_LAMS.equip_tonnage = 0
o_LAMS.unmountable = true
}
initialize(o_ECM)
initialize(o_beagle)
initialize(o_lightamp)
initialize(o_jumpjets)
initialize(o_AMS)
initialize(o_LAMS)
#endif // SUB_SYSTEM
#if SHOW_CAMO
o_camodroplist.list_size = skin_num
int s
for s = 0; s < skin_num; s++
{
o_camodroplist.list_item[s] = skin_names[s]
}
o_camodroplist.nSelected = __skin_selected
initialize(o_camodroplist)
#endif // SHOW_CAMO
#if SUB_SYSTEM
o_engine_topspeed_spinbox.displayed_value = engine_topspeed
o_heat_sinks_spinbox.displayed_value = heatsinks_installed
#endif // SUB_SYSTEM
}
}
GUI_ACTIVATE
{
#if 0 // temp
if $$m_isCampaign$$ == 0
{
callback($$ML_CallbackHandler$$, MLDataSetupMechSelection, mech_name[], selected_mech)
o_availmechsdroplist.list_size = 0
for (int i = 0; i < $$m_chassisCount$$; i++)
{
stock_count[i] = 0
}
for (count = 0; count < $$m_mechLabCount$$; count++)
{
for (i = 0; i < $$m_chassisCount$$; i++)
{
if (equal$(left$(mech_name[count], length$(stock_name[i])), stock_name[i]) == true)
{
// special case for Mad Cat Mark II
if (!((equal$(stock_name[i], mad_cat) == true) && (equal$(left$(mech_name[count], length$(mad_cat2)), mad_cat2) == true)))
{
stock_count[i]++
mech_name2[count] = right$(mech_name[count], length$(mech_name[count]) - (length$(stock_name[i]) + 1))
break
}
}
}
}
for (i = 0; i < $$m_chassisCount$$; i++)
{
if (stock_count[i] != 0)
{
o_availmechsdroplist.list_item[o_availmechsdroplist.list_size] = stock_name[i]
o_availmechsdroplist.list_size++
}
}
initialize(o_availmechsdroplist)
count = 0
if ($$m_mechLabCount$$)
{
stock_array[0] = 0
count = 1
for (i = 0; i < $$m_chassisCount$$; i++)
{
if (stock_count[i] != 0)
{
stock_array[count] = stock_array[count - 1] + stock_count[i]
count++
}
}
selected_mech = previous_mech
stock_mech_selected = 0
while (selected_mech >= stock_array[stock_mech_selected])
{
stock_mech_selected++
}
stock_mech_selected--
last_count = stock_array[stock_mech_selected]
variant_mech_selected = selected_mech - last_count
count = 0
do
{
o_availmechsdroplist2.list_item[count] = mech_name2[last_count]
count++
last_count++
if (last_count == $$m_mechLabCount$$)
break
}
while ((stock_array[stock_mech_selected] + count) != stock_array[stock_mech_selected + 1])
}
o_availmechsdroplist2.list_size = count
initialize(o_availmechsdroplist2)
o_availmechsdroplist.nSelected = stock_mech_selected
o_availmechsdroplist2.nselected = variant_mech_selected
}
#endif // temp
#if SHOW_MECH
activate(o_availmechsdroplist)
if ($$m_isCampaign$$ == 0)
activate(o_availmechsdroplist2)
#endif // SHOW_MECH
#if SHOW_CAMO
activate(o_camodroplist)
#endif // SHOW_CAMO
#if SUB_SYSTEM
activate(o_engine_topspeed_spinbox)
activate(o_heat_sinks_spinbox)
activate(o_ECM)
activate(o_beagle)
activate(o_lightamp)
activate(o_jumpjets)
activate(o_AMS)
activate(o_LAMS)
#endif // SUB_SYSTEM
}
GUI_DEACTIVATE
{
#if SHOW_MECH
deactivate(o_availmechsdroplist)
if ($$m_isCampaign$$ == 0)
deactivate(o_availmechsdroplist2)
#endif // SHOW_MECH
#if SHOW_CAMO
deactivate(o_camodroplist)
#endif // SHOW_CAMO
#if SUB_SYSTEM
deactivate(o_engine_topspeed_spinbox)
deactivate(o_heat_sinks_spinbox)
deactivate(o_ECM)
deactivate(o_beagle)
deactivate(o_lightamp)
deactivate(o_jumpjets)
deactivate(o_AMS)
deactivate(o_LAMS)
#endif // SUB_SYSTEM
}
GUI_DRAW
{
setpencolor(0x66ffffff)
#if SUB_SYSTEM
// Separator line 1
drawline sepx1, sepy1 to sepx2, sepy1
drawline sepx1, sepy1 - 1 to sepx1 + 20, sepy1 - 1
drawline sepx1, sepy1 + 1 to sepx1 + 20, sepy1 + 1
drawline sepx2 - 20, sepy1 - 1 to sepx2, sepy1 - 1
drawline sepx2 - 20, sepy1 + 1 to sepx2, sepy1 + 1
// Separator line 2
drawline sepx1, sepy2 to sepx2, sepy2
drawline sepx1, sepy2 - 1 to sepx1 + 20, sepy2 - 1
drawline sepx1, sepy2 + 1 to sepx1 + 20, sepy2 + 1
drawline sepx2 - 20, sepy2 - 1 to sepx2, sepy2 - 1
drawline sepx2 - 20, sepy2 + 1 to sepx2, sepy2 + 1
// Separator line 4
drawline sepx1, sepy3 to sepx2, sepy3
drawline sepx1, sepy3 - 1 to sepx1 + 20, sepy3 - 1
drawline sepx1, sepy3 + 1 to sepx1 + 20, sepy3 + 1
drawline sepx2 - 20, sepy3 - 1 to sepx2, sepy3 - 1
drawline sepx2 - 20, sepy3 + 1 to sepx2, sepy3 + 1
print3d_attributes = regfont, 0xffffffff, 1, 1, 1, 0, 0
print3d_margins = 20, 130 - 74 to 315, 530
print3d_margins = 20, 130 to 315, 530
print3d_position = labelx, boxy + 370
print3d localize$(IDS_ML_CH_HEATSINKS)
print3d_position = labelx, boxy + 400
print3d localize$(IDS_ML_CH_TOPSPEED)
print3d_position = labelx, boxy + 420
print3d localize$(IDS_ML_CH_UPGRADE)
print3d_attributes = regfont, 0xffffffff, 1, 1, 1, 0, 0, just_right
print3d_margins = 250, 130 to 310, 530
print3d_position = 250, boxy + 370
print3d conv$(heatsinks_installed) ".00"
print3d_position = 250, boxy + 420
print3d engine_tons
print3d_attributes = regfont, 0xffffffff, 1, 1, 1, 0, 0
print3d_margins = 20, 130 to 315, 530
print3d_position = 22, labely + 215
print3d localize$(IDS_ML_CH_AUXEQUIP)
print3d_attributes = regfont, 0xffffffff, 1, 1, 1, 0, 0, just_right
print3d_margins = 250, 130 to 310, 530
print3d_position = 250, labely + 215
print3d localize$(IDS_ML_CH_TONS)
// Non-editable information
#endif // SUB_SYSTEM
if parent.mech_exists == true
{
print3d_attributes = regfont, 0xffffffff, 1, 1, 1, 0, 0
print3d_margins = noneditx, nonedity to getresx() - 10, nonedity + 371
print3d_position = noneditx, labely + 135
print3d localize$(IDS_ML_CH_CHASSISTECH)
print3d_position = noneditx, labely + 180
print3d localize$(IDS_ML_CH_CHASSISCLASS)
print3d_position = noneditx, labely + 225
print3d localize$(IDS_ML_CH_ACCELERATION)
print3d_position = noneditx, labely + 270
print3d localize$(IDS_ML_CH_DECELERATION)
print3d_position = noneditx, labely + 315
print3d localize$(IDS_ML_CH_TURNRATE)
print3d_position = noneditx, labely + 360
print3d localize$(IDS_ML_CH_TWISTRANGE)
print3d_position = noneditx, labely + 405
print3d localize$(IDS_ML_CH_TWISTSPEED)
print3d_attributes = boldfont, 0xffffffff, 1, 1, 1, 0, 0
print3d_margins = noneditx, nonedity to getresx() - 10, nonedity + 371
print3d_position = noneditx + 20, labely + 155
print3d chassis_tech[parent.mech_id]
print3d_position = noneditx + 20, labely + 200
print3d class[parent.mech_id]
print3d_position = noneditx + 20, labely + 245
print3d acceleration
print3d_position = noneditx + 20, labely + 290
print3d deacceleration
print3d_position = noneditx + 20, labely + 335
print3d turn_rate
print3d_position = noneditx + 20, labely + 380
print3d torso_twist
print3d_position = noneditx + 20, labely + 425
print3d twist_speed
print3d_margins = 0, 0 to getresx(), getresy()
string eq_text
int neq_count = 0
if jumpjets_installed && can_have_jump
{
if neq_count
eq_text = eq_text " / "
eq_text = eq_text "Jump Jet"
neq_count = 1
}
if ams_installed && can_have_ams
{
if neq_count
eq_text = eq_text " / "
eq_text = eq_text "AMS"
neq_count = 1
}
if lams_installed && can_have_lams
{
if neq_count
eq_text = eq_text " / "
eq_text = eq_text "LAMS"
neq_count = 1
}
if (neq_count)
{
//eq_text = eq_text " equipped"
print3d_attributes = boldfont, 0xffffff00, 1, 1, 1, 0, 0
print3d_position = (getresx() - getprint3dwidth(eq_text)) / 2, 527 - 10
print3d eq_text
}
}
}
GUI_MAILBOX
{
if (sender == parent)
{
int kEvent = getmessage(1)
int tmp_mech
if (kEvent & fs_up)
{
#if SHOW_CAMO
tmp_mech = o_camodroplist.nselected
o_camodroplist.nselected = o_camodroplist.nselected - 1
if o_camodroplist.nselected < 0
o_camodroplist.nselected = o_camodroplist.list_size - 1
callback($$ML_CallbackHandler$$, MLSetMechSkin, o_camodroplist.nselected)
#else // !SHOW_CAMO
tmp_mech = __skin_selected
__skin_selected = __skin_selected - 1
if __skin_selected < 0
__skin_selected = skin_num - 1
callback($$ML_CallbackHandler$$, MLSetMechSkin, __skin_selected)
#endif // SHOW_CAMO
parent.just_saved = false
return
}
if (kEvent & fs_down)
{
#if SHOW_CAMO
tmp_mech = o_camodroplist.nselected
o_camodroplist.nselected = o_camodroplist.nselected + 1
if o_camodroplist.nselected >= o_camodroplist.list_size
o_camodroplist.nselected = 0
callback($$ML_CallbackHandler$$, MLSetMechSkin, o_camodroplist.nselected)
#else // !SHOW_CAMO
tmp_mech = __skin_selected
__skin_selected = __skin_selected + 1
if __skin_selected >= skin_num
__skin_selected = 0
callback($$ML_CallbackHandler$$, MLSetMechSkin, __skin_selected)
#endif // SHOW_CAMO
parent.just_saved = false
return
}
if (kEvent & fs_left)
{
if ($$m_isCampaign$$)
{
#if SHOW_MECH
tmp_mech = o_availmechsdroplist.nSelected - 1
if tmp_mech < 0
tmp_mech = $$m_mechLabCount$$ - 1
o_availmechsdroplist.nSelected = tmp_mech
#else // !SHOW_MECH
tmp_mech = __mech_selected - 1
if tmp_mech < 0
tmp_mech = $$m_mechLabCount$$ - 1
__mech_selected = tmp_mech
#endif // SHOW_MECH
}
#if 0 // temp
else
{
o_availmechsdroplist2.nselected = 0
stock_mech_selected = o_availmechsdroplist.nselected - 1
if stock_mech_selected < 0
stock_mech_selected = $$m_chassisCount$$ - 1
variant_mech_selected = o_availmechsdroplist2.nselected
tmp_mech = stock_array[stock_mech_selected] + variant_mech_selected
o_availmechsdroplist.nselected = stock_mech_selected
}
#endif // temp
}
if (kEvent & fs_right)
{
if ($$m_isCampaign$$)
{
#if SHOW_MECH
tmp_mech = o_availmechsdroplist.nSelected + 1
if tmp_mech >= $$m_mechLabCount$$
tmp_mech = 0
o_availmechsdroplist.nSelected = tmp_mech
#else // !SHOW_MECH
tmp_mech = __mech_selected + 1
if tmp_mech >= $$m_mechLabCount$$
tmp_mech = 0
__mech_selected = tmp_mech
#endif // SHOW_MECH
}
#if 0 // temp
else
{
o_availmechsdroplist2.nselected = 0
stock_mech_selected = o_availmechsdroplist.nselected + 1
if stock_mech_selected >= $$m_chassisCount$$
stock_mech_selected = 0
variant_mech_selected = o_availmechsdroplist2.nselected
tmp_mech = stock_array[stock_mech_selected] + variant_mech_selected
o_availmechsdroplist.nselected = stock_mech_selected
}
#endif // temp
}
callback($$ML_CallbackHandler$$, MLSave)
parent.just_saved = true
if ($$m_isCampaign$$)
{
string mech_name = szMechName[tmp_mech + 1]
callback($$Shell_CallbackHandler$$, ShellCampaignSetMech, nComID, mech_name)
}
if ($$m_isCampaign$$)
{
#if SHOW_CAMO
tmp_mech = o_camodroplist.nselected
#else // !SHOW_CAMO
tmp_mech = __skin_selected
#endif // SHOW_CAMO
}
initialize(this)
//activate(this)
initialize(parent)
//activate(parent)
if ($$m_isCampaign$$)
{
#if SHOW_CAMO
o_camodroplist.nselected = tmp_mech
callback($$ML_CallbackHandler$$, MLSetMechSkin, o_camodroplist.nselected)
#else // !SHOW_CAMO
__skin_selected = tmp_mech
callback($$ML_CallbackHandler$$, MLSetMechSkin, __skin_selected)
#endif // SHOW_CAMO
parent.just_saved = false
}
return
}
#if SHOW_MECH
if (sender == o_availmechsdroplist)
{
int tmp_mech
if ($$m_isCampaign$$)
{
tmp_mech = o_availmechsdroplist.nSelected
}
else
{
o_availmechsdroplist2.nselected = 0
stock_mech_selected = o_availmechsdroplist.nselected
variant_mech_selected = o_availmechsdroplist2.nselected
tmp_mech = stock_array[stock_mech_selected] + variant_mech_selected
}
if previous_mech != tmp_mech
{
callback($$ML_CallbackHandler$$, MLSave)
parent.just_saved = true
if ($$m_isCampaign$$)
{
string mech_name = szMechName[tmp_mech + 1]
callback($$Shell_CallbackHandler$$, ShellCampaignSetMech, nComID, mech_name)
}
initialize(this)
activate(this)
return
}
}
#endif // SHOW_MECH
#if 0 // temp
if ($$m_isCampaign$$ == 0)
{
if (sender == o_availmechsdroplist2)
{
stock_mech_selected = o_availmechsdroplist.nselected
variant_mech_selected = o_availmechsdroplist2.nselected
mech_selected = stock_array[stock_mech_selected] + variant_mech_selected
int tmp_mech = mech_selected
if previous_mech != tmp_mech
{
callback($$ML_CallbackHandler$$, MLDataGetWeaponGroups, grp_typearray[], grp_id_array[], grp_loc_array[], grp_group1_array[], grp_group2_array[], grp_group3_array[], grp_group4_array[], grp_group5_array[], grp_group6_array[], grp_num_weapons, grp_array_size)
callback($$ML_CallbackHandler$$, MLSave)
parent.just_saved = true
initialize(this)
activate(this)
}
}
}
#endif // temp
#if SHOW_CAMO
if sender == o_camodroplist
{
callback($$ML_CallbackHandler$$, MLSetMechSkin, o_camodroplist.nselected)
parent.just_saved = false
}
#endif // SHOW_CAMO
// it is only valid in Non-campaign MechLab mode
#if SUB_SYSTEM
if sender == o_engine_topspeed_spinbox
{
if GetMessage() == 1
{
play btnTriggeredSound,1
callback($$ML_CallbackHandler$$, MLSetEngineUpgrade)
callback($$ML_CallbackHandler$$, MLDataSetupGetEngineSpeed, engine_topspeed, engine_tons)
}
if GetMessage() == -1
{
play btnTriggeredSound,1
callback($$ML_CallbackHandler$$, MLSetEngineDegrade)
callback($$ML_CallbackHandler$$, MLDataSetupGetEngineSpeed, engine_topspeed, engine_tons)
}
o_engine_topspeed_spinbox.displayed_value = engine_topspeed
parent.just_saved = false
}
if sender == o_heat_sinks_spinbox
{
if GetMessage() == 1
{
play btnTriggeredSound,1
callback($$ML_CallbackHandler$$, MLAddHeatSink)
callback($$ML_CallbackHandler$$, MLDataSetupGetHeatSinks, heatsinks_installed)
}
if GetMessage() == -1
{
play btnTriggeredSound,1
callback($$ML_CallbackHandler$$, MLRemoveHeatSink)
callback($$ML_CallbackHandler$$, MLDataSetupGetHeatSinks, heatsinks_installed)
}
o_heat_sinks_spinbox.displayed_value = heatsinks_installed
parent.just_saved = false
}
if sender == o_ECM
{
int value
if getmessage() == 1
{
value = 1
}
if getmessage() == 0
{
value = 0
}
callback($$ML_CallbackHandler$$, MLSetECM, value)
callback($$ML_CallbackHandler$$, MLGetECM, ecm_installed, can_have_ecm, ecm_tons)
if can_have_ecm != 0
{
if ecm_installed != 0
{
o_ECM.state = 2
}
if ecm_installed == 0
{
o_ECM.state = 0
}
}
initialize(o_ECM)
parent.just_saved = false
}
if sender == o_beagle
{
int value
if getmessage() == 1
{
value = 1
}
if getmessage() == 0
{
value = 0
}
callback($$ML_CallbackHandler$$, MLSetBeagle, value)
callback($$ML_CallbackHandler$$, MLGetBeagle, beagle_installed, can_have_beagle, beagle_tons)
if can_have_beagle != 0
{
if beagle_installed != 0
{
o_beagle.state = 2
}
if beagle_installed == 0
{
o_beagle.state = 0
}
}
initialize(o_beagle)
parent.just_saved = false
}
if sender == o_lightamp
{
int value
if getmessage() == 1
{
value = 1
}
if getmessage() == 0
{
value = 0
}
callback($$ML_CallbackHandler$$, MLSetLightAmp, value)
callback($$ML_CallbackHandler$$, MLGetLightAmp, light_installed, can_have_light, light_tons)
if can_have_light != 0
{
if light_installed != 0
{
o_lightamp.state = 2
}
if light_installed == 0
{
o_lightamp.state = 0
}
}
initialize(o_lightamp)
parent.just_saved = false
}
if sender == o_jumpjets
{
int value
if getmessage() == 1
{
value = 1
}
if getmessage() == 0
{
value = 0
}
callback($$ML_CallbackHandler$$, MLSetJumpJets, value)
callback($$ML_CallbackHandler$$, MLGetJumpJets, jumpjets_installed, can_have_jump, jump_tons)
if can_have_jump != 0
{
if jumpjets_installed != 0
{
o_jumpjets.state = 2
}
if jumpjets_installed == 0
{
o_jumpjets.state = 0
}
}
initialize(o_jumpjets)
parent.just_saved = false
}
if sender == o_AMS
{
int value
if getmessage() == 1
{
value = 1
}
if getmessage() == 0
{
value = 0
}
callback($$ML_CallbackHandler$$, MLSetAMS, value)
callback($$ML_CallbackHandler$$, MLGetAMS, ams_installed, can_have_ams, ams_tons)
if can_have_ams != 0
{
if ams_installed != 0
{
o_AMS.state = 2
}
if ams_installed == 0
{
o_AMS.state = 0
}
}
initialize(o_AMS)
parent.just_saved = false
}
if sender == o_LAMS
{
int value
if getmessage() == 1
{
value = 1
}
if getmessage() == 0
{
value = 0
}
callback($$ML_CallbackHandler$$, MLSetLAMS, value)
callback($$ML_CallbackHandler$$, MLGetLAMS, lams_installed, can_have_lams, lams_tons)
if can_have_lams != 0
{
if lams_installed != 0
{
o_LAMS.state = 2
}
if lams_installed == 0
{
o_LAMS.state = 0
}
}
initialize(o_LAMS)
parent.just_saved = false
}
#endif // SUB_SYSTEM
mail(1)
}
}