mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-02-25 15:41:01 +00:00
nuke useless files and fix tiny shit
This commit is contained in:
parent
99a52d3d05
commit
4d061ae930
62 changed files with 43 additions and 1386 deletions
110
data/init.cs
110
data/init.cs
|
|
@ -1,110 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Torque Game Engine
|
||||
//
|
||||
// Copyright (c) 2001 GarageGames.Com
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new MaterialProperty(DefaultMaterial) {
|
||||
friction = 1;
|
||||
restitution = 1;
|
||||
force = 0;
|
||||
};
|
||||
|
||||
|
||||
// Will need to play with these three friction values to balance game play
|
||||
new MaterialProperty(NoFrictionMaterial) {
|
||||
friction = 0.01;
|
||||
restitution = 0.5;
|
||||
};
|
||||
|
||||
new MaterialProperty(LowFrictionMaterial) {
|
||||
friction = 0.20;
|
||||
restitution = 0.5;
|
||||
};
|
||||
|
||||
new MaterialProperty(HighFrictionMaterial) {
|
||||
friction = 1.50;
|
||||
restitution = 0.5;
|
||||
};
|
||||
|
||||
new MaterialProperty(VeryHighFrictionMaterial) {
|
||||
friction = 2;
|
||||
restitution = 1;
|
||||
};
|
||||
|
||||
|
||||
|
||||
new MaterialProperty(RubberFloorMaterial) {
|
||||
friction = 1;
|
||||
restitution = 1;
|
||||
};
|
||||
|
||||
new MaterialProperty(IceMaterial) {
|
||||
friction = 0.05;
|
||||
restitution = 0.5;
|
||||
};
|
||||
|
||||
new MaterialProperty(BumperMaterial) {
|
||||
friction = 0.5;
|
||||
restitution = 0;
|
||||
force = 15;
|
||||
};
|
||||
|
||||
new MaterialProperty(ButtonMaterial) {
|
||||
friction = 1;
|
||||
restitution = 1;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
addMaterialMapping( "", DefaultMaterial);
|
||||
|
||||
// Textures listed in BrianH texture document
|
||||
addMaterialMapping( "grid_warm" , DefaultMaterial);
|
||||
addMaterialMapping( "grid_cool" , DefaultMaterial);
|
||||
addMaterialMapping( "grid_neutral" , DefaultMaterial);
|
||||
|
||||
addMaterialMapping( "stripe_cool" , DefaultMaterial);
|
||||
addMaterialMapping( "stripe_neutral" , DefaultMaterial);
|
||||
addMaterialMapping( "stripe_warm" , DefaultMaterial);
|
||||
addMaterialMapping( "tube_cool" , DefaultMaterial);
|
||||
addMaterialMapping( "tube_neutral" , DefaultMaterial);
|
||||
addMaterialMapping( "tube_warm" , DefaultMaterial);
|
||||
|
||||
addMaterialMapping( "solid_cool1" , DefaultMaterial);
|
||||
addMaterialMapping( "solid_cool2" , DefaultMaterial);
|
||||
addMaterialMapping( "solid_neutral1" , DefaultMaterial);
|
||||
addMaterialMapping( "solid_neutral2" , DefaultMaterial);
|
||||
addMaterialMapping( "solid_warm1" , DefaultMaterial);
|
||||
addMaterialMapping( "solid_warm2" , DefaultMaterial);
|
||||
|
||||
addMaterialMapping( "pattern_cool1" , DefaultMaterial);
|
||||
addMaterialMapping( "pattern_cool2" , DefaultMaterial);
|
||||
addMaterialMapping( "pattern_neutral1" , DefaultMaterial);
|
||||
addMaterialMapping( "pattern_neutral2" , DefaultMaterial);
|
||||
addMaterialMapping( "pattern_warm1" , DefaultMaterial);
|
||||
addMaterialMapping( "pattern_warm2" , DefaultMaterial);
|
||||
|
||||
addMaterialMapping( "friction_none" , NoFrictionMaterial);
|
||||
addMaterialMapping( "friction_low" , LowFrictionMaterial);
|
||||
addMaterialMapping( "friction_high" , HighFrictionMaterial);
|
||||
// used for ramps in escher level
|
||||
addMaterialMapping( "friction_ramp_yellow" , VeryHighFrictionMaterial);
|
||||
|
||||
// old textures (to be removed?)
|
||||
addMaterialMapping( "grid1" , RubberFloorMaterial);
|
||||
addMaterialMapping( "grid2" , RubberFloorMaterial);
|
||||
addMaterialMapping( "grid3" , RubberFloorMaterial);
|
||||
addMaterialMapping( "grid4" , RubberFloorMaterial);
|
||||
|
||||
// some part textures
|
||||
addMaterialMapping( "oilslick" , IceMaterial);
|
||||
addMaterialMapping( "base.slick" , IceMaterial);
|
||||
addMaterialMapping( "ice.slick" , IceMaterial);
|
||||
addMaterialMapping( "bumper-rubber" , BumperMaterial);
|
||||
addMaterialMapping( "triang-side" , BumperMaterial);
|
||||
addMaterialMapping( "triang-top" , BumperMaterial);
|
||||
addMaterialMapping( "pball-round-side" , BumperMaterial);
|
||||
addMaterialMapping( "pball-round-top" , BumperMaterial);
|
||||
addMaterialMapping( "pball-round-bottm" , BumperMaterial);
|
||||
addMaterialMapping( "button" , ButtonMaterial);
|
||||
Binary file not shown.
Binary file not shown.
BIN
data/ui/common/cache/arial bold_14.gft
vendored
BIN
data/ui/common/cache/arial bold_14.gft
vendored
Binary file not shown.
BIN
data/ui/common/cache/arial italic_14.gft
vendored
BIN
data/ui/common/cache/arial italic_14.gft
vendored
Binary file not shown.
BIN
data/ui/common/cache/arial_12.gft
vendored
BIN
data/ui/common/cache/arial_12.gft
vendored
Binary file not shown.
BIN
data/ui/common/cache/arial_13.gft
vendored
BIN
data/ui/common/cache/arial_13.gft
vendored
Binary file not shown.
BIN
data/ui/common/cache/arial_14.gft
vendored
BIN
data/ui/common/cache/arial_14.gft
vendored
Binary file not shown.
BIN
data/ui/common/cache/arial_16.gft
vendored
BIN
data/ui/common/cache/arial_16.gft
vendored
Binary file not shown.
BIN
data/ui/common/cache/arial_24.gft
vendored
BIN
data/ui/common/cache/arial_24.gft
vendored
Binary file not shown.
BIN
data/ui/common/cache/domcasuald_24.gft
vendored
BIN
data/ui/common/cache/domcasuald_24.gft
vendored
Binary file not shown.
BIN
data/ui/common/cache/domcasuald_32.gft
vendored
BIN
data/ui/common/cache/domcasuald_32.gft
vendored
Binary file not shown.
BIN
data/ui/common/cache/expo_32.gft
vendored
BIN
data/ui/common/cache/expo_32.gft
vendored
Binary file not shown.
BIN
data/ui/common/cache/expo_50.gft
vendored
BIN
data/ui/common/cache/expo_50.gft
vendored
Binary file not shown.
BIN
data/ui/common/cache/lucida console_12.gft
vendored
BIN
data/ui/common/cache/lucida console_12.gft
vendored
Binary file not shown.
Binary file not shown.
|
|
@ -1,470 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Torque Game Engine
|
||||
//
|
||||
// Copyright (c) 2001 GarageGames.Com
|
||||
// Portions Copyright (c) 2001 by Sierra Online, Inc.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
$Gui::fontCacheDirectory = expandFilename("./cache");
|
||||
$Gui::clipboardFile = expandFilename("./cache/clipboard.gui");
|
||||
|
||||
// GuiDefaultProfile is a special case, all other profiles are initialized
|
||||
// to the contents of this profile first then the profile specific
|
||||
// overrides are assigned.
|
||||
|
||||
if(!isObject(GuiDefaultProfile)) new GuiControlProfile (GuiDefaultProfile)
|
||||
{
|
||||
tab = false;
|
||||
canKeyFocus = false;
|
||||
hasBitmapArray = false;
|
||||
mouseOverSelected = false;
|
||||
|
||||
// fill color
|
||||
opaque = false;
|
||||
fillColor = ($platform $= "macos") ? "211 211 211" : "192 192 192";
|
||||
fillColorHL = ($platform $= "macos") ? "244 244 244" : "220 220 220";
|
||||
fillColorNA = ($platform $= "macos") ? "244 244 244" : "220 220 220";
|
||||
|
||||
// border color
|
||||
border = false;
|
||||
borderColor = "0 0 0";
|
||||
borderColorHL = "128 128 128";
|
||||
borderColorNA = "64 64 64";
|
||||
|
||||
// font
|
||||
fontType = "Arial";
|
||||
fontSize = 14;
|
||||
|
||||
fontColor = "0 0 0";
|
||||
fontColorHL = "32 100 100";
|
||||
fontColorNA = "0 0 0";
|
||||
fontColorSEL= "200 200 200";
|
||||
|
||||
// bitmap information
|
||||
bitmap = ($platform $= "macos") ? "./osxWindow" : "./darkWindow";
|
||||
bitmapBase = "";
|
||||
textOffset = "0 0";
|
||||
|
||||
// used by guiTextControl
|
||||
modal = true;
|
||||
justify = "left";
|
||||
autoSizeWidth = false;
|
||||
autoSizeHeight = false;
|
||||
returnTab = false;
|
||||
numbersOnly = false;
|
||||
cursorColor = "0 0 0 255";
|
||||
|
||||
// sounds
|
||||
soundButtonDown = "";
|
||||
soundButtonOver = "";
|
||||
};
|
||||
|
||||
|
||||
if(!isObject(GuiComic18Profile)) new GuiControlProfile ( GuiComic18Profile )
|
||||
{
|
||||
fontType = "Comic Sans MS Bold";
|
||||
fontSize = 18;
|
||||
fontColor = "0 0 0";
|
||||
autoSizeWidth = true;
|
||||
autoSizeHeight = true;
|
||||
};
|
||||
|
||||
|
||||
if(!isObject(GuiComic24Profile)) new GuiControlProfile ( GuiComic24Profile )
|
||||
{
|
||||
fontType = "Comic Sans MS Bold";
|
||||
fontSize = 24;
|
||||
fontColor = "0 0 0";
|
||||
autoSizeWidth = true;
|
||||
autoSizeHeight = true;
|
||||
};
|
||||
|
||||
|
||||
if(!isObject(GuiComic36Profile)) new GuiControlProfile ( GuiComic36Profile )
|
||||
{
|
||||
fontType = "Comic Sans MS Bold";
|
||||
fontSize = 36;
|
||||
fontColor = "0 0 0";
|
||||
autoSizeWidth = true;
|
||||
autoSizeHeight = true;
|
||||
};
|
||||
|
||||
|
||||
if(!isObject(GuiInputCtrlProfile)) new GuiControlProfile( GuiInputCtrlProfile )
|
||||
{
|
||||
tab = true;
|
||||
canKeyFocus = true;
|
||||
};
|
||||
|
||||
if(!isObject(GuiDialogProfile)) new GuiControlProfile(GuiDialogProfile);
|
||||
|
||||
|
||||
if(!isObject(GuiSolidDefaultProfile)) new GuiControlProfile (GuiSolidDefaultProfile)
|
||||
{
|
||||
opaque = true;
|
||||
border = true;
|
||||
};
|
||||
|
||||
if(!isObject(GuiWindowProfile)) new GuiControlProfile (GuiWindowProfile)
|
||||
{
|
||||
opaque = true;
|
||||
border = 2;
|
||||
fillColor = ($platform $= "macos") ? "211 211 211" : "192 192 192";
|
||||
fillColorHL = ($platform $= "macos") ? "190 255 255" : "64 150 150";
|
||||
fillColorNA = ($platform $= "macos") ? "255 255 255" : "150 150 150";
|
||||
fontColor = ($platform $= "macos") ? "0 0 0" : "255 255 255";
|
||||
fontColorHL = ($platform $= "macos") ? "200 200 200" : "0 0 0";
|
||||
text = "GuiWindowCtrl test";
|
||||
bitmap = ($platform $= "macos") ? "./osxWindow" : "./darkWindow";
|
||||
textOffset = ($platform $= "macos") ? "5 5" : "6 6";
|
||||
hasBitmapArray = true;
|
||||
justify = ($platform $= "macos") ? "center" : "left";
|
||||
};
|
||||
|
||||
if(!isObject(GuiToolWindowProfile)) new GuiControlProfile (GuiToolWindowProfile)
|
||||
{
|
||||
opaque = true;
|
||||
border = 2;
|
||||
fillColor = "192 192 192";
|
||||
fillColorHL = "64 150 150";
|
||||
fillColorNA = "150 150 150";
|
||||
fontColor = "255 255 255";
|
||||
fontColorHL = "0 0 0";
|
||||
bitmap = "./torqueToolWindow";
|
||||
textOffset = "6 6";
|
||||
};
|
||||
|
||||
if(!isObject(EditorToolButtonProfile)) new GuiControlProfile (EditorToolButtonProfile)
|
||||
{
|
||||
opaque = true;
|
||||
border = 2;
|
||||
};
|
||||
|
||||
if(!isObject(GuiContentProfile)) new GuiControlProfile (GuiContentProfile)
|
||||
{
|
||||
opaque = true;
|
||||
fillColor = "255 255 255";
|
||||
};
|
||||
|
||||
if(!isObject(GuiModelessDialogProfile)) new GuiControlProfile("GuiModelessDialogProfile")
|
||||
{
|
||||
modal = false;
|
||||
};
|
||||
|
||||
if(!isObject(GuiButtonProfile)) new GuiControlProfile (GuiButtonProfile)
|
||||
{
|
||||
opaque = true;
|
||||
border = true;
|
||||
fontColor = "0 0 0";
|
||||
fontColorHL = "32 100 100";
|
||||
fixedExtent = true;
|
||||
justify = "center";
|
||||
canKeyFocus = false;
|
||||
};
|
||||
|
||||
if(!isObject(GuiBorderButtonProfile)) new GuiControlProfile (GuiBorderButtonProfile)
|
||||
{
|
||||
fontColorHL = "0 0 0";
|
||||
};
|
||||
|
||||
if(!isObject(GuiMenuBarProfile)) new GuiControlProfile (GuiMenuBarProfile)
|
||||
{
|
||||
opaque = true;
|
||||
fillColorHL = "0 0 96";
|
||||
border = 4;
|
||||
fontColor = "0 0 0";
|
||||
fontColorHL = "255 255 255";
|
||||
fontColorNA = "128 128 128";
|
||||
fixedExtent = true;
|
||||
justify = "center";
|
||||
canKeyFocus = false;
|
||||
mouseOverSelected = true;
|
||||
bitmap = ($platform $= "macos") ? "./osxMenu" : "./torqueMenu";
|
||||
hasBitmapArray = true;
|
||||
};
|
||||
|
||||
if(!isObject(GuiButtonSmProfile)) new GuiControlProfile (GuiButtonSmProfile : GuiButtonProfile)
|
||||
{
|
||||
fontSize = 14;
|
||||
};
|
||||
|
||||
if(!isObject(GuiRadioProfile)) new GuiControlProfile (GuiRadioProfile)
|
||||
{
|
||||
fontSize = 14;
|
||||
fillColor = "232 232 232";
|
||||
fontColorHL = "32 100 100";
|
||||
fixedExtent = true;
|
||||
bitmap = ($platform $= "macos") ? "./osxRadio" : "./torqueRadio";
|
||||
hasBitmapArray = true;
|
||||
};
|
||||
|
||||
if(!isObject(GuiScrollProfile)) new GuiControlProfile (GuiScrollProfile)
|
||||
{
|
||||
opaque = true;
|
||||
fillColor = "255 255 255";
|
||||
border = 3;
|
||||
borderThickness = 2;
|
||||
borderColor = "0 0 0";
|
||||
bitmap = ($platform $= "macos") ? "./osxScroll" : "./darkScroll";
|
||||
hasBitmapArray = true;
|
||||
};
|
||||
|
||||
if(!isObject(GuiSliderProfile)) new GuiControlProfile (GuiSliderProfile);
|
||||
|
||||
if(!isObject(GuiTextProfile)) new GuiControlProfile (GuiTextProfile)
|
||||
{
|
||||
fontColor = "0 0 0";
|
||||
fontColorLink = "255 96 96";
|
||||
fontColorLinkHL = "0 0 255";
|
||||
autoSizeWidth = true;
|
||||
autoSizeHeight = true;
|
||||
};
|
||||
|
||||
if(!isObject(EditorTextProfile)) new GuiControlProfile (EditorTextProfile)
|
||||
{
|
||||
fontType = "Arial Bold";
|
||||
fontColor = "0 0 0";
|
||||
autoSizeWidth = true;
|
||||
autoSizeHeight = true;
|
||||
};
|
||||
|
||||
if(!isObject(EditorTextProfileWhite)) new GuiControlProfile (EditorTextProfileWhite)
|
||||
{
|
||||
fontType = "Arial Bold";
|
||||
fontColor = "255 255 255";
|
||||
autoSizeWidth = true;
|
||||
autoSizeHeight = true;
|
||||
};
|
||||
|
||||
if(!isObject(GuiMediumTextProfile)) new GuiControlProfile (GuiMediumTextProfile : GuiTextProfile)
|
||||
{
|
||||
fontSize = 24;
|
||||
};
|
||||
|
||||
if(!isObject(GuiBigTextProfile)) new GuiControlProfile (GuiBigTextProfile : GuiTextProfile)
|
||||
{
|
||||
fontSize = 36;
|
||||
};
|
||||
|
||||
if(!isObject(GuiCenterTextProfile)) new GuiControlProfile (GuiCenterTextProfile : GuiTextProfile)
|
||||
{
|
||||
justify = "center";
|
||||
};
|
||||
|
||||
if(!isObject(MissionEditorProfile)) new GuiControlProfile (MissionEditorProfile)
|
||||
{
|
||||
canKeyFocus = true;
|
||||
};
|
||||
|
||||
if(!isObject(EditorScrollProfile)) new GuiControlProfile (EditorScrollProfile)
|
||||
{
|
||||
opaque = true;
|
||||
fillColor = "192 192 192 192";
|
||||
border = 3;
|
||||
borderThickness = 2;
|
||||
borderColor = "0 0 0";
|
||||
bitmap = "./darkScroll";
|
||||
hasBitmapArray = true;
|
||||
};
|
||||
|
||||
if(!isObject(GuiTextEditProfile)) new GuiControlProfile (GuiTextEditProfile)
|
||||
{
|
||||
opaque = true;
|
||||
fillColor = "255 255 255";
|
||||
fillColorHL = "128 128 128";
|
||||
border = 3;
|
||||
borderThickness = 2;
|
||||
borderColor = "0 0 0";
|
||||
fontColor = "0 0 0";
|
||||
fontColorHL = "255 255 255";
|
||||
fontColorNA = "128 128 128";
|
||||
textOffset = "0 2";
|
||||
autoSizeWidth = false;
|
||||
autoSizeHeight = true;
|
||||
tab = true;
|
||||
canKeyFocus = true;
|
||||
};
|
||||
|
||||
if(!isObject(GuiControlListPopupProfile)) new GuiControlProfile (GuiControlListPopupProfile)
|
||||
{
|
||||
opaque = true;
|
||||
fillColor = "255 255 255";
|
||||
fillColorHL = "128 128 128";
|
||||
border = true;
|
||||
borderColor = "0 0 0";
|
||||
fontColor = "0 0 0";
|
||||
fontColorHL = "255 255 255";
|
||||
fontColorNA = "128 128 128";
|
||||
textOffset = "0 2";
|
||||
autoSizeWidth = false;
|
||||
autoSizeHeight = true;
|
||||
tab = true;
|
||||
canKeyFocus = true;
|
||||
bitmap = ($platform $= "macos") ? "./osxScroll" : "./darkScroll";
|
||||
hasBitmapArray = true;
|
||||
};
|
||||
|
||||
if(!isObject(GuiTextArrayProfile)) new GuiControlProfile (GuiTextArrayProfile : GuiTextProfile)
|
||||
{
|
||||
fontColorHL = "32 100 100";
|
||||
fillColorHL = "200 200 200";
|
||||
};
|
||||
|
||||
if(!isObject(GuiTextListProfile)) new GuiControlProfile (GuiTextListProfile : GuiTextProfile) ;
|
||||
|
||||
if(!isObject(GuiTreeViewProfile)) new GuiControlProfile (GuiTreeViewProfile)
|
||||
{
|
||||
fontSize = 13; // dhc - trying a better fit...
|
||||
fontColor = "0 0 0";
|
||||
fontColorHL = "64 150 150";
|
||||
};
|
||||
|
||||
if(!isObject(GuiCheckBoxProfile)) new GuiControlProfile (GuiCheckBoxProfile)
|
||||
{
|
||||
opaque = false;
|
||||
fillColor = "232 232 232";
|
||||
border = false;
|
||||
borderColor = "0 0 0";
|
||||
fontSize = 14;
|
||||
fontColor = "0 0 0";
|
||||
fontColorHL = "32 100 100";
|
||||
fixedExtent = true;
|
||||
justify = "left";
|
||||
bitmap = ($platform $= "macos") ? "./osxCheck" : "./torqueCheck";
|
||||
hasBitmapArray = true;
|
||||
|
||||
};
|
||||
|
||||
if(!isObject(GuiPopUpMenuProfile)) new GuiControlProfile (GuiPopUpMenuProfile)
|
||||
{
|
||||
opaque = true;
|
||||
mouseOverSelected = true;
|
||||
|
||||
border = 4;
|
||||
borderThickness = 2;
|
||||
borderColor = "0 0 0";
|
||||
fontSize = 14;
|
||||
fontColor = "0 0 0";
|
||||
fontColorHL = "32 100 100";
|
||||
fontColorSEL = "32 100 100";
|
||||
fixedExtent = true;
|
||||
justify = "center";
|
||||
bitmap = ($platform $= "macos") ? "./osxScroll" : "./darkScroll";
|
||||
hasBitmapArray = true;
|
||||
};
|
||||
|
||||
if(!isObject(GuiEditorClassProfile)) new GuiControlProfile (GuiEditorClassProfile)
|
||||
{
|
||||
opaque = true;
|
||||
fillColor = "232 232 232";
|
||||
border = true;
|
||||
borderColor = "0 0 0";
|
||||
borderColorHL = "127 127 127";
|
||||
fontColor = "0 0 0";
|
||||
fontColorHL = "32 100 100";
|
||||
fixedExtent = true;
|
||||
justify = "center";
|
||||
bitmap = ($platform $= "macos") ? "./osxScroll" : "./darkScroll";
|
||||
hasBitmapArray = true;
|
||||
};
|
||||
|
||||
|
||||
if(!isObject(LoadTextProfile)) new GuiControlProfile ("LoadTextProfile")
|
||||
{
|
||||
fontColor = "66 219 234";
|
||||
autoSizeWidth = true;
|
||||
autoSizeHeight = true;
|
||||
};
|
||||
|
||||
|
||||
if(!isObject(GuiMLTextProfile)) new GuiControlProfile ("GuiMLTextProfile")
|
||||
{
|
||||
fontColorLink = "255 96 96";
|
||||
fontColorLinkHL = "0 0 255";
|
||||
};
|
||||
|
||||
if(!isObject(GuiMLTextEditProfile)) new GuiControlProfile (GuiMLTextEditProfile)
|
||||
{
|
||||
fontColorLink = "255 96 96";
|
||||
fontColorLinkHL = "0 0 255";
|
||||
|
||||
fillColor = "255 255 255";
|
||||
fillColorHL = "128 128 128";
|
||||
|
||||
fontColor = "0 0 0";
|
||||
fontColorHL = "255 255 255";
|
||||
fontColorNA = "128 128 128";
|
||||
|
||||
autoSizeWidth = true;
|
||||
autoSizeHeight = true;
|
||||
tab = true;
|
||||
canKeyFocus = true;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Console Window
|
||||
|
||||
if(!isObject(GuiConsoleProfile)) new GuiControlProfile ("GuiConsoleProfile")
|
||||
{
|
||||
fontType = ($platform $= "macos") ? "Courier New" : "Lucida Console";
|
||||
fontSize = 12;
|
||||
fontColor = "0 0 0";
|
||||
fontColorHL = "130 130 130";
|
||||
fontColorNA = "255 0 0";
|
||||
fontColors[6] = "50 50 50";
|
||||
fontColors[7] = "50 50 0";
|
||||
fontColors[8] = "0 0 50";
|
||||
fontColors[9] = "0 50 0";
|
||||
};
|
||||
|
||||
|
||||
if(!isObject(GuiProgressProfile)) new GuiControlProfile ("GuiProgressProfile")
|
||||
{
|
||||
opaque = false;
|
||||
fillColor = "44 152 162 100";
|
||||
border = true;
|
||||
borderColor = "78 88 120";
|
||||
};
|
||||
|
||||
if(!isObject(GuiProgressTextProfile)) new GuiControlProfile ("GuiProgressTextProfile")
|
||||
{
|
||||
fontColor = "0 0 0";
|
||||
justify = "center";
|
||||
};
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Gui Inspector
|
||||
|
||||
if(!isObject(GuiInspectorTextEditProfile)) new GuiControlProfile ("GuiInspectorTextEditProfile")
|
||||
{
|
||||
opaque = true;
|
||||
fillColor = "255 255 255";
|
||||
fillColorHL = "128 128 128";
|
||||
border = true;
|
||||
borderColor = "0 0 0";
|
||||
fontColor = "0 0 0";
|
||||
fontColorHL = "255 255 255";
|
||||
autoSizeWidth = false;
|
||||
autoSizeHeight = true;
|
||||
tab = false;
|
||||
canKeyFocus = true;
|
||||
};
|
||||
|
||||
if(!isObject(GuiBitmapBorderProfile)) new GuiControlProfile(GuiBitmapBorderProfile)
|
||||
{
|
||||
bitmap = "./darkBorder";
|
||||
hasBitmapArray = true;
|
||||
};
|
||||
|
||||
//-------------------------------------- Cursors
|
||||
//
|
||||
new GuiCursor(DefaultCursor)
|
||||
{
|
||||
hotSpot = "1 1";
|
||||
bitmapName = "./CUR_3darrow";
|
||||
};
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,155 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Torque Game Engine
|
||||
//
|
||||
// Copyright (c) 2001 GarageGames.Com
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Override base controls
|
||||
GuiButtonProfile.soundButtonOver = AudioButtonOver;
|
||||
GuiButtonProfile.soundButtonDown = AudioButtonDown;
|
||||
|
||||
GuiDefaultProfile.soundButtonDown = AudioButtonDown;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Chat Hud profiles
|
||||
|
||||
|
||||
new GuiControlProfile ("ChatHudMessageProfile")
|
||||
{
|
||||
fontType = "Arial";
|
||||
fontSize = 16;
|
||||
fontColor = "255 255 0"; // default color (death msgs, scoring, inventory)
|
||||
fontColors[1] = "4 235 105"; // client join/drop, tournament mode
|
||||
fontColors[2] = "219 200 128"; // gameplay, admin/voting, pack/deployable
|
||||
fontColors[3] = "77 253 95"; // team chat, spam protection message, client tasks
|
||||
fontColors[4] = "40 231 240"; // global chat
|
||||
fontColors[5] = "200 200 50 200"; // used in single player game
|
||||
// WARNING! Colors 6-9 are reserved for name coloring
|
||||
autoSizeWidth = true;
|
||||
autoSizeHeight = true;
|
||||
};
|
||||
|
||||
new GuiControlProfile ("ChatHudScrollProfile")
|
||||
{
|
||||
opaque = false;
|
||||
bitmap = "common/ui/darkScroll";
|
||||
hasBitmapArray = true;
|
||||
};
|
||||
|
||||
|
||||
new GuiControlProfile (GuiTPTextEditProfile)
|
||||
{
|
||||
opaque = false;
|
||||
fillColor = "255 255 255";
|
||||
fillColorHL = "128 128 128";
|
||||
border = false;
|
||||
borderColor = "0 0 0";
|
||||
fontColor = "0 0 0";
|
||||
fontColorHL = "255 255 255";
|
||||
fontColorNA = "128 128 128";
|
||||
textOffset = "0 2";
|
||||
autoSizeWidth = false;
|
||||
autoSizeHeight = true;
|
||||
tab = true;
|
||||
canKeyFocus = true;
|
||||
};
|
||||
|
||||
new GuiControlProfile (OverlayScreenProfile)
|
||||
{
|
||||
opaque = true;
|
||||
fillColor = "0 0 0 96";
|
||||
fillColorHL = "128 128 128";
|
||||
border = false;
|
||||
borderColor = "0 0 0";
|
||||
fontColor = "0 0 0";
|
||||
fontColorHL = "255 255 255";
|
||||
fontColorNA = "128 128 128";
|
||||
textOffset = "0 2";
|
||||
autoSizeWidth = false;
|
||||
autoSizeHeight = true;
|
||||
tab = true;
|
||||
canKeyFocus = true;
|
||||
};
|
||||
|
||||
new GuiControlProfile (GuiBigTextEditProfile)
|
||||
{
|
||||
fontType = "DomCasualD";
|
||||
fontSize = 32;
|
||||
opaque = false;
|
||||
fillColor = "255 255 255";
|
||||
fillColorHL = "128 128 128";
|
||||
border = false;
|
||||
borderColor = "0 0 0";
|
||||
fontColor = "0 0 0";
|
||||
fontColorHL = "255 255 255";
|
||||
fontColorNA = "128 128 128";
|
||||
textOffset = "0 2";
|
||||
autoSizeWidth = false;
|
||||
autoSizeHeight = true;
|
||||
tab = true;
|
||||
canKeyFocus = true;
|
||||
};
|
||||
|
||||
new GuiControlProfile (BevelPurpleProfile)
|
||||
{
|
||||
// fill color
|
||||
opaque = true;
|
||||
border = 2;
|
||||
fillColor = "161 150 229";
|
||||
fillColorHL = "255 0 0";
|
||||
fillColorNA = "0 0 255";
|
||||
|
||||
// border color
|
||||
borderColor = "0 255 0";
|
||||
borderColorNA = "92 86 131";
|
||||
|
||||
textOffset = "6 6";
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Common Hud profiles
|
||||
|
||||
new GuiControlProfile ("HudScrollProfile")
|
||||
{
|
||||
opaque = false;
|
||||
border = true;
|
||||
borderColor = "0 255 0";
|
||||
bitmap = "common/ui/darkScroll";
|
||||
hasBitmapArray = true;
|
||||
};
|
||||
|
||||
new GuiControlProfile ("HudTextProfile")
|
||||
{
|
||||
opaque = false;
|
||||
fillColor = "128 128 128";
|
||||
fontColor = "0 255 0";
|
||||
border = true;
|
||||
borderColor = "0 255 0";
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Center and bottom print
|
||||
|
||||
new GuiControlProfile ("CenterPrintProfile")
|
||||
{
|
||||
opaque = false;
|
||||
fillColor = "128 128 128";
|
||||
fontColor = "0 255 0";
|
||||
border = true;
|
||||
borderColor = "0 255 0";
|
||||
};
|
||||
|
||||
new GuiControlProfile ("CenterPrintTextProfile")
|
||||
{
|
||||
opaque = false;
|
||||
fontType = "Arial";
|
||||
fontSize = 12;
|
||||
fontColor = "0 255 0";
|
||||
};
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.6 KiB |
Binary file not shown.
|
|
@ -1,646 +0,0 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiChunkedBitmapCtrl(playMissionGui) {
|
||||
profile = "GuiContentProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
bitmap = "./background.jpg";
|
||||
useVariable = "0";
|
||||
tile = "0";
|
||||
|
||||
new GuiControl() {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
position = "-1 44";
|
||||
extent = "641 392";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiBitmapCtrl(PM_TabAdvanced) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "410 21";
|
||||
extent = "166 43";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "$MissionType=\"Advanced\";buildMissionList();";
|
||||
helpTag = "0";
|
||||
bitmap = "./play/tab_adv";
|
||||
wrap = "1";
|
||||
text = "Advanced";
|
||||
};
|
||||
new GuiBitmapCtrl(PM_TabIntermediate) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "213 4";
|
||||
extent = "205 58";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "$MissionType=\"Intermediate\";buildMissionList();";
|
||||
helpTag = "0";
|
||||
bitmap = "./play/tab_inter";
|
||||
wrap = "1";
|
||||
text = "Intermediate";
|
||||
};
|
||||
new GuiBitmapCtrl(PM_TabCustom) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "589 91";
|
||||
extent = "52 198";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "$MissionType=\"Custom\";buildMissionList();";
|
||||
helpTag = "0";
|
||||
bitmap = "./play/cust_tab";
|
||||
wrap = "0";
|
||||
text = "Advanced";
|
||||
};
|
||||
new GuiBitmapCtrl(PM_Box) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 42";
|
||||
extent = "610 351";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
bitmap = "./play/playGui.png";
|
||||
wrap = "0";
|
||||
|
||||
new GuiBitmapCtrl() {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "31 29";
|
||||
extent = "276 229";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
bitmap = "./play/text_window";
|
||||
wrap = "0";
|
||||
};
|
||||
new GuiBitmapCtrl(PM_preview) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "312 42";
|
||||
extent = "258 193";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
bitmap = "~/data/missions/beginner/superspeed";
|
||||
wrap = "0";
|
||||
|
||||
new GuiControl(PM_NoQualOverlay) {
|
||||
profile = "OverlayScreenProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "2 3";
|
||||
extent = "256 190";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
};
|
||||
new GuiBitmapCtrl() {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "258 194";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
bitmap = "./play/level_window.png";
|
||||
wrap = "0";
|
||||
|
||||
new GuiMLTextCtrl(PM_level_bkgnd) {
|
||||
profile = "GuiMLTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "5 156";
|
||||
extent = "254 24";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
};
|
||||
new GuiMLTextCtrl(PM_level_fgnd) {
|
||||
profile = "GuiMLTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "4 155";
|
||||
extent = "254 24";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
};
|
||||
new GuiMLTextCtrl(PM_NoQualText) {
|
||||
profile = "GuiMLTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 84";
|
||||
extent = "254 32";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
};
|
||||
};
|
||||
};
|
||||
new GuiBitmapButtonCtrl(PM_play) {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "391 257";
|
||||
extent = "121 62";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "PM_StartMission();";
|
||||
helpTag = "0";
|
||||
text = "play";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
bitmap = "./play/play";
|
||||
};
|
||||
new GuiBitmapButtonCtrl(PM_prev) {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "321 260";
|
||||
extent = "77 58";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "PM_setSelected(4);";
|
||||
helpTag = "0";
|
||||
text = "Prev";
|
||||
groupNum = "-1";
|
||||
buttonType = "RepeaterButton";
|
||||
repeatPeriod = 350;
|
||||
repeatDecay = 0.9;
|
||||
accelerator = "left";
|
||||
bitmap = "./play/prev";
|
||||
};
|
||||
new GuiBitmapButtonCtrl(PM_next) {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "507 262";
|
||||
extent = "75 60";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "PM_setSelected(6);";
|
||||
helpTag = "0";
|
||||
text = "Next";
|
||||
groupNum = "-1";
|
||||
buttonType = "RepeaterButton";
|
||||
repeatPeriod = 350;
|
||||
accelerator = "right";
|
||||
repeatDecay = 0.9;
|
||||
bitmap = "./play/next";
|
||||
};
|
||||
new GuiTextListCtrl(PM_missionList) {
|
||||
profile = "GuiTextArrayProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "80 384";
|
||||
minExtent = "8 8";
|
||||
visible = "0";
|
||||
helpTag = "0";
|
||||
enumerate = "0";
|
||||
resizeCell = "1";
|
||||
columns = "0";
|
||||
fitParentWidth = "1";
|
||||
clipColumnText = "0";
|
||||
noDuplicates = "false";
|
||||
};
|
||||
new GuiBitmapButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "102 260";
|
||||
extent = "79 61";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "disconnect(); Canvas.setContent(MainMenuGui);";
|
||||
accelerator = "escape";
|
||||
helpTag = "0";
|
||||
text = "play";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
bitmap = "./play/back";
|
||||
};
|
||||
new GuiMLTextCtrl(PM_description) {
|
||||
profile = "GuiMLTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "61 43";
|
||||
extent = "215 174";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
};
|
||||
};
|
||||
new GuiBitmapCtrl(PM_TabBeginner) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "29 2";
|
||||
extent = "184 55";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "$MissionType=\"Beginner\";buildMissionList();";
|
||||
helpTag = "0";
|
||||
bitmap = "./play/tab_begin";
|
||||
wrap = "1";
|
||||
text = "Beginner";
|
||||
};
|
||||
new GuiControl(PM_TabButtons) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "-4 2";
|
||||
extent = "631 61";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiButtonBaseCtrl() {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "577 18";
|
||||
extent = "43 40";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "$MissionType=\"\";buildMissionList();";
|
||||
helpTag = "0";
|
||||
text = "Button";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
};
|
||||
new GuiButtonBaseCtrl() {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "428 22";
|
||||
extent = "142 36";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "PMSetMissionTab(\"Advanced\");";
|
||||
helpTag = "0";
|
||||
text = "Button";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
};
|
||||
new GuiButtonBaseCtrl() {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "236 6";
|
||||
extent = "183 52";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "PMSetMissionTab(\"Intermediate\");";
|
||||
helpTag = "0";
|
||||
text = "Button";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
};
|
||||
new GuiButtonBaseCtrl() {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "62 7";
|
||||
extent = "141 50";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "PMSetMissionTab(\"Beginner\");";
|
||||
helpTag = "0";
|
||||
text = "Button";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
};
|
||||
};
|
||||
new GuiButtonBaseCtrl(PM_TabButtons2) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "597 106";
|
||||
extent = "42 171";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "PMSetMissionTab(\"Custom\");";
|
||||
helpTag = "0";
|
||||
text = "Button";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
};
|
||||
};
|
||||
new GuiButtonBaseCtrl() {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "left";
|
||||
vertSizing = "top";
|
||||
position = "625 465";
|
||||
extent = "18 19";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "PM_skipQualify();";
|
||||
helpTag = "0";
|
||||
text = "Button";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
|
||||
//----------------------------------------
|
||||
function playMissionGui::onWake()
|
||||
{
|
||||
if($MissionType $= "")
|
||||
$MissionType = "Beginner";
|
||||
PMSetMissionTab($MissionType);
|
||||
}
|
||||
|
||||
function PMSetMissionTab(%tab)
|
||||
{
|
||||
$MissionType = %tab;
|
||||
%par = PM_Box.getGroup();
|
||||
RootGroup.add(PM_Box);
|
||||
RootGroup.add("PM_Tab" @ %tab);
|
||||
RootGroup.add(PM_TabButtons);
|
||||
RootGroup.add(PM_TabButtons2);
|
||||
%par.add(PM_Box);
|
||||
%par.add("PM_Tab" @ %tab);
|
||||
%par.add(PM_TabButtons);
|
||||
%par.add(PM_TabButtons2);
|
||||
buildMissionList();
|
||||
}
|
||||
|
||||
function sortByLevel(%grp)
|
||||
{
|
||||
%ngrp = new SimGroup();
|
||||
// take all the objects out of grp and put them in ngrp
|
||||
while((%obj = %grp.getObject(0)) != -1)
|
||||
%ngrp.add(%obj);
|
||||
|
||||
while(%ngrp.getCount() != 0)
|
||||
{
|
||||
%lowest = %ngrp.getObject(0).level;
|
||||
%lowestIndex = 0;
|
||||
for(%i = 1; %i < %ngrp.getCount(); %i++)
|
||||
{
|
||||
%level = %ngrp.getObject(%i).level;
|
||||
if(%level < %lowest)
|
||||
{
|
||||
%lowest = %level;
|
||||
%lowestIndex = %i;
|
||||
}
|
||||
}
|
||||
%obj = %ngrp.getObject(%lowestIndex);
|
||||
%grp.add(%obj);
|
||||
%obj.level = %grp.getCount();
|
||||
}
|
||||
%ngrp.delete();
|
||||
}
|
||||
|
||||
function buildMissionList()
|
||||
{
|
||||
if (!isObject(PlayMissionGroup))
|
||||
{
|
||||
new SimGroup(PlayMissionGroup);
|
||||
RootGroup.add(PlayMissionGroup);
|
||||
|
||||
for(%file = findFirstFile($Server::MissionFileSpec);
|
||||
%file !$= ""; %file = findNextFile($Server::MissionFileSpec))
|
||||
{
|
||||
if (strStr(%file, "CVS/") == -1 && strStr(%file, "common/") == -1)
|
||||
getMissionObject(%file);
|
||||
}
|
||||
for(%i = 0;(%grp = PlayMissionGroup.getObject(%i)) != -1; %i++)
|
||||
sortByLevel(%grp);
|
||||
}
|
||||
PM_missionList.clear();
|
||||
%cnt = 0;
|
||||
for(%i = 0;(%grp = PlayMissionGroup.getObject(%i)) != -1; %i++)
|
||||
{
|
||||
if($MissionType $= "" || %grp.getName() $= ("MTYPE_" @ $MissionType))
|
||||
{
|
||||
for(%j = 0; (%mission = %grp.getObject(%j)) != -1; %j++)
|
||||
{
|
||||
PM_missionList.addRow(%cnt++, %mission.level TAB %mission);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Select mission level, or highest qualified
|
||||
if(isObject(MissionInfo) && $LastMissionType $= $MissionType)
|
||||
{
|
||||
if($Game::Qualified)
|
||||
%level = MissionInfo.level + 1;
|
||||
else
|
||||
%level = MissionInfo.level;
|
||||
}
|
||||
else
|
||||
%level = $Pref::QualifiedLevel[$MissionType];
|
||||
%selected = PM_missionList.rowCount() - 1;
|
||||
for (%row = 0; %row < PM_missionList.rowCount(); %row++)
|
||||
{
|
||||
%mission = getField(PM_missionList.getRowText(%row), 1);
|
||||
if (%mission.level + 0 == %level)
|
||||
{
|
||||
%selected = %row;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
PM_setSelected(%selected);
|
||||
}
|
||||
|
||||
function PM_skipQualify()
|
||||
{
|
||||
%row = PM_MissionList.getRowNumById(PM_MissionList.getSelectedId());
|
||||
if($MissionType !$= "" && %row == $pref::QualifiedLevel[$MissionType])
|
||||
{
|
||||
$pref::QualifiedLevel[$MissionType]++;
|
||||
PM_setSelected(%row);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function PM_StartMission()
|
||||
{
|
||||
|
||||
%id = PM_missionList.getSelectedId();
|
||||
%mission = getField(PM_missionList.getRowTextById(%id), 1);
|
||||
$LastMissionType = %mission.type;
|
||||
|
||||
//
|
||||
if ($pref::HostMultiPlayer)
|
||||
%serverType = "MultiPlayer";
|
||||
else
|
||||
%serverType = "SinglePlayer";
|
||||
|
||||
// We need to start a server if one isn't already running
|
||||
if ($Server::ServerType $= "") {
|
||||
if($doRecordDemo)
|
||||
recordDemo("~/client/demos/demo.rec", %mission.file);
|
||||
createServer(%serverType, %mission.file);
|
||||
%conn = new GameConnection(ServerConnection);
|
||||
RootGroup.add(ServerConnection);
|
||||
%conn.setConnectArgs($pref::Player::Name);
|
||||
%conn.setJoinPassword($Client::Password);
|
||||
%conn.connectLocal();
|
||||
}
|
||||
else
|
||||
loadMission(%mission.file);
|
||||
if(isObject(MissionInfo))
|
||||
MissionInfo.level = %mission.level;
|
||||
}
|
||||
|
||||
function onDemoPlay(%misFile)
|
||||
{
|
||||
$playingDemo = true;
|
||||
createServer("SinglePlayer", %misFile);
|
||||
%conn = new GameConnection(ServerConnection);
|
||||
RootGroup.add(ServerConnection);
|
||||
%conn.setConnectArgs($pref::Player::Name);
|
||||
%conn.setJoinPassword($Client::Password);
|
||||
%conn.connectLocal();
|
||||
}
|
||||
|
||||
function onDemoPlayDone(%forced)
|
||||
{
|
||||
$playingDemo = false;
|
||||
disconnect();
|
||||
if(%forced)
|
||||
Canvas.setContent(MainMenuGui);
|
||||
else
|
||||
runPresentation();
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function PM_setSelected( %row )
|
||||
{
|
||||
%playEnabled = (PM_missionList.rowCount() > 0) && ($testCheats || ($MissionType $= "") || (%row < $pref::QualifiedLevel[$MissionType]));
|
||||
|
||||
PM_play.setActive(%playEnabled);
|
||||
PM_NoQualOverlay.setVisible(!%playEnabled);
|
||||
PM_NoQualText.setText(%playEnabled ? "" : "<color:CCCCCC><font:DomCasualD:32><just:center>Not Qualified!");
|
||||
|
||||
PM_missionList.setSelectedRow(%row);
|
||||
%id = PM_missionList.getSelectedId();
|
||||
%mission = getField(PM_missionList.getRowTextById(%id), 1);
|
||||
|
||||
// set the preview info
|
||||
%levelText = "<font:DomCasualD:24><just:center>" @ upperFirst(%mission.type) @ " Level " @ (%mission.level+0);
|
||||
PM_level_fgnd.setText("<color:FFFFFF>" @ %levelText);
|
||||
PM_level_bkgnd.setText("<color:000000>" @ %levelText);
|
||||
%descText = "<spush><font:DomCasualD:24>" @ %mission.name @
|
||||
"<spop><lmargin:10>\n\n" @
|
||||
%mission.desc;
|
||||
if(%mission.time)
|
||||
%descText = %descText @ "<spush><font:DomCasualD:24><lmargin:0>\nTime to Qualify: " @ formatTime(%mission.time) @ "<spop>";
|
||||
|
||||
%file = %mission.file;
|
||||
getBestTimes(%file);
|
||||
%descText = %descText @ "<lmargin:0>\n\n<spush><font:DomCasualD:24>Best Times:<spop><lmargin:10><tab:0,130,180><font:Arial Bold:14>\n\n";
|
||||
for(%i = 0; %i < 3; %i++)
|
||||
{
|
||||
%time = getField($hs[%i], 0);
|
||||
%descText = %descText @ "<shadow:1:1><color:000000><shadowcolor:ffffff4f>" @ (%i + 1) @ ". " @ getField($hs[%i], 1) TAB formatTime(%time) TAB ((%time < %mission.goldTime) ? "<bitmap:marble/client/ui/play/goldscore.png>\n" : "\n");
|
||||
}
|
||||
|
||||
PM_description.setValue( %descText );
|
||||
|
||||
PM_preview.setBitmap(filePath(%mission.file) @ "/" @fileBase(%mission.file));
|
||||
|
||||
%next = %row+1;
|
||||
PM_next.setActive(%next < PM_missionList.rowCount());
|
||||
|
||||
if (%next >= PM_missionList.rowCount())
|
||||
%next = PM_missionList.rowCount() - 1;
|
||||
PM_next.command = "PM_setSelected(" @ %next @ ");";
|
||||
|
||||
%prev = %row-1;
|
||||
PM_prev.setActive(%prev >= 0);
|
||||
if (%prev < 0 )
|
||||
%prev = 0;
|
||||
PM_prev.command = "PM_setSelected(" @ %prev @ ");";
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------
|
||||
function getMissionObject( %missionFile )
|
||||
{
|
||||
%file = new FileObject();
|
||||
|
||||
%missionInfoObject = "";
|
||||
|
||||
if ( %file.openForRead( %missionFile ) ) {
|
||||
%inInfoBlock = false;
|
||||
|
||||
while ( !%file.isEOF() ) {
|
||||
%line = %file.readLine();
|
||||
%line = trim( %line );
|
||||
|
||||
if( %line $= "new ScriptObject(MissionInfo) {" ) {
|
||||
%line = "new ScriptObject() {";
|
||||
%inInfoBlock = true;
|
||||
}
|
||||
else if( %inInfoBlock && %line $= "};" ) {
|
||||
%inInfoBlock = false;
|
||||
%missionInfoObject = %missionInfoObject @ %line;
|
||||
break;
|
||||
}
|
||||
|
||||
if( %inInfoBlock )
|
||||
%missionInfoObject = %missionInfoObject @ %line @ " ";
|
||||
}
|
||||
|
||||
%file.close();
|
||||
}
|
||||
%missionInfoObject = "%missionInfoObject = " @ %missionInfoObject;
|
||||
eval( %missionInfoObject );
|
||||
|
||||
// find the directory this file belongs in:
|
||||
|
||||
%path = filePath(%missionFile);
|
||||
%misPath = filePath(%path);
|
||||
|
||||
if(%misPath !$= "marble/data/missions")
|
||||
%groupTab = "custom";
|
||||
else
|
||||
%groupTab = fileBase(%path);
|
||||
|
||||
%grp = nameToId("MTYPE_" @ %groupTab);
|
||||
if(%grp == -1)
|
||||
{
|
||||
%grp = new SimGroup("MTYPE_" @ %groupTab);
|
||||
PlayMissionGroup.add(%grp);
|
||||
}
|
||||
%missionInfoObject.type = %groupTab;
|
||||
%missionInfoObject.setName("");
|
||||
%grp.add(%missionInfoObject);
|
||||
%missionInfoObject.file = %missionFile;
|
||||
%file.delete();
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
marblegame.hl
BIN
marblegame.hl
Binary file not shown.
|
|
@ -18,6 +18,9 @@ class Main extends hxd.App {
|
|||
override function init() {
|
||||
super.init();
|
||||
|
||||
#if hl
|
||||
hl.UI.closeConsole();
|
||||
#end
|
||||
Settings.init();
|
||||
AudioManager.init();
|
||||
AudioManager.playShell();
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ class Marble extends GameObject {
|
|||
var soFar = 0.0;
|
||||
for (k in 0...contacts.length) {
|
||||
var dist = this._radius - contacts[k].contactDistance;
|
||||
var timeToSeparate = 0.048;
|
||||
var timeToSeparate = 0.1;
|
||||
if (dist >= 0) {
|
||||
var f1 = this.velocity.sub(contacts[k].velocity).add(dir.multiply(soFar)).dot(contacts[k].normal);
|
||||
var f2 = timeToSeparate * f1;
|
||||
|
|
|
|||
|
|
@ -580,9 +580,44 @@ class MarbleWorld extends Scheduler {
|
|||
this.collisionWorld.addEntity(trigger.collider);
|
||||
}
|
||||
|
||||
public function addTSStatic(element:MissionElementTSStatic) {}
|
||||
public function addTSStatic(element:MissionElementTSStatic) {
|
||||
// !! WARNING - UNTESTED !!
|
||||
var shapeName = element.shapename;
|
||||
var index = shapeName.indexOf('data/');
|
||||
if (index == -1)
|
||||
return;
|
||||
|
||||
public function addParticleEmitterNode(element:MissionElementParticleEmitterNode) {}
|
||||
var tsShape = new DtsObject();
|
||||
tsShape.useInstancing = true;
|
||||
tsShape.dtsPath = shapeName.substring(index + 'data/'.length);
|
||||
|
||||
var shapePosition = MisParser.parseVector3(element.position);
|
||||
shapePosition.x = -shapePosition.x;
|
||||
var shapeRotation = MisParser.parseRotation(element.rotation);
|
||||
shapeRotation.x = -shapeRotation.x;
|
||||
shapeRotation.w = -shapeRotation.w;
|
||||
var shapeScale = MisParser.parseVector3(element.scale);
|
||||
|
||||
// Apparently we still do collide with zero-volume shapes
|
||||
if (shapeScale.x == 0)
|
||||
shapeScale.x = 0.0001;
|
||||
if (shapeScale.y == 0)
|
||||
shapeScale.y = 0.0001;
|
||||
if (shapeScale.z == 0)
|
||||
shapeScale.z = 0.0001;
|
||||
|
||||
var mat = shapeRotation.toMatrix();
|
||||
mat.scale(shapeScale.x, shapeScale.y, shapeScale.z);
|
||||
mat.setPosition(shapePosition);
|
||||
|
||||
this.addDtsObject(tsShape);
|
||||
|
||||
tsShape.setTransform(mat);
|
||||
}
|
||||
|
||||
public function addParticleEmitterNode(element:MissionElementParticleEmitterNode) {
|
||||
// TODO THIS SHIT
|
||||
}
|
||||
|
||||
public function addInterior(obj:InteriorObject) {
|
||||
this.interiors.push(obj);
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ class Settings {
|
|||
videoDriver: 0,
|
||||
colorDepth: 1,
|
||||
shadows: false,
|
||||
musicVolume: 0,
|
||||
soundVolume: 0,
|
||||
musicVolume: 1,
|
||||
soundVolume: 0.7,
|
||||
vsync: true
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue