├── beta ├── server │ ├── banlist.cs │ └── prefs.cs ├── data │ ├── shapes │ │ ├── player │ │ │ ├── minifig.cs │ │ │ └── player.cs │ │ └── horse │ │ │ └── horse.cs │ └── init.cs ├── ipBanList.cs ├── client │ ├── scripts │ │ ├── filtersGui.cs │ │ ├── mainMenuGui.cs │ │ ├── joinServerPassGui.cs │ │ ├── noHudGui.cs │ │ ├── adminLoginGui.cs │ │ ├── manualJoin.cs │ │ ├── game.cs │ │ ├── clientCmd.cs │ │ ├── loadingGui.cs │ │ ├── adminGui.cs │ │ ├── audioProfiles.cs │ │ ├── escapeMenu.cs │ │ ├── changeMapGui.cs │ │ ├── whosTalking.cs │ │ ├── centerPrint.cs │ │ ├── brickControls.cs │ │ ├── messageHud.cs │ │ ├── newMessageHud.cs │ │ └── missionDownload.cs │ ├── mission.cs │ ├── ui │ │ ├── noHudGui.gui │ │ ├── newChatHud.gui │ │ ├── remapDlg.gui │ │ ├── newMessageHud.gui │ │ ├── endGameGui.gui │ │ ├── MessageHud.gui │ │ ├── printSelectorDlg.gui │ │ ├── adminLoginGui.gui │ │ ├── aboutDlg.gui │ │ ├── playerList.gui │ │ ├── loadingGui.gui │ │ ├── manualJoin.gui │ │ ├── joinServerPassGui.gui │ │ └── MainChatHud.gui │ ├── audio.cs │ ├── actionMap.cs │ ├── message.cs │ ├── canvas.cs │ ├── Favorites.cs │ ├── cursor.cs │ ├── help.cs │ ├── defaults.cs │ ├── missionDownload.cs │ ├── screenshot.cs │ ├── messageBox.cs │ ├── recordings.cs │ └── init.cs ├── ui │ ├── cache │ │ └── clipboard.gui │ ├── FrameOverlayGui.gui │ ├── MessagePopupDlg.gui │ ├── MessageBoxOkDlg.gui │ ├── ConsoleDlg.gui │ ├── PlayerListGui.gui │ ├── MessageBoxOKCancelDlg.gui │ ├── MessageBoxYesNoDlg.gui │ ├── RecordingsDlg.gui │ ├── HelpDlg.gui │ └── InspectAddFieldDlg.gui ├── main.cs └── prefs.cs ├── .gitattributes ├── v1 ├── data │ ├── init.cs │ ├── terrains │ │ └── greenhills │ │ │ └── propertyMap.cs │ ├── sound │ │ └── music │ │ │ └── musicList.cs │ └── shapes │ │ └── player │ │ └── player.cs ├── client │ ├── mission.cs │ ├── scripts │ │ └── clientAddOns.cs │ ├── ui │ │ ├── noHudGui.gui │ │ ├── savingGui.gui │ │ ├── newChatHud.gui │ │ ├── ProgressGui.gui │ │ ├── connectingGui.gui │ │ ├── AddOnsGui.gui │ │ ├── musicFilesGui.gui │ │ ├── newMessageHud.gui │ │ ├── remapDlg.gui │ │ ├── fastLoadWarningGui.gui │ │ ├── saveBricksWarningGui.gui │ │ ├── aboutDlg.gui │ │ ├── printSelectorDlg.gui │ │ ├── adminLoginGui.gui │ │ ├── PortForwardInfoGui.gui │ │ ├── loadingGui.gui │ │ ├── joinServerPassGui.gui │ │ ├── demoBrickLimitGui.gui │ │ ├── manualJoin.gui │ │ └── loadBricksColorGui.gui │ ├── audio.cs │ ├── actionMap.cs │ ├── message.cs │ ├── help.cs │ ├── cursor.cs │ ├── missionDownload.cs │ ├── canvas.cs │ ├── messageBox.cs │ ├── recordings.cs │ └── init.cs ├── ui │ ├── FrameOverlayGui.gui │ ├── MessagePopupDlg.gui │ ├── MessageBoxOkDlg.gui │ ├── MessageBoxOKCancelDlg.gui │ ├── MessageBoxYesNoDlg.gui │ ├── ConsoleDlg.gui │ ├── RecordingsDlg.gui │ ├── InspectAddFieldDlg.gui │ └── LoadFileDlg.gui ├── main.cs └── server │ ├── scripts │ ├── DamageTypes.cs │ └── centerPrint.cs │ ├── defaults.cs │ └── init.cs ├── v20 ├── client │ ├── mission.cs │ ├── audio.cs │ ├── actionMap.cs │ ├── message.cs │ └── canvas.cs ├── server │ ├── defaultMusicList.cs │ ├── defaultAddOnList.cs │ └── defaults.cs └── main.cs ├── v21 ├── client │ ├── mission.cs │ ├── audio.cs │ ├── actionMap.cs │ ├── message.cs │ └── canvas.cs ├── server │ ├── defaultMusicList.cs │ ├── init.cs │ └── defaultAddOnList.cs └── main.cs ├── README.md └── .gitignore /beta/server/banlist.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /beta/data/shapes/player/minifig.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /beta/ipBanList.cs: -------------------------------------------------------------------------------- 1 | $Ban::numBans = 0; 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Automatically convert text file line endings to CRLF 2 | text=auto 3 | text eol=crlf 4 | -------------------------------------------------------------------------------- /beta/data/init.cs: -------------------------------------------------------------------------------- 1 | exec("./terrains/grassland/propertyMap.cs"); 2 | exec("./terrains/scorched/propertyMap.cs"); 3 | -------------------------------------------------------------------------------- /beta/client/scripts/filtersGui.cs: -------------------------------------------------------------------------------- 1 | function filtersGui::onWake() 2 | { 3 | } 4 | 5 | function filtersGui::onSleep() 6 | { 7 | } 8 | 9 | -------------------------------------------------------------------------------- /beta/client/scripts/mainMenuGui.cs: -------------------------------------------------------------------------------- 1 | function MainMenuGui::onWake(%__unused) 2 | { 3 | MM_Version.setText("Version: " @ $Version); 4 | } 5 | 6 | -------------------------------------------------------------------------------- /v1/data/init.cs: -------------------------------------------------------------------------------- 1 | for (%file = findFirstFile("base/data/terrains/*propertymap.cs"); %file !$= ""; %file = findNextFile("base/data/terrains/*propertymap.cs")) 2 | { 3 | exec(%file); 4 | } 5 | -------------------------------------------------------------------------------- /beta/client/mission.cs: -------------------------------------------------------------------------------- 1 | function clientCmdMissionStart(%__unused) 2 | { 3 | } 4 | 5 | function clientCmdMissionEnd(%__unused) 6 | { 7 | alxStopAll(); 8 | $lightingMission = 0; 9 | $sceneLighting::terminateLighting = 1; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /v1/client/mission.cs: -------------------------------------------------------------------------------- 1 | function clientCmdMissionStart(%__unused) 2 | { 3 | } 4 | 5 | function clientCmdMissionEnd(%__unused) 6 | { 7 | alxStopAll(); 8 | $lightingMission = 0; 9 | $sceneLighting::terminateLighting = 1; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /v20/client/mission.cs: -------------------------------------------------------------------------------- 1 | function clientCmdMissionStart(%seq) 2 | { 3 | ClearPhysicsCache(); 4 | } 5 | 6 | function clientCmdMissionEnd(%seq) 7 | { 8 | alxStopAll(); 9 | $lightingMission = 0; 10 | $sceneLighting::terminateLighting = 1; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /v21/client/mission.cs: -------------------------------------------------------------------------------- 1 | function clientCmdMissionStart(%seq) 2 | { 3 | ClearPhysicsCache(); 4 | } 5 | 6 | function clientCmdMissionEnd(%seq) 7 | { 8 | alxStopAll(); 9 | $lightingMission = 0; 10 | $sceneLighting::terminateLighting = 1; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /v1/client/scripts/clientAddOns.cs: -------------------------------------------------------------------------------- 1 | function loadClientAddOns() 2 | { 3 | %dir = "Add-Ons/client/*.cs"; 4 | %fileCount = getFileCount(%dir); 5 | %fileName = findFirstFile(%dir); 6 | for (%i = 0; %i < %fileCount; %i++) 7 | { 8 | exec(%fileName); 9 | %fileName = findNextFile(%dir); 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /v1/data/terrains/greenhills/propertyMap.cs: -------------------------------------------------------------------------------- 1 | addMaterialMapping("base/data/terrains/grassland/sand", "sound: 0", "color: 0.46 0.36 0.26 0.4 0.0"); 2 | addMaterialMapping("base/data/terrains/grassland/grass", "sound: 0", "color: 0.46 0.36 0.26 0.4 0.0"); 3 | addMaterialMapping("base/data/terrains/grassland/patchy", "sound: 0", "color: 0.46 0.36 0.26 0.4 0.0"); 4 | -------------------------------------------------------------------------------- /beta/client/scripts/joinServerPassGui.cs: -------------------------------------------------------------------------------- 1 | function joinServerPassGui::enterPass(%__unused) 2 | { 3 | %pass = JSP_txtPass.getValue(); 4 | if (%pass !$= "") 5 | { 6 | $conn = new GameConnection(ServerConnection); 7 | $conn.setConnectArgs($pref::Player::Name); 8 | $conn.setJoinPassword(%pass); 9 | $conn.connect($ServerInfo::Address); 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /beta/client/scripts/noHudGui.cs: -------------------------------------------------------------------------------- 1 | function noHudGui::onWake(%__unused) 2 | { 3 | $enableDirectInput = 1; 4 | activateDirectInput(); 5 | Canvas.popDialog(MainChatHud); 6 | moveMap.push(); 7 | schedule(0, 0, "refreshCenterTextCtrl"); 8 | schedule(0, 0, "refreshBottomTextCtrl"); 9 | } 10 | 11 | function noHudGui::onSleep(%__unused) 12 | { 13 | moveMap.pop(); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /beta/client/scripts/adminLoginGui.cs: -------------------------------------------------------------------------------- 1 | function sendAdminLogin() 2 | { 3 | SAD(txtAdminPass.getValue()); 4 | } 5 | 6 | function clientCmdAdminSuccess() 7 | { 8 | $IamAdmin = 1; 9 | Canvas.popDialog(adminLoginGui); 10 | eval($AdminCallback); 11 | } 12 | 13 | function clientCmdAdminFailure() 14 | { 15 | if ($sendAdminPass == 1) 16 | { 17 | MessageBoxOK("Login Failure", "Wrong Password"); 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /v1/data/sound/music/musicList.cs: -------------------------------------------------------------------------------- 1 | $Music__After_School_Special = 1; 2 | $Music__Ambient_Deep = 1; 3 | $Music__Bass_1 = 1; 4 | $Music__Bass_2 = 1; 5 | $Music__Bass_3 = 1; 6 | $Music__Creepy = 1; 7 | $Music__Distort = 1; 8 | $Music__Drums = 1; 9 | $Music__Factory = 1; 10 | $Music__Icy = 1; 11 | $Music__Jungle = 1; 12 | $Music__Peaceful = 1; 13 | $Music__Piano_Bass = 1; 14 | $Music__Rock = 1; 15 | $Music__Stress_ = 1; 16 | -------------------------------------------------------------------------------- /v20/server/defaultMusicList.cs: -------------------------------------------------------------------------------- 1 | $Music__After_School_Special = 1; 2 | $Music__Ambient_Deep = 1; 3 | $Music__Bass_1 = 1; 4 | $Music__Bass_2 = 1; 5 | $Music__Bass_3 = 1; 6 | $Music__Creepy = 1; 7 | $Music__Distort = 1; 8 | $Music__Drums = 1; 9 | $Music__Factory = 1; 10 | $Music__Icy = 1; 11 | $Music__Jungle = 1; 12 | $Music__Peaceful = 1; 13 | $Music__Piano_Bass = 1; 14 | $Music__Rock = 1; 15 | $Music__Stress_ = 1; 16 | -------------------------------------------------------------------------------- /v21/server/defaultMusicList.cs: -------------------------------------------------------------------------------- 1 | $Music__After_School_Special = 1; 2 | $Music__Ambient_Deep = 1; 3 | $Music__Bass_1 = 1; 4 | $Music__Bass_2 = 1; 5 | $Music__Bass_3 = 1; 6 | $Music__Creepy = 1; 7 | $Music__Distort = 1; 8 | $Music__Drums = 1; 9 | $Music__Factory = 1; 10 | $Music__Icy = 1; 11 | $Music__Jungle = 1; 12 | $Music__Peaceful = 1; 13 | $Music__Piano_Bass = 1; 14 | $Music__Rock = 1; 15 | $Music__Stress_ = 1; 16 | -------------------------------------------------------------------------------- /beta/client/scripts/manualJoin.cs: -------------------------------------------------------------------------------- 1 | function MJ_connect() 2 | { 3 | cancelServerQuery(); 4 | %ip = MJ_txtIP.getValue(); 5 | %joinPass = MJ_txtJoinPass.getValue(); 6 | echo("Attempting to connect to ", %ip); 7 | if (%ip) 8 | { 9 | $conn.delete(); 10 | $conn = new GameConnection(ServerConnection); 11 | $conn.setConnectArgs($pref::Player::Name); 12 | $conn.setJoinPassword(%joinPass); 13 | $conn.connect(%ip); 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Blockland's Default Scripts Decompiled 2 | 3 | These scripts were decompiled using [DSO Sharp](https://github.com/Elletra/dso-sharp), my DSO decompiler. They are logically and functionally accurate, but they ain't pretty. Decompilation, particularly for DSOs, is tricky and will produce some _unconventional_ code... 4 | 5 | So far there are four versions decompiled: [Retail Beta](https://bl.kenko.dev/Versions/Retail%20Beta/), v1, v20, and v21 (current revision) 6 | -------------------------------------------------------------------------------- /beta/client/scripts/game.cs: -------------------------------------------------------------------------------- 1 | function clientCmdGameStart(%__unused) 2 | { 3 | PlayerListGui.zeroScores(); 4 | } 5 | 6 | function clientCmdGameEnd(%__unused) 7 | { 8 | alxStopAll(); 9 | EndGameGuiList.clear(); 10 | for (%i = 0; %i < PlayerListGuiList.rowCount(); %i++) 11 | { 12 | %text = PlayerListGuiList.getRowText(%i); 13 | %id = PlayerListGuiList.getRowId(%i); 14 | EndGameGuiList.addRow(%id, %text); 15 | } 16 | EndGameGuiList.sortNumerical(1, 0); 17 | Canvas.setContent(EndGameGui); 18 | } 19 | 20 | -------------------------------------------------------------------------------- /beta/ui/cache/clipboard.gui: -------------------------------------------------------------------------------- 1 | new SimSet(guiClipboard) { 2 | 3 | new GuiBitmapButtonCtrl(AU_Cancel) { 4 | profile = "BlockButtonProfile"; 5 | horizSizing = "left"; 6 | vertSizing = "top"; 7 | position = "24 288"; 8 | extent = "89 34"; 9 | minExtent = "8 2"; 10 | visible = "1"; 11 | command = "canvas.popdialog(AutoUpdateGui);"; 12 | text = "Cancel"; 13 | groupNum = "-1"; 14 | buttonType = "PushButton"; 15 | bitmap = "base/client/ui/button2"; 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /beta/client/scripts/clientCmd.cs: -------------------------------------------------------------------------------- 1 | function clientCmdUpdatePrefs() 2 | { 3 | commandToServer('updatePrefs', $pref::Player::Name, $pref::Player::Hat, $pref::Player::Accent, $pref::Player::Pack, $pref::Player::HatColor, $pref::Player::AccentColor, $pref::Player::PackColor, $pref::Player::TorsoColor, $pref::Player::HipColor, $pref::Player::LLegColor, $pref::Player::RLegColor, $pref::Player::LArmColor, $pref::Player::RArmColor, $pref::Player::LHandColor, $pref::Player::RHandColor, $pref::Player::DecalColor, $pref::Player::FaceColor); 4 | } 5 | 6 | function clientCmdTimeScale(%val) 7 | { 8 | if (%val < 0.5 || %val > 2) 9 | { 10 | return; 11 | } 12 | $timeScale = %val; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /beta/client/scripts/loadingGui.cs: -------------------------------------------------------------------------------- 1 | function LoadingGui::onAdd(%this) 2 | { 3 | %this.qLineCount = 0; 4 | } 5 | 6 | function LoadingGui::onWake(%this) 7 | { 8 | CloseMessagePopup(); 9 | moveMap.push(); 10 | Canvas.pushDialog(NewChatHud); 11 | } 12 | 13 | function LoadingGui::onSleep(%this) 14 | { 15 | if (%this.qLineCount !$= "") 16 | { 17 | for (%line = 0; %line < %this.qLineCount; %line++) 18 | { 19 | %this.qLine[%line] = ""; 20 | } 21 | } 22 | %this.qLineCount = 0; 23 | LOAD_MapName.setText(""); 24 | LOAD_MapDescription.setText(""); 25 | LoadingProgress.setValue(0); 26 | LoadingProgressTxt.setValue("WAITING FOR SERVER"); 27 | Canvas.popDialog(NewChatHud); 28 | } 29 | 30 | -------------------------------------------------------------------------------- /beta/client/scripts/adminGui.cs: -------------------------------------------------------------------------------- 1 | function admingui::kick() 2 | { 3 | %victimId = lstAdminPlayerList.getSelectedId(); 4 | commandToServer('kick', %victimId); 5 | } 6 | 7 | function admingui::ban() 8 | { 9 | %victimId = lstAdminPlayerList.getSelectedId(); 10 | commandToServer('ban', %victimId); 11 | } 12 | 13 | function admingui::changeMap() 14 | { 15 | } 16 | 17 | function AdminGui_Wand() 18 | { 19 | commandToServer('MagicWand'); 20 | Canvas.popDialog(admingui); 21 | Canvas.popDialog(EscapeMenu); 22 | } 23 | 24 | function AdminGui_ClearBricks() 25 | { 26 | MessageBoxYesNo("Clear Bricks?", "Are you sure you want to delete all bricks?", "commandToServer('ClearBricks');canvas.popDialog(AdminGui);"); 27 | } 28 | 29 | -------------------------------------------------------------------------------- /beta/ui/FrameOverlayGui.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(FrameOverlayGui) 2 | { 3 | profile = "GuiModelessDialogProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = "True"; 10 | setFirstResponder = "True"; 11 | modal = "false"; 12 | helpTag = 0; 13 | noCursor = 1; 14 | 15 | new GuiConsoleTextCtrl(TextOverlayControl) 16 | { 17 | profile = "GuiTextProfile"; 18 | horizSizing = "right"; 19 | vertSizing = "bottom"; 20 | position = "5 5"; 21 | extent = "15 18"; 22 | minExtent = "8 8"; 23 | visible = "True"; 24 | setFirstResponder = "True"; 25 | modal = "True"; 26 | helpTag = 0; 27 | expression = 10; 28 | }; 29 | }; 30 | -------------------------------------------------------------------------------- /v1/ui/FrameOverlayGui.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(FrameOverlayGui) 2 | { 3 | profile = "GuiModelessDialogProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = "True"; 10 | setFirstResponder = "True"; 11 | modal = "false"; 12 | helpTag = 0; 13 | noCursor = 1; 14 | 15 | new GuiConsoleTextCtrl(TextOverlayControl) 16 | { 17 | profile = "GuiTextProfile"; 18 | horizSizing = "right"; 19 | vertSizing = "bottom"; 20 | position = "5 5"; 21 | extent = "15 18"; 22 | minExtent = "8 8"; 23 | visible = "True"; 24 | setFirstResponder = "True"; 25 | modal = "True"; 26 | helpTag = 0; 27 | expression = 10; 28 | }; 29 | }; 30 | -------------------------------------------------------------------------------- /beta/client/scripts/audioProfiles.cs: -------------------------------------------------------------------------------- 1 | $GuiAudioType = 1; 2 | $SimAudioType = 2; 3 | $MessageAudioType = 3; 4 | new AudioDescription(AudioGui) 5 | { 6 | volume = 1; 7 | isLooping = 0; 8 | is3D = 0; 9 | type = $GuiAudioType; 10 | }; 11 | new AudioDescription(AudioMessage) 12 | { 13 | volume = 1; 14 | isLooping = 0; 15 | is3D = 0; 16 | type = $MessageAudioType; 17 | }; 18 | new AudioProfile(AudioButtonOver) 19 | { 20 | fileName = "~/data/sound/buttonOver.wav"; 21 | description = "AudioGui"; 22 | preload = 1; 23 | }; 24 | new AudioProfile(AudioError) 25 | { 26 | fileName = "~/data/sound/error.wav"; 27 | description = "AudioGui"; 28 | preload = 1; 29 | }; 30 | new AudioProfile(ItemPickup) 31 | { 32 | fileName = "~/data/sound/error.wav"; 33 | description = "AudioGui"; 34 | preload = 1; 35 | }; 36 | -------------------------------------------------------------------------------- /beta/client/scripts/escapeMenu.cs: -------------------------------------------------------------------------------- 1 | function EscapeMenu::toggle(%this) 2 | { 3 | if (%this.isAwake()) 4 | { 5 | Canvas.popDialog(%this); 6 | } 7 | else 8 | { 9 | Canvas.pushDialog(%this); 10 | } 11 | } 12 | 13 | function EscapeMenu::clickAdmin() 14 | { 15 | if ($IamAdmin == 1 || isObject(ServerGroup)) 16 | { 17 | Canvas.pushDialog("adminGui"); 18 | } 19 | else 20 | { 21 | $AdminCallback = "canvas.pushDialog(admingui);"; 22 | Canvas.pushDialog("adminLoginGui"); 23 | } 24 | } 25 | 26 | function EscapeMenu::clickLoadBricks() 27 | { 28 | if ($IamAdmin == 1 || isObject(ServerGroup)) 29 | { 30 | Canvas.pushDialog("loadBricksGui"); 31 | } 32 | else 33 | { 34 | $AdminCallback = "canvas.pushDialog(loadBricksGui);"; 35 | Canvas.pushDialog("adminLoginGui"); 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /beta/main.cs: -------------------------------------------------------------------------------- 1 | exec("./defaults.cs"); 2 | function initCommon() 3 | { 4 | setRandomSeed(); 5 | exec("./client/canvas.cs"); 6 | exec("./client/audio.cs"); 7 | } 8 | 9 | function initBaseClient() 10 | { 11 | exec("./client/message.cs"); 12 | exec("./client/mission.cs"); 13 | exec("./client/missionDownload.cs"); 14 | exec("./client/actionMap.cs"); 15 | } 16 | 17 | function initBaseServer() 18 | { 19 | exec("./server/webCom.cs"); 20 | exec("./server/audio.cs"); 21 | exec("./server/server.cs"); 22 | exec("./server/message.cs"); 23 | exec("./server/commands.cs"); 24 | exec("./server/missionInfo.cs"); 25 | exec("./server/missionLoad.cs"); 26 | exec("./server/missionDownload.cs"); 27 | exec("./server/clientConnection.cs"); 28 | exec("./server/kickban.cs"); 29 | exec("./server/game.cs"); 30 | } 31 | 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore files without extensions 2 | * 3 | !/**/ 4 | !*.* 5 | 6 | # Visual Studio Code files 7 | .vscode/* 8 | !.vscode/settings.json 9 | !.vscode/tasks.json 10 | !.vscode/launch.json 11 | !.vscode/extensions.json 12 | !.vscode/*.code-snippets 13 | 14 | .history/ 15 | 16 | *.vsix 17 | 18 | # Sublime Text files 19 | *.sublime-project 20 | *.sublime-workspace 21 | 22 | # Ignore config/ folders 23 | config/ 24 | 25 | # Ignore specific extensions 26 | *.exe 27 | *.dll 28 | *.dso 29 | *.mis 30 | *.dif 31 | *.ter 32 | *.blb 33 | *.bls 34 | *.dts 35 | *.dsq 36 | *.gft 37 | *.ifl 38 | *.hfl 39 | *.dml 40 | *.ml 41 | *.log 42 | *.rec 43 | *.bak 44 | *.psd 45 | *.png 46 | *.jpg 47 | *.bmp 48 | *.gif 49 | *.log 50 | *.txt 51 | *.wav 52 | *.ogg 53 | *.mp3 54 | *.obj 55 | 56 | # Ignore specific files 57 | crapOns_Cache.cs 58 | -------------------------------------------------------------------------------- /beta/client/ui/noHudGui.gui: -------------------------------------------------------------------------------- 1 | new GameTSCtrl(noHudGui) 2 | { 3 | profile = "GuiContentProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | cameraZRot = 0; 11 | forceFOV = 0; 12 | helpTag = 0; 13 | noCursor = 1; 14 | 15 | new GuiShapeNameHud() 16 | { 17 | profile = "GuiDefaultProfile"; 18 | horizSizing = "width"; 19 | vertSizing = "height"; 20 | position = "0 0"; 21 | extent = "640 480"; 22 | minExtent = "8 2"; 23 | visible = 1; 24 | fillColor = "0.250000 0.250000 0.250000 0.000000"; 25 | frameColor = "0.000000 1.000000 0.000000 0.000000"; 26 | textColor = "1.000000 1.000000 1.000000 0.885906"; 27 | showFill = 1; 28 | showFrame = 1; 29 | verticalOffset = 0.85; 30 | distanceFade = 0.1; 31 | }; 32 | }; 33 | -------------------------------------------------------------------------------- /v1/client/ui/noHudGui.gui: -------------------------------------------------------------------------------- 1 | new GameTSCtrl(noHudGui) 2 | { 3 | profile = "GuiContentProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | cameraZRot = 0; 11 | forceFOV = 0; 12 | noCursor = 1; 13 | helpTag = 0; 14 | 15 | new GuiShapeNameHud(NoHudGui_ShapeNameHud) 16 | { 17 | profile = "BlockChatTextProfile"; 18 | horizSizing = "width"; 19 | vertSizing = "height"; 20 | position = "0 0"; 21 | extent = "640 480"; 22 | minExtent = "8 2"; 23 | visible = 1; 24 | fillColor = "0.250000 0.250000 0.250000 0.000000"; 25 | frameColor = "0.000000 1.000000 0.000000 0.000000"; 26 | textColor = "1.000000 1.000000 1.000000 1.000000"; 27 | showFill = 1; 28 | showFrame = 1; 29 | verticalOffset = 0.85; 30 | distanceFade = 0.1; 31 | }; 32 | }; 33 | -------------------------------------------------------------------------------- /v1/main.cs: -------------------------------------------------------------------------------- 1 | function initCommon() 2 | { 3 | setRandomSeed(); 4 | exec("./client/canvas.cs"); 5 | exec("./client/audio.cs"); 6 | } 7 | 8 | function initBaseClient() 9 | { 10 | exec("./client/message.cs"); 11 | exec("./client/mission.cs"); 12 | exec("./client/missionDownload.cs"); 13 | exec("./client/actionMap.cs"); 14 | } 15 | 16 | function initBaseServer() 17 | { 18 | if (1) 19 | { 20 | exec("./server/mainServer.cs"); 21 | } 22 | else 23 | { 24 | exec("./server/webCom.cs"); 25 | exec("./server/authQuery.cs"); 26 | exec("./server/audio.cs"); 27 | exec("./server/server.cs"); 28 | exec("./server/message.cs"); 29 | exec("./server/commands.cs"); 30 | exec("./server/missionInfo.cs"); 31 | exec("./server/missionLoad.cs"); 32 | exec("./server/missionDownload.cs"); 33 | exec("./server/clientConnection.cs"); 34 | exec("./server/game.cs"); 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /beta/client/audio.cs: -------------------------------------------------------------------------------- 1 | function OpenALInit() 2 | { 3 | OpenALShutdownDriver(); 4 | echo(""); 5 | echo("OpenAL Driver Init:"); 6 | echo($pref::Audio::driver); 7 | if ($pref::Audio::driver $= "OpenAL") 8 | { 9 | if (!OpenALInitDriver()) 10 | { 11 | error(" Failed to initialize driver."); 12 | $Audio::initFailed = 1; 13 | } 14 | else 15 | { 16 | echo(" Vendor: " @ alGetString("AL_VENDOR")); 17 | echo(" Version: " @ alGetString("AL_VERSION")); 18 | echo(" Renderer: " @ alGetString("AL_RENDERER")); 19 | echo(" Extensions: " @ alGetString("AL_EXTENSIONS")); 20 | alxListenerf(AL_GAIN_LINEAR, $pref::Audio::masterVolume); 21 | for (%channel = 1; %channel <= 8; %channel++) 22 | { 23 | alxSetChannelVolume(%channel, $pref::Audio::channelVolume[%channel]); 24 | } 25 | echo(""); 26 | } 27 | } 28 | } 29 | 30 | function OpenALShutdown() 31 | { 32 | OpenALShutdownDriver(); 33 | } 34 | 35 | -------------------------------------------------------------------------------- /v1/client/audio.cs: -------------------------------------------------------------------------------- 1 | function OpenALInit() 2 | { 3 | OpenALShutdownDriver(); 4 | echo(""); 5 | echo("OpenAL Driver Init:"); 6 | echo($pref::Audio::driver); 7 | if ($pref::Audio::driver $= "OpenAL") 8 | { 9 | if (!OpenALInitDriver()) 10 | { 11 | error(" Failed to initialize driver."); 12 | $Audio::initFailed = 1; 13 | } 14 | else 15 | { 16 | echo(" Vendor: " @ alGetString("AL_VENDOR")); 17 | echo(" Version: " @ alGetString("AL_VERSION")); 18 | echo(" Renderer: " @ alGetString("AL_RENDERER")); 19 | echo(" Extensions: " @ alGetString("AL_EXTENSIONS")); 20 | alxListenerf(AL_GAIN_LINEAR, $pref::Audio::masterVolume); 21 | for (%channel = 1; %channel <= 8; %channel++) 22 | { 23 | alxSetChannelVolume(%channel, $pref::Audio::channelVolume[%channel]); 24 | } 25 | echo(""); 26 | } 27 | } 28 | } 29 | 30 | function OpenALShutdown() 31 | { 32 | OpenALShutdownDriver(); 33 | } 34 | 35 | -------------------------------------------------------------------------------- /v20/client/audio.cs: -------------------------------------------------------------------------------- 1 | function OpenALInit() 2 | { 3 | OpenALShutdownDriver(); 4 | echo(""); 5 | echo("OpenAL Driver Init:"); 6 | echo($pref::Audio::driver); 7 | if ($pref::Audio::driver $= "OpenAL") 8 | { 9 | if (!OpenALInitDriver()) 10 | { 11 | error(" Failed to initialize driver."); 12 | $Audio::initFailed = 1; 13 | } 14 | else 15 | { 16 | echo(" Vendor: " @ alGetString("AL_VENDOR")); 17 | echo(" Version: " @ alGetString("AL_VERSION")); 18 | echo(" Renderer: " @ alGetString("AL_RENDERER")); 19 | echo(" Extensions: " @ alGetString("AL_EXTENSIONS")); 20 | alxListenerf(AL_GAIN_LINEAR, $pref::Audio::masterVolume); 21 | for (%channel = 1; %channel <= 8; %channel++) 22 | { 23 | alxSetChannelVolume(%channel, $pref::Audio::channelVolume[%channel]); 24 | } 25 | echo(""); 26 | } 27 | } 28 | } 29 | 30 | function OpenALShutdown() 31 | { 32 | OpenALShutdownDriver(); 33 | } 34 | 35 | -------------------------------------------------------------------------------- /v21/client/audio.cs: -------------------------------------------------------------------------------- 1 | function OpenALInit() 2 | { 3 | OpenALShutdownDriver(); 4 | echo(""); 5 | echo("OpenAL Driver Init:"); 6 | echo($pref::Audio::driver); 7 | if ($pref::Audio::driver $= "OpenAL") 8 | { 9 | if (!OpenALInitDriver()) 10 | { 11 | error(" Failed to initialize driver."); 12 | $Audio::initFailed = 1; 13 | } 14 | else 15 | { 16 | echo(" Vendor: " @ alGetString("AL_VENDOR")); 17 | echo(" Version: " @ alGetString("AL_VERSION")); 18 | echo(" Renderer: " @ alGetString("AL_RENDERER")); 19 | echo(" Extensions: " @ alGetString("AL_EXTENSIONS")); 20 | alxListenerf(AL_GAIN_LINEAR, $pref::Audio::masterVolume); 21 | for (%channel = 1; %channel <= 8; %channel++) 22 | { 23 | alxSetChannelVolume(%channel, $pref::Audio::channelVolume[%channel]); 24 | } 25 | echo(""); 26 | } 27 | } 28 | } 29 | 30 | function OpenALShutdown() 31 | { 32 | OpenALShutdownDriver(); 33 | } 34 | 35 | -------------------------------------------------------------------------------- /beta/client/ui/newChatHud.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(NewChatHud) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | noCursor = 1; 11 | 12 | new GuiMLTextCtrl(newChatText) 13 | { 14 | profile = "BlockChatTextProfile"; 15 | horizSizing = "width"; 16 | vertSizing = "bottom"; 17 | position = "2 20"; 18 | extent = "640 14"; 19 | minExtent = "8 2"; 20 | visible = 1; 21 | lineSpacing = 12; 22 | allowColorChars = 1; 23 | maxChars = -1; 24 | text = "\c0what \c1what \c2what \c3what \c4what \c5hat \c6what \c7what"; 25 | }; 26 | new GuiTextCtrl(chatWhosTalkingText) 27 | { 28 | profile = "MM_LeftProfile"; 29 | horizSizing = "width"; 30 | vertSizing = "bottom"; 31 | position = "-1 0"; 32 | extent = "630 18"; 33 | minExtent = "8 2"; 34 | visible = 1; 35 | maxLength = 255; 36 | }; 37 | }; 38 | -------------------------------------------------------------------------------- /beta/client/actionMap.cs: -------------------------------------------------------------------------------- 1 | function ActionMap::copyBind(%this, %otherMap, %command) 2 | { 3 | if (!isObject(%otherMap)) 4 | { 5 | error("ActionMap::copyBind - \"" @ %otherMap @ "\" is not an object!"); 6 | return; 7 | } 8 | %bind = %otherMap.getBinding(%command); 9 | if (%bind !$= "") 10 | { 11 | %device = getField(%bind, 0); 12 | %action = getField(%bind, 1); 13 | %flags = %otherMap.isInverted(%device, %action) ? "SDI" : "SD"; 14 | %deadZone = %otherMap.getDeadZone(%device, %action); 15 | %scale = %otherMap.getScale(%device, %action); 16 | %this.bind(%device, %action, %flags, %deadZone, %scale, %command); 17 | } 18 | } 19 | 20 | function ActionMap::blockBind(%this, %otherMap, %command) 21 | { 22 | if (!isObject(%otherMap)) 23 | { 24 | error("ActionMap::blockBind - \"" @ %otherMap @ "\" is not an object!"); 25 | return; 26 | } 27 | %bind = %otherMap.getBinding(%command); 28 | if (%bind !$= "") 29 | { 30 | %this.bind(getField(%bind, 0), getField(%bind, 1), ""); 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /v1/client/actionMap.cs: -------------------------------------------------------------------------------- 1 | function ActionMap::copyBind(%this, %otherMap, %command) 2 | { 3 | if (!isObject(%otherMap)) 4 | { 5 | error("ActionMap::copyBind - \"" @ %otherMap @ "\" is not an object!"); 6 | return; 7 | } 8 | %bind = %otherMap.getBinding(%command); 9 | if (%bind !$= "") 10 | { 11 | %device = getField(%bind, 0); 12 | %action = getField(%bind, 1); 13 | %flags = %otherMap.isInverted(%device, %action) ? "SDI" : "SD"; 14 | %deadZone = %otherMap.getDeadZone(%device, %action); 15 | %scale = %otherMap.getScale(%device, %action); 16 | %this.bind(%device, %action, %flags, %deadZone, %scale, %command); 17 | } 18 | } 19 | 20 | function ActionMap::blockBind(%this, %otherMap, %command) 21 | { 22 | if (!isObject(%otherMap)) 23 | { 24 | error("ActionMap::blockBind - \"" @ %otherMap @ "\" is not an object!"); 25 | return; 26 | } 27 | %bind = %otherMap.getBinding(%command); 28 | if (%bind !$= "") 29 | { 30 | %this.bind(getField(%bind, 0), getField(%bind, 1), ""); 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /v20/client/actionMap.cs: -------------------------------------------------------------------------------- 1 | function ActionMap::copyBind(%this, %otherMap, %command) 2 | { 3 | if (!isObject(%otherMap)) 4 | { 5 | error("ActionMap::copyBind - \"" @ %otherMap @ "\" is not an object!"); 6 | return; 7 | } 8 | %bind = %otherMap.getBinding(%command); 9 | if (%bind !$= "") 10 | { 11 | %device = getField(%bind, 0); 12 | %action = getField(%bind, 1); 13 | %flags = %otherMap.isInverted(%device, %action) ? "SDI" : "SD"; 14 | %deadZone = %otherMap.getDeadZone(%device, %action); 15 | %scale = %otherMap.getScale(%device, %action); 16 | %this.bind(%device, %action, %flags, %deadZone, %scale, %command); 17 | } 18 | } 19 | 20 | function ActionMap::blockBind(%this, %otherMap, %command) 21 | { 22 | if (!isObject(%otherMap)) 23 | { 24 | error("ActionMap::blockBind - \"" @ %otherMap @ "\" is not an object!"); 25 | return; 26 | } 27 | %bind = %otherMap.getBinding(%command); 28 | if (%bind !$= "") 29 | { 30 | %this.bind(getField(%bind, 0), getField(%bind, 1), ""); 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /v21/client/actionMap.cs: -------------------------------------------------------------------------------- 1 | function ActionMap::copyBind(%this, %otherMap, %command) 2 | { 3 | if (!isObject(%otherMap)) 4 | { 5 | error("ActionMap::copyBind - \"" @ %otherMap @ "\" is not an object!"); 6 | return; 7 | } 8 | %bind = %otherMap.getBinding(%command); 9 | if (%bind !$= "") 10 | { 11 | %device = getField(%bind, 0); 12 | %action = getField(%bind, 1); 13 | %flags = %otherMap.isInverted(%device, %action) ? "SDI" : "SD"; 14 | %deadZone = %otherMap.getDeadZone(%device, %action); 15 | %scale = %otherMap.getScale(%device, %action); 16 | %this.bind(%device, %action, %flags, %deadZone, %scale, %command); 17 | } 18 | } 19 | 20 | function ActionMap::blockBind(%this, %otherMap, %command) 21 | { 22 | if (!isObject(%otherMap)) 23 | { 24 | error("ActionMap::blockBind - \"" @ %otherMap @ "\" is not an object!"); 25 | return; 26 | } 27 | %bind = %otherMap.getBinding(%command); 28 | if (%bind !$= "") 29 | { 30 | %this.bind(getField(%bind, 0), getField(%bind, 1), ""); 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /beta/prefs.cs: -------------------------------------------------------------------------------- 1 | $Pref::Server::AdminPassword = ""; 2 | $Pref::Server::BanTime = 1800; 3 | $Pref::Server::BrickLimit = 32000; 4 | $Pref::Server::ConnectionError = "You do not have the correct version of the Torque Game Engine or the related art needed to connect to this server, please contact the server operator to obtain the latest version of this game."; 5 | $pref::Server::FallingDamage = 1; 6 | $Pref::Server::FloodProtectionEnabled = 0; 7 | $Pref::Server::HammerDelayTime = 30; 8 | $Pref::Server::Info = "Info Goes here"; 9 | $Pref::Server::KickBanTime = 300; 10 | $Pref::Server::MaxBricksPerSecond = 10; 11 | $Pref::Server::MaxChatLen = 120; 12 | $Pref::Server::MaxPlayers = " 2"; 13 | $Pref::Server::Name = "Blockland Server"; 14 | $Pref::Server::PaintDelayTime = 30; 15 | $Pref::Server::Password = "asdf"; 16 | $Pref::Server::Port = "28000"; 17 | $Pref::Server::PrintDelayTime = 30; 18 | $Pref::Server::RandomBrickColor = 1; 19 | $Pref::Server::RegionMask = 2; 20 | $Pref::Server::ResetOnEmpty = "0"; 21 | $Pref::Server::TimeLimit = "0"; 22 | -------------------------------------------------------------------------------- /beta/server/prefs.cs: -------------------------------------------------------------------------------- 1 | $Pref::Server::AdminPassword = "woot"; 2 | $Pref::Server::BanTime = 1800; 3 | $Pref::Server::BrickLimit = 32000; 4 | $Pref::Server::ConnectionError = "You do not have the correct version of the Torque Game Engine or the related art needed to connect to this server, please contact the server operator to obtain the latest version of this game."; 5 | $pref::Server::FallingDamage = 1; 6 | $Pref::Server::FloodProtectionEnabled = 1; 7 | $Pref::Server::HammerDelayTime = 30; 8 | $Pref::Server::HostInternet = 0; 9 | $Pref::Server::Info = "Info Goes here"; 10 | $Pref::Server::KickBanTime = 300; 11 | $Pref::Server::MaxBricksPerSecond = 10; 12 | $Pref::Server::MaxChatLen = 120; 13 | $Pref::Server::MaxPlayers = 2; 14 | $Pref::Server::Name = "Blockland Server"; 15 | $Pref::Server::PaintDelayTime = 30; 16 | $Pref::Server::Password = "asdf"; 17 | $Pref::Server::Port = 28000; 18 | $Pref::Server::PrintDelayTime = 30; 19 | $Pref::Server::RandomBrickColor = 0; 20 | $Pref::Server::RegionMask = 2; 21 | $Pref::Server::ResetOnEmpty = 0; 22 | $Pref::Server::TimeLimit = 0; 23 | -------------------------------------------------------------------------------- /v20/main.cs: -------------------------------------------------------------------------------- 1 | function initCommon() 2 | { 3 | setRandomSeed(); 4 | exec("./client/canvas.cs"); 5 | exec("./client/audio.cs"); 6 | } 7 | 8 | function initBaseClient() 9 | { 10 | exec("./client/message.cs"); 11 | exec("./client/mission.cs"); 12 | exec("./client/missionDownload.cs"); 13 | exec("./client/actionMap.cs"); 14 | } 15 | 16 | function initBaseServer() 17 | { 18 | if (1) 19 | { 20 | exec("./server/mainServer.cs"); 21 | } 22 | else 23 | { 24 | exec("./server/webCom.cs"); 25 | exec("./server/authQuery.cs"); 26 | exec("./server/audio.cs"); 27 | exec("./server/server.cs"); 28 | exec("./server/message.cs"); 29 | exec("./server/commands.cs"); 30 | exec("./server/missionInfo.cs"); 31 | exec("./server/missionLoad.cs"); 32 | exec("./server/missionDownload.cs"); 33 | exec("./server/clientConnection.cs"); 34 | exec("./server/game.cs"); 35 | } 36 | } 37 | 38 | function onDatablockLimitExceeded() 39 | { 40 | $datablockExceededCount++; 41 | } 42 | 43 | function onDatablocksDeleted() 44 | { 45 | $datablockExceededCount = 0; 46 | } 47 | 48 | -------------------------------------------------------------------------------- /v21/main.cs: -------------------------------------------------------------------------------- 1 | function initCommon() 2 | { 3 | setRandomSeed(); 4 | exec("./client/canvas.cs"); 5 | exec("./client/audio.cs"); 6 | } 7 | 8 | function initBaseClient() 9 | { 10 | exec("./client/message.cs"); 11 | exec("./client/mission.cs"); 12 | exec("./client/missionDownload.cs"); 13 | exec("./client/actionMap.cs"); 14 | } 15 | 16 | function initBaseServer() 17 | { 18 | if (1) 19 | { 20 | exec("./server/mainServer.cs"); 21 | } 22 | else 23 | { 24 | exec("./server/webCom.cs"); 25 | exec("./server/authQuery.cs"); 26 | exec("./server/audio.cs"); 27 | exec("./server/server.cs"); 28 | exec("./server/message.cs"); 29 | exec("./server/commands.cs"); 30 | exec("./server/missionInfo.cs"); 31 | exec("./server/missionLoad.cs"); 32 | exec("./server/missionDownload.cs"); 33 | exec("./server/clientConnection.cs"); 34 | exec("./server/game.cs"); 35 | } 36 | } 37 | 38 | function onDatablockLimitExceeded() 39 | { 40 | $datablockExceededCount++; 41 | } 42 | 43 | function onDatablocksDeleted() 44 | { 45 | $datablockExceededCount = 0; 46 | } 47 | 48 | -------------------------------------------------------------------------------- /v1/client/ui/savingGui.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(SavingGui) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | 11 | new GuiWindowCtrl() 12 | { 13 | profile = "BlockWindowProfile"; 14 | horizSizing = "center"; 15 | vertSizing = "center"; 16 | position = "202 182"; 17 | extent = "235 116"; 18 | minExtent = "8 2"; 19 | visible = 1; 20 | text = "Saving"; 21 | maxLength = 255; 22 | resizeWidth = 1; 23 | resizeHeight = 1; 24 | canMove = 0; 25 | canClose = 1; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | closeCommand = "canvas.popDialog(savingGui);"; 30 | 31 | new GuiTextCtrl() 32 | { 33 | profile = "MapDescriptionTextProfile"; 34 | horizSizing = "center"; 35 | vertSizing = "bottom"; 36 | position = "80 59"; 37 | extent = "74 18"; 38 | minExtent = "8 2"; 39 | visible = 1; 40 | text = "Saving bricks..."; 41 | maxLength = 255; 42 | }; 43 | }; 44 | }; 45 | -------------------------------------------------------------------------------- /v1/ui/MessagePopupDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(MessagePopupDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "width"; 5 | vertSizing = "height"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl(MessagePopFrame) 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "170 194"; 18 | extent = "300 92"; 19 | minExtent = "48 92"; 20 | visible = 1; 21 | maxLength = 255; 22 | resizeWidth = 1; 23 | resizeHeight = 1; 24 | canMove = 1; 25 | canClose = 0; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | helpTag = 0; 30 | 31 | new GuiMLTextCtrl(MessagePopText) 32 | { 33 | profile = "GuiTextProfile"; 34 | horizSizing = "center"; 35 | vertSizing = "bottom"; 36 | position = "32 39"; 37 | extent = "236 14"; 38 | minExtent = "8 8"; 39 | visible = 1; 40 | lineSpacing = 2; 41 | allowColorChars = 0; 42 | maxChars = -1; 43 | helpTag = 0; 44 | }; 45 | }; 46 | }; 47 | -------------------------------------------------------------------------------- /beta/ui/MessagePopupDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(MessagePopupDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "width"; 5 | vertSizing = "height"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl(MessagePopFrame) 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "170 194"; 18 | extent = "300 92"; 19 | minExtent = "48 92"; 20 | visible = 1; 21 | maxLength = 255; 22 | resizeWidth = 1; 23 | resizeHeight = 1; 24 | canMove = 1; 25 | canClose = 0; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | helpTag = 0; 30 | 31 | new GuiMLTextCtrl(MessagePopText) 32 | { 33 | profile = "GuiTextProfile"; 34 | horizSizing = "center"; 35 | vertSizing = "bottom"; 36 | position = "32 39"; 37 | extent = "236 14"; 38 | minExtent = "8 8"; 39 | visible = 1; 40 | lineSpacing = 2; 41 | allowColorChars = 0; 42 | maxChars = -1; 43 | helpTag = 0; 44 | }; 45 | }; 46 | }; 47 | -------------------------------------------------------------------------------- /beta/client/ui/remapDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(RemapDlg) 2 | { 3 | profile = "GuiDialogProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiControl(OptRemapDlg) 13 | { 14 | profile = "GuiWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "213 213"; 18 | extent = "243 64"; 19 | minExtent = "8 8"; 20 | visible = 1; 21 | helpTag = 0; 22 | 23 | new GuiTextCtrl(OptRemapText) 24 | { 25 | profile = "GuiCenterTextProfile"; 26 | horizSizing = "right"; 27 | vertSizing = "bottom"; 28 | position = "2 21"; 29 | extent = "99 20"; 30 | minExtent = "8 8"; 31 | visible = 1; 32 | helpTag = 0; 33 | text = "Re-bind control..."; 34 | maxLength = 255; 35 | }; 36 | new GuiInputCtrl(OptRemapInputCtrl) 37 | { 38 | profile = "GuiInputCtrlProfile"; 39 | horizSizing = "center"; 40 | vertSizing = "bottom"; 41 | position = "0 0"; 42 | extent = "64 64"; 43 | minExtent = "8 8"; 44 | visible = 1; 45 | helpTag = 0; 46 | }; 47 | }; 48 | }; 49 | -------------------------------------------------------------------------------- /beta/data/shapes/player/player.cs: -------------------------------------------------------------------------------- 1 | datablock TSShapeConstructor(mDts) 2 | { 3 | baseShape = "./m.dts"; 4 | sequence0 = "./m_root.dsq root"; 5 | sequence1 = "./m_run.dsq run"; 6 | sequence2 = "./m_run.dsq walk"; 7 | sequence3 = "./m_back.dsq back"; 8 | sequence4 = "./m_side.dsq side"; 9 | sequence5 = "./m_crouch.dsq crouch"; 10 | sequence6 = "./m_crouchRun.dsq crouchRun"; 11 | sequence7 = "./m_crouchBack.dsq crouchBack"; 12 | sequence8 = "./m_crouchSide.dsq crouchSide"; 13 | sequence9 = "./m_look.dsq look"; 14 | sequence10 = "./m_headSide.dsq headside"; 15 | sequence11 = "./m_headup.dsq headUp"; 16 | sequence12 = "./m_standjump.dsq jump"; 17 | sequence13 = "./m_standjump.dsq standjump"; 18 | sequence14 = "./m_fall.dsq fall"; 19 | sequence15 = "./m_root.dsq land"; 20 | sequence16 = "./m_armAttack.dsq armAttack"; 21 | sequence17 = "./m_armReadyLeft.dsq armReadyLeft"; 22 | sequence18 = "./m_armReadyRight.dsq armReadyRight"; 23 | sequence19 = "./m_armReadyBoth.dsq armReadyBoth"; 24 | sequence20 = "./m_spearReady.dsq spearready"; 25 | sequence21 = "./m_spearThrow.dsq spearThrow"; 26 | sequence22 = "./m_talk.dsq talk"; 27 | sequence23 = "./m_death1.dsq death1"; 28 | }; 29 | -------------------------------------------------------------------------------- /beta/client/message.cs: -------------------------------------------------------------------------------- 1 | function clientCmdChatMessage(%__unused, %voice, %pitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) 2 | { 3 | onChatMessage(detag(%msgString), %voice, %pitch); 4 | } 5 | 6 | function clientCmdServerMessage(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) 7 | { 8 | %tag = getWord(%msgType, 0); 9 | for (%i = 0; (%func = $MSGCB["", %i]) !$= ""; %i++) 10 | { 11 | call(%func, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10); 12 | } 13 | if (%tag !$= "") 14 | { 15 | for (%i = 0; (%func = $MSGCB[%tag, %i]) !$= ""; %i++) 16 | { 17 | call(%func, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10); 18 | } 19 | } 20 | } 21 | 22 | function addMessageCallback(%msgType, %func) 23 | { 24 | for (%i = 0; (%afunc = $MSGCB[%msgType, %i]) !$= ""; %i++) 25 | { 26 | if (%afunc $= %func) 27 | { 28 | return; 29 | } 30 | } 31 | $MSGCB[%msgType, %i] = %func; 32 | } 33 | 34 | function defaultMessageCallback(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) 35 | { 36 | onServerMessage(detag(%msgString)); 37 | } 38 | 39 | addMessageCallback("", defaultMessageCallback); 40 | -------------------------------------------------------------------------------- /v1/client/message.cs: -------------------------------------------------------------------------------- 1 | function clientCmdChatMessage(%__unused, %voice, %pitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) 2 | { 3 | onChatMessage(detag(%msgString), %voice, %pitch); 4 | } 5 | 6 | function clientCmdServerMessage(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) 7 | { 8 | %tag = getWord(%msgType, 0); 9 | for (%i = 0; (%func = $MSGCB["", %i]) !$= ""; %i++) 10 | { 11 | call(%func, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10); 12 | } 13 | if (%tag !$= "") 14 | { 15 | for (%i = 0; (%func = $MSGCB[%tag, %i]) !$= ""; %i++) 16 | { 17 | call(%func, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10); 18 | } 19 | } 20 | } 21 | 22 | function addMessageCallback(%msgType, %func) 23 | { 24 | for (%i = 0; (%afunc = $MSGCB[%msgType, %i]) !$= ""; %i++) 25 | { 26 | if (%afunc $= %func) 27 | { 28 | return; 29 | } 30 | } 31 | $MSGCB[%msgType, %i] = %func; 32 | } 33 | 34 | function defaultMessageCallback(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) 35 | { 36 | onServerMessage(detag(%msgString)); 37 | } 38 | 39 | addMessageCallback("", defaultMessageCallback); 40 | -------------------------------------------------------------------------------- /v20/client/message.cs: -------------------------------------------------------------------------------- 1 | function clientCmdChatMessage(%sender, %voice, %pitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) 2 | { 3 | onChatMessage(detag(%msgString), %voice, %pitch); 4 | } 5 | 6 | function clientCmdServerMessage(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) 7 | { 8 | %tag = getWord(%msgType, 0); 9 | for (%i = 0; (%func = $MSGCB["", %i]) !$= ""; %i++) 10 | { 11 | call(%func, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10); 12 | } 13 | if (%tag !$= "") 14 | { 15 | for (%i = 0; (%func = $MSGCB[%tag, %i]) !$= ""; %i++) 16 | { 17 | call(%func, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10); 18 | } 19 | } 20 | } 21 | 22 | function addMessageCallback(%msgType, %func) 23 | { 24 | for (%i = 0; (%afunc = $MSGCB[%msgType, %i]) !$= ""; %i++) 25 | { 26 | if (%afunc $= %func) 27 | { 28 | return; 29 | } 30 | } 31 | $MSGCB[%msgType, %i] = %func; 32 | } 33 | 34 | function defaultMessageCallback(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) 35 | { 36 | onServerMessage(detag(%msgString)); 37 | } 38 | 39 | addMessageCallback("", defaultMessageCallback); 40 | -------------------------------------------------------------------------------- /v21/client/message.cs: -------------------------------------------------------------------------------- 1 | function clientCmdChatMessage(%sender, %voice, %pitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) 2 | { 3 | onChatMessage(detag(%msgString), %voice, %pitch); 4 | } 5 | 6 | function clientCmdServerMessage(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) 7 | { 8 | %tag = getWord(%msgType, 0); 9 | for (%i = 0; (%func = $MSGCB["", %i]) !$= ""; %i++) 10 | { 11 | call(%func, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10); 12 | } 13 | if (%tag !$= "") 14 | { 15 | for (%i = 0; (%func = $MSGCB[%tag, %i]) !$= ""; %i++) 16 | { 17 | call(%func, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10); 18 | } 19 | } 20 | } 21 | 22 | function addMessageCallback(%msgType, %func) 23 | { 24 | for (%i = 0; (%afunc = $MSGCB[%msgType, %i]) !$= ""; %i++) 25 | { 26 | if (%afunc $= %func) 27 | { 28 | return; 29 | } 30 | } 31 | $MSGCB[%msgType, %i] = %func; 32 | } 33 | 34 | function defaultMessageCallback(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) 35 | { 36 | onServerMessage(detag(%msgString)); 37 | } 38 | 39 | addMessageCallback("", defaultMessageCallback); 40 | -------------------------------------------------------------------------------- /v1/client/ui/newChatHud.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(NewChatHud) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | noCursor = 1; 11 | 12 | new GuiMLTextCtrl(newChatText) 13 | { 14 | profile = "BlockChatTextProfile"; 15 | horizSizing = "width"; 16 | vertSizing = "bottom"; 17 | position = "2 20"; 18 | extent = "640 14"; 19 | minExtent = "8 2"; 20 | visible = 1; 21 | lineSpacing = 12; 22 | allowColorChars = 1; 23 | maxChars = -1; 24 | text = "\c0what \c1what \c2what \c3what \c4what \c5hat \c6what \c7what"; 25 | }; 26 | new GuiTextCtrl(chatWhosTalkingText) 27 | { 28 | profile = "MM_LeftProfile"; 29 | horizSizing = "width"; 30 | vertSizing = "bottom"; 31 | position = "-1 0"; 32 | extent = "630 18"; 33 | minExtent = "8 2"; 34 | visible = 1; 35 | maxLength = 255; 36 | }; 37 | new GuiTextCtrl(chatScrollDownIndicator) 38 | { 39 | profile = "MM_LeftProfile"; 40 | horizSizing = "right"; 41 | vertSizing = "bottom"; 42 | position = "4 40"; 43 | extent = "27 18"; 44 | minExtent = "8 2"; 45 | visible = 1; 46 | text = "VVV"; 47 | maxLength = 255; 48 | }; 49 | }; 50 | -------------------------------------------------------------------------------- /beta/client/canvas.cs: -------------------------------------------------------------------------------- 1 | function initCanvas(%windowName) 2 | { 3 | videoSetGammaCorrection($pref::OpenGL::gammaCorrection); 4 | if (!createCanvas(%windowName)) 5 | { 6 | quit(); 7 | return; 8 | } 9 | setOpenGLTextureCompressionHint($pref::OpenGL::compressionHint); 10 | setOpenGLAnisotropy($pref::OpenGL::anisotropy); 11 | setOpenGLMipReduction($pref::OpenGL::mipReduction); 12 | setOpenGLInteriorMipReduction($pref::OpenGL::interiorMipReduction); 13 | setOpenGLSkyMipReduction($pref::OpenGL::skyMipReduction); 14 | exec("~/ui/defaultProfiles.cs"); 15 | exec("~/ui/customProfiles.cs"); 16 | exec("~/ui/ConsoleDlg.gui"); 17 | exec("~/ui/InspectDlg.gui"); 18 | exec("~/ui/LoadFileDlg.gui"); 19 | exec("~/ui/SaveFileDlg.gui"); 20 | exec("~/ui/MessageBoxOkDlg.gui"); 21 | exec("~/ui/MessageBoxYesNoDlg.gui"); 22 | exec("~/ui/MessageBoxOKCancelDlg.gui"); 23 | exec("~/ui/MessagePopupDlg.gui"); 24 | exec("~/ui/HelpDlg.gui"); 25 | exec("~/ui/RecordingsDlg.gui"); 26 | exec("./metrics.cs"); 27 | exec("./messageBox.cs"); 28 | exec("./screenshot.cs"); 29 | exec("./cursor.cs"); 30 | exec("./help.cs"); 31 | exec("./recordings.cs"); 32 | OpenALInit(); 33 | } 34 | 35 | function resetCanvas() 36 | { 37 | if (isObject(Canvas)) 38 | { 39 | Canvas.repaint(); 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /beta/client/ui/newMessageHud.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(newMessageHud) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | channel = "SAY"; 11 | 12 | new GuiSwatchCtrl(NMH_Box) 13 | { 14 | profile = "GuiDefaultProfile"; 15 | horizSizing = "width"; 16 | vertSizing = "bottom"; 17 | position = "2 90"; 18 | extent = "636 18"; 19 | minExtent = "8 2"; 20 | visible = 1; 21 | color = "0 0 0 0"; 22 | 23 | new GuiTextCtrl(NMH_Channel) 24 | { 25 | profile = "BlockChatChannelProfile"; 26 | horizSizing = "right"; 27 | vertSizing = "bottom"; 28 | position = "2 0"; 29 | extent = "60 18"; 30 | minExtent = "8 2"; 31 | visible = 1; 32 | maxLength = 255; 33 | }; 34 | new GuiTextEditCtrl(NMH_Type) 35 | { 36 | profile = "HUDChatTextEditProfile"; 37 | horizSizing = "width"; 38 | vertSizing = "bottom"; 39 | position = "60 0"; 40 | extent = "574 18"; 41 | minExtent = "8 2"; 42 | visible = 1; 43 | command = "$Thiscontrol.type();"; 44 | altCommand = "$Thiscontrol.send();"; 45 | maxLength = 255; 46 | historySize = 0; 47 | password = 0; 48 | tabComplete = 0; 49 | sinkAllKeyEvents = 0; 50 | }; 51 | }; 52 | }; 53 | -------------------------------------------------------------------------------- /v20/client/canvas.cs: -------------------------------------------------------------------------------- 1 | function initCanvas(%windowName) 2 | { 3 | videoSetGammaCorrection($pref::OpenGL::gammaCorrection); 4 | if (!createCanvas(%windowName)) 5 | { 6 | quit(); 7 | return; 8 | } 9 | setOpenGLTextureCompressionHint($pref::OpenGL::compressionHint); 10 | setOpenGLAnisotropy($pref::OpenGL::anisotropy); 11 | setOpenGLMipReduction($pref::OpenGL::mipReduction); 12 | setOpenGLInteriorMipReduction($pref::OpenGL::interiorMipReduction); 13 | setOpenGLSkyMipReduction($pref::OpenGL::skyMipReduction); 14 | OpenALInit(); 15 | } 16 | 17 | function resetCanvas() 18 | { 19 | if (isObject(Canvas)) 20 | { 21 | Canvas.repaint(); 22 | } 23 | if (isObject(PlayGui)) 24 | { 25 | PlayGui.createInvHud(); 26 | PlayGui.createToolHud(); 27 | PlayGui.LoadPaint(); 28 | } 29 | } 30 | 31 | function onWindowReactivate() 32 | { 33 | } 34 | 35 | function restartAudio() 36 | { 37 | OpenALInit(); 38 | if (!isObject(ServerConnection)) 39 | { 40 | return; 41 | } 42 | %group = ServerConnection.getId(); 43 | %count = %group.getCount(); 44 | for (%i = 0; %i < %count; %i++) 45 | { 46 | %obj = %group.getObject(%i); 47 | if (%obj.getClassName() $= "AudioEmitter") 48 | { 49 | %profile = %obj.profile; 50 | %obj.profile = 0; 51 | %obj.profile = %profile; 52 | %obj.schedule(10, update); 53 | } 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /v1/client/ui/ProgressGui.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(ProgressGui) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | noCursor = 1; 11 | 12 | new GuiWindowCtrl(Progress_Window) 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "bottom"; 17 | position = "199 0"; 18 | extent = "242 91"; 19 | minExtent = "8 2"; 20 | visible = 1; 21 | text = "Save Progress"; 22 | maxLength = 255; 23 | resizeWidth = 0; 24 | resizeHeight = 0; 25 | canMove = 1; 26 | canClose = 0; 27 | canMinimize = 0; 28 | canMaximize = 0; 29 | minSize = "50 50"; 30 | 31 | new GuiTextCtrl(Progress_Text) 32 | { 33 | profile = "GuiProgressTextProfile"; 34 | horizSizing = "center"; 35 | vertSizing = "bottom"; 36 | position = "18 46"; 37 | extent = "205 20"; 38 | minExtent = "8 8"; 39 | visible = 1; 40 | text = "Saving..."; 41 | maxLength = 255; 42 | helpTag = 0; 43 | }; 44 | new GuiProgressCtrl(Progress_Bar) 45 | { 46 | profile = "GuiProgressProfile"; 47 | horizSizing = "center"; 48 | vertSizing = "bottom"; 49 | position = "17 38"; 50 | extent = "207 37"; 51 | minExtent = "8 8"; 52 | visible = 1; 53 | helpTag = 0; 54 | total = 2300; 55 | }; 56 | }; 57 | }; 58 | -------------------------------------------------------------------------------- /beta/client/Favorites.cs: -------------------------------------------------------------------------------- 1 | $Favorite::Brick1_0 = "2x2"; 2 | $Favorite::Brick1_1 = "2x3"; 3 | $Favorite::Brick1_2 = "2x4"; 4 | $Favorite::Brick1_3 = "2x6"; 5 | $Favorite::Brick1_4 = "2x8"; 6 | $Favorite::Brick1_5 = "2x10"; 7 | $Favorite::Brick1_6 = "-45° Ramp 2x Print"; 8 | $Favorite::Brick1_7 = "45° Ramp 2x Print"; 9 | $Favorite::Brick1_8 = "2x2F Print"; 10 | $Favorite::Brick1_9 = "1x2F Print"; 11 | $Favorite::Brick2_0 = "Castle Wall"; 12 | $Favorite::Brick2_1 = "2x2x5 Lattice"; 13 | $Favorite::Brick2_2 = "1x4x5 Window"; 14 | $Favorite::Brick2_3 = "Pine Tree"; 15 | $Favorite::Brick2_4 = ""; 16 | $Favorite::Brick2_5 = ""; 17 | $Favorite::Brick2_6 = ""; 18 | $Favorite::Brick2_7 = ""; 19 | $Favorite::Brick2_8 = ""; 20 | $Favorite::Brick2_9 = ""; 21 | $Favorite::Brick3_0 = "Castle Wall"; 22 | $Favorite::Brick3_1 = "32x32 Road"; 23 | $Favorite::Brick3_2 = "32x32 Road T"; 24 | $Favorite::Brick3_3 = "45° Ramp 2x"; 25 | $Favorite::Brick3_4 = "45° Ramp 1x"; 26 | $Favorite::Brick3_5 = ""; 27 | $Favorite::Brick3_6 = ""; 28 | $Favorite::Brick3_7 = ""; 29 | $Favorite::Brick3_8 = ""; 30 | $Favorite::Brick3_9 = ""; 31 | $Favorite::Brick4_0 = "32x32 Base"; 32 | $Favorite::Brick4_1 = "32x32 Road"; 33 | $Favorite::Brick4_2 = "32x32 Road T"; 34 | $Favorite::Brick4_3 = "32x32 Road C"; 35 | $Favorite::Brick4_4 = "32x32 Road X"; 36 | $Favorite::Brick4_5 = ""; 37 | $Favorite::Brick4_6 = ""; 38 | $Favorite::Brick4_7 = ""; 39 | $Favorite::Brick4_8 = ""; 40 | $Favorite::Brick4_9 = ""; 41 | -------------------------------------------------------------------------------- /beta/client/cursor.cs: -------------------------------------------------------------------------------- 1 | $cursorControlled = 1; 2 | function cursorOff() 3 | { 4 | if ($cursorControlled) 5 | { 6 | lockMouse(1); 7 | } 8 | Canvas.cursorOff(); 9 | } 10 | 11 | function cursorOn() 12 | { 13 | if ($cursorControlled) 14 | { 15 | lockMouse(0); 16 | } 17 | Canvas.cursorOn(); 18 | Canvas.setCursor(DefaultCursor); 19 | } 20 | 21 | package CanvasCursor 22 | { 23 | function GuiCanvas::checkCursor(%this) 24 | { 25 | %cursorShouldBeOn = 0; 26 | for (%i = 0; %i < %this.getCount(); %i++) 27 | { 28 | %control = %this.getObject(%i); 29 | if (%control.noCursor $= "") 30 | { 31 | %cursorShouldBeOn = 1; 32 | break; 33 | } 34 | } 35 | if (%cursorShouldBeOn != %this.isCursorOn()) 36 | { 37 | if (%cursorShouldBeOn) 38 | { 39 | cursorOn(); 40 | } 41 | else 42 | { 43 | cursorOff(); 44 | } 45 | } 46 | } 47 | 48 | function GuiCanvas::setContent(%this, %ctrl) 49 | { 50 | Parent::setContent(%this, %ctrl); 51 | %this.checkCursor(); 52 | } 53 | 54 | function GuiCanvas::pushDialog(%this, %ctrl) 55 | { 56 | Parent::pushDialog(%this, %ctrl); 57 | %this.checkCursor(); 58 | } 59 | 60 | function GuiCanvas::popDialog(%this, %ctrl) 61 | { 62 | Parent::popDialog(%this, %ctrl); 63 | %this.checkCursor(); 64 | } 65 | 66 | function GuiCanvas::popLayer(%this, %layer) 67 | { 68 | Parent::popLayer(%this, %layer); 69 | %this.checkCursor(); 70 | } 71 | 72 | }; 73 | activatePackage(CanvasCursor); 74 | -------------------------------------------------------------------------------- /beta/data/shapes/horse/horse.cs: -------------------------------------------------------------------------------- 1 | datablock TSShapeConstructor(HorseDts) 2 | { 3 | baseShape = "./horse.dts"; 4 | sequence0 = "./horse_root.dsq root"; 5 | sequence1 = "./horse_run.dsq run"; 6 | sequence2 = "./horse_back.dsq back"; 7 | sequence3 = "./horse_side.dsq side"; 8 | sequence4 = "./horse_root.dsq look"; 9 | sequence5 = "./horse_root.dsq crouch"; 10 | sequence6 = "./horse_root.dsq fall"; 11 | sequence7 = "./horse_root.dsq land"; 12 | sequence8 = "./horse_jump.dsq jump"; 13 | sequence9 = "./horse_run.dsq crouchRun"; 14 | sequence10 = "./horse_back.dsq crouchBack"; 15 | sequence11 = "./horse_side.dsq crouchSide"; 16 | sequence12 = "./horse_root.dsq walk"; 17 | sequence13 = "./horse_root.dsq death5"; 18 | sequence14 = "./horse_root.dsq death6"; 19 | sequence15 = "./horse_root.dsq death7"; 20 | sequence16 = "./horse_root.dsq death8"; 21 | sequence17 = "./horse_root.dsq death9"; 22 | sequence18 = "./horse_root.dsq spearready"; 23 | sequence19 = "./horse_root.dsq spearThrow"; 24 | sequence20 = "./horse_root.dsq talk"; 25 | sequence21 = "./horse_root.dsq headUp"; 26 | sequence22 = "./horse_root.dsq talk"; 27 | sequence23 = "./horse_root.dsq headside"; 28 | sequence24 = "./horse_jump.dsq standjump"; 29 | sequence25 = "./horse_root.dsq headUp"; 30 | sequence26 = "./horse_root.dsq armAttack"; 31 | sequence27 = "./horse_root.dsq armReadyLeft"; 32 | sequence28 = "./horse_root.dsq armReadyRight"; 33 | sequence29 = "./horse_root.dsq armReadyBoth"; 34 | }; 35 | -------------------------------------------------------------------------------- /beta/client/help.cs: -------------------------------------------------------------------------------- 1 | function HelpDlg::onWake(%this) 2 | { 3 | HelpFileList.entryCount = 0; 4 | HelpFileList.clear(); 5 | for (%file = findFirstFile("*.hfl"); %file !$= ""; %file = findNextFile("*.hfl")) 6 | { 7 | HelpFileList.fileName[HelpFileList.entryCount] = %file; 8 | HelpFileList.addRow(HelpFileList.entryCount, fileBase(%file)); 9 | HelpFileList.entryCount++; 10 | } 11 | HelpFileList.sortNumerical(0); 12 | HelpFileList.setSelectedRow(0); 13 | } 14 | 15 | function HelpFileList::onSelect(%this, %row) 16 | { 17 | %fo = new FileObject(); 18 | %fo.openForRead(%this.fileName[%row]); 19 | for (%text = ""; !%fo.isEOF(); %text = %text @ %fo.readLine() @ "\n") 20 | { 21 | } 22 | %fo.delete(); 23 | HelpText.setText(%text); 24 | } 25 | 26 | function getHelp(%helpName) 27 | { 28 | Canvas.pushDialog(HelpDlg); 29 | if (%helpName !$= "") 30 | { 31 | %index = HelpFileList.findTextIndex(%helpName); 32 | HelpFileList.setSelectedRow(%index); 33 | } 34 | } 35 | 36 | function contextHelp() 37 | { 38 | for (%i = 0; %i < Canvas.getCount(); %i++) 39 | { 40 | if (Canvas.getObject(%i).getName() $= HelpDlg) 41 | { 42 | Canvas.popDialog(HelpDlg); 43 | return; 44 | } 45 | } 46 | %content = Canvas.getContent(); 47 | %helpPage = %content.getHelpPage(); 48 | getHelp(%helpPage); 49 | } 50 | 51 | function GuiControl::getHelpPage(%this) 52 | { 53 | return %this.helpPage; 54 | } 55 | 56 | function GuiMLTextCtrl::onURL(%this, %url) 57 | { 58 | gotoWebPage(%url); 59 | } 60 | 61 | -------------------------------------------------------------------------------- /v1/client/help.cs: -------------------------------------------------------------------------------- 1 | function HelpDlg::onWake(%this) 2 | { 3 | HelpFileList.entryCount = 0; 4 | HelpFileList.clear(); 5 | for (%file = findFirstFile("*.hfl"); %file !$= ""; %file = findNextFile("*.hfl")) 6 | { 7 | HelpFileList.fileName[HelpFileList.entryCount] = %file; 8 | HelpFileList.addRow(HelpFileList.entryCount, fileBase(%file)); 9 | HelpFileList.entryCount++; 10 | } 11 | HelpFileList.sortNumerical(0); 12 | HelpFileList.setSelectedRow(0); 13 | } 14 | 15 | function HelpFileList::onSelect(%this, %row) 16 | { 17 | %fo = new FileObject(); 18 | %fo.openForRead(%this.fileName[%row]); 19 | for (%text = ""; !%fo.isEOF(); %text = %text @ %fo.readLine() @ "\n") 20 | { 21 | } 22 | %fo.delete(); 23 | HelpText.setText(%text); 24 | } 25 | 26 | function getHelp(%helpName) 27 | { 28 | Canvas.pushDialog(HelpDlg); 29 | if (%helpName !$= "") 30 | { 31 | %index = HelpFileList.findTextIndex(%helpName); 32 | HelpFileList.setSelectedRow(%index); 33 | } 34 | } 35 | 36 | function contextHelp() 37 | { 38 | for (%i = 0; %i < Canvas.getCount(); %i++) 39 | { 40 | if (Canvas.getObject(%i).getName() $= HelpDlg) 41 | { 42 | Canvas.popDialog(HelpDlg); 43 | return; 44 | } 45 | } 46 | %content = Canvas.getContent(); 47 | %helpPage = %content.getHelpPage(); 48 | getHelp(%helpPage); 49 | } 50 | 51 | function GuiControl::getHelpPage(%this) 52 | { 53 | return %this.helpPage; 54 | } 55 | 56 | function GuiMLTextCtrl::onURL(%this, %url) 57 | { 58 | gotoWebPage(%url); 59 | } 60 | 61 | -------------------------------------------------------------------------------- /beta/ui/MessageBoxOkDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(MessageBoxOKDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "width"; 5 | vertSizing = "height"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl(MBOKFrame) 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "172 169"; 18 | extent = "295 142"; 19 | minExtent = "48 92"; 20 | visible = 1; 21 | maxLength = 255; 22 | resizeWidth = 1; 23 | resizeHeight = 1; 24 | canMove = 1; 25 | canClose = 0; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | helpTag = 0; 30 | 31 | new GuiMLTextCtrl(MBOKText) 32 | { 33 | profile = "GuiDefaultProfile"; 34 | horizSizing = "center"; 35 | vertSizing = "bottom"; 36 | position = "29 46"; 37 | extent = "236 14"; 38 | minExtent = "8 8"; 39 | visible = 1; 40 | lineSpacing = 2; 41 | allowColorChars = 0; 42 | maxChars = -1; 43 | helpTag = 0; 44 | }; 45 | new GuiBitmapButtonCtrl() 46 | { 47 | profile = "BlockButtonProfile"; 48 | horizSizing = "center"; 49 | vertSizing = "top"; 50 | position = "102 90"; 51 | extent = "91 38"; 52 | minExtent = "8 2"; 53 | visible = 1; 54 | command = "MessageCallback(MessageBoxOKDlg,MessageBoxOKDlg.callback);"; 55 | text = "OK"; 56 | groupNum = -1; 57 | buttonType = "PushButton"; 58 | bitmap = "~/client/ui/button2"; 59 | }; 60 | }; 61 | }; 62 | -------------------------------------------------------------------------------- /beta/ui/ConsoleDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(ConsoleDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | 5 | new GuiWindowCtrl() 6 | { 7 | profile = "GuiWindowProfile"; 8 | position = "0 0"; 9 | extent = "640 370"; 10 | text = "Console"; 11 | 12 | new GuiScrollCtrl() 13 | { 14 | profile = "GuiScrollProfile"; 15 | position = "0 0"; 16 | extent = "640 350"; 17 | hScrollBar = "alwaysOn"; 18 | vScrollBar = "alwaysOn"; 19 | horizSizing = "width"; 20 | vertSizing = "height"; 21 | 22 | new GuiConsole("testArrayCtrl") 23 | { 24 | profile = "GuiConsoleProfile"; 25 | position = "0 0"; 26 | }; 27 | }; 28 | new GuiConsoleEditCtrl("ConsoleEntry") 29 | { 30 | profile = "GuiTextEditProfile"; 31 | position = "0 350"; 32 | extent = "640 20"; 33 | historySize = 20; 34 | altCommand = "ConsoleEntry::eval();"; 35 | horizSizing = "width"; 36 | vertSizing = "top"; 37 | }; 38 | }; 39 | }; 40 | $ConsoleActive = 0; 41 | function ConsoleEntry::eval() 42 | { 43 | %text = ConsoleEntry.getValue(); 44 | echo("==>" @ %text); 45 | eval(%text); 46 | ConsoleEntry.setValue(""); 47 | } 48 | 49 | function ToggleConsole(%make) 50 | { 51 | if (%make) 52 | { 53 | if ($ConsoleActive) 54 | { 55 | if ($enableDirectInput) 56 | { 57 | activateKeyboard(); 58 | } 59 | Canvas.popDialog(ConsoleDlg); 60 | $ConsoleActive = 0; 61 | } 62 | else 63 | { 64 | if ($enableDirectInput) 65 | { 66 | deactivateKeyboard(); 67 | } 68 | Canvas.pushDialog(ConsoleDlg, 99); 69 | $ConsoleActive = 1; 70 | } 71 | } 72 | } 73 | 74 | -------------------------------------------------------------------------------- /v1/ui/MessageBoxOkDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(MessageBoxOKDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "width"; 5 | vertSizing = "height"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl(MBOKFrame) 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "172 141"; 18 | extent = "295 198"; 19 | minExtent = "48 92"; 20 | visible = 1; 21 | maxLength = 255; 22 | resizeWidth = 0; 23 | resizeHeight = 0; 24 | canMove = 1; 25 | canClose = 0; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | helpTag = 0; 30 | 31 | new GuiMLTextCtrl(MBOKText) 32 | { 33 | profile = "GuiDefaultProfile"; 34 | horizSizing = "center"; 35 | vertSizing = "bottom"; 36 | position = "29 46"; 37 | extent = "236 70"; 38 | minExtent = "8 8"; 39 | visible = 1; 40 | lineSpacing = 2; 41 | allowColorChars = 0; 42 | maxChars = -1; 43 | helpTag = 0; 44 | }; 45 | new GuiBitmapButtonCtrl() 46 | { 47 | profile = "BlockButtonProfile"; 48 | horizSizing = "center"; 49 | vertSizing = "top"; 50 | position = "102 146"; 51 | extent = "91 38"; 52 | minExtent = "8 2"; 53 | visible = 1; 54 | command = "MessageCallback(MessageBoxOKDlg,MessageBoxOKDlg.callback);"; 55 | accelerator = "enter"; 56 | text = "OK"; 57 | groupNum = -1; 58 | buttonType = "PushButton"; 59 | bitmap = "~/client/ui/button2"; 60 | mKeepCached = 0; 61 | }; 62 | }; 63 | }; 64 | -------------------------------------------------------------------------------- /beta/ui/PlayerListGui.gui: -------------------------------------------------------------------------------- 1 | //--- OBJECT WRITE BEGIN --- 2 | new GuiControl(PlayerListGui) { 3 | profile = "GuiModelessDialogProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = "1"; 10 | noCursor = "1"; 11 | helpTag = "0"; 12 | 13 | new GuiBitmapCtrl() { 14 | profile = "GuiDefaultProfile"; 15 | horizSizing = "right"; 16 | vertSizing = "center"; 17 | position = "5 42"; 18 | extent = "156 396"; 19 | minExtent = "8 8"; 20 | visible = "1"; 21 | bitmap = "~/client/ui/hudfill.png"; 22 | wrap = "0"; 23 | helpTag = "0"; 24 | 25 | new GuiTextCtrl() { 26 | profile = "HUDChatTextProfile"; 27 | horizSizing = "center"; 28 | vertSizing = "bottom"; 29 | position = "45 2"; 30 | extent = "65 20"; 31 | minExtent = "8 8"; 32 | visible = "1"; 33 | text = "Score Board"; 34 | maxLength = "255"; 35 | helpTag = "0"; 36 | }; 37 | new GuiTextListCtrl(PlayerListGuiList) { 38 | profile = "HUDChatTextProfile"; 39 | horizSizing = "width"; 40 | vertSizing = "height"; 41 | position = "0 22"; 42 | extent = "134 16"; 43 | minExtent = "8 8"; 44 | visible = "1"; 45 | enumerate = "0"; 46 | resizeCell = "1"; 47 | columns = "0 120"; 48 | fitParentWidth = "0"; 49 | clipColumnText = "0"; 50 | helpTag = "0"; 51 | }; 52 | }; 53 | }; 54 | //--- OBJECT WRITE END --- 55 | -------------------------------------------------------------------------------- /v1/client/ui/connectingGui.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(ConnectingGui) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | 11 | new GuiWindowCtrl() 12 | { 13 | profile = "BlockWindowProfile"; 14 | horizSizing = "center"; 15 | vertSizing = "center"; 16 | position = "140 131"; 17 | extent = "359 218"; 18 | minExtent = "8 2"; 19 | visible = 1; 20 | text = "Connection Attempt"; 21 | maxLength = 255; 22 | resizeWidth = 1; 23 | resizeHeight = 0; 24 | canMove = 1; 25 | canClose = 1; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | closeCommand = "ConnectingGui::cancel();"; 30 | 31 | new GuiBitmapButtonCtrl() 32 | { 33 | profile = "BlockButtonProfile"; 34 | horizSizing = "center"; 35 | vertSizing = "top"; 36 | position = "134 167"; 37 | extent = "91 38"; 38 | minExtent = "8 2"; 39 | visible = 1; 40 | command = "ConnectingGui::cancel();"; 41 | accelerator = "escape"; 42 | text = "<< Cancel"; 43 | groupNum = -1; 44 | buttonType = "PushButton"; 45 | bitmap = "./button2"; 46 | mKeepCached = 0; 47 | mColor = "255 255 255 255"; 48 | }; 49 | new GuiMLTextCtrl(Connecting_Text) 50 | { 51 | profile = "GuiMLTextProfile"; 52 | horizSizing = "center"; 53 | vertSizing = "bottom"; 54 | position = "11 33"; 55 | extent = "337 28"; 56 | minExtent = "8 2"; 57 | visible = 1; 58 | lineSpacing = 2; 59 | allowColorChars = 0; 60 | maxChars = -1; 61 | text = "Connecting to 12.234.13"; 62 | }; 63 | }; 64 | }; 65 | -------------------------------------------------------------------------------- /beta/client/scripts/changeMapGui.cs: -------------------------------------------------------------------------------- 1 | function changeMapGui::onWake(%this) 2 | { 3 | if (changeMapList.rowCount() <= 0) 4 | { 5 | changeMapList.clear(); 6 | commandToServer('getMapList'); 7 | } 8 | } 9 | 10 | function changeMapGui::onSleep(%this) 11 | { 12 | } 13 | 14 | function changeMapList::select(%this) 15 | { 16 | %selectedID = %this.getSelectedId(); 17 | %row = %this.getRowTextById(%selectedID); 18 | %name = getField(%row, 0); 19 | %picture = getField(%row, 1); 20 | %fileName = getField(%row, 2); 21 | %description = %this.description[%selectedID]; 22 | changeMapPreview.setBitmap(%picture); 23 | changeMapName.setValue(%name); 24 | if (strlen(%description) > 1) 25 | { 26 | changeMapDescription.setValue(%description); 27 | } 28 | else 29 | { 30 | %description = getMissionDescription(%fileName); 31 | if (strlen(%description) > 1) 32 | { 33 | changeMapDescription.setText(%description); 34 | %this.description[%selectedID] = %description; 35 | } 36 | } 37 | } 38 | 39 | function changeMapButton::click(%this) 40 | { 41 | %row = changeMapList.getRowTextById(changeMapList.getSelectedId()); 42 | %fileName = getField(%row, 2); 43 | if (strlen(%fileName) > 1) 44 | { 45 | commandToServer('changeMap', %fileName); 46 | } 47 | } 48 | 49 | function clientCmdUpdateMapList(%entry) 50 | { 51 | echo("client recieved map entry ", %entry); 52 | changeMapList.addRow(changeMapList.rowCount(), %entry); 53 | changeMapList.sort(0); 54 | changeMapList.setSelectedRow(0); 55 | } 56 | 57 | function clientCmdClearMapList() 58 | { 59 | changeMapList.clear(); 60 | for (%i = 0; changeMapList.description[%i] !$= ""; %i++) 61 | { 62 | changeMapList.description[%i] = ""; 63 | } 64 | } 65 | 66 | -------------------------------------------------------------------------------- /v1/client/ui/AddOnsGui.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(AddOnsGui) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | 11 | new GuiWindowCtrl() 12 | { 13 | profile = "GuiWindowProfile"; 14 | horizSizing = "center"; 15 | vertSizing = "center"; 16 | position = "180 78"; 17 | extent = "280 323"; 18 | minExtent = "8 2"; 19 | visible = 1; 20 | text = "Add-Ons"; 21 | maxLength = 255; 22 | resizeWidth = 0; 23 | resizeHeight = 1; 24 | canMove = 1; 25 | canClose = 1; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | closeCommand = "canvas.popDialog(AddOnsGui);"; 30 | 31 | new GuiScrollCtrl(AOG_Scroll) 32 | { 33 | profile = "GuiScrollProfile"; 34 | horizSizing = "right"; 35 | vertSizing = "bottom"; 36 | position = "10 34"; 37 | extent = "261 223"; 38 | minExtent = "8 2"; 39 | visible = 1; 40 | willFirstRespond = 1; 41 | hScrollBar = "alwaysOff"; 42 | vScrollBar = "alwaysOn"; 43 | constantThumbHeight = 0; 44 | childMargin = "0 0"; 45 | rowHeight = 40; 46 | columnWidth = 30; 47 | }; 48 | new GuiBitmapButtonCtrl() 49 | { 50 | profile = "BlockButtonProfile"; 51 | horizSizing = "center"; 52 | vertSizing = "top"; 53 | position = "94 270"; 54 | extent = "91 38"; 55 | minExtent = "8 2"; 56 | visible = 1; 57 | command = "canvas.popDialog(AddOnsGui);"; 58 | accelerator = "escape"; 59 | text = "Done"; 60 | groupNum = -1; 61 | buttonType = "PushButton"; 62 | bitmap = "./button2"; 63 | mKeepCached = 0; 64 | mColor = "255 255 255 255"; 65 | }; 66 | }; 67 | }; 68 | -------------------------------------------------------------------------------- /v1/data/shapes/player/player.cs: -------------------------------------------------------------------------------- 1 | datablock TSShapeConstructor(mDts) 2 | { 3 | baseShape = "./m.dts"; 4 | sequence0 = "./m_root.dsq root"; 5 | sequence1 = "./m_run.dsq run"; 6 | sequence2 = "./m_run.dsq walk"; 7 | sequence3 = "./m_back.dsq back"; 8 | sequence4 = "./m_side.dsq side"; 9 | sequence5 = "./m_crouch.dsq crouch"; 10 | sequence6 = "./m_crouchRun.dsq crouchRun"; 11 | sequence7 = "./m_crouchBack.dsq crouchBack"; 12 | sequence8 = "./m_crouchSide.dsq crouchSide"; 13 | sequence9 = "./m_look.dsq look"; 14 | sequence10 = "./m_headSide.dsq headside"; 15 | sequence11 = "./m_headup.dsq headUp"; 16 | sequence12 = "./m_standjump.dsq jump"; 17 | sequence13 = "./m_standjump.dsq standjump"; 18 | sequence14 = "./m_fall.dsq fall"; 19 | sequence15 = "./m_root.dsq land"; 20 | sequence16 = "./m_armAttack.dsq armAttack"; 21 | sequence17 = "./m_armReadyLeft.dsq armReadyLeft"; 22 | sequence18 = "./m_armReadyRight.dsq armReadyRight"; 23 | sequence19 = "./m_armReadyBoth.dsq armReadyBoth"; 24 | sequence20 = "./m_spearReady.dsq spearready"; 25 | sequence21 = "./m_spearThrow.dsq spearThrow"; 26 | sequence22 = "./m_talk.dsq talk"; 27 | sequence23 = "./m_death1.dsq death1"; 28 | sequence24 = "./m_shiftUp.dsq shiftUp"; 29 | sequence25 = "./m_shiftDown.dsq shiftDown"; 30 | sequence26 = "./m_shiftAway.dsq shiftAway"; 31 | sequence27 = "./m_shiftTo.dsq shiftTo"; 32 | sequence28 = "./m_shiftLeft.dsq shiftLeft"; 33 | sequence29 = "./m_shiftRight.dsq shiftRight"; 34 | sequence30 = "./m_rotCW.dsq rotCW"; 35 | sequence31 = "./m_rotCCW.dsq rotCCW"; 36 | sequence32 = "./m_undo.dsq undo"; 37 | sequence33 = "./m_plant.dsq plant"; 38 | sequence34 = "./m_sit.dsq sit"; 39 | sequence35 = "./m_wrench.dsq wrench"; 40 | }; 41 | -------------------------------------------------------------------------------- /beta/client/defaults.cs: -------------------------------------------------------------------------------- 1 | $pref::Player::Name = "Test Guy"; 2 | $pref::Player::defaultFov = 90; 3 | $pref::Player::zoomSpeed = 0; 4 | $Pref::Net::LagThreshold = 400; 5 | $pref::shadows = 2; 6 | $pref::HudMessageLogSize = 40; 7 | $pref::ChatHudLength = 1; 8 | $pref::Input::LinkMouseSensitivity = 1; 9 | $pref::Input::KeyboardEnabled = 1; 10 | $pref::Input::MouseEnabled = 1; 11 | $pref::Input::JoystickEnabled = 0; 12 | $pref::Input::KeyboardTurnSpeed = 0.1; 13 | $pref::sceneLighting::cacheSize = 20000; 14 | $pref::sceneLighting::purgeMethod = "lastCreated"; 15 | $pref::sceneLighting::cacheLighting = 1; 16 | $pref::sceneLighting::terrainGenerateLevel = 1; 17 | $pref::Terrain::dynamicLights = 1; 18 | $pref::Interior::TexturedFog = 0; 19 | $pref::Video::displayDevice = "OpenGL"; 20 | $pref::Video::allowOpenGL = 1; 21 | $pref::Video::allowD3D = 1; 22 | $pref::Video::preferOpenGL = 1; 23 | $pref::Video::appliedPref = 0; 24 | $pref::Video::disableVerticalSync = 1; 25 | $pref::Video::monitorNum = 0; 26 | $pref::Video::windowedRes = "800 600"; 27 | $pref::Video::screenShotFormat = "PNG"; 28 | $pref::OpenGL::force16BitTexture = 0; 29 | $pref::OpenGL::forcePalettedTexture = 0; 30 | $pref::OpenGL::maxHardwareLights = 3; 31 | $pref::visibleDistanceMod = 1; 32 | $pref::Audio::driver = "OpenAL"; 33 | $pref::Audio::forceMaxDistanceUpdate = 0; 34 | $pref::Audio::environmentEnabled = 0; 35 | $pref::Audio::masterVolume = 0.8; 36 | $pref::Audio::channelVolume1 = 0.8; 37 | $pref::Audio::channelVolume2 = 0.8; 38 | $pref::Audio::channelVolume3 = 0.8; 39 | $pref::Audio::channelVolume4 = 0.8; 40 | $pref::Audio::channelVolume5 = 0.8; 41 | $pref::Audio::channelVolume6 = 0.8; 42 | $pref::Audio::channelVolume7 = 0.8; 43 | $pref::Audio::channelVolume8 = 0.8; 44 | -------------------------------------------------------------------------------- /v1/client/ui/musicFilesGui.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(MusicFilesGui) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | 11 | new GuiWindowCtrl() 12 | { 13 | profile = "GuiWindowProfile"; 14 | horizSizing = "center"; 15 | vertSizing = "center"; 16 | position = "180 78"; 17 | extent = "280 323"; 18 | minExtent = "8 2"; 19 | visible = 1; 20 | text = "Music Files"; 21 | maxLength = 255; 22 | resizeWidth = 0; 23 | resizeHeight = 1; 24 | canMove = 1; 25 | canClose = 1; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | closeCommand = "canvas.popDialog(MusicFilesGui);"; 30 | 31 | new GuiScrollCtrl(MFG_Scroll) 32 | { 33 | profile = "GuiScrollProfile"; 34 | horizSizing = "right"; 35 | vertSizing = "bottom"; 36 | position = "10 34"; 37 | extent = "261 223"; 38 | minExtent = "8 2"; 39 | visible = 1; 40 | willFirstRespond = 1; 41 | hScrollBar = "alwaysOff"; 42 | vScrollBar = "alwaysOn"; 43 | constantThumbHeight = 0; 44 | childMargin = "0 0"; 45 | rowHeight = 40; 46 | columnWidth = 30; 47 | }; 48 | new GuiBitmapButtonCtrl() 49 | { 50 | profile = "BlockButtonProfile"; 51 | horizSizing = "center"; 52 | vertSizing = "top"; 53 | position = "94 270"; 54 | extent = "91 38"; 55 | minExtent = "8 2"; 56 | visible = 1; 57 | command = "canvas.popDialog(MusicFilesGui);"; 58 | accelerator = "escape"; 59 | text = "Done"; 60 | groupNum = -1; 61 | buttonType = "PushButton"; 62 | bitmap = "./button2"; 63 | mKeepCached = 0; 64 | mColor = "255 255 255 255"; 65 | }; 66 | }; 67 | }; 68 | -------------------------------------------------------------------------------- /v1/client/ui/newMessageHud.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(newMessageHud) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | channel = "TEAM"; 11 | noCursor = 1; 12 | 13 | new GuiSwatchCtrl(NMH_Box) 14 | { 15 | profile = "GuiDefaultProfile"; 16 | horizSizing = "width"; 17 | vertSizing = "bottom"; 18 | position = "0 416"; 19 | extent = "636 40"; 20 | minExtent = "8 2"; 21 | visible = 1; 22 | color = "0 0 0 0"; 23 | 24 | new GuiTextCtrl(NMH_Channel) 25 | { 26 | profile = "BlockChatChannelSize10Profile"; 27 | horizSizing = "right"; 28 | vertSizing = "height"; 29 | position = "2 0"; 30 | extent = "190 40"; 31 | minExtent = "8 2"; 32 | visible = 1; 33 | maxLength = 255; 34 | }; 35 | new GuiTextEditCtrl(NMH_Type) 36 | { 37 | profile = "HUDChatTextEditSize10Profile"; 38 | horizSizing = "width"; 39 | vertSizing = "bottom"; 40 | position = "89 0"; 41 | extent = "545 40"; 42 | minExtent = "8 2"; 43 | visible = 1; 44 | command = "$Thiscontrol.type();"; 45 | altCommand = "$Thiscontrol.send();"; 46 | maxLength = 255; 47 | historySize = 10; 48 | password = 0; 49 | tabComplete = 0; 50 | sinkAllKeyEvents = 0; 51 | }; 52 | }; 53 | new GuiButtonCtrl() 54 | { 55 | profile = "GuiButtonProfile"; 56 | horizSizing = "right"; 57 | vertSizing = "bottom"; 58 | position = "-200 -200"; 59 | extent = "140 30"; 60 | minExtent = "8 2"; 61 | visible = 1; 62 | command = "canvas.popDialog(newMessageHud);"; 63 | accelerator = "escape"; 64 | text = "Button"; 65 | groupNum = -1; 66 | buttonType = "PushButton"; 67 | }; 68 | }; 69 | -------------------------------------------------------------------------------- /v21/server/init.cs: -------------------------------------------------------------------------------- 1 | function initServer() 2 | { 3 | %dashes = ""; 4 | %version = atoi($Version); 5 | %version = mClampF(%version, 0, 25); 6 | for (%i = 0; %i < %version; %i++) 7 | { 8 | %dashes = %dashes @ "-"; 9 | } 10 | echo("\n--------- Initializing Base: Server " @ %dashes); 11 | $useSteam = 0; 12 | $useSteam = SteamAPI_Init(); 13 | if ($useSteam) 14 | { 15 | echo("Steam initialized..."); 16 | } 17 | $Server::Status = "Unknown"; 18 | $Server::TestCheats = 1; 19 | initBaseServer(); 20 | exec("./scripts/game.cs"); 21 | } 22 | 23 | function initDedicated() 24 | { 25 | enableWinConsole(1); 26 | echo("\n--------- Starting Dedicated Server ---------"); 27 | $Server::Dedicated = 1; 28 | $Server::LAN = 0; 29 | createServer("Internet"); 30 | } 31 | 32 | function initDedicatedLAN() 33 | { 34 | enableWinConsole(1); 35 | echo("\n--------- Starting Dedicated LAN Server ---------"); 36 | $Server::Dedicated = 1; 37 | $Server::LAN = 1; 38 | createServer("LAN"); 39 | } 40 | 41 | function serverPart2() 42 | { 43 | if ($Server::Dedicated) 44 | { 45 | if ($Server::LAN) 46 | { 47 | initDedicatedLAN(); 48 | } 49 | else if ($Server::LAN) 50 | { 51 | initDedicatedLAN(); 52 | } 53 | else 54 | { 55 | initDedicated(); 56 | } 57 | } 58 | else 59 | { 60 | initClient(); 61 | } 62 | if ($connectArg !$= "" && !$Server::Dedicated) 63 | { 64 | Connecting_Text.setText("Connecting to " @ $connectArg); 65 | Canvas.pushDialog(connectingGui); 66 | } 67 | if ($GameModeArg !$= "" && !$Server::Dedicated) 68 | { 69 | setTimeScale(10); 70 | $Pref::Net::ServerType = "SinglePlayer"; 71 | createServer($Pref::Net::ServerType); 72 | ConnectToServer("local", $Pref::Server::Password, 1, 0); 73 | } 74 | } 75 | 76 | -------------------------------------------------------------------------------- /v21/client/canvas.cs: -------------------------------------------------------------------------------- 1 | function initCanvas(%windowName) 2 | { 3 | videoSetGammaCorrection($pref::OpenGL::gammaCorrection); 4 | if (!createCanvas(%windowName)) 5 | { 6 | quit(); 7 | return; 8 | } 9 | setOpenGLTextureCompressionHint($pref::OpenGL::compressionHint); 10 | setOpenGLAnisotropy($pref::OpenGL::anisotropy); 11 | setOpenGLMipReduction($pref::OpenGL::mipReduction); 12 | setOpenGLSkyMipReduction($pref::OpenGL::skyMipReduction); 13 | OpenALInit(); 14 | } 15 | 16 | function resetCanvas() 17 | { 18 | echo("Resetting Canvas..."); 19 | if (isObject(PlayGui)) 20 | { 21 | PlayGui.setHasRendered(0); 22 | } 23 | } 24 | 25 | function onWindowReactivate() 26 | { 27 | if ($windowReactivating) 28 | { 29 | return; 30 | } 31 | echo("Window reactivating..."); 32 | $windowReactivating = 1; 33 | if (isFullScreen() && isObject(Canvas)) 34 | { 35 | if (isObject(PlayGui)) 36 | { 37 | PlayGui.setHasRendered(0); 38 | } 39 | %oldShaderEnabled = $Shader::Enabled; 40 | $Shader::Enabled = 0; 41 | Canvas.repaint(); 42 | flushTextureCache(); 43 | regenerateShadowMapFBOs(); 44 | Canvas.repaint(); 45 | $Shader::Enabled = %oldShaderEnabled; 46 | if ($Shader::Enabled) 47 | { 48 | initializeShaderAssets(); 49 | } 50 | } 51 | $windowReactivating = 0; 52 | } 53 | 54 | function restartAudio() 55 | { 56 | OpenALInit(); 57 | if (!isObject(ServerConnection)) 58 | { 59 | return; 60 | } 61 | %group = ServerConnection.getId(); 62 | %count = %group.getCount(); 63 | for (%i = 0; %i < %count; %i++) 64 | { 65 | %obj = %group.getObject(%i); 66 | if (%obj.getClassName() $= "AudioEmitter") 67 | { 68 | %profile = %obj.profile; 69 | %obj.profile = 0; 70 | %obj.profile = %profile; 71 | %obj.schedule(10, update); 72 | } 73 | } 74 | } 75 | 76 | -------------------------------------------------------------------------------- /beta/client/scripts/whosTalking.cs: -------------------------------------------------------------------------------- 1 | function WhoTalk_Init() 2 | { 3 | if (isObject($WhoTalkSO)) 4 | { 5 | $WhoTalkSO.delete(); 6 | } 7 | $WhoTalkSO = new ScriptObject() 8 | { 9 | class = WhoTalkSO; 10 | textObj = chatWhosTalkingText.getId(); 11 | count = 0; 12 | }; 13 | } 14 | 15 | function WhoTalk_addID(%client) 16 | { 17 | if (!isObject($WhoTalkSO)) 18 | { 19 | WhoTalk_Init(); 20 | } 21 | $WhoTalkSO.addID(%client); 22 | } 23 | 24 | function WhoTalk_removeID(%client) 25 | { 26 | if (!isObject($WhoTalkSO)) 27 | { 28 | return; 29 | } 30 | $WhoTalkSO.removeID(%client); 31 | } 32 | 33 | function WhoTalkSO::addID(%this, %client) 34 | { 35 | if (%this.HasID(%client)) 36 | { 37 | return; 38 | } 39 | %this.id[%this.count] = %client; 40 | %this.count++; 41 | %this.Display(); 42 | } 43 | 44 | function WhoTalkSO::removeID(%this, %client) 45 | { 46 | for (%i = 0; %i < %this.count; %i++) 47 | { 48 | if (%this.id[%i] == %client) 49 | { 50 | for (%j = %i + 1; %j < %this.count; %j++) 51 | { 52 | %this.id[%j - 1] = %this.id[%j]; 53 | } 54 | %this.count--; 55 | %this.Display(); 56 | return; 57 | } 58 | } 59 | } 60 | 61 | function WhoTalkSO::HasID(%this, %client) 62 | { 63 | for (%i = 0; %i < %this.count; %i++) 64 | { 65 | if (%this.id[%i] == %client) 66 | { 67 | return 1; 68 | } 69 | } 70 | return 0; 71 | } 72 | 73 | function WhoTalkSO::Display(%this) 74 | { 75 | %text = %this.textObj; 76 | if (isObject(%text)) 77 | { 78 | %buff = ""; 79 | for (%i = 0; %i < %this.count; %i++) 80 | { 81 | %buff = %buff @ " " @ lstAdminPlayerList.getRowTextById(%this.id[%i]); 82 | } 83 | %text.setText(%buff); 84 | } 85 | else 86 | { 87 | error("ERROR: WhoTalkSO::Display() - text object not found."); 88 | } 89 | } 90 | 91 | -------------------------------------------------------------------------------- /v1/client/cursor.cs: -------------------------------------------------------------------------------- 1 | $cursorControlled = 1; 2 | function cursorOff() 3 | { 4 | if ($cursorControlled) 5 | { 6 | lockMouse(1); 7 | } 8 | Canvas.cursorOff(); 9 | } 10 | 11 | function cursorOn() 12 | { 13 | if ($cursorControlled) 14 | { 15 | lockMouse(0); 16 | } 17 | Canvas.cursorOn(); 18 | Canvas.setCursor(DefaultCursor); 19 | } 20 | 21 | package CanvasCursor 22 | { 23 | function GuiCanvas::checkCursor(%this) 24 | { 25 | %cursorShouldBeOn = 0; 26 | for (%i = 0; %i < %this.getCount(); %i++) 27 | { 28 | %control = %this.getObject(%i); 29 | if (%control.noCursor $= "") 30 | { 31 | %cursorShouldBeOn = 1; 32 | break; 33 | } 34 | } 35 | if (%cursorShouldBeOn != %this.isCursorOn()) 36 | { 37 | if (%cursorShouldBeOn) 38 | { 39 | cursorOn(); 40 | } 41 | else 42 | { 43 | cursorOff(); 44 | } 45 | } 46 | %this.checkTabFocus(); 47 | } 48 | 49 | function GuiCanvas::checkTabFocus(%this) 50 | { 51 | for (%i = 0; %i < %this.getCount(); %i++) 52 | { 53 | %control = %this.getObject(%i); 54 | if (%control.noTabFocus == 1) 55 | { 56 | %this.canTabFocus(0); 57 | return; 58 | } 59 | } 60 | %this.canTabFocus(1); 61 | } 62 | 63 | function GuiCanvas::setContent(%this, %ctrl) 64 | { 65 | Parent::setContent(%this, %ctrl); 66 | %this.checkCursor(); 67 | } 68 | 69 | function GuiCanvas::pushDialog(%this, %ctrl) 70 | { 71 | Parent::pushDialog(%this, %ctrl); 72 | %this.checkCursor(); 73 | } 74 | 75 | function GuiCanvas::popDialog(%this, %ctrl) 76 | { 77 | Parent::popDialog(%this, %ctrl); 78 | %this.checkCursor(); 79 | } 80 | 81 | function GuiCanvas::popLayer(%this, %layer) 82 | { 83 | Parent::popLayer(%this, %layer); 84 | %this.checkCursor(); 85 | } 86 | 87 | }; 88 | activatePackage(CanvasCursor); 89 | -------------------------------------------------------------------------------- /v20/server/defaultAddOnList.cs: -------------------------------------------------------------------------------- 1 | $AddOn__Brick_Large_Cubes = 1; 2 | $AddOn__Brick_Arch = 1; 3 | $AddOn__Brick_V15 = 1; 4 | $AddOn__Emote_Alarm = 1; 5 | $AddOn__Emote_Confusion = 1; 6 | $AddOn__Emote_Hate = 1; 7 | $AddOn__Emote_Love = 1; 8 | $AddOn__Item_Skis = 1; 9 | $AddOn__Light_Animated = 1; 10 | $AddOn__Light_Basic = 1; 11 | $AddOn__Particle_Basic = 1; 12 | $AddOn__Particle_FX_Cans = 1; 13 | $AddOn__Particle_Grass = 1; 14 | $AddOn__Particle_Player = 1; 15 | $AddOn__Particle_Tools = 1; 16 | $AddOn__Player_Fuel_Jet = 1; 17 | $AddOn__Player_Jump_Jet = 1; 18 | $AddOn__Player_Leap_Jet = 1; 19 | $AddOn__Player_No_Jet = 1; 20 | $AddOn__Player_Quake = 1; 21 | $AddOn__Projectile_GravityRocket = 1; 22 | $AddOn__Projectile_Pinball = 1; 23 | $AddOn__Projectile_Pong = 1; 24 | $AddOn__Projectile_Radio_Wave = 1; 25 | $AddOn__Sound_Synth4 = 1; 26 | $AddOn__Sound_Beeps = 1; 27 | $AddOn__Sound_Phone = 1; 28 | $AddOn__Vehicle_Ball = 1; 29 | $AddOn__Vehicle_Flying_Wheeled_Jeep = 1; 30 | $AddOn__Vehicle_Horse = 1; 31 | $AddOn__Vehicle_Jeep = 1; 32 | $AddOn__Vehicle_Magic_Carpet = 1; 33 | $AddOn__Vehicle_Tank = 1; 34 | $AddOn__Weapon_Bow = 1; 35 | $AddOn__Weapon_Gun = 1; 36 | $AddOn__Weapon_Guns_Akimbo = 1; 37 | $AddOn__Weapon_Horse_Ray = 1; 38 | $AddOn__Weapon_Push_Broom = 1; 39 | $AddOn__Weapon_Rocket_Launcher = 1; 40 | $AddOn__Weapon_Spear = 1; 41 | $AddOn__Weapon_Sword = 1; 42 | $AddOn__Print_1x2f_Default = 1; 43 | $AddOn__Print_2x2f_Default = 1; 44 | $AddOn__Print_2x2r_Default = 1; 45 | $AddOn__Print_Letters_Default = 1; 46 | $AddOn__Print_2x2r_Monitor3 = 1; 47 | $AddOn__Print_1x2f_BLPRemote = 1; 48 | $AddOn__Vehicle_Pirate_Cannon = 1; 49 | $AddOn__Vehicle_Rowboat = 1; 50 | $AddOn__Item_Key = 1; 51 | $AddOn__Brick_Checkpoint = 1; 52 | $AddOn__Brick_Treasure_Chest = 1; 53 | $AddOn__Brick_Halloween = 1; 54 | $AddOn__Brick_Teledoor = 1; 55 | -------------------------------------------------------------------------------- /beta/client/ui/endGameGui.gui: -------------------------------------------------------------------------------- 1 | new GuiChunkedBitmapCtrl(EndGameGui) 2 | { 3 | profile = "GuiContentProfile"; 4 | horizSizing = "width"; 5 | vertSizing = "height"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | bitmap = "./background"; 11 | useVariable = 0; 12 | tile = 0; 13 | helpTag = 0; 14 | 15 | new GuiControl() 16 | { 17 | profile = "BlockWindowProfile"; 18 | horizSizing = "center"; 19 | vertSizing = "center"; 20 | position = "92 86"; 21 | extent = "455 308"; 22 | minExtent = "8 8"; 23 | visible = 1; 24 | helpTag = 0; 25 | 26 | new GuiTextCtrl() 27 | { 28 | profile = "GuiMediumTextProfile"; 29 | horizSizing = "right"; 30 | vertSizing = "bottom"; 31 | position = "101 15"; 32 | extent = "251 28"; 33 | minExtent = "8 8"; 34 | visible = 1; 35 | text = "Game Over - Final Scores:"; 36 | maxLength = 255; 37 | helpTag = 0; 38 | }; 39 | new GuiScrollCtrl() 40 | { 41 | profile = "GuiScrollProfile"; 42 | horizSizing = "width"; 43 | vertSizing = "height"; 44 | position = "5 51"; 45 | extent = "444 251"; 46 | minExtent = "8 8"; 47 | visible = 1; 48 | willFirstRespond = 1; 49 | hScrollBar = "alwaysOff"; 50 | vScrollBar = "dynamic"; 51 | constantThumbHeight = 0; 52 | childMargin = "0 0"; 53 | defaultLineHeight = 15; 54 | helpTag = 0; 55 | 56 | new GuiTextListCtrl(EndGameGuiList) 57 | { 58 | profile = "GuiTextProfile"; 59 | horizSizing = "width"; 60 | vertSizing = "height"; 61 | position = "1 1"; 62 | extent = "442 8"; 63 | minExtent = "8 8"; 64 | visible = 1; 65 | enumerate = 0; 66 | resizeCell = 1; 67 | columns = "0 256"; 68 | fitParentWidth = 1; 69 | clipColumnText = 0; 70 | helpTag = 0; 71 | }; 72 | }; 73 | }; 74 | }; 75 | -------------------------------------------------------------------------------- /v1/server/scripts/DamageTypes.cs: -------------------------------------------------------------------------------- 1 | function AddDamageType(%name, %deathMessageSuicide, %deathMessageMurder, %vehicleDamageScale, %direct) 2 | { 3 | eval("%exists = $DamageType::" @ %name @ ";"); 4 | if (%exists > 0) 5 | { 6 | %idx = %exists; 7 | } 8 | else 9 | { 10 | $MaxDamageType++; 11 | %idx = $MaxDamageType; 12 | eval("$DamageType::" @ %name @ " = $maxDamageType;"); 13 | } 14 | $DamageType_Array[%idx] = %name; 15 | $DeathMessage_Suicide[%idx] = %deathMessageSuicide; 16 | $DeathMessage_Murder[%idx] = %deathMessageMurder; 17 | if (%vehicleDamageScale $= "") 18 | { 19 | %vehicleDamageScale = 1; 20 | } 21 | $Damage::VehicleDamageScale[%idx] = %vehicleDamageScale; 22 | if (%direct $= "") 23 | { 24 | %direct = 0; 25 | } 26 | $Damage::Direct[%idx] = %direct; 27 | } 28 | 29 | function initDefaultDamageTypes() 30 | { 31 | $MaxDamageType = 0; 32 | AddDamageType("Default", ' %1', '%2 %1!', 1, 0); 33 | AddDamageType("Suicide", ' %1', '%2 %1', 1, 0); 34 | AddDamageType("Direct", ' %1', '%2 %1', 1, 1); 35 | AddDamageType("Radius", ' %1', '%2 %1', 1, 0); 36 | AddDamageType("Impact", ' %1', '%2 %1', 1, 0); 37 | AddDamageType("Fall", ' %1', '%2 %1', 1, 0); 38 | AddDamageType("Vehicle", ' %1', '%2 %1', 1, 0); 39 | } 40 | 41 | function dumpDamageTypes() 42 | { 43 | for (%i = 1; %i <= $MaxDamageType; %i++) 44 | { 45 | echo($DamageType_Array[%i]); 46 | echo(" SuicideMsg: ", getTaggedString($DeathMessage_Suicide[%i])); 47 | echo(" MurderMsg: ", getTaggedString($DeathMessage_Murder[%i])); 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /beta/client/scripts/centerPrint.cs: -------------------------------------------------------------------------------- 1 | $centerPrintActive = 0; 2 | $bottomPrintActive = 0; 3 | $CenterPrintSizes[1] = 20; 4 | $CenterPrintSizes[2] = 36; 5 | $CenterPrintSizes[3] = 56; 6 | function clientCmdCenterPrint(%message, %time, %size) 7 | { 8 | if ($centerPrintActive) 9 | { 10 | if (CenterPrintDlg.removePrint !$= "") 11 | { 12 | cancel(CenterPrintDlg.removePrint); 13 | } 14 | } 15 | else 16 | { 17 | CenterPrintDlg.visible = 1; 18 | $centerPrintActive = 1; 19 | } 20 | CenterPrintText.setText("" @ %message); 21 | CenterPrintDlg.extent = firstWord(CenterPrintDlg.extent) @ " " @ $CenterPrintSizes[%size]; 22 | if (%time > 0) 23 | { 24 | CenterPrintDlg.removePrint = schedule(%time * 1000, 0, "clientCmdClearCenterPrint"); 25 | } 26 | } 27 | 28 | function clientCmdBottomPrint(%message, %time, %size) 29 | { 30 | if ($bottomPrintActive) 31 | { 32 | if (BottomPrintDlg.removePrint !$= "") 33 | { 34 | cancel(BottomPrintDlg.removePrint); 35 | } 36 | } 37 | else 38 | { 39 | BottomPrintDlg.setVisible(1); 40 | $bottomPrintActive = 1; 41 | } 42 | BottomPrintText.setText("" @ %message); 43 | BottomPrintDlg.extent = firstWord(BottomPrintDlg.extent) @ " " @ $CenterPrintSizes[%size]; 44 | if (%time > 0) 45 | { 46 | BottomPrintDlg.removePrint = schedule(%time * 1000, 0, "clientCmdClearbottomPrint"); 47 | } 48 | } 49 | 50 | function BottomPrintText::onResize(%this, %__unused, %__unused) 51 | { 52 | %this.position = "0 0"; 53 | } 54 | 55 | function CenterPrintText::onResize(%this, %__unused, %__unused) 56 | { 57 | %this.position = "0 0"; 58 | } 59 | 60 | function clientCmdClearCenterPrint() 61 | { 62 | $centerPrintActive = 0; 63 | CenterPrintDlg.visible = 0; 64 | CenterPrintDlg.removePrint = ""; 65 | } 66 | 67 | function clientCmdclearBottomPrint() 68 | { 69 | $bottomPrintActive = 0; 70 | BottomPrintDlg.visible = 0; 71 | BottomPrintDlg.removePrint = ""; 72 | } 73 | 74 | -------------------------------------------------------------------------------- /v1/client/missionDownload.cs: -------------------------------------------------------------------------------- 1 | function clientCmdMissionStartPhase1(%seq, %missionName, %musicTrack) 2 | { 3 | echo("*** New Mission: " @ %missionName); 4 | echo("*** Phase 1: Download Datablocks & Targets"); 5 | onMissionDownloadPhase1(%missionName, %musicTrack); 6 | commandToServer('MissionStartPhase1Ack', %seq); 7 | } 8 | 9 | function onDataBlockObjectReceived(%index, %total) 10 | { 11 | onPhase1Progress(%index / %total); 12 | } 13 | 14 | function clientCmdMissionStartPhase2(%seq, %missionName) 15 | { 16 | onPhase1Complete(); 17 | echo("*** Phase 2: Download Ghost Objects"); 18 | purgeResources(); 19 | onMissionDownloadPhase2(%missionName); 20 | commandToServer('MissionStartPhase2Ack', %seq); 21 | } 22 | 23 | function onGhostAlwaysStarted(%ghostCount) 24 | { 25 | $ghostCount = %ghostCount; 26 | $ghostsRecvd = 0; 27 | } 28 | 29 | function onGhostAlwaysObjectReceived() 30 | { 31 | $ghostsRecvd++; 32 | onPhase2Progress($ghostsRecvd / $ghostCount); 33 | } 34 | 35 | function clientCmdMissionStartPhase3(%seq, %missionName) 36 | { 37 | onPhase2Complete(); 38 | StartClientReplication(); 39 | StartFoliageReplication(); 40 | StartGrassReplication(); 41 | echo("*** Phase 3: Mission Lighting"); 42 | $MSeq = %seq; 43 | $Client::MissionFile = %missionName; 44 | if (lightScene("sceneLightingComplete", "")) 45 | { 46 | error("Lighting mission...."); 47 | schedule(1, 0, "updateLightingProgress"); 48 | onMissionDownloadPhase3(%missionName); 49 | $lightingMission = 1; 50 | } 51 | } 52 | 53 | function updateLightingProgress() 54 | { 55 | onPhase3Progress($SceneLighting::lightingProgress); 56 | if ($lightingMission) 57 | { 58 | $lightingProgressThread = schedule(1, 0, "updateLightingProgress"); 59 | } 60 | } 61 | 62 | function sceneLightingComplete() 63 | { 64 | echo("Mission lighting done"); 65 | onPhase3Complete(); 66 | onMissionDownloadComplete(); 67 | commandToServer('MissionStartPhase3Ack', $MSeq); 68 | } 69 | 70 | -------------------------------------------------------------------------------- /beta/client/missionDownload.cs: -------------------------------------------------------------------------------- 1 | function clientCmdMissionStartPhase1(%seq, %missionName, %musicTrack) 2 | { 3 | echo("*** New Mission: " @ %missionName); 4 | echo("*** Phase 1: Download Datablocks & Targets"); 5 | onMissionDownloadPhase1(%missionName, %musicTrack); 6 | commandToServer('MissionStartPhase1Ack', %seq); 7 | } 8 | 9 | function onDataBlockObjectReceived(%index, %total) 10 | { 11 | onPhase1Progress(%index / %total); 12 | } 13 | 14 | function clientCmdMissionStartPhase2(%seq, %missionName) 15 | { 16 | onPhase1Complete(); 17 | echo("*** Phase 2: Download Ghost Objects"); 18 | purgeResources(); 19 | onMissionDownloadPhase2(%missionName); 20 | commandToServer('MissionStartPhase2Ack', %seq); 21 | } 22 | 23 | function onGhostAlwaysStarted(%ghostCount) 24 | { 25 | $ghostCount = %ghostCount; 26 | $ghostsRecvd = 0; 27 | } 28 | 29 | function onGhostAlwaysObjectReceived() 30 | { 31 | $ghostsRecvd++; 32 | onPhase2Progress($ghostsRecvd / $ghostCount); 33 | } 34 | 35 | function clientCmdMissionStartPhase3(%seq, %missionName) 36 | { 37 | onPhase2Complete(); 38 | StartClientReplication(); 39 | StartFoliageReplication(); 40 | StartGrassReplication(); 41 | echo("*** Phase 3: Mission Lighting"); 42 | $MSeq = %seq; 43 | $Client::MissionFile = %missionName; 44 | if (lightScene("sceneLightingComplete", "")) 45 | { 46 | error("Lighting mission...."); 47 | schedule(1, 0, "updateLightingProgress"); 48 | onMissionDownloadPhase3(%missionName); 49 | $lightingMission = 1; 50 | } 51 | } 52 | 53 | function updateLightingProgress() 54 | { 55 | onPhase3Progress($SceneLighting::lightingProgress); 56 | if ($lightingMission) 57 | { 58 | $lightingProgressThread = schedule(1, 0, "updateLightingProgress"); 59 | } 60 | } 61 | 62 | function sceneLightingComplete() 63 | { 64 | echo("Mission lighting done"); 65 | onPhase3Complete(); 66 | onMissionDownloadComplete(); 67 | commandToServer('MissionStartPhase3Ack', $MSeq); 68 | } 69 | 70 | -------------------------------------------------------------------------------- /beta/client/ui/MessageHud.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(MessageHud) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "width"; 5 | vertSizing = "height"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | noCursor = 1; 11 | isTeamMsg = 0; 12 | 13 | new GuiControl(MessageHud_Frame) 14 | { 15 | profile = "GuiDefaultProfile"; 16 | horizSizing = "right"; 17 | vertSizing = "bottom"; 18 | position = "5 94"; 19 | extent = "630 29"; 20 | minExtent = "8 8"; 21 | visible = 1; 22 | 23 | new GuiSwatchCtrl(MessageHud_TextSwatch) 24 | { 25 | profile = "GuiDefaultProfile"; 26 | horizSizing = "right"; 27 | vertSizing = "bottom"; 28 | position = "0 0"; 29 | extent = "55 18"; 30 | minExtent = "8 2"; 31 | visible = 1; 32 | color = "0 0 128 128"; 33 | 34 | new GuiTextCtrl(MessageHud_Text) 35 | { 36 | profile = "HUDChatTextProfile"; 37 | horizSizing = "right"; 38 | vertSizing = "bottom"; 39 | position = "5 0"; 40 | extent = "31 18"; 41 | minExtent = "8 8"; 42 | visible = 1; 43 | text = "CHAT:"; 44 | maxLength = 255; 45 | }; 46 | }; 47 | new GuiSwatchCtrl() 48 | { 49 | profile = "GuiDefaultProfile"; 50 | horizSizing = "width"; 51 | vertSizing = "bottom"; 52 | position = "55 0"; 53 | extent = "575 18"; 54 | minExtent = "8 2"; 55 | visible = 1; 56 | color = "0 0 0 128"; 57 | 58 | new GuiTextEditCtrl(MessageHud_Edit) 59 | { 60 | profile = "HUDChatTextEditProfile"; 61 | horizSizing = "relative"; 62 | vertSizing = "bottom"; 63 | position = "0 0"; 64 | extent = "544 18"; 65 | minExtent = "8 8"; 66 | visible = 1; 67 | altCommand = "$ThisControl.eval();"; 68 | maxLength = 120; 69 | escapeCommand = "MessageHud_Edit.onEscape();"; 70 | historySize = 5; 71 | password = 0; 72 | tabComplete = 0; 73 | sinkAllKeyEvents = 0; 74 | }; 75 | }; 76 | }; 77 | }; 78 | -------------------------------------------------------------------------------- /v1/client/ui/remapDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(RemapDlg) 2 | { 3 | profile = "GuiDialogProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl(OptRemapDlg) 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "193 189"; 18 | extent = "253 102"; 19 | minExtent = "8 2"; 20 | visible = 1; 21 | text = "Re-Bind Control..."; 22 | maxLength = 255; 23 | resizeWidth = 0; 24 | resizeHeight = 0; 25 | canMove = 0; 26 | canClose = 0; 27 | canMinimize = 0; 28 | canMaximize = 0; 29 | minSize = "50 50"; 30 | 31 | new GuiTextCtrl(OptRemapText) 32 | { 33 | profile = "GuiCenterTextProfile"; 34 | horizSizing = "center"; 35 | vertSizing = "bottom"; 36 | position = "85 46"; 37 | extent = "82 18"; 38 | minExtent = "8 8"; 39 | visible = 1; 40 | text = "Re-bind control..."; 41 | maxLength = 255; 42 | helpTag = 0; 43 | }; 44 | new GuiTextCtrl() 45 | { 46 | profile = "GuiTextProfile"; 47 | horizSizing = "right"; 48 | vertSizing = "bottom"; 49 | position = "6 82"; 50 | extent = "83 18"; 51 | minExtent = "8 2"; 52 | visible = 1; 53 | text = "Escape to cancel"; 54 | maxLength = 255; 55 | }; 56 | new GuiTextCtrl() 57 | { 58 | profile = "GuiTextProfile"; 59 | horizSizing = "right"; 60 | vertSizing = "bottom"; 61 | position = "156 82"; 62 | extent = "93 18"; 63 | minExtent = "8 2"; 64 | visible = 1; 65 | text = "Backspace to clear"; 66 | maxLength = 255; 67 | }; 68 | new GuiInputCtrl(OptRemapInputCtrl) 69 | { 70 | profile = "GuiInputCtrlProfile"; 71 | horizSizing = "center"; 72 | vertSizing = "bottom"; 73 | position = "0 0"; 74 | extent = "64 64"; 75 | minExtent = "8 8"; 76 | visible = 1; 77 | helpTag = 0; 78 | }; 79 | }; 80 | }; 81 | -------------------------------------------------------------------------------- /beta/ui/MessageBoxOKCancelDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(MessageBoxOKCancelDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "width"; 5 | vertSizing = "height"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl(MBOKCancelFrame) 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "170 165"; 18 | extent = "300 149"; 19 | minExtent = "48 92"; 20 | visible = 1; 21 | maxLength = 255; 22 | resizeWidth = 1; 23 | resizeHeight = 1; 24 | canMove = 1; 25 | canClose = 0; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | helpTag = 0; 30 | 31 | new GuiMLTextCtrl(MBOKCancelText) 32 | { 33 | profile = "GuiTextProfile"; 34 | horizSizing = "center"; 35 | vertSizing = "bottom"; 36 | position = "32 39"; 37 | extent = "236 14"; 38 | minExtent = "8 8"; 39 | visible = 1; 40 | lineSpacing = 2; 41 | allowColorChars = 0; 42 | maxChars = -1; 43 | helpTag = 0; 44 | }; 45 | new GuiBitmapButtonCtrl() 46 | { 47 | profile = "BlockButtonProfile"; 48 | horizSizing = "left"; 49 | vertSizing = "top"; 50 | position = "39 94"; 51 | extent = "91 38"; 52 | minExtent = "8 2"; 53 | visible = 1; 54 | command = "MessageCallback(MessageBoxOKCancelDlg,MessageBoxOKCancelDlg.cancelCallback);"; 55 | accelerator = "escape"; 56 | text = "CANCEL"; 57 | groupNum = -1; 58 | buttonType = "PushButton"; 59 | bitmap = "~/client/ui/button2"; 60 | }; 61 | new GuiBitmapButtonCtrl() 62 | { 63 | profile = "BlockButtonProfile"; 64 | horizSizing = "left"; 65 | vertSizing = "top"; 66 | position = "171 94"; 67 | extent = "91 38"; 68 | minExtent = "8 2"; 69 | visible = 1; 70 | command = "MessageCallback(MessageBoxOKCancelDlg,MessageBoxOKCancelDlg.callback);"; 71 | text = "OK"; 72 | groupNum = -1; 73 | buttonType = "PushButton"; 74 | bitmap = "~/client/ui/button2"; 75 | }; 76 | }; 77 | }; 78 | -------------------------------------------------------------------------------- /beta/ui/MessageBoxYesNoDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(MessageBoxYesNoDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "width"; 5 | vertSizing = "height"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl(MBYesNoFrame) 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "170 180"; 18 | extent = "300 119"; 19 | minExtent = "48 92"; 20 | visible = 1; 21 | maxLength = 255; 22 | resizeWidth = 1; 23 | resizeHeight = 1; 24 | canMove = 1; 25 | canClose = 0; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | helpTag = 0; 30 | 31 | new GuiMLTextCtrl(MBYesNoText) 32 | { 33 | profile = "GuiTextProfile"; 34 | horizSizing = "center"; 35 | vertSizing = "bottom"; 36 | position = "32 39"; 37 | extent = "236 14"; 38 | minExtent = "8 8"; 39 | visible = 1; 40 | lineSpacing = 2; 41 | allowColorChars = 0; 42 | maxChars = -1; 43 | helpTag = 0; 44 | }; 45 | new GuiBitmapButtonCtrl() 46 | { 47 | profile = "BlockButtonProfile"; 48 | horizSizing = "left"; 49 | vertSizing = "top"; 50 | position = "171 64"; 51 | extent = "91 38"; 52 | minExtent = "8 2"; 53 | visible = 1; 54 | command = "MessageCallback(MessageBoxYesNoDlg,MessageBoxYesNoDlg.yesCallback);"; 55 | accelerator = "return"; 56 | text = "YES"; 57 | groupNum = -1; 58 | buttonType = "PushButton"; 59 | bitmap = "~/client/ui/button2"; 60 | }; 61 | new GuiBitmapButtonCtrl() 62 | { 63 | profile = "BlockButtonProfile"; 64 | horizSizing = "left"; 65 | vertSizing = "top"; 66 | position = "38 64"; 67 | extent = "91 38"; 68 | minExtent = "8 2"; 69 | visible = 1; 70 | command = "MessageCallback(MessageBoxYesNoDlg,MessageBoxYesNoDlg.noCallback);"; 71 | accelerator = "escape"; 72 | text = "NO"; 73 | groupNum = -1; 74 | buttonType = "PushButton"; 75 | bitmap = "~/client/ui/button2"; 76 | }; 77 | }; 78 | }; 79 | -------------------------------------------------------------------------------- /beta/client/scripts/brickControls.cs: -------------------------------------------------------------------------------- 1 | function clientCmdUseBrickControls() 2 | { 3 | if (!$UsingBrickControls) 4 | { 5 | $BC_mouseX = moveMap.getCommand("mouse0", "xaxis"); 6 | $BC_mouseY = moveMap.getCommand("mouse0", "yaxis"); 7 | $BC_mouseZ = moveMap.getCommand("mouse0", "zaxis"); 8 | $BC_mouseButton0 = moveMap.getCommand("mouse0", "button0"); 9 | $BC_mouseButton1 = moveMap.getCommand("mouse0", "button1"); 10 | $BC_mouseButton2 = moveMap.getCommand("mouse0", "button2"); 11 | moveMap.bind(mouse0, "xaxis", mouseMoveBrickX); 12 | moveMap.bind(mouse0, "yaxis", mouseMoveBrickY); 13 | moveMap.bind(mouse0, "zaxis", mouseMoveBrickZ); 14 | moveMap.bind(mouse0, "button0", plantBrick); 15 | moveMap.bind(mouse0, "button1", RotateBrickCW); 16 | moveMap.bind(mouse0, "button2", RotateBrickCCW); 17 | $UsingBrickControls = 1; 18 | } 19 | } 20 | 21 | function clientCmdStopBrickControls() 22 | { 23 | moveMap.bind(mouse0, "xaxis", $BC_mouseX); 24 | moveMap.bind(mouse0, "yaxis", $BC_mouseY); 25 | moveMap.bind(mouse0, "zaxis", $BC_mouseZ); 26 | moveMap.bind(mouse0, "button0", $BC_mouseButton0); 27 | moveMap.bind(mouse0, "button1", $BC_mouseButton1); 28 | moveMap.bind(mouse0, "button2", $BC_mouseButton2); 29 | $UsingBrickControls = 0; 30 | } 31 | 32 | function mouseMoveBrickX(%val) 33 | { 34 | $mouseBrickShiftX += %val * 0.1; 35 | if ($mouseBrickShiftX >= 1) 36 | { 37 | commandToServer('ShiftBrick', 0, -1, 0); 38 | $mouseBrickShiftX = 0; 39 | } 40 | else if ($mouseBrickShiftX <= -1) 41 | { 42 | commandToServer('ShiftBrick', 0, 1, 0); 43 | $mouseBrickShiftX = 0; 44 | } 45 | } 46 | 47 | function mouseMoveBrickY(%val) 48 | { 49 | $mouseBrickShiftY += %val * 0.1; 50 | if ($mouseBrickShiftY >= 1) 51 | { 52 | commandToServer('ShiftBrick', -1, 0, 0); 53 | $mouseBrickShiftY = 0; 54 | } 55 | else if ($mouseBrickShiftY <= -1) 56 | { 57 | commandToServer('ShiftBrick', 1, 0, 0); 58 | $mouseBrickShiftY = 0; 59 | } 60 | } 61 | 62 | function mouseMoveBrickZ(%val) 63 | { 64 | commandToServer('ShiftBrick', 0, 0, %val / 120); 65 | } 66 | 67 | -------------------------------------------------------------------------------- /v21/server/defaultAddOnList.cs: -------------------------------------------------------------------------------- 1 | $AddOn__Brick_Large_Cubes = 1; 2 | $AddOn__Brick_Arch = 1; 3 | $AddOn__Brick_V15 = 1; 4 | $AddOn__Emote_Alarm = 1; 5 | $AddOn__Emote_Confusion = 1; 6 | $AddOn__Emote_Hate = 1; 7 | $AddOn__Emote_Love = 1; 8 | $AddOn__Item_Skis = 1; 9 | $AddOn__Light_Animated = 1; 10 | $AddOn__Light_Basic = 1; 11 | $AddOn__Particle_Basic = 1; 12 | $AddOn__Particle_FX_Cans = 1; 13 | $AddOn__Particle_Grass = 1; 14 | $AddOn__Particle_Player = 1; 15 | $AddOn__Particle_Tools = 1; 16 | $AddOn__Player_Fuel_Jet = 1; 17 | $AddOn__Player_Jump_Jet = 1; 18 | $AddOn__Player_Leap_Jet = 1; 19 | $AddOn__Player_No_Jet = 1; 20 | $AddOn__Player_Quake = 1; 21 | $AddOn__Projectile_GravityRocket = 1; 22 | $AddOn__Projectile_Pinball = 1; 23 | $AddOn__Projectile_Pong = 1; 24 | $AddOn__Projectile_Radio_Wave = 1; 25 | $AddOn__Sound_Synth4 = 1; 26 | $AddOn__Sound_Beeps = 1; 27 | $AddOn__Sound_Phone = 1; 28 | $AddOn__Vehicle_Ball = 1; 29 | $AddOn__Vehicle_Flying_Wheeled_Jeep = 1; 30 | $AddOn__Vehicle_Horse = 1; 31 | $AddOn__Vehicle_Jeep = 1; 32 | $AddOn__Vehicle_Magic_Carpet = 1; 33 | $AddOn__Vehicle_Tank = 1; 34 | $AddOn__Weapon_Bow = 1; 35 | $AddOn__Weapon_Gun = 1; 36 | $AddOn__Weapon_Guns_Akimbo = 1; 37 | $AddOn__Weapon_Horse_Ray = 1; 38 | $AddOn__Weapon_Push_Broom = 1; 39 | $AddOn__Weapon_Rocket_Launcher = 1; 40 | $AddOn__Weapon_Spear = 1; 41 | $AddOn__Weapon_Sword = 1; 42 | $AddOn__Print_1x2f_Default = 1; 43 | $AddOn__Print_2x2f_Default = 1; 44 | $AddOn__Print_2x2r_Default = 1; 45 | $AddOn__Print_Letters_Default = 1; 46 | $AddOn__Print_2x2r_Monitor3 = 1; 47 | $AddOn__Print_1x2f_BLPRemote = 1; 48 | $AddOn__Vehicle_Pirate_Cannon = 1; 49 | $AddOn__Vehicle_Rowboat = 1; 50 | $AddOn__Item_Key = 1; 51 | $AddOn__Brick_Checkpoint = 1; 52 | $AddOn__Brick_Treasure_Chest = 1; 53 | $AddOn__Brick_Halloween = 1; 54 | $AddOn__Brick_Teledoor = 1; 55 | $AddOn__Brick_Christmas_Tree = 1; 56 | $AddOn__Brick_Doors = 1; 57 | $AddOn__Support_Doors = 1; 58 | $AddOn__Item_Sports = 1; 59 | $AddOn__Bot_Blockhead = 1; 60 | $AddOn__Bot_Hole = 1; 61 | $AddOn__Bot_Horse = 1; 62 | $AddOn__Bot_Shark = 1; 63 | $AddOn__Bot_Zombie = 1; 64 | -------------------------------------------------------------------------------- /v1/server/scripts/centerPrint.cs: -------------------------------------------------------------------------------- 1 | function centerPrintAll(%message, %time, %lines) 2 | { 3 | if (%lines $= "" || %lines > 3 || %lines < 1) 4 | { 5 | %lines = 1; 6 | } 7 | %count = ClientGroup.getCount(); 8 | for (%i = 0; %i < %count; %i++) 9 | { 10 | %cl = ClientGroup.getObject(%i); 11 | if (!%cl.isAIControlled()) 12 | { 13 | commandToClient(%cl, 'centerPrint', %message, %time, %lines); 14 | } 15 | } 16 | } 17 | 18 | function bottomPrintAll(%message, %time, %lines) 19 | { 20 | if (%lines $= "" || %lines > 3 || %lines < 1) 21 | { 22 | %lines = 1; 23 | } 24 | %count = ClientGroup.getCount(); 25 | for (%i = 0; %i < %count; %i++) 26 | { 27 | %cl = ClientGroup.getObject(%i); 28 | if (!%cl.isAIControlled()) 29 | { 30 | commandToClient(%cl, 'bottomPrint', %message, %time, %lines); 31 | } 32 | } 33 | } 34 | 35 | function centerPrint(%client, %message, %time, %lines) 36 | { 37 | if (%lines $= "" || %lines > 3 || %lines < 1) 38 | { 39 | %lines = 1; 40 | } 41 | commandToClient(%client, 'CenterPrint', %message, %time, %lines); 42 | } 43 | 44 | function bottomPrint(%client, %message, %time, %lines) 45 | { 46 | if (%lines $= "" || %lines > 3 || %lines < 1) 47 | { 48 | %lines = 1; 49 | } 50 | commandToClient(%client, 'BottomPrint', %message, %time, %lines); 51 | } 52 | 53 | function clearCenterPrint(%client) 54 | { 55 | commandToClient(%client, 'ClearCenterPrint'); 56 | } 57 | 58 | function clearBottomPrint(%client) 59 | { 60 | commandToClient(%client, 'ClearBottomPrint'); 61 | } 62 | 63 | function clearCenterPrintAll() 64 | { 65 | %count = ClientGroup.getCount(); 66 | for (%i = 0; %i < %count; %i++) 67 | { 68 | %cl = ClientGroup.getObject(%i); 69 | if (!%cl.isAIControlled()) 70 | { 71 | commandToClient(%cl, 'ClearCenterPrint'); 72 | } 73 | } 74 | } 75 | 76 | function clearBottomPrintAll() 77 | { 78 | %count = ClientGroup.getCount(); 79 | for (%i = 0; %i < %count; %i++) 80 | { 81 | %cl = ClientGroup.getObject(%i); 82 | if (!%cl.isAIControlled()) 83 | { 84 | commandToClient(%cl, 'ClearBottomPrint'); 85 | } 86 | } 87 | } 88 | 89 | -------------------------------------------------------------------------------- /v1/ui/MessageBoxOKCancelDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(MessageBoxOKCancelDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "width"; 5 | vertSizing = "height"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl(MBOKCancelFrame) 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "170 165"; 18 | extent = "300 149"; 19 | minExtent = "48 92"; 20 | visible = 1; 21 | maxLength = 255; 22 | resizeWidth = 0; 23 | resizeHeight = 0; 24 | canMove = 1; 25 | canClose = 0; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | helpTag = 0; 30 | 31 | new GuiMLTextCtrl(MBOKCancelText) 32 | { 33 | profile = "GuiTextProfile"; 34 | horizSizing = "center"; 35 | vertSizing = "bottom"; 36 | position = "32 39"; 37 | extent = "236 14"; 38 | minExtent = "8 8"; 39 | visible = 1; 40 | lineSpacing = 2; 41 | allowColorChars = 0; 42 | maxChars = -1; 43 | helpTag = 0; 44 | }; 45 | new GuiBitmapButtonCtrl() 46 | { 47 | profile = "BlockButtonProfile"; 48 | horizSizing = "left"; 49 | vertSizing = "top"; 50 | position = "39 94"; 51 | extent = "91 38"; 52 | minExtent = "8 2"; 53 | visible = 1; 54 | command = "MessageCallback(MessageBoxOKCancelDlg,MessageBoxOKCancelDlg.cancelCallback);"; 55 | accelerator = "escape"; 56 | text = "CANCEL"; 57 | groupNum = -1; 58 | buttonType = "PushButton"; 59 | bitmap = "~/client/ui/button2"; 60 | mKeepCached = 0; 61 | }; 62 | new GuiBitmapButtonCtrl() 63 | { 64 | profile = "BlockButtonProfile"; 65 | horizSizing = "left"; 66 | vertSizing = "top"; 67 | position = "171 94"; 68 | extent = "91 38"; 69 | minExtent = "8 2"; 70 | visible = 1; 71 | command = "MessageCallback(MessageBoxOKCancelDlg,MessageBoxOKCancelDlg.callback);"; 72 | text = "OK"; 73 | groupNum = -1; 74 | buttonType = "PushButton"; 75 | bitmap = "~/client/ui/button2"; 76 | mKeepCached = 0; 77 | }; 78 | }; 79 | }; 80 | -------------------------------------------------------------------------------- /v1/ui/MessageBoxYesNoDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(MessageBoxYesNoDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "width"; 5 | vertSizing = "height"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl(MBYesNoFrame) 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "170 180"; 18 | extent = "300 119"; 19 | minExtent = "48 92"; 20 | visible = 1; 21 | maxLength = 255; 22 | resizeWidth = 0; 23 | resizeHeight = 0; 24 | canMove = 1; 25 | canClose = 0; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | helpTag = 0; 30 | 31 | new GuiMLTextCtrl(MBYesNoText) 32 | { 33 | profile = "GuiTextProfile"; 34 | horizSizing = "center"; 35 | vertSizing = "bottom"; 36 | position = "32 39"; 37 | extent = "236 14"; 38 | minExtent = "8 8"; 39 | visible = 1; 40 | lineSpacing = 2; 41 | allowColorChars = 0; 42 | maxChars = -1; 43 | helpTag = 0; 44 | }; 45 | new GuiBitmapButtonCtrl() 46 | { 47 | profile = "BlockButtonProfile"; 48 | horizSizing = "left"; 49 | vertSizing = "top"; 50 | position = "171 64"; 51 | extent = "91 38"; 52 | minExtent = "8 2"; 53 | visible = 1; 54 | command = "MessageCallback(MessageBoxYesNoDlg,MessageBoxYesNoDlg.yesCallback);"; 55 | accelerator = "return"; 56 | text = "YES"; 57 | groupNum = -1; 58 | buttonType = "PushButton"; 59 | bitmap = "~/client/ui/button2"; 60 | mKeepCached = 0; 61 | }; 62 | new GuiBitmapButtonCtrl() 63 | { 64 | profile = "BlockButtonProfile"; 65 | horizSizing = "left"; 66 | vertSizing = "top"; 67 | position = "38 64"; 68 | extent = "91 38"; 69 | minExtent = "8 2"; 70 | visible = 1; 71 | command = "MessageCallback(MessageBoxYesNoDlg,MessageBoxYesNoDlg.noCallback);"; 72 | accelerator = "escape"; 73 | text = "NO"; 74 | groupNum = -1; 75 | buttonType = "PushButton"; 76 | bitmap = "~/client/ui/button2"; 77 | mKeepCached = 0; 78 | }; 79 | }; 80 | }; 81 | -------------------------------------------------------------------------------- /v1/client/ui/fastLoadWarningGui.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(fastLoadWarningGui) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | 11 | new GuiWindowCtrl() 12 | { 13 | profile = "BlockWindowProfile"; 14 | horizSizing = "center"; 15 | vertSizing = "center"; 16 | position = "151 141"; 17 | extent = "337 197"; 18 | minExtent = "8 2"; 19 | visible = 1; 20 | text = "Fast Load Warning"; 21 | maxLength = 255; 22 | resizeWidth = 0; 23 | resizeHeight = 0; 24 | canMove = 1; 25 | canClose = 1; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | closeCommand = "canvas.popDialog(SaveBricksWarningGui);"; 30 | 31 | new GuiMLTextCtrl() 32 | { 33 | profile = "GuiMLTextProfile"; 34 | horizSizing = "center"; 35 | vertSizing = "bottom"; 36 | position = "30 43"; 37 | extent = "277 42"; 38 | minExtent = "8 2"; 39 | visible = 1; 40 | lineSpacing = 2; 41 | allowColorChars = 0; 42 | maxChars = -1; 43 | text = "This option will speed up loading on non-dedicated servers but may cause other players to time out when loading large builds."; 44 | }; 45 | new GuiBitmapButtonCtrl() 46 | { 47 | profile = "BlockButtonProfile"; 48 | horizSizing = "center"; 49 | vertSizing = "top"; 50 | position = "123 144"; 51 | extent = "91 38"; 52 | minExtent = "8 2"; 53 | visible = 1; 54 | command = "canvas.popDialog(fastLoadWarningGui);"; 55 | text = "OK"; 56 | groupNum = -1; 57 | buttonType = "PushButton"; 58 | bitmap = "./button2"; 59 | mKeepCached = 0; 60 | }; 61 | new GuiCheckBoxCtrl() 62 | { 63 | profile = "GuiCheckBoxProfile"; 64 | horizSizing = "center"; 65 | vertSizing = "bottom"; 66 | position = "79 106"; 67 | extent = "178 30"; 68 | minExtent = "8 2"; 69 | visible = 1; 70 | variable = "$Pref::Gui::IgnoreFastLoadWarning"; 71 | text = "Do not show this message again"; 72 | groupNum = -1; 73 | buttonType = "ToggleButton"; 74 | }; 75 | }; 76 | }; 77 | -------------------------------------------------------------------------------- /beta/client/screenshot.cs: -------------------------------------------------------------------------------- 1 | function formatImageNumber(%number) 2 | { 3 | if (%number < 10) 4 | { 5 | %number = "0" @ %number; 6 | } 7 | if (%number < 100) 8 | { 9 | %number = "0" @ %number; 10 | } 11 | if (%number < 1000) 12 | { 13 | %number = "0" @ %number; 14 | } 15 | if (%number < 10000) 16 | { 17 | %number = "0" @ %number; 18 | } 19 | return %number; 20 | } 21 | 22 | function recordMovie(%movieName, %fps) 23 | { 24 | $timeAdvance = 1000 / %fps; 25 | $screenGrabThread = schedule($timeAdvance, 0, movieGrabScreen, %movieName, 0); 26 | } 27 | 28 | function movieGrabScreen(%movieName, %frameNumber) 29 | { 30 | screenShot(%movieName @ formatImageNumber(%frameNumber) @ ".png"); 31 | $screenGrabThread = schedule($timeAdvance, 0, movieGrabScreen, %movieName, %frameNumber + 1); 32 | } 33 | 34 | function stopMovie() 35 | { 36 | $timeAdvance = 0; 37 | cancel($screenGrabThread); 38 | } 39 | 40 | $screenshotNumber = 0; 41 | function doScreenShot(%val) 42 | { 43 | if (%val) 44 | { 45 | %oldContent = Canvas.getContent(); 46 | Canvas.setContent(noHudGui); 47 | $pref::interior::showdetailmaps = 0; 48 | while (1) 49 | { 50 | %fileName = "screenshot_" @ formatImageNumber($pref::screenshotNumber++); 51 | if ($pref::Video::screenShotFormat $= "JPEG") 52 | { 53 | if (screenShot(%fileName @ ".jpg", "JPEG")) 54 | { 55 | break; 56 | } 57 | } 58 | else if (screenShot(%fileName @ ".png", "png")) 59 | { 60 | break; 61 | } 62 | } 63 | Canvas.setContent(%oldContent); 64 | return; 65 | } 66 | } 67 | 68 | function doPanoramaScreenShot(%val) 69 | { 70 | if (%val) 71 | { 72 | $pref::interior::showdetailmaps = 0; 73 | if ($pref::Video::screenShotFormat $= "JPEG") 74 | { 75 | panoramaScreenShot("screenshot_" @ formatImageNumber($pref::screenshotNumber++), "JPEG"); 76 | } 77 | else if ($pref::Video::screenShotFormat $= "PNG") 78 | { 79 | panoramaScreenShot("screenshot_" @ formatImageNumber($pref::screenshotNumber++), "PNG"); 80 | } 81 | else 82 | { 83 | panoramaScreenShot("screenshot_" @ formatImageNumber($pref::screenshotNumber++), "PNG"); 84 | } 85 | } 86 | } 87 | 88 | -------------------------------------------------------------------------------- /v1/client/canvas.cs: -------------------------------------------------------------------------------- 1 | function initCanvas(%windowName) 2 | { 3 | videoSetGammaCorrection($pref::OpenGL::gammaCorrection); 4 | if (!createCanvas(%windowName)) 5 | { 6 | quit(); 7 | return; 8 | } 9 | setOpenGLTextureCompressionHint($pref::OpenGL::compressionHint); 10 | setOpenGLAnisotropy($pref::OpenGL::anisotropy); 11 | setOpenGLMipReduction($pref::OpenGL::mipReduction); 12 | setOpenGLInteriorMipReduction($pref::OpenGL::interiorMipReduction); 13 | setOpenGLSkyMipReduction($pref::OpenGL::skyMipReduction); 14 | exec("~/ui/defaultProfiles.cs"); 15 | exec("~/ui/customProfiles.cs"); 16 | exec("~/ui/ConsoleDlg.gui"); 17 | exec("~/ui/InspectDlg.gui"); 18 | exec("~/ui/LoadFileDlg.gui"); 19 | exec("~/ui/SaveFileDlg.gui"); 20 | exec("~/ui/MessageBoxOkDlg.gui"); 21 | exec("~/ui/MessageBoxYesNoDlg.gui"); 22 | exec("~/ui/MessageBoxOKCancelDlg.gui"); 23 | exec("~/ui/MessagePopupDlg.gui"); 24 | exec("~/ui/HelpDlg.gui"); 25 | exec("~/ui/RecordingsDlg.gui"); 26 | exec("~/ui/NetGraphGui.gui"); 27 | exec("./metrics.cs"); 28 | exec("./messageBox.cs"); 29 | exec("./screenshot.cs"); 30 | exec("./cursor.cs"); 31 | exec("./help.cs"); 32 | exec("./recordings.cs"); 33 | OpenALInit(); 34 | } 35 | 36 | function resetCanvas() 37 | { 38 | if (isObject(Canvas)) 39 | { 40 | Canvas.repaint(); 41 | } 42 | if (isObject(PlayGui)) 43 | { 44 | PlayGui.createInvHud(); 45 | PlayGui.createToolHud(); 46 | PlayGui.LoadPaint(); 47 | } 48 | } 49 | 50 | function onWindowReactivate() 51 | { 52 | if ($Pref::Audio::TurnOffAltTab) 53 | { 54 | if (isEventPending($OpenALInitSchedule)) 55 | { 56 | cancel($OpenALInitSchedule); 57 | } 58 | $OpenALInitSchedule = schedule(100, 0, restartAudio); 59 | } 60 | } 61 | 62 | function restartAudio() 63 | { 64 | OpenALInit(); 65 | if (!isObject(ServerConnection)) 66 | { 67 | return; 68 | } 69 | %group = ServerConnection.getId(); 70 | %count = %group.getCount(); 71 | for (%i = 0; %i < %count; %i++) 72 | { 73 | %obj = %group.getObject(%i); 74 | if (%obj.getClassName() $= "AudioEmitter") 75 | { 76 | %profile = %obj.profile; 77 | %obj.profile = 0; 78 | %obj.profile = %profile; 79 | %obj.schedule(10, update); 80 | } 81 | } 82 | } 83 | 84 | -------------------------------------------------------------------------------- /v1/client/ui/saveBricksWarningGui.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(saveBricksWarningGui) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | 11 | new GuiWindowCtrl() 12 | { 13 | profile = "BlockWindowProfile"; 14 | horizSizing = "center"; 15 | vertSizing = "center"; 16 | position = "151 141"; 17 | extent = "337 197"; 18 | minExtent = "8 2"; 19 | visible = 1; 20 | text = "Remote Save Warning"; 21 | maxLength = 255; 22 | resizeWidth = 0; 23 | resizeHeight = 0; 24 | canMove = 1; 25 | canClose = 1; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | closeCommand = "canvas.popDialog(SaveBricksWarningGui);"; 30 | 31 | new GuiMLTextCtrl() 32 | { 33 | profile = "GuiMLTextProfile"; 34 | horizSizing = "center"; 35 | vertSizing = "bottom"; 36 | position = "30 43"; 37 | extent = "277 56"; 38 | minExtent = "8 2"; 39 | visible = 1; 40 | lineSpacing = 2; 41 | allowColorChars = 0; 42 | maxChars = -1; 43 | text = "You are attempting to save bricks from another server. Because of the way the game's network communication works, you will only be able to save the bricks that you have seen. "; 44 | }; 45 | new GuiBitmapButtonCtrl() 46 | { 47 | profile = "BlockButtonProfile"; 48 | horizSizing = "center"; 49 | vertSizing = "top"; 50 | position = "123 144"; 51 | extent = "91 38"; 52 | minExtent = "8 2"; 53 | visible = 1; 54 | command = "canvas.popDialog(SaveBricksWarningGui);canvas.pushDialog(saveBricksGui);"; 55 | text = "OK"; 56 | groupNum = -1; 57 | buttonType = "PushButton"; 58 | bitmap = "./button2"; 59 | mKeepCached = 0; 60 | }; 61 | new GuiCheckBoxCtrl() 62 | { 63 | profile = "GuiCheckBoxProfile"; 64 | horizSizing = "center"; 65 | vertSizing = "bottom"; 66 | position = "79 107"; 67 | extent = "178 30"; 68 | minExtent = "8 2"; 69 | visible = 1; 70 | variable = "$Pref::Gui::IgnoreRemoteSaveWarning"; 71 | text = "Do not show this message again"; 72 | groupNum = -1; 73 | buttonType = "ToggleButton"; 74 | }; 75 | }; 76 | }; 77 | -------------------------------------------------------------------------------- /beta/client/messageBox.cs: -------------------------------------------------------------------------------- 1 | function MessageCallback(%dlg, %callback) 2 | { 3 | Canvas.popDialog(%dlg); 4 | eval(%callback); 5 | } 6 | 7 | function MBSetText(%text, %frame, %msg) 8 | { 9 | %ext = %text.getExtent(); 10 | %text.setText("" @ %msg); 11 | %text.forceReflow(); 12 | %newExtent = %text.getExtent(); 13 | %deltaY = getWord(%newExtent, 1) - getWord(%ext, 1); 14 | %windowPos = %frame.getPosition(); 15 | %windowExt = %frame.getExtent(); 16 | %frame.resize(getWord(%windowPos, 0), getWord(%windowPos, 1) - %deltaY / 2, getWord(%windowExt, 0), getWord(%windowExt, 1) + %deltaY); 17 | } 18 | 19 | function MessageBoxOK(%title, %message, %callback) 20 | { 21 | MBOKFrame.setText(%title); 22 | Canvas.pushDialog(MessageBoxOKDlg); 23 | MBSetText(MBOKText, MBOKFrame, %message); 24 | MessageBoxOKDlg.callback = %callback; 25 | } 26 | 27 | function MessageBoxOKDlg::onSleep(%this) 28 | { 29 | %this.callback = ""; 30 | } 31 | 32 | function MessageBoxOKCancel(%title, %message, %callback, %cancelCallback) 33 | { 34 | MBOKCancelFrame.setText(%title); 35 | Canvas.pushDialog(MessageBoxOKCancelDlg); 36 | MBSetText(MBOKCancelText, MBOKCancelFrame, %message); 37 | MessageBoxOKCancelDlg.callback = %callback; 38 | MessageBoxOKCancelDlg.cancelCallback = %cancelCallback; 39 | } 40 | 41 | function MessageBoxOKCancelDlg::onSleep(%this) 42 | { 43 | %this.callback = ""; 44 | } 45 | 46 | function MessageBoxYesNo(%title, %message, %yesCallback, %noCallback) 47 | { 48 | MBYesNoFrame.setText(%title); 49 | Canvas.pushDialog(MessageBoxYesNoDlg); 50 | MBSetText(MBYesNoText, MBYesNoFrame, %message); 51 | MessageBoxYesNoDlg.yesCallBack = %yesCallback; 52 | MessageBoxYesNoDlg.noCallback = %noCallback; 53 | } 54 | 55 | function MessageBoxYesNoDlg::onSleep(%this) 56 | { 57 | %this.yesCallBack = ""; 58 | %this.noCallback = ""; 59 | } 60 | 61 | function MessagePopup(%title, %message, %delay) 62 | { 63 | MessagePopFrame.setText(%title); 64 | Canvas.pushDialog(MessagePopupDlg); 65 | MBSetText(MessagePopText, MessagePopFrame, %message); 66 | if (%delay !$= "") 67 | { 68 | schedule(%delay, 0, CloseMessagePopup); 69 | } 70 | } 71 | 72 | function CloseMessagePopup() 73 | { 74 | Canvas.popDialog(MessagePopupDlg); 75 | } 76 | 77 | -------------------------------------------------------------------------------- /v1/client/ui/aboutDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(aboutDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl() 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "132 93"; 18 | extent = "376 318"; 19 | minExtent = "8 8"; 20 | visible = 1; 21 | text = "About..."; 22 | maxLength = 255; 23 | resizeWidth = 0; 24 | resizeHeight = 0; 25 | canMove = 1; 26 | canClose = 1; 27 | canMinimize = 0; 28 | canMaximize = 0; 29 | minSize = "50 50"; 30 | closeCommand = "Canvas.popDialog(aboutDlg);"; 31 | helpTag = 0; 32 | 33 | new GuiMLTextCtrl(aboutText) 34 | { 35 | profile = "GuiMLTextProfile"; 36 | horizSizing = "width"; 37 | vertSizing = "bottom"; 38 | position = "19 39"; 39 | extent = "336 260"; 40 | minExtent = "8 8"; 41 | visible = 1; 42 | lineSpacing = 2; 43 | allowColorChars = 0; 44 | maxChars = -1; 45 | text = "This is a test"; 46 | maxBitmapHeight = -1; 47 | helpTag = 0; 48 | }; 49 | new GuiBitmapButtonCtrl() 50 | { 51 | profile = "BlockButtonProfile"; 52 | horizSizing = "right"; 53 | vertSizing = "top"; 54 | position = "279 275"; 55 | extent = "78 30"; 56 | minExtent = "8 2"; 57 | visible = 1; 58 | command = "Canvas.popDialog(aboutDlg);"; 59 | text = "OK"; 60 | groupNum = -1; 61 | buttonType = "PushButton"; 62 | bitmap = "./button2"; 63 | mKeepCached = 0; 64 | mColor = "255 255 255 255"; 65 | helpTag = 0; 66 | }; 67 | }; 68 | }; 69 | function aboutDlg::onWake(%this) 70 | { 71 | %text = "Torque Game Engine\n( v1.3 )\n" @ "" @ getCompileTimeString() @ ", " @ getBuildString() @ "Build\n\n" @ "Copyright (c) 2001 GarageGames.Com\n" @ "Portions Copyright (c) 2001 by Sierra Online, Inc.\n\n" @ ""; 72 | aboutText.setText(%text); 73 | } 74 | 75 | function aboutText::onURL(%this, %url) 76 | { 77 | echo(%this); 78 | echo(%url); 79 | gotoWebPage(%url); 80 | } 81 | 82 | -------------------------------------------------------------------------------- /v1/client/ui/printSelectorDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(printSelectorDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | 11 | new GuiWindowCtrl(PSD_window) 12 | { 13 | profile = "BlockWindowProfile"; 14 | horizSizing = "left"; 15 | vertSizing = "center"; 16 | position = "333 20"; 17 | extent = "214 439"; 18 | minExtent = "8 2"; 19 | visible = 1; 20 | text = "Print Selector"; 21 | maxLength = 255; 22 | resizeWidth = 0; 23 | resizeHeight = 0; 24 | canMove = 1; 25 | canClose = 1; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | closeCommand = "canvas.popDialog(\"printSelectorDlg\");"; 30 | scrollcount = 0; 31 | Scroll0 = 16584; 32 | 33 | new GuiButtonCtrl() 34 | { 35 | profile = "GuiButtonProfile"; 36 | horizSizing = "right"; 37 | vertSizing = "bottom"; 38 | position = "-166 241"; 39 | extent = "140 30"; 40 | minExtent = "8 2"; 41 | visible = 1; 42 | command = "canvas.popDialog(\"printSelectorDlg\");"; 43 | accelerator = "escape"; 44 | text = "exit"; 45 | groupNum = -1; 46 | buttonType = "PushButton"; 47 | }; 48 | new GuiBitmapButtonCtrl() 49 | { 50 | profile = "BlockButtonProfile"; 51 | horizSizing = "right"; 52 | vertSizing = "bottom"; 53 | position = "69 22"; 54 | extent = "58 18"; 55 | minExtent = "8 2"; 56 | visible = 1; 57 | command = "PSD_LettersTab();"; 58 | text = "Letters"; 59 | groupNum = -1; 60 | buttonType = "PushButton"; 61 | bitmap = "./tab1"; 62 | }; 63 | new GuiBitmapButtonCtrl() 64 | { 65 | profile = "BlockButtonProfile"; 66 | horizSizing = "right"; 67 | vertSizing = "bottom"; 68 | position = "10 22"; 69 | extent = "58 18"; 70 | minExtent = "8 2"; 71 | visible = 1; 72 | command = "PSD_PrintsTab();"; 73 | text = "Prints"; 74 | groupNum = -1; 75 | buttonType = "PushButton"; 76 | bitmap = "./tab1"; 77 | }; 78 | new GuiBitmapCtrl() 79 | { 80 | profile = "GuiDefaultProfile"; 81 | horizSizing = "right"; 82 | vertSizing = "bottom"; 83 | position = "3 40"; 84 | extent = "209 2"; 85 | minExtent = "8 2"; 86 | visible = 1; 87 | bitmap = "./bar1"; 88 | wrap = 0; 89 | }; 90 | }; 91 | }; 92 | -------------------------------------------------------------------------------- /beta/client/ui/printSelectorDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(printSelectorDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | 11 | new GuiWindowCtrl(PSD_window) 12 | { 13 | profile = "BlockWindowProfile"; 14 | horizSizing = "left"; 15 | vertSizing = "center"; 16 | position = "333 20"; 17 | extent = "214 439"; 18 | minExtent = "8 2"; 19 | visible = 1; 20 | text = "Print Selector"; 21 | maxLength = 255; 22 | resizeWidth = 0; 23 | resizeHeight = 0; 24 | canMove = 1; 25 | canClose = 1; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | closeCommand = "canvas.popDialog(\"printSelectorDlg\");"; 30 | scrollcount = 0; 31 | Scroll0 = 16584; 32 | 33 | new GuiButtonCtrl() 34 | { 35 | profile = "GuiButtonProfile"; 36 | horizSizing = "right"; 37 | vertSizing = "bottom"; 38 | position = "-166 241"; 39 | extent = "140 30"; 40 | minExtent = "8 2"; 41 | visible = 1; 42 | command = "canvas.popDialog(\"printSelectorDlg\");"; 43 | accelerator = "escape"; 44 | text = "exit"; 45 | groupNum = -1; 46 | buttonType = "PushButton"; 47 | }; 48 | new GuiBitmapButtonCtrl() 49 | { 50 | profile = "BlockButtonProfile"; 51 | horizSizing = "right"; 52 | vertSizing = "bottom"; 53 | position = "69 22"; 54 | extent = "58 18"; 55 | minExtent = "8 2"; 56 | visible = 1; 57 | command = "PSD_LettersTab();"; 58 | text = "Letters"; 59 | groupNum = -1; 60 | buttonType = "PushButton"; 61 | bitmap = "./tab1"; 62 | }; 63 | new GuiBitmapButtonCtrl() 64 | { 65 | profile = "BlockButtonProfile"; 66 | horizSizing = "right"; 67 | vertSizing = "bottom"; 68 | position = "10 22"; 69 | extent = "58 18"; 70 | minExtent = "8 2"; 71 | visible = 1; 72 | command = "PSD_PrintsTab();"; 73 | text = "Prints"; 74 | groupNum = -1; 75 | buttonType = "PushButton"; 76 | bitmap = "./tab1"; 77 | }; 78 | new GuiBitmapCtrl() 79 | { 80 | profile = "GuiDefaultProfile"; 81 | horizSizing = "right"; 82 | vertSizing = "bottom"; 83 | position = "3 40"; 84 | extent = "209 2"; 85 | minExtent = "8 2"; 86 | visible = 1; 87 | bitmap = "./bar1"; 88 | wrap = 0; 89 | }; 90 | }; 91 | }; 92 | -------------------------------------------------------------------------------- /v1/client/messageBox.cs: -------------------------------------------------------------------------------- 1 | function MessageCallback(%dlg, %callback) 2 | { 3 | Canvas.popDialog(%dlg); 4 | eval(%callback); 5 | } 6 | 7 | function MBSetText(%text, %frame, %msg) 8 | { 9 | %ext = %text.getExtent(); 10 | %text.setText("" @ %msg); 11 | %text.forceReflow(); 12 | %newExtent = %text.getExtent(); 13 | %deltaY = getWord(%newExtent, 1) - getWord(%ext, 1); 14 | %windowPos = %frame.getPosition(); 15 | %windowExt = %frame.getExtent(); 16 | %frame.resize(getWord(%windowPos, 0), getWord(%windowPos, 1) - %deltaY / 2, getWord(%windowExt, 0), getWord(%windowExt, 1) + %deltaY); 17 | } 18 | 19 | function MessageBoxOK(%title, %message, %callback) 20 | { 21 | MBOKFrame.setText(%title); 22 | Canvas.pushDialog(MessageBoxOKDlg); 23 | MBSetText(MBOKText, MBOKFrame, %message); 24 | MessageBoxOKDlg.callback = %callback; 25 | } 26 | 27 | function clientCmdMessageBoxOK(%title, %message) 28 | { 29 | MessageBoxOK(detag(%title), detag(%message), ""); 30 | } 31 | 32 | function MessageBoxOKDlg::onSleep(%this) 33 | { 34 | %this.callback = ""; 35 | } 36 | 37 | function MessageBoxOKCancel(%title, %message, %callback, %cancelCallback) 38 | { 39 | MBOKCancelFrame.setText(%title); 40 | Canvas.pushDialog(MessageBoxOKCancelDlg); 41 | MBSetText(MBOKCancelText, MBOKCancelFrame, %message); 42 | MessageBoxOKCancelDlg.callback = %callback; 43 | MessageBoxOKCancelDlg.cancelCallback = %cancelCallback; 44 | } 45 | 46 | function MessageBoxOKCancelDlg::onSleep(%this) 47 | { 48 | %this.callback = ""; 49 | } 50 | 51 | function MessageBoxYesNo(%title, %message, %yesCallback, %noCallback) 52 | { 53 | MBYesNoFrame.setText(%title); 54 | Canvas.pushDialog(MessageBoxYesNoDlg); 55 | MBSetText(MBYesNoText, MBYesNoFrame, %message); 56 | MessageBoxYesNoDlg.yesCallBack = %yesCallback; 57 | MessageBoxYesNoDlg.noCallback = %noCallback; 58 | } 59 | 60 | function MessageBoxYesNoDlg::onSleep(%this) 61 | { 62 | %this.yesCallBack = ""; 63 | %this.noCallback = ""; 64 | } 65 | 66 | function MessagePopup(%title, %message, %delay) 67 | { 68 | MessagePopFrame.setText(%title); 69 | Canvas.pushDialog(MessagePopupDlg); 70 | MBSetText(MessagePopText, MessagePopFrame, %message); 71 | if (%delay !$= "") 72 | { 73 | schedule(%delay, 0, CloseMessagePopup); 74 | } 75 | } 76 | 77 | function CloseMessagePopup() 78 | { 79 | Canvas.popDialog(MessagePopupDlg); 80 | } 81 | 82 | -------------------------------------------------------------------------------- /v1/server/defaults.cs: -------------------------------------------------------------------------------- 1 | $Pref::Server::Name = "Blockland Server"; 2 | $Pref::Server::Info = "This is a Blockland Server."; 3 | $Pref::Server::ConnectionError = "You do not have the correct version of the Torque Game Engine or " @ "the related art needed to connect to this server, please contact " @ "the server operator to obtain the latest version of this game."; 4 | $Pref::Server::Port = 28000; 5 | $Pref::Server::Password = ""; 6 | $Pref::Server::AdminPassword = ""; 7 | $Pref::Server::MaxPlayers = 64; 8 | $Pref::Server::KickBanTime = 300; 9 | $Pref::Server::BanTime = 1800; 10 | $Pref::Server::FloodProtectionEnabled = 1; 11 | $Pref::Server::MaxChatLen = 120; 12 | $Audio::voiceCodec = ".v12"; 13 | $Pref::Server::AllowColorLoading = 0; 14 | $Pref::Server::AdminPassword = ""; 15 | $Pref::Server::AllowColorLoading = 0; 16 | $Pref::Server::BrickLimit = 128000; 17 | $Pref::Server::ConnectionError = ""; 18 | $Pref::Server::CurseFilter = 1; 19 | $Pref::Server::CurseList = "shit,fuck,fuk,cunt,nigger,asshole,faggot, fag , suck my , dick ,"; 20 | $Pref::Server::ETardFilter = 1; 21 | $Pref::Server::ETardList = " u , r , ur , wat , wut , wuts , wit , dat , loel , y ,"; 22 | $pref::Server::FallingDamage = 1; 23 | $Pref::Server::FloodProtectionEnabled = 1; 24 | $Pref::Server::Info = "Info Goes Here"; 25 | $Pref::Server::MaxBricksPerSecond = 10; 26 | $Pref::Server::MaxChatLen = 120; 27 | $Pref::Server::MaxEmitters_PerPlayer = 100; 28 | $Pref::Server::MaxEmitters_Total = 1000; 29 | $Pref::Server::MaxLights_PerPlayer = 100; 30 | $Pref::Server::MaxLights_Total = 2000; 31 | $Pref::Server::MaxPhysVehicles_PerPlayer = 4; 32 | $Pref::Server::MaxPhysVehicles_Total = 30; 33 | $Pref::Server::MaxPlayers = 8; 34 | $Pref::Server::MaxPlayerVehicles_PerPlayer = 8; 35 | $Pref::Server::MaxPlayerVehicles_Total = 150; 36 | $Pref::Server::Name = "Blockland Server"; 37 | $Pref::Server::Password = ""; 38 | $Pref::Server::Port = 28000; 39 | $Pref::Server::RandomBrickColor = 0; 40 | $Pref::Server::ResetOnEmpty = 0; 41 | $Pref::Server::SuperAdminPassword = ""; 42 | $pref::Net::PacketRateToClient = 32; 43 | $pref::Net::PacketRateToServer = 32; 44 | $pref::Net::PacketSize = 450; 45 | $Pref::Net::LagThreshold = 400; 46 | $Pref::Server::BrickPublicDomainTimeout = 15; 47 | $Pref::Server::WelcomeMessage = "\c2Welcome to Blockland %1."; 48 | $Pref::Server::AutoAdminList = " "; 49 | $Pref::Server::AutoSuperAdminList = " "; 50 | -------------------------------------------------------------------------------- /beta/client/ui/adminLoginGui.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(adminLoginGui) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | 11 | new GuiWindowCtrl() 12 | { 13 | profile = "BlockWindowProfile"; 14 | horizSizing = "center"; 15 | vertSizing = "center"; 16 | position = "170 172"; 17 | extent = "300 135"; 18 | minExtent = "8 2"; 19 | visible = 1; 20 | text = "Administrator Login"; 21 | maxLength = 255; 22 | resizeWidth = 1; 23 | resizeHeight = 1; 24 | canMove = 1; 25 | canClose = 1; 26 | canMinimize = 1; 27 | canMaximize = 1; 28 | minSize = "50 50"; 29 | closeCommand = "canvas.popDialog(\"adminLoginGui\");"; 30 | 31 | new GuiTextEditCtrl(txtAdminPass) 32 | { 33 | profile = "GuiTextEditProfile"; 34 | horizSizing = "right"; 35 | vertSizing = "bottom"; 36 | position = "72 44"; 37 | extent = "215 18"; 38 | minExtent = "8 2"; 39 | visible = 1; 40 | altCommand = "SAD(txtAdminPass.getValue());"; 41 | accelerator = "return"; 42 | maxLength = 255; 43 | historySize = 0; 44 | password = 1; 45 | tabComplete = 0; 46 | sinkAllKeyEvents = 0; 47 | helpTag = 0; 48 | }; 49 | new GuiBitmapButtonCtrl() 50 | { 51 | profile = "BlockButtonProfile"; 52 | horizSizing = "center"; 53 | vertSizing = "bottom"; 54 | position = "104 79"; 55 | extent = "91 38"; 56 | minExtent = "8 2"; 57 | visible = 1; 58 | command = "SAD(txtAdminPass.getValue());"; 59 | accelerator = "return"; 60 | text = "Submit"; 61 | groupNum = -1; 62 | buttonType = "PushButton"; 63 | bitmap = "./button2"; 64 | }; 65 | new GuiTextCtrl() 66 | { 67 | profile = "GuiTextProfile"; 68 | horizSizing = "right"; 69 | vertSizing = "bottom"; 70 | position = "13 44"; 71 | extent = "53 18"; 72 | minExtent = "8 2"; 73 | visible = 1; 74 | text = "Password:"; 75 | maxLength = 255; 76 | helpTag = 0; 77 | }; 78 | new GuiButtonCtrl(closer) 79 | { 80 | profile = "GuiButtonProfile"; 81 | horizSizing = "right"; 82 | vertSizing = "bottom"; 83 | position = "-89 145"; 84 | extent = "140 30"; 85 | minExtent = "8 2"; 86 | visible = 1; 87 | command = "canvas.popDialog(\"adminLoginGui\");"; 88 | accelerator = "escape"; 89 | text = "Button"; 90 | groupNum = -1; 91 | buttonType = "PushButton"; 92 | }; 93 | }; 94 | }; 95 | -------------------------------------------------------------------------------- /v1/client/ui/adminLoginGui.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(adminLoginGui) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | 11 | new GuiWindowCtrl() 12 | { 13 | profile = "BlockWindowProfile"; 14 | horizSizing = "center"; 15 | vertSizing = "center"; 16 | position = "170 172"; 17 | extent = "300 135"; 18 | minExtent = "8 2"; 19 | visible = 1; 20 | text = "Administrator Login"; 21 | maxLength = 255; 22 | resizeWidth = 0; 23 | resizeHeight = 0; 24 | canMove = 1; 25 | canClose = 1; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | closeCommand = "canvas.popDialog(\"adminLoginGui\");"; 30 | 31 | new GuiTextEditCtrl(txtAdminPass) 32 | { 33 | profile = "GuiTextEditProfile"; 34 | horizSizing = "right"; 35 | vertSizing = "bottom"; 36 | position = "72 44"; 37 | extent = "215 18"; 38 | minExtent = "8 2"; 39 | visible = 1; 40 | altCommand = "SAD(txtAdminPass.getValue());"; 41 | accelerator = "return"; 42 | maxLength = 255; 43 | historySize = 0; 44 | password = 1; 45 | tabComplete = 0; 46 | sinkAllKeyEvents = 0; 47 | helpTag = 0; 48 | }; 49 | new GuiBitmapButtonCtrl() 50 | { 51 | profile = "BlockButtonProfile"; 52 | horizSizing = "center"; 53 | vertSizing = "bottom"; 54 | position = "104 79"; 55 | extent = "91 38"; 56 | minExtent = "8 2"; 57 | visible = 1; 58 | command = "SAD(txtAdminPass.getValue());"; 59 | accelerator = "return"; 60 | text = "Submit"; 61 | groupNum = -1; 62 | buttonType = "PushButton"; 63 | bitmap = "./button2"; 64 | mKeepCached = 0; 65 | }; 66 | new GuiTextCtrl() 67 | { 68 | profile = "GuiTextProfile"; 69 | horizSizing = "right"; 70 | vertSizing = "bottom"; 71 | position = "13 44"; 72 | extent = "53 18"; 73 | minExtent = "8 2"; 74 | visible = 1; 75 | text = "Password:"; 76 | maxLength = 255; 77 | helpTag = 0; 78 | }; 79 | new GuiButtonCtrl(closer) 80 | { 81 | profile = "GuiButtonProfile"; 82 | horizSizing = "right"; 83 | vertSizing = "bottom"; 84 | position = "-89 145"; 85 | extent = "140 30"; 86 | minExtent = "8 2"; 87 | visible = 1; 88 | command = "canvas.popDialog(\"adminLoginGui\");"; 89 | accelerator = "escape"; 90 | text = "Button"; 91 | groupNum = -1; 92 | buttonType = "PushButton"; 93 | }; 94 | }; 95 | }; 96 | -------------------------------------------------------------------------------- /beta/client/recordings.cs: -------------------------------------------------------------------------------- 1 | function recordingsDlg::onWake() 2 | { 3 | RecordingsDlgList.clear(); 4 | %i = 0; 5 | %filespec = $currentMod @ "/recordings/*.rec"; 6 | echo(%filespec); 7 | for (%file = findFirstFile(%filespec); %file !$= ""; %file = findNextFile(%filespec)) 8 | { 9 | %fileName = fileBase(%file); 10 | if (strstr(%file, "/CVS/") == -1) 11 | { 12 | RecordingsDlgList.addRow(%i++, %fileName); 13 | } 14 | } 15 | RecordingsDlgList.sort(0); 16 | RecordingsDlgList.setSelectedRow(0); 17 | RecordingsDlgList.scrollVisible(0); 18 | } 19 | 20 | function StartSelectedDemo() 21 | { 22 | %sel = RecordingsDlgList.getSelectedId(); 23 | %rowText = RecordingsDlgList.getRowTextById(%sel); 24 | %file = $currentMod @ "/recordings/" @ getField(%rowText, 0) @ ".rec"; 25 | new GameConnection(ServerConnection); 26 | RootGroup.add(ServerConnection); 27 | if (ServerConnection.playDemo(%file)) 28 | { 29 | Canvas.popDialog(recordingsDlg); 30 | ServerConnection.prepDemoPlayback(); 31 | } 32 | else 33 | { 34 | MessageBoxOK("Playback Failed", "Demo playback failed for file '" @ %file @ "'."); 35 | if (isObject(ServerConnection)) 36 | { 37 | ServerConnection.delete(); 38 | } 39 | } 40 | } 41 | 42 | function startDemoRecord() 43 | { 44 | ServerConnection.stopRecording(); 45 | if (ServerConnection.isDemoPlaying()) 46 | { 47 | return; 48 | } 49 | for (%i = 0; %i < 1000; %i++) 50 | { 51 | %num = %i; 52 | if (%num < 10) 53 | { 54 | %num = "0" @ %num; 55 | } 56 | if (%num < 100) 57 | { 58 | %num = "0" @ %num; 59 | } 60 | %file = $currentMod @ "/recordings/demo" @ %num @ ".rec"; 61 | if (!isFile(%file)) 62 | { 63 | break; 64 | } 65 | } 66 | if (%i == 1000) 67 | { 68 | return; 69 | } 70 | $DemoFileName = %file; 71 | ChatHud.addLine("\c4Recording to file [\c2" @ $DemoFileName @ "\cr]."); 72 | ServerConnection.prepDemoRecord(); 73 | ServerConnection.startRecording($DemoFileName); 74 | if (!ServerConnection.isDemoRecording()) 75 | { 76 | deleteFile($DemoFileName); 77 | ChatHud.addLine("\c3 *** Failed to record to file [\c2" @ $DemoFileName @ "\cr]."); 78 | $DemoFileName = ""; 79 | } 80 | } 81 | 82 | function stopDemoRecord() 83 | { 84 | if (ServerConnection.isDemoRecording()) 85 | { 86 | ChatHud.addLine("\c4Recording file [\c2" @ $DemoFileName @ "\cr] finished."); 87 | ServerConnection.stopRecording(); 88 | } 89 | } 90 | 91 | function demoPlaybackComplete() 92 | { 93 | disconnect(); 94 | Canvas.setContent("MainMenuGui"); 95 | Canvas.pushDialog(recordingsDlg); 96 | } 97 | 98 | -------------------------------------------------------------------------------- /v1/client/ui/PortForwardInfoGui.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(portForwardInfoGui) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | 11 | new GuiWindowCtrl() 12 | { 13 | profile = "GuiWindowProfile"; 14 | horizSizing = "center"; 15 | vertSizing = "center"; 16 | position = "142 83"; 17 | extent = "355 315"; 18 | minExtent = "8 2"; 19 | visible = 1; 20 | text = "Forward Your Ports!"; 21 | maxLength = 255; 22 | resizeWidth = 0; 23 | resizeHeight = 0; 24 | canMove = 1; 25 | canClose = 1; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | closeCommand = "canvas.popDialog(portForwardInfoGui);"; 30 | 31 | new GuiMLTextCtrl(crapo) 32 | { 33 | profile = "GuiMLTextProfile"; 34 | horizSizing = "right"; 35 | vertSizing = "bottom"; 36 | position = "16 44"; 37 | extent = "323 168"; 38 | minExtent = "8 2"; 39 | visible = 1; 40 | lineSpacing = 2; 41 | allowColorChars = 1; 42 | maxChars = -1; 43 | text = "To host an internet game, people need to have access to ports 28000-28032 on your computer.
" @ "
" @ "1. Make sure any security software you have installed is not blocking these ports or Blockland.exe
" @ "
" @ "2. If you are behind a router or NAT device (if you have broadband, you probably are) you need to forward these ports to your computer.
" @ "
" @ "Visit http://www.Blockland.us/PortForward/ for more help.
" @ ""; 44 | maxBitmapHeight = -1; 45 | }; 46 | new GuiCheckBoxCtrl() 47 | { 48 | profile = "GuiCheckBoxProfile"; 49 | horizSizing = "center"; 50 | vertSizing = "top"; 51 | position = "112 233"; 52 | extent = "131 30"; 53 | minExtent = "8 2"; 54 | visible = 1; 55 | variable = "$Pref::Gui::IgnorePortForwardWarning"; 56 | text = "Don't Show This Again"; 57 | groupNum = -1; 58 | buttonType = "ToggleButton"; 59 | }; 60 | new GuiBitmapButtonCtrl() 61 | { 62 | profile = "BlockButtonProfile"; 63 | horizSizing = "left"; 64 | vertSizing = "top"; 65 | position = "132 264"; 66 | extent = "91 38"; 67 | minExtent = "8 2"; 68 | visible = 1; 69 | command = "canvas.popDialog(portForwardInfoGui);"; 70 | text = "OK"; 71 | groupNum = -1; 72 | buttonType = "PushButton"; 73 | bitmap = "./button2"; 74 | mKeepCached = 0; 75 | mColor = "255 255 255 255"; 76 | }; 77 | }; 78 | }; 79 | -------------------------------------------------------------------------------- /beta/client/ui/aboutDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(aboutDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl() 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "132 88"; 18 | extent = "376 303"; 19 | minExtent = "8 8"; 20 | visible = 1; 21 | text = "About..."; 22 | maxLength = 255; 23 | resizeWidth = 0; 24 | resizeHeight = 0; 25 | canMove = 1; 26 | canClose = 1; 27 | canMinimize = 0; 28 | canMaximize = 0; 29 | minSize = "50 50"; 30 | closeCommand = "Canvas.popDialog(aboutDlg);"; 31 | helpTag = 0; 32 | 33 | new GuiMLTextCtrl(aboutText) 34 | { 35 | profile = "GuiMLTextProfile"; 36 | horizSizing = "width"; 37 | vertSizing = "relative"; 38 | position = "19 36"; 39 | extent = "336 126"; 40 | minExtent = "8 8"; 41 | visible = 1; 42 | lineSpacing = 2; 43 | allowColorChars = 0; 44 | maxChars = -1; 45 | text = "This is a test"; 46 | helpTag = 0; 47 | }; 48 | new GuiBitmapButtonCtrl() 49 | { 50 | profile = "BlockButtonProfile"; 51 | horizSizing = "right"; 52 | vertSizing = "bottom"; 53 | position = "278 262"; 54 | extent = "78 30"; 55 | minExtent = "8 2"; 56 | visible = 1; 57 | command = "Canvas.popDialog(aboutDlg);"; 58 | text = "OK"; 59 | groupNum = -1; 60 | buttonType = "PushButton"; 61 | bitmap = "./button2"; 62 | helpTag = 0; 63 | }; 64 | new GuiBitmapButtonCtrl() 65 | { 66 | profile = "BlockButtonProfile"; 67 | horizSizing = "right"; 68 | vertSizing = "bottom"; 69 | position = "19 262"; 70 | extent = "78 30"; 71 | minExtent = "8 2"; 72 | visible = 1; 73 | command = "getHelp(\"2. License\");"; 74 | text = "License..."; 75 | groupNum = -1; 76 | buttonType = "PushButton"; 77 | bitmap = "./button2"; 78 | helpTag = 0; 79 | }; 80 | }; 81 | }; 82 | function aboutDlg::onWake(%this) 83 | { 84 | %text = "Torque Game Engine Test Application\n( v1.1.2 )\n" @ "" @ getCompileTimeString() @ ", " @ getBuildString() @ "Build\n\n" @ "Copyright (c) 2001 GarageGames.Com\n" @ "Portions Copyright (c) 2001 by Sierra Online, Inc.\n\n" @ ""; 85 | aboutText.setText(%text); 86 | } 87 | 88 | function aboutText::onURL(%this, %url) 89 | { 90 | echo(%this); 91 | echo(%url); 92 | gotoWebPage(%url); 93 | } 94 | 95 | -------------------------------------------------------------------------------- /beta/client/ui/playerList.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(PlayerListGui) 2 | { 3 | profile = "GuiModelessDialogProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | noCursor = 1; 12 | 13 | new GuiBitmapCtrl() 14 | { 15 | profile = "GuiDefaultProfile"; 16 | horizSizing = "right"; 17 | vertSizing = "center"; 18 | position = "5 42"; 19 | extent = "156 396"; 20 | minExtent = "8 8"; 21 | visible = 1; 22 | bitmap = "./hudfill.png"; 23 | wrap = 0; 24 | helpTag = 0; 25 | 26 | new GuiTextCtrl() 27 | { 28 | profile = "HUDChatTextProfile"; 29 | horizSizing = "center"; 30 | vertSizing = "bottom"; 31 | position = "45 2"; 32 | extent = "65 20"; 33 | minExtent = "8 8"; 34 | visible = 1; 35 | text = "Score Board"; 36 | maxLength = 255; 37 | helpTag = 0; 38 | }; 39 | new GuiTextListCtrl(PlayerListGuiList) 40 | { 41 | profile = "HUDChatTextProfile"; 42 | horizSizing = "width"; 43 | vertSizing = "height"; 44 | position = "0 22"; 45 | extent = "134 16"; 46 | minExtent = "8 8"; 47 | visible = 1; 48 | enumerate = 0; 49 | resizeCell = 1; 50 | columns = "0 120"; 51 | fitParentWidth = 0; 52 | clipColumnText = 0; 53 | helpTag = 0; 54 | }; 55 | }; 56 | }; 57 | function PlayerListGui::update(%this, %clientId, %name, %isSuperAdmin, %isAdmin, %isAI, %score) 58 | { 59 | %tag = %isSuperAdmin ? "[Super]" : (%isAdmin ? "[Admin]" : (%isAI ? "[Bot]" : "")); 60 | %text = StripMLControlChars(%name) SPC %tag TAB %score; 61 | if (PlayerListGuiList.getRowNumById(%clientId) == -1) 62 | { 63 | PlayerListGuiList.addRow(%clientId, %text); 64 | } 65 | else 66 | { 67 | PlayerListGuiList.setRowById(%clientId, %text); 68 | } 69 | PlayerListGuiList.sortNumerical(1); 70 | } 71 | 72 | function PlayerListGui::updateScore(%this, %clientId, %score) 73 | { 74 | %text = PlayerListGuiList.getRowTextById(%clientId); 75 | %text = setField(%text, 1, %score); 76 | PlayerListGuiList.setRowById(%clientId, %text); 77 | PlayerListGuiList.sortNumerical(1); 78 | } 79 | 80 | function PlayerListGui::remove(%this, %clientId) 81 | { 82 | PlayerListGuiList.removeRowById(%clientId); 83 | } 84 | 85 | function PlayerListGui::toggle(%this) 86 | { 87 | if (%this.isAwake()) 88 | { 89 | Canvas.popDialog(%this); 90 | } 91 | else 92 | { 93 | Canvas.pushDialog(%this); 94 | } 95 | } 96 | 97 | function PlayerListGui::clear(%this) 98 | { 99 | PlayerListGuiList.clear(); 100 | } 101 | 102 | -------------------------------------------------------------------------------- /v1/ui/ConsoleDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(ConsoleDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | 11 | new GuiWindowCtrl() 12 | { 13 | profile = "GuiWindowProfile"; 14 | horizSizing = "right"; 15 | vertSizing = "bottom"; 16 | position = "0 0"; 17 | extent = "640 370"; 18 | minExtent = "8 2"; 19 | visible = 1; 20 | text = "Console"; 21 | maxLength = 255; 22 | resizeWidth = 1; 23 | resizeHeight = 1; 24 | canMove = 1; 25 | canClose = 1; 26 | canMinimize = 1; 27 | canMaximize = 1; 28 | minSize = "50 50"; 29 | 30 | new GuiScrollCtrl() 31 | { 32 | profile = "GuiScrollProfile"; 33 | horizSizing = "width"; 34 | vertSizing = "height"; 35 | position = "0 0"; 36 | extent = "640 353"; 37 | minExtent = "8 2"; 38 | visible = 1; 39 | willFirstRespond = 1; 40 | hScrollBar = "dynamic"; 41 | vScrollBar = "alwaysOn"; 42 | constantThumbHeight = 0; 43 | childMargin = "0 0"; 44 | rowHeight = 40; 45 | columnWidth = 30; 46 | 47 | new GuiConsole(testArrayCtrl) 48 | { 49 | profile = "GuiConsoleProfile"; 50 | position = "1 1"; 51 | visible = 1; 52 | }; 53 | }; 54 | new GuiConsoleEditCtrl(ConsoleEntry) 55 | { 56 | profile = "GuiTextEditProfile"; 57 | horizSizing = "width"; 58 | vertSizing = "top"; 59 | position = "0 352"; 60 | extent = "640 18"; 61 | minExtent = "8 2"; 62 | visible = 1; 63 | altCommand = "ConsoleEntry::eval();"; 64 | maxLength = 255; 65 | historySize = 20; 66 | password = 0; 67 | tabComplete = 0; 68 | sinkAllKeyEvents = 1; 69 | useSiblingScroller = 1; 70 | }; 71 | }; 72 | }; 73 | $ConsoleActive = 0; 74 | function ConsoleEntry::eval() 75 | { 76 | %text = ConsoleEntry.getValue(); 77 | echo("==>" @ %text); 78 | eval(%text); 79 | ConsoleEntry.setValue(""); 80 | } 81 | 82 | function ToggleConsole(%make) 83 | { 84 | if (getSimTime() - $lastToggleConsoleTime < 100) 85 | { 86 | return; 87 | } 88 | $lastToggleConsoleTime = getSimTime(); 89 | if (%make) 90 | { 91 | if ($ConsoleActive) 92 | { 93 | if ($enableDirectInput) 94 | { 95 | activateKeyboard(); 96 | } 97 | Canvas.popDialog(ConsoleDlg); 98 | $ConsoleActive = 0; 99 | } 100 | else 101 | { 102 | if ($enableDirectInput) 103 | { 104 | deactivateKeyboard(); 105 | } 106 | Canvas.pushDialog(ConsoleDlg, 99); 107 | $ConsoleActive = 1; 108 | } 109 | } 110 | } 111 | 112 | -------------------------------------------------------------------------------- /beta/client/scripts/messageHud.cs: -------------------------------------------------------------------------------- 1 | function MessageHud::open(%this) 2 | { 3 | %offset = 0; 4 | if (%this.isVisible()) 5 | { 6 | return; 7 | } 8 | if (%this.isTeamMsg) 9 | { 10 | %text = "TEAM:"; 11 | } 12 | else 13 | { 14 | %text = "CHAT:"; 15 | } 16 | MessageHud_Text.setValue(%text); 17 | %windowPos = "5 " @ getWord(OuterChatHud.position, 1) + getWord(OuterChatHud.extent, 1) + 18 + 1; 18 | %windowExt = getWord(OuterChatHud.extent, 0) @ " " @ getWord(MessageHud_Frame.extent, 1); 19 | %textExtent = getWord(MessageHud_TextSwatch.extent, 0); 20 | %ctrlExtent = getWord(MessageHud_Frame.extent, 0); 21 | Canvas.pushDialog(%this); 22 | MessageHud_Frame.position = %windowPos; 23 | MessageHud_Frame.extent = %windowExt; 24 | MessageHud_Edit.position = "0 0"; 25 | MessageHud_Edit.extent = setWord(MessageHud_Edit.extent, 0, (%ctrlExtent - %textExtent) - 2 * %offset); 26 | %this.setVisible(1); 27 | deactivateKeyboard(); 28 | MessageHud_Edit.makeFirstResponder(1); 29 | commandToServer('StartTalking'); 30 | } 31 | 32 | function MessageHud::close(%this) 33 | { 34 | if (!%this.isVisible()) 35 | { 36 | return; 37 | } 38 | Canvas.popDialog(%this); 39 | %this.setVisible(0); 40 | if ($enableDirectInput) 41 | { 42 | activateKeyboard(); 43 | } 44 | MessageHud_Edit.setValue(""); 45 | commandToServer('StopTalking'); 46 | } 47 | 48 | function MessageHud::toggleState(%this) 49 | { 50 | %this.open(); 51 | } 52 | 53 | function MessageHud_Edit::onEscape(%this) 54 | { 55 | MessageHud.close(); 56 | } 57 | 58 | function MessageHud_Edit::eval(%this) 59 | { 60 | %text = trim(%this.getValue()); 61 | if (%text !$= "") 62 | { 63 | %firstChar = getSubStr(%text, 0, 1); 64 | if (%firstChar $= "/") 65 | { 66 | %newText = getSubStr(%text, 1, 256); 67 | %command = getWord(%newText, 0); 68 | %par1 = getWord(%newText, 1); 69 | %par2 = getWord(%newText, 2); 70 | %par3 = getWord(%newText, 3); 71 | %par4 = getWord(%newText, 4); 72 | commandToServer(addTaggedString(%command), %par1, %par2, %par3, %par4); 73 | } 74 | else if (MessageHud.isTeamMsg) 75 | { 76 | commandToServer('teamMessageSent', %text); 77 | } 78 | else 79 | { 80 | commandToServer('messageSent', %text); 81 | } 82 | } 83 | MessageHud.close(); 84 | } 85 | 86 | function toggleMessageHud(%make) 87 | { 88 | if (%make) 89 | { 90 | MessageHud.isTeamMsg = 0; 91 | MessageHud.toggleState(); 92 | } 93 | } 94 | 95 | function teamMessageHud(%make) 96 | { 97 | if (%make) 98 | { 99 | MessageHud.isTeamMsg = 1; 100 | MessageHud.toggleState(); 101 | } 102 | } 103 | 104 | -------------------------------------------------------------------------------- /beta/client/ui/loadingGui.gui: -------------------------------------------------------------------------------- 1 | new GuiControlProfile("LoadingGuiContentProfile") 2 | { 3 | opaque = 1; 4 | fillColor = "200 200 200"; 5 | border = 1; 6 | borderColor = "0 0 0"; 7 | }; 8 | new GuiChunkedBitmapCtrl(LoadingGui) 9 | { 10 | profile = "GuiContentProfile"; 11 | horizSizing = "width"; 12 | vertSizing = "height"; 13 | position = "0 0"; 14 | extent = "640 480"; 15 | minExtent = "8 8"; 16 | visible = 1; 17 | bitmap = "./background.jpg"; 18 | useVariable = 0; 19 | tile = 0; 20 | helpTag = 0; 21 | qLineCount = 0; 22 | 23 | new GuiBitmapCtrl(LOAD_MapPicture) 24 | { 25 | profile = "GuiDefaultProfile"; 26 | horizSizing = "width"; 27 | vertSizing = "height"; 28 | position = "0 0"; 29 | extent = "640 480"; 30 | minExtent = "8 2"; 31 | visible = 1; 32 | bitmap = "~/data/missions/bedroom"; 33 | wrap = 0; 34 | }; 35 | new GuiMLTextCtrl(LOAD_MapDescription) 36 | { 37 | profile = "MapDescriptionTextProfile"; 38 | horizSizing = "right"; 39 | vertSizing = "bottom"; 40 | position = "17 62"; 41 | extent = "303 14"; 42 | minExtent = "8 8"; 43 | visible = 0; 44 | lineSpacing = 2; 45 | allowColorChars = 0; 46 | maxChars = -1; 47 | text = "map description"; 48 | helpTag = 0; 49 | }; 50 | new GuiProgressCtrl(LoadingProgress) 51 | { 52 | profile = "GuiProgressProfile"; 53 | horizSizing = "width"; 54 | vertSizing = "relative"; 55 | position = "14 420"; 56 | extent = "596 25"; 57 | minExtent = "8 8"; 58 | visible = 1; 59 | helpTag = 0; 60 | 61 | new GuiTextCtrl(LoadingProgressTxt) 62 | { 63 | profile = "HudInvTextProfile"; 64 | horizSizing = "center"; 65 | vertSizing = "center"; 66 | position = "61 3"; 67 | extent = "474 18"; 68 | minExtent = "8 8"; 69 | visible = 1; 70 | text = "LOADING MISSION"; 71 | maxLength = 255; 72 | helpTag = 0; 73 | }; 74 | }; 75 | new GuiButtonCtrl() 76 | { 77 | profile = "GuiButtonProfile"; 78 | horizSizing = "right"; 79 | vertSizing = "top"; 80 | position = "-15 488"; 81 | extent = "65 25"; 82 | minExtent = "20 20"; 83 | visible = 1; 84 | command = "disconnect();"; 85 | accelerator = "escape"; 86 | text = "CANCEL"; 87 | groupNum = -1; 88 | buttonType = "PushButton"; 89 | helpTag = 0; 90 | }; 91 | new GuiTextCtrl(LOAD_MapName) 92 | { 93 | profile = "LoadingMapNameProfile"; 94 | horizSizing = "center"; 95 | vertSizing = "bottom"; 96 | position = "224 20"; 97 | extent = "192 43"; 98 | minExtent = "8 8"; 99 | visible = 0; 100 | text = "Map Name"; 101 | maxLength = 255; 102 | helpTag = 0; 103 | }; 104 | }; 105 | -------------------------------------------------------------------------------- /v1/client/ui/loadingGui.gui: -------------------------------------------------------------------------------- 1 | new GuiControlProfile("LoadingGuiContentProfile") 2 | { 3 | opaque = 1; 4 | fillColor = "200 200 200"; 5 | border = 1; 6 | borderColor = "0 0 0"; 7 | }; 8 | new GuiChunkedBitmapCtrl(LoadingGui) 9 | { 10 | profile = "GuiContentProfile"; 11 | horizSizing = "width"; 12 | vertSizing = "height"; 13 | position = "0 0"; 14 | extent = "640 480"; 15 | minExtent = "8 8"; 16 | visible = 1; 17 | useVariable = 0; 18 | tile = 0; 19 | qLineCount = 0; 20 | helpTag = 0; 21 | 22 | new GuiBitmapCtrl(LOAD_MapPicture) 23 | { 24 | profile = "GuiDefaultProfile"; 25 | horizSizing = "width"; 26 | vertSizing = "height"; 27 | position = "0 0"; 28 | extent = "640 480"; 29 | minExtent = "8 2"; 30 | visible = 1; 31 | bitmap = "~/data/missions/bedroom"; 32 | wrap = 0; 33 | lockAspectRatio = 1; 34 | overflowImage = 1; 35 | keepCached = 0; 36 | }; 37 | new GuiMLTextCtrl(LOAD_MapDescription) 38 | { 39 | profile = "MapDescriptionTextProfile"; 40 | horizSizing = "right"; 41 | vertSizing = "bottom"; 42 | position = "17 62"; 43 | extent = "303 14"; 44 | minExtent = "8 8"; 45 | visible = 0; 46 | lineSpacing = 2; 47 | allowColorChars = 0; 48 | maxChars = -1; 49 | text = "map description"; 50 | helpTag = 0; 51 | }; 52 | new GuiProgressCtrl(LoadingProgress) 53 | { 54 | profile = "GuiProgressProfile"; 55 | horizSizing = "width"; 56 | vertSizing = "relative"; 57 | position = "22 420"; 58 | extent = "596 25"; 59 | minExtent = "8 8"; 60 | visible = 1; 61 | helpTag = 0; 62 | 63 | new GuiTextCtrl(LoadingProgressTxt) 64 | { 65 | profile = "HudInvTextProfile"; 66 | horizSizing = "center"; 67 | vertSizing = "center"; 68 | position = "61 3"; 69 | extent = "474 18"; 70 | minExtent = "8 8"; 71 | visible = 1; 72 | text = "LOADING MISSION"; 73 | maxLength = 255; 74 | helpTag = 0; 75 | }; 76 | }; 77 | new GuiButtonCtrl() 78 | { 79 | profile = "GuiButtonProfile"; 80 | horizSizing = "right"; 81 | vertSizing = "top"; 82 | position = "-15 488"; 83 | extent = "65 25"; 84 | minExtent = "20 20"; 85 | visible = 1; 86 | command = "disconnect();"; 87 | accelerator = "escape"; 88 | text = "CANCEL"; 89 | groupNum = -1; 90 | buttonType = "PushButton"; 91 | helpTag = 0; 92 | }; 93 | new GuiTextCtrl(LOAD_MapName) 94 | { 95 | profile = "LoadingMapNameProfile"; 96 | horizSizing = "center"; 97 | vertSizing = "bottom"; 98 | position = "224 20"; 99 | extent = "192 43"; 100 | minExtent = "8 8"; 101 | visible = 0; 102 | text = "Map Name"; 103 | maxLength = 255; 104 | helpTag = 0; 105 | }; 106 | }; 107 | -------------------------------------------------------------------------------- /beta/client/scripts/newMessageHud.cs: -------------------------------------------------------------------------------- 1 | function newMessageHud::onWake(%this) 2 | { 3 | } 4 | 5 | function newMessageHud::onSleep(%this) 6 | { 7 | commandToServer('stopTalking'); 8 | } 9 | 10 | function newMessageHud::open(%this, %channel) 11 | { 12 | %this.channel = %channel; 13 | if (%channel $= "SAY") 14 | { 15 | NMH_Channel.setText("\c0" @ %channel @ ":"); 16 | } 17 | else if (%channel $= "TEAM") 18 | { 19 | NMH_Channel.setText("\c1" @ %channel @ ":"); 20 | } 21 | else 22 | { 23 | error("ERROR(): newMessageHud::open() - unknown channel \"" @ %channel @ "\""); 24 | return; 25 | } 26 | if (!%this.isAwake()) 27 | { 28 | NMH_Type.setValue(""); 29 | Canvas.pushDialog(%this); 30 | %this.updatePosition(); 31 | %this.schedule(10, updateTypePosition); 32 | } 33 | } 34 | 35 | function newMessageHud::updateTypePosition(%this) 36 | { 37 | %x = getWord(NMH_Channel.getPosition(), 0); 38 | %x += NMH_Channel.getPixelWidth() + 2; 39 | %y = 0; 40 | %w = (getWord(NMH_Box.getExtent(), 0) - %x) - 2; 41 | %h = 18; 42 | NMH_Type.resize(%x, %y, %w, %h); 43 | } 44 | 45 | function newMessageHud::updatePosition(%this) 46 | { 47 | if (!%this.isAwake()) 48 | { 49 | return; 50 | } 51 | %x = getWord(NMH_Box.getPosition(), 0); 52 | %y = getWord(newChatText.getPosition(), 1); 53 | %y += getWord(newChatText.getExtent(), 1); 54 | %w = getWord(NMH_Box.getExtent(), 0); 55 | %h = getWord(NMH_Box.getExtent(), 1); 56 | NMH_Box.resize(%x, %y, %w, %h); 57 | } 58 | 59 | function NMH_Type::type(%this) 60 | { 61 | %text = %this.getValue(); 62 | if (strlen(%text) == 1) 63 | { 64 | if (%text !$= "/") 65 | { 66 | commandToServer('StartTalking'); 67 | } 68 | } 69 | } 70 | 71 | function NMH_Type::send(%this) 72 | { 73 | %text = %this.getValue(); 74 | %firstChar = getSubStr(%text, 0, 1); 75 | if (%firstChar $= "/") 76 | { 77 | %newText = getSubStr(%text, 1, 256); 78 | %command = getWord(%newText, 0); 79 | %par1 = getWord(%newText, 1); 80 | %par2 = getWord(%newText, 2); 81 | %par3 = getWord(%newText, 3); 82 | %par4 = getWord(%newText, 4); 83 | %par5 = getWord(%newText, 4); 84 | %par6 = getWord(%newText, 4); 85 | commandToServer(addTaggedString(%command), %par1, %par2, %par3, %par4, %par5, %par6); 86 | } 87 | else if (newMessageHud.channel $= "SAY") 88 | { 89 | commandToServer('messageSent', %text); 90 | } 91 | else if (newMessageHud.channel $= "TEAM") 92 | { 93 | commandToServer('teamMessageSent', %text); 94 | } 95 | else 96 | { 97 | error("ERROR: NMH_Type::Send() - unknown channel \"" @ newMessageHuf.channel @ "\""); 98 | } 99 | Canvas.popDialog(newMessageHud); 100 | } 101 | 102 | -------------------------------------------------------------------------------- /v1/ui/RecordingsDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(recordingsDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl() 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "55 56"; 18 | extent = "530 368"; 19 | minExtent = "48 92"; 20 | visible = 1; 21 | text = "Demo Recordings"; 22 | maxLength = 255; 23 | resizeWidth = 0; 24 | resizeHeight = 0; 25 | canMove = 1; 26 | canClose = 1; 27 | canMinimize = 0; 28 | canMaximize = 0; 29 | minSize = "50 50"; 30 | closeCommand = "Canvas.popDialog(recordingsDlg);"; 31 | helpTag = 0; 32 | 33 | new GuiScrollCtrl() 34 | { 35 | profile = "GuiScrollProfile"; 36 | horizSizing = "right"; 37 | vertSizing = "bottom"; 38 | position = "23 37"; 39 | extent = "484 283"; 40 | minExtent = "32 32"; 41 | visible = 1; 42 | willFirstRespond = 1; 43 | hScrollBar = "dynamic"; 44 | vScrollBar = "alwaysOn"; 45 | constantThumbHeight = 0; 46 | childMargin = "0 0"; 47 | defaultLineHeight = 15; 48 | helpTag = 0; 49 | 50 | new GuiTextListCtrl(RecordingsDlgList) 51 | { 52 | profile = "GuiTextArrayProfile"; 53 | horizSizing = "right"; 54 | vertSizing = "bottom"; 55 | position = "1 1"; 56 | extent = "464 20"; 57 | minExtent = "8 20"; 58 | visible = 1; 59 | enumerate = 0; 60 | resizeCell = 1; 61 | columns = 0; 62 | fitParentWidth = 1; 63 | clipColumnText = 0; 64 | helpTag = 0; 65 | noDuplicates = "false"; 66 | }; 67 | }; 68 | new GuiBitmapButtonCtrl() 69 | { 70 | profile = "BlockButtonProfile"; 71 | horizSizing = "right"; 72 | vertSizing = "bottom"; 73 | position = "367 328"; 74 | extent = "140 30"; 75 | minExtent = "8 2"; 76 | visible = 1; 77 | command = "StartSelectedDemo();"; 78 | accelerator = "return"; 79 | text = "Play"; 80 | groupNum = -1; 81 | buttonType = "PushButton"; 82 | bitmap = "~/client/ui/button1"; 83 | }; 84 | new GuiBitmapButtonCtrl() 85 | { 86 | profile = "BlockButtonProfile"; 87 | horizSizing = "right"; 88 | vertSizing = "bottom"; 89 | position = "23 328"; 90 | extent = "140 30"; 91 | minExtent = "8 2"; 92 | visible = 1; 93 | command = "Canvas.popDialog(recordingsDlg);"; 94 | accelerator = "escape"; 95 | text = "Cancel"; 96 | groupNum = -1; 97 | buttonType = "PushButton"; 98 | bitmap = "~/client/ui/button1"; 99 | }; 100 | }; 101 | }; 102 | -------------------------------------------------------------------------------- /beta/ui/RecordingsDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(recordingsDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl() 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "55 56"; 18 | extent = "530 368"; 19 | minExtent = "48 92"; 20 | visible = 1; 21 | text = "Demo Recordings"; 22 | maxLength = 255; 23 | resizeWidth = 0; 24 | resizeHeight = 0; 25 | canMove = 1; 26 | canClose = 1; 27 | canMinimize = 0; 28 | canMaximize = 0; 29 | minSize = "50 50"; 30 | closeCommand = "Canvas.popDialog(recordingsDlg);"; 31 | helpTag = 0; 32 | 33 | new GuiScrollCtrl() 34 | { 35 | profile = "GuiScrollProfile"; 36 | horizSizing = "right"; 37 | vertSizing = "bottom"; 38 | position = "23 37"; 39 | extent = "484 283"; 40 | minExtent = "32 32"; 41 | visible = 1; 42 | willFirstRespond = 1; 43 | hScrollBar = "dynamic"; 44 | vScrollBar = "alwaysOn"; 45 | constantThumbHeight = 0; 46 | childMargin = "0 0"; 47 | defaultLineHeight = 15; 48 | helpTag = 0; 49 | 50 | new GuiTextListCtrl(RecordingsDlgList) 51 | { 52 | profile = "GuiTextArrayProfile"; 53 | horizSizing = "right"; 54 | vertSizing = "bottom"; 55 | position = "1 1"; 56 | extent = "464 20"; 57 | minExtent = "8 20"; 58 | visible = 1; 59 | enumerate = 0; 60 | resizeCell = 1; 61 | columns = 0; 62 | fitParentWidth = 1; 63 | clipColumnText = 0; 64 | helpTag = 0; 65 | noDuplicates = "false"; 66 | }; 67 | }; 68 | new GuiBitmapButtonCtrl() 69 | { 70 | profile = "BlockButtonProfile"; 71 | horizSizing = "right"; 72 | vertSizing = "bottom"; 73 | position = "367 328"; 74 | extent = "140 30"; 75 | minExtent = "8 2"; 76 | visible = 1; 77 | command = "StartSelectedDemo();"; 78 | accelerator = "return"; 79 | text = "Play"; 80 | groupNum = -1; 81 | buttonType = "PushButton"; 82 | bitmap = "~/client/ui/button1"; 83 | }; 84 | new GuiBitmapButtonCtrl() 85 | { 86 | profile = "BlockButtonProfile"; 87 | horizSizing = "right"; 88 | vertSizing = "bottom"; 89 | position = "23 328"; 90 | extent = "140 30"; 91 | minExtent = "8 2"; 92 | visible = 1; 93 | command = "Canvas.popDialog(recordingsDlg);"; 94 | accelerator = "escape"; 95 | text = "Cancel"; 96 | groupNum = -1; 97 | buttonType = "PushButton"; 98 | bitmap = "~/client/ui/button1"; 99 | }; 100 | }; 101 | }; 102 | -------------------------------------------------------------------------------- /beta/client/ui/manualJoin.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(manualJoin) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl() 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "227 163"; 18 | extent = "185 153"; 19 | minExtent = "8 2"; 20 | visible = 1; 21 | text = "Connect to IP"; 22 | maxLength = 255; 23 | resizeWidth = 1; 24 | resizeHeight = 1; 25 | canMove = 1; 26 | canClose = 1; 27 | canMinimize = 1; 28 | canMaximize = 1; 29 | minSize = "50 50"; 30 | closeCommand = "canvas.popdialog(\"manualJoin\");"; 31 | helpTag = 0; 32 | 33 | new GuiTextEditCtrl(MJ_txtIP) 34 | { 35 | profile = "GuiTextEditProfile"; 36 | horizSizing = "right"; 37 | vertSizing = "bottom"; 38 | position = "67 71"; 39 | extent = "104 18"; 40 | minExtent = "8 2"; 41 | visible = 1; 42 | maxLength = 255; 43 | historySize = 0; 44 | password = 0; 45 | tabComplete = 0; 46 | sinkAllKeyEvents = 0; 47 | helpTag = 0; 48 | }; 49 | new GuiBitmapButtonCtrl() 50 | { 51 | profile = "BlockButtonProfile"; 52 | horizSizing = "center"; 53 | vertSizing = "bottom"; 54 | position = "47 102"; 55 | extent = "90 36"; 56 | minExtent = "8 2"; 57 | visible = 1; 58 | command = "MJ_connect();"; 59 | text = "Connect"; 60 | groupNum = -1; 61 | buttonType = "PushButton"; 62 | bitmap = "./button2"; 63 | wrap = 0; 64 | }; 65 | new GuiTextCtrl() 66 | { 67 | profile = "GuiTextProfile"; 68 | horizSizing = "right"; 69 | vertSizing = "bottom"; 70 | position = "20 70"; 71 | extent = "47 18"; 72 | minExtent = "8 2"; 73 | visible = 1; 74 | text = "Server IP:"; 75 | maxLength = 255; 76 | helpTag = 0; 77 | }; 78 | new GuiTextEditCtrl(MJ_txtJoinPass) 79 | { 80 | profile = "GuiTextEditProfile"; 81 | horizSizing = "right"; 82 | vertSizing = "bottom"; 83 | position = "67 41"; 84 | extent = "104 18"; 85 | minExtent = "8 2"; 86 | visible = 1; 87 | maxLength = 255; 88 | historySize = 0; 89 | password = 0; 90 | tabComplete = 0; 91 | sinkAllKeyEvents = 0; 92 | helpTag = 0; 93 | }; 94 | new GuiTextCtrl() 95 | { 96 | profile = "GuiTextProfile"; 97 | horizSizing = "right"; 98 | vertSizing = "bottom"; 99 | position = "14 40"; 100 | extent = "53 18"; 101 | minExtent = "8 2"; 102 | visible = 1; 103 | text = "Password:"; 104 | maxLength = 255; 105 | helpTag = 0; 106 | }; 107 | }; 108 | }; 109 | -------------------------------------------------------------------------------- /beta/client/ui/joinServerPassGui.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(joinServerPassGui) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | 11 | new GuiWindowCtrl() 12 | { 13 | profile = "BlockWindowProfile"; 14 | horizSizing = "center"; 15 | vertSizing = "center"; 16 | position = "170 161"; 17 | extent = "300 158"; 18 | minExtent = "8 2"; 19 | visible = 1; 20 | text = "Enter Password"; 21 | maxLength = 255; 22 | resizeWidth = 0; 23 | resizeHeight = 0; 24 | canMove = 1; 25 | canClose = 1; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | closeCommand = "canvas.popDialog(\"joinServerPassGui\");"; 30 | 31 | new GuiTextEditCtrl(JSP_txtPass) 32 | { 33 | profile = "GuiTextEditProfile"; 34 | horizSizing = "right"; 35 | vertSizing = "top"; 36 | position = "72 68"; 37 | extent = "215 18"; 38 | minExtent = "8 2"; 39 | visible = 1; 40 | altCommand = "JoinServerPassGui::enterPass();"; 41 | accelerator = "return"; 42 | maxLength = 255; 43 | historySize = 0; 44 | password = 1; 45 | tabComplete = 0; 46 | sinkAllKeyEvents = 0; 47 | helpTag = 0; 48 | }; 49 | new GuiBitmapButtonCtrl() 50 | { 51 | profile = "BlockButtonProfile"; 52 | horizSizing = "right"; 53 | vertSizing = "top"; 54 | position = "196 103"; 55 | extent = "91 38"; 56 | minExtent = "8 2"; 57 | visible = 1; 58 | command = "JoinServerPassGui::enterPass();"; 59 | accelerator = "return"; 60 | text = "Connect"; 61 | groupNum = -1; 62 | buttonType = "PushButton"; 63 | bitmap = "./button2"; 64 | }; 65 | new GuiTextCtrl() 66 | { 67 | profile = "GuiTextProfile"; 68 | horizSizing = "right"; 69 | vertSizing = "top"; 70 | position = "13 68"; 71 | extent = "53 18"; 72 | minExtent = "8 2"; 73 | visible = 1; 74 | text = "Password:"; 75 | maxLength = 255; 76 | helpTag = 0; 77 | }; 78 | new GuiBitmapButtonCtrl() 79 | { 80 | profile = "BlockButtonProfile"; 81 | horizSizing = "right"; 82 | vertSizing = "top"; 83 | position = "12 103"; 84 | extent = "91 38"; 85 | minExtent = "8 2"; 86 | visible = 1; 87 | command = "canvas.popDialog(\"joinServerPassGui\");"; 88 | accelerator = "escape"; 89 | text = "<< Back"; 90 | groupNum = -1; 91 | buttonType = "PushButton"; 92 | bitmap = "./button2"; 93 | }; 94 | new GuiTextCtrl() 95 | { 96 | profile = "GuiTextProfile"; 97 | horizSizing = "center"; 98 | vertSizing = "bottom"; 99 | position = "53 40"; 100 | extent = "194 18"; 101 | minExtent = "8 2"; 102 | visible = 1; 103 | text = "This server requires a password to join."; 104 | maxLength = 255; 105 | helpTag = 0; 106 | }; 107 | }; 108 | }; 109 | -------------------------------------------------------------------------------- /v1/client/ui/joinServerPassGui.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(joinServerPassGui) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | 11 | new GuiWindowCtrl() 12 | { 13 | profile = "BlockWindowProfile"; 14 | horizSizing = "center"; 15 | vertSizing = "center"; 16 | position = "170 161"; 17 | extent = "300 158"; 18 | minExtent = "8 2"; 19 | visible = 1; 20 | text = "Enter Password"; 21 | maxLength = 255; 22 | resizeWidth = 0; 23 | resizeHeight = 0; 24 | canMove = 1; 25 | canClose = 1; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | closeCommand = "canvas.popDialog(\"joinServerPassGui\");"; 30 | 31 | new GuiTextEditCtrl(JSP_txtPass) 32 | { 33 | profile = "GuiTextEditProfile"; 34 | horizSizing = "right"; 35 | vertSizing = "top"; 36 | position = "72 68"; 37 | extent = "215 18"; 38 | minExtent = "8 2"; 39 | visible = 1; 40 | altCommand = "JoinServerPassGui::enterPass();"; 41 | accelerator = "return"; 42 | maxLength = 255; 43 | historySize = 0; 44 | password = 1; 45 | tabComplete = 0; 46 | sinkAllKeyEvents = 0; 47 | helpTag = 0; 48 | }; 49 | new GuiBitmapButtonCtrl() 50 | { 51 | profile = "BlockButtonProfile"; 52 | horizSizing = "right"; 53 | vertSizing = "top"; 54 | position = "196 103"; 55 | extent = "91 38"; 56 | minExtent = "8 2"; 57 | visible = 1; 58 | command = "JoinServerPassGui::enterPass();"; 59 | accelerator = "return"; 60 | text = "Connect"; 61 | groupNum = -1; 62 | buttonType = "PushButton"; 63 | bitmap = "./button2"; 64 | }; 65 | new GuiTextCtrl() 66 | { 67 | profile = "GuiTextProfile"; 68 | horizSizing = "right"; 69 | vertSizing = "top"; 70 | position = "13 68"; 71 | extent = "53 18"; 72 | minExtent = "8 2"; 73 | visible = 1; 74 | text = "Password:"; 75 | maxLength = 255; 76 | helpTag = 0; 77 | }; 78 | new GuiBitmapButtonCtrl() 79 | { 80 | profile = "BlockButtonProfile"; 81 | horizSizing = "right"; 82 | vertSizing = "top"; 83 | position = "12 103"; 84 | extent = "91 38"; 85 | minExtent = "8 2"; 86 | visible = 1; 87 | command = "canvas.popDialog(\"joinServerPassGui\");"; 88 | accelerator = "escape"; 89 | text = "<< Back"; 90 | groupNum = -1; 91 | buttonType = "PushButton"; 92 | bitmap = "./button2"; 93 | }; 94 | new GuiTextCtrl() 95 | { 96 | profile = "GuiTextProfile"; 97 | horizSizing = "center"; 98 | vertSizing = "bottom"; 99 | position = "53 40"; 100 | extent = "194 18"; 101 | minExtent = "8 2"; 102 | visible = 1; 103 | text = "This server requires a password to join."; 104 | maxLength = 255; 105 | helpTag = 0; 106 | }; 107 | }; 108 | }; 109 | -------------------------------------------------------------------------------- /beta/client/scripts/missionDownload.cs: -------------------------------------------------------------------------------- 1 | function onMissionDownloadPhase1(%__unused, %__unused) 2 | { 3 | MessageHud.close(); 4 | LoadingProgress.setValue(0); 5 | LoadingProgressTxt.setValue("LOADING DATABLOCKS"); 6 | } 7 | 8 | function onPhase1Progress(%progress) 9 | { 10 | LoadingProgress.setValue(%progress); 11 | Canvas.repaint(); 12 | } 13 | 14 | function onPhase1Complete() 15 | { 16 | } 17 | 18 | function onMissionDownloadPhase2() 19 | { 20 | LoadingProgress.setValue(0); 21 | LoadingProgressTxt.setValue("LOADING OBJECTS"); 22 | Canvas.repaint(); 23 | } 24 | 25 | function onPhase2Progress(%progress) 26 | { 27 | LoadingProgress.setValue(%progress); 28 | Canvas.repaint(); 29 | } 30 | 31 | function onPhase2Complete() 32 | { 33 | } 34 | 35 | function onFileChunkReceived(%fileName, %ofs, %size) 36 | { 37 | LoadingProgress.setValue(%ofs / %size); 38 | LoadingProgressTxt.setValue("Downloading " @ %fileName @ "..."); 39 | } 40 | 41 | function onMissionDownloadPhase3() 42 | { 43 | LoadingProgress.setValue(0); 44 | LoadingProgressTxt.setValue("LIGHTING MISSION (This only happens once)"); 45 | Canvas.repaint(); 46 | } 47 | 48 | function onPhase3Progress(%progress) 49 | { 50 | LoadingProgress.setValue(%progress); 51 | } 52 | 53 | function onPhase3Complete() 54 | { 55 | LoadingProgress.setValue(1); 56 | $lightingMission = 0; 57 | } 58 | 59 | function onMissionDownloadComplete() 60 | { 61 | } 62 | 63 | addMessageCallback('MsgLoadInfo', handleLoadInfoMessage); 64 | addMessageCallback('MsgLoadDescripition', handleLoadDescriptionMessage); 65 | addMessageCallback('MsgLoadMapPicture', handleLoadMapPictureMessage); 66 | addMessageCallback('MsgLoadInfoDone', handleLoadInfoDoneMessage); 67 | function handleLoadInfoMessage(%__unused, %__unused, %mapName, %mapSaveName) 68 | { 69 | Canvas.setContent("LoadingGui"); 70 | for (%line = 0; %line < LoadingGui.qLineCount; %line++) 71 | { 72 | LoadingGui.qLine[%line] = ""; 73 | } 74 | LoadingGui.qLineCount = 0; 75 | LOAD_MapName.setText(%mapName); 76 | $MapSaveName = %mapSaveName; 77 | } 78 | 79 | function handleLoadDescriptionMessage(%__unused, %__unused, %line) 80 | { 81 | %text = LOAD_MapDescription.getText(); 82 | if (%text !$= "") 83 | { 84 | LOAD_MapDescription.setText(%text @ "\n" @ %line); 85 | } 86 | else 87 | { 88 | LOAD_MapDescription.setText(%line); 89 | } 90 | return; 91 | LoadingGui.qLine[LoadingGui.qLineCount] = %line; 92 | LoadingGui.qLineCount++; 93 | %text = ""; 94 | for (%line = 0; %line < LoadingGui.qLineCount - 1; %line++) 95 | { 96 | %text = %text @ LoadingGui.qLine[%line] @ " "; 97 | } 98 | %text = %text @ LoadingGui.qLine[%line] @ ""; 99 | LOAD_MapDescription.setText(%text); 100 | } 101 | 102 | function handleLoadMapPictureMessage(%__unused, %__unused, %imageName) 103 | { 104 | LOAD_MapPicture.setBitmap(%imageName); 105 | } 106 | 107 | function handleLoadInfoDoneMessage(%__unused, %__unused) 108 | { 109 | } 110 | 111 | -------------------------------------------------------------------------------- /v1/client/recordings.cs: -------------------------------------------------------------------------------- 1 | function recordingsDlg::onWake() 2 | { 3 | RecordingsDlgList.clear(); 4 | %i = 0; 5 | if ($currentMod $= "editor" || $currentMod $= "") 6 | { 7 | %mod = "base"; 8 | } 9 | else 10 | { 11 | %mod = $currentMod; 12 | } 13 | %filespec = %mod @ "/recordings/*.rec"; 14 | echo(%filespec); 15 | for (%file = findFirstFile(%filespec); %file !$= ""; %file = findNextFile(%filespec)) 16 | { 17 | %fileName = fileBase(%file); 18 | if (strstr(%file, "/CVS/") == -1) 19 | { 20 | RecordingsDlgList.addRow(%i++, %fileName); 21 | } 22 | } 23 | RecordingsDlgList.sort(0); 24 | RecordingsDlgList.setSelectedRow(0); 25 | RecordingsDlgList.scrollVisible(0); 26 | } 27 | 28 | function StartSelectedDemo() 29 | { 30 | %sel = RecordingsDlgList.getSelectedId(); 31 | %rowText = RecordingsDlgList.getRowTextById(%sel); 32 | if ($currentMod $= "editor" || $currentMod $= "") 33 | { 34 | %mod = "base"; 35 | } 36 | else 37 | { 38 | %mod = $currentMod; 39 | } 40 | %file = %mod @ "/recordings/" @ getField(%rowText, 0) @ ".rec"; 41 | new GameConnection(ServerConnection); 42 | RootGroup.add(ServerConnection); 43 | if (ServerConnection.playDemo(%file)) 44 | { 45 | Canvas.popDialog(recordingsDlg); 46 | ServerConnection.prepDemoPlayback(); 47 | } 48 | else 49 | { 50 | MessageBoxOK("Playback Failed", "Demo playback failed for file '" @ %file @ "'."); 51 | if (isObject(ServerConnection)) 52 | { 53 | ServerConnection.delete(); 54 | } 55 | } 56 | } 57 | 58 | function startDemoRecord() 59 | { 60 | ServerConnection.stopRecording(); 61 | if (ServerConnection.isDemoPlaying()) 62 | { 63 | return; 64 | } 65 | if ($currentMod $= "editor" || $currentMod $= "") 66 | { 67 | %mod = "base"; 68 | } 69 | else 70 | { 71 | %mod = $currentMod; 72 | } 73 | for (%i = 0; %i < 1000; %i++) 74 | { 75 | %num = %i; 76 | if (%num < 10) 77 | { 78 | %num = "0" @ %num; 79 | } 80 | if (%num < 100) 81 | { 82 | %num = "0" @ %num; 83 | } 84 | %file = %mod @ "/recordings/demo" @ %num @ ".rec"; 85 | if (!isFile(%file)) 86 | { 87 | break; 88 | } 89 | } 90 | if (%i == 1000) 91 | { 92 | return; 93 | } 94 | $DemoFileName = %file; 95 | newChatHud_AddLine("\c4Recording to file [\c2" @ $DemoFileName @ "\c4]"); 96 | ServerConnection.prepDemoRecord(); 97 | ServerConnection.startRecording($DemoFileName); 98 | if (!ServerConnection.isDemoRecording()) 99 | { 100 | deleteFile($DemoFileName); 101 | newChatHud_AddLine("\c4Recording to file [\c2" @ $DemoFileName @ "\c4]"); 102 | $DemoFileName = ""; 103 | } 104 | } 105 | 106 | function stopDemoRecord() 107 | { 108 | if (ServerConnection.isDemoRecording()) 109 | { 110 | newChatHud_AddLine("\c4Recording file [\c2" @ $DemoFileName @ "\c4] finished"); 111 | ServerConnection.stopRecording(); 112 | } 113 | } 114 | 115 | function demoPlaybackComplete() 116 | { 117 | disconnect(); 118 | Canvas.setContent("MainMenuGui"); 119 | Canvas.pushDialog(recordingsDlg); 120 | } 121 | 122 | -------------------------------------------------------------------------------- /v20/server/defaults.cs: -------------------------------------------------------------------------------- 1 | $Pref::Server::Name = "Blockland Server"; 2 | $Pref::Server::Info = "This is a Blockland Server."; 3 | $Pref::Server::ConnectionError = "You do not have the correct version of the Torque Game Engine or " @ "the related art needed to connect to this server, please contact " @ "the server operator to obtain the latest version of this game."; 4 | $Pref::Server::Port = 28000; 5 | $Pref::Server::Password = ""; 6 | $Pref::Server::AdminPassword = ""; 7 | $Pref::Server::MaxPlayers = 64; 8 | $Pref::Server::KickBanTime = 300; 9 | $Pref::Server::BanTime = 1800; 10 | $Pref::Server::MaxChatLen = 120; 11 | $Audio::voiceCodec = ".v12"; 12 | $Pref::Server::AllowColorLoading = 0; 13 | $Pref::Server::WrenchEventsAdminOnly = 0; 14 | $Pref::Server::AdminPassword = ""; 15 | $Pref::Server::AllowColorLoading = 0; 16 | $Pref::Server::BrickLimit = 256000; 17 | $Pref::Server::ConnectionError = ""; 18 | $Pref::Server::ETardFilter = 1; 19 | $Pref::Server::ETardList = " u , r , ur , wat , wut , wuts , wit , dat , loel , y ,"; 20 | $pref::Server::FallingDamage = 1; 21 | $Pref::Server::Info = "Info Goes Here"; 22 | $Pref::Server::MaxBricksPerSecond = 10; 23 | $Pref::Server::MaxChatLen = 120; 24 | $Pref::Server::MaxPhysVehicles_Total = 10; 25 | $Pref::Server::MaxPlayerVehicles_Total = 150; 26 | $Pref::Server::MaxPlayers = 8; 27 | $Pref::Server::Name = "Blockland Server"; 28 | $Pref::Server::Password = ""; 29 | $Pref::Server::Port = 28000; 30 | $Pref::Server::RandomBrickColor = 0; 31 | $Pref::Server::ResetOnEmpty = 0; 32 | $Pref::Server::SuperAdminPassword = ""; 33 | $pref::Net::PacketRateToClient = 32; 34 | $pref::Net::PacketRateToServer = 32; 35 | $pref::Net::PacketSize = 1023; 36 | $Pref::Net::LagThreshold = 400; 37 | $Pref::Net::DisableUPnP = 0; 38 | $Pref::Server::TooFarDistance = 50; 39 | $Pref::Server::BrickPublicDomainTimeout = -1; 40 | $Pref::Server::WelcomeMessage = "\c2Welcome to Blockland %1."; 41 | $Pref::Server::AutoAdminList = " "; 42 | $Pref::Server::AutoSuperAdminList = " "; 43 | $Pref::Server::AutoAdminServerOwner = 1; 44 | $Pref::Server::QuotaLAN::Schedules = 300; 45 | $Pref::Server::QuotaLAN::Misc = 300; 46 | $Pref::Server::QuotaLAN::Projectile = 50; 47 | $Pref::Server::QuotaLAN::Item = 50; 48 | $Pref::Server::QuotaLAN::Environment = 500; 49 | $Pref::Server::QuotaLAN::Player = 64; 50 | $Pref::Server::QuotaLAN::Vehicle = 20; 51 | $Pref::Server::Quota::Schedules = 50; 52 | $Pref::Server::Quota::Misc = 100; 53 | $Pref::Server::Quota::Projectile = 25; 54 | $Pref::Server::Quota::Item = 25; 55 | $Pref::Server::Quota::Environment = 100; 56 | $Pref::Server::Quota::Player = 10; 57 | $Pref::Server::Quota::Vehicle = 5; 58 | $Pref::Server::ClearEventsOnClientExit = 1; 59 | $Pref::Server::BrickRespawnTime = 30000; 60 | $Music__After_School_Special = 1; 61 | $Music__Ambient_Deep = 1; 62 | $Music__Bass_1 = 1; 63 | $Music__Bass_2 = 1; 64 | $Music__Bass_3 = 1; 65 | $Music__Creepy = 1; 66 | $Music__Distort = 1; 67 | $Music__Drums = 1; 68 | $Music__Factory = 1; 69 | $Music__Icy = 1; 70 | $Music__Jungle = 1; 71 | $Music__Peaceful = 1; 72 | $Music__Piano_Bass = 1; 73 | $Music__Rock = 1; 74 | $Music__Stress_ = 1; 75 | -------------------------------------------------------------------------------- /beta/ui/HelpDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(HelpDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl() 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "78 43"; 18 | extent = "483 393"; 19 | minExtent = "300 200"; 20 | visible = 1; 21 | text = "Help"; 22 | maxLength = 255; 23 | resizeWidth = 1; 24 | resizeHeight = 1; 25 | canMove = 1; 26 | canClose = 1; 27 | canMinimize = 1; 28 | canMaximize = 1; 29 | minSize = "50 50"; 30 | closeCommand = "Canvas.popDialog(HelpDlg);"; 31 | helpTag = 0; 32 | 33 | new GuiScrollCtrl() 34 | { 35 | profile = "GuiScrollProfile"; 36 | horizSizing = "right"; 37 | vertSizing = "height"; 38 | position = "8 26"; 39 | extent = "132 356"; 40 | minExtent = "8 8"; 41 | visible = 1; 42 | willFirstRespond = 1; 43 | hScrollBar = "alwaysOff"; 44 | vScrollBar = "dynamic"; 45 | constantThumbHeight = 0; 46 | childMargin = "0 0"; 47 | helpTag = 0; 48 | 49 | new GuiTextListCtrl(HelpFileList) 50 | { 51 | profile = "GuiTextListProfile"; 52 | horizSizing = "right"; 53 | vertSizing = "bottom"; 54 | position = "1 1"; 55 | extent = "130 160"; 56 | minExtent = "8 8"; 57 | visible = 1; 58 | enumerate = 0; 59 | resizeCell = 1; 60 | columns = 0; 61 | fitParentWidth = 1; 62 | clipColumnText = 0; 63 | fileName3 = "common/help/6. Mission Area Editor.hfl"; 64 | fileName7 = "common/help/2. License.hfl"; 65 | helpTag = 0; 66 | entryCount = 10; 67 | fileName0 = "common/help/9. Terrain Texture Editor.hfl"; 68 | fileName4 = "common/help/5. World Editor.hfl"; 69 | fileName8 = "common/help/10. Terrain Texture Painter.hfl"; 70 | fileName1 = "common/help/8. Terrain Terraform Editor.hfl"; 71 | fileName5 = "common/help/4. Mission Editor Overview.hfl"; 72 | fileName9 = "base/client/help/1. Credits.hfl"; 73 | fileName2 = "common/help/7. Terrain Editor.hfl"; 74 | fileName6 = "common/help/3. Gui Editor.hfl"; 75 | }; 76 | }; 77 | new GuiScrollCtrl() 78 | { 79 | profile = "GuiScrollProfile"; 80 | horizSizing = "width"; 81 | vertSizing = "height"; 82 | position = "146 26"; 83 | extent = "328 356"; 84 | minExtent = "8 8"; 85 | visible = 1; 86 | willFirstRespond = 1; 87 | hScrollBar = "alwaysOff"; 88 | vScrollBar = "alwaysOn"; 89 | constantThumbHeight = 0; 90 | childMargin = "0 0"; 91 | helpTag = 0; 92 | 93 | new GuiMLTextCtrl(HelpText) 94 | { 95 | profile = "GuiMLTextProfile"; 96 | horizSizing = "width"; 97 | vertSizing = "bottom"; 98 | position = "1 1"; 99 | extent = "310 757"; 100 | minExtent = "8 8"; 101 | visible = 1; 102 | lineSpacing = 2; 103 | allowColorChars = 0; 104 | maxChars = -1; 105 | helpTag = 0; 106 | }; 107 | }; 108 | }; 109 | }; 110 | -------------------------------------------------------------------------------- /v1/client/init.cs: -------------------------------------------------------------------------------- 1 | function initClient() 2 | { 3 | echo("\n--------- Initializing Base: Client ---------"); 4 | $Server::Dedicated = 0; 5 | $Client::GameTypeQuery = "Blockland"; 6 | $Client::MissionTypeQuery = "Any"; 7 | initBaseClient(); 8 | initCanvas("Blockland"); 9 | exec("./scripts/allClientScripts.cs"); 10 | exec("./ui/PlayGui.gui"); 11 | exec("./ui/newPlayerListGui.gui"); 12 | exec("./ui/trustInviteGui.gui"); 13 | exec("./ui/miniGameInviteGui.gui"); 14 | exec("./ui/JoinMiniGameGui.gui"); 15 | exec("./ui/CreateMiniGameGui.gui"); 16 | exec("./ui/mainMenuGui.gui"); 17 | exec("./ui/aboutDlg.gui"); 18 | exec("./ui/startMissionGui.gui"); 19 | exec("./ui/joinServerGui.gui"); 20 | exec("./ui/joinServerPassGui.gui"); 21 | exec("./ui/connectingGui.gui"); 22 | exec("./ui/loadingGui.gui"); 23 | exec("./ui/optionsDlg.gui"); 24 | exec("./ui/remapDlg.gui"); 25 | exec("./ui/manualJoin.gui"); 26 | exec("./ui/filtersGui.gui"); 27 | exec("./ui/changeMapGui.gui"); 28 | exec("./ui/noHudGui.gui"); 29 | exec("./ui/ServerConfigGui.gui"); 30 | exec("./scripts/default.bind.cs"); 31 | exec("~/config/client/config.cs"); 32 | exec("./ui/adminGui.gui"); 33 | exec("./ui/addBanGui.gui"); 34 | exec("./ui/unBanGui.gui"); 35 | exec("./ui/brickManGui.gui"); 36 | exec("./ui/escapeMenu.gui"); 37 | exec("./ui/adminLoginGui.gui"); 38 | exec("./ui/printSelectorDlg.gui"); 39 | exec("./ui/brickSelectorDlg.gui"); 40 | exec("./ui/saveBricksGui.gui"); 41 | exec("./ui/loadBricksGui.gui"); 42 | exec("./ui/loadBricksColorGui.gui"); 43 | exec("./ui/saveBricksWarningGui.gui"); 44 | exec("./ui/AvatarGui.gui"); 45 | exec("./ui/autoUpdateGui.gui"); 46 | exec("./ui/newMessageHud.gui"); 47 | exec("./ui/newChatHud.gui"); 48 | exec("./ui/SelectNetworkGui.gui"); 49 | exec("./ui/ProgressGui.gui"); 50 | exec("./ui/fastLoadWarningGui.gui"); 51 | exec("./ui/defaultControlsGui.gui"); 52 | exec("./ui/savingGui.gui"); 53 | exec("./ui/wrenchDlg.gui"); 54 | exec("./ui/wrenchSoundDlg.gui"); 55 | exec("./ui/wrenchVehicleSpawnDlg.gui"); 56 | exec("./ui/keyGui.gui"); 57 | exec("./ui/regNameGui.gui"); 58 | exec("./ui/colorGui.gui"); 59 | exec("./ui/colorSetGui.gui"); 60 | exec("./ui/musicFilesGui.gui"); 61 | exec("./ui/AddOnsGui.gui"); 62 | exec("./ui/PortForwardInfoGui.gui"); 63 | exec("./ui/demoBrickLimitGui.gui"); 64 | JoinServerGui.lastQueryTime = 0; 65 | exec("./scripts/clientAddOns.cs"); 66 | loadClientAddOns(); 67 | setNetPort(0); 68 | setShadowDetailLevel($pref::shadows); 69 | setDefaultFov($pref::Player::defaultFov); 70 | setZoomSpeed($pref::Player::zoomSpeed); 71 | loadMainMenu(); 72 | loadTrustList(); 73 | updateTempBrickSettings(); 74 | if ($JoinGameAddress !$= "") 75 | { 76 | connect($JoinGameAddress, "", $pref::Player::LANName, $pref::Player::NetName, $Pref::Player::ClanPrefix, $Pref::Player::ClanSuffix); 77 | } 78 | } 79 | 80 | function loadMainMenu() 81 | { 82 | Canvas.setContent(MainMenuGui); 83 | Canvas.setCursor("DefaultCursor"); 84 | if ($Pref::Net::ConnectionType > 0 && $Pref::Input::SelectedDefaults > 0) 85 | { 86 | if (!$Pref::DontUpdate) 87 | { 88 | $AU_AutoClose = 1; 89 | Canvas.pushDialog(AutoUpdateGui); 90 | } 91 | } 92 | } 93 | 94 | -------------------------------------------------------------------------------- /v1/server/init.cs: -------------------------------------------------------------------------------- 1 | function initServer() 2 | { 3 | echo("\n--------- Initializing Base: Server ---------"); 4 | Unlock(); 5 | $Server::Status = "Unknown"; 6 | $Server::TestCheats = 1; 7 | $Server::MissionFileSpec = "*/missions/*.mis"; 8 | initBaseServer(); 9 | exec("./scripts/centerPrint.cs"); 10 | exec("./scripts/game.cs"); 11 | } 12 | 13 | function initDedicated() 14 | { 15 | enableWinConsole(1); 16 | echo("\n--------- Starting Dedicated Server ---------"); 17 | $Server::Dedicated = 1; 18 | $Server::LAN = 0; 19 | if ($missionArg !$= "") 20 | { 21 | createServer("Internet", $missionArg); 22 | } 23 | else 24 | { 25 | echo("No mission specified (use -mission filename)"); 26 | } 27 | } 28 | 29 | function initDedicatedLAN() 30 | { 31 | enableWinConsole(1); 32 | echo("\n--------- Starting Dedicated LAN Server ---------"); 33 | $Server::Dedicated = 1; 34 | $Server::LAN = 1; 35 | if ($missionArg !$= "") 36 | { 37 | createServer("LAN", $missionArg); 38 | } 39 | else 40 | { 41 | echo("No mission specified (use -mission filename)"); 42 | } 43 | } 44 | 45 | function dedicatedKeyCheck() 46 | { 47 | if (isUnlocked()) 48 | { 49 | if ($Server::LAN) 50 | { 51 | initDedicatedLAN(); 52 | } 53 | else 54 | { 55 | initDedicated(); 56 | } 57 | } 58 | else 59 | { 60 | dedicatedKeyPrompt(); 61 | } 62 | } 63 | 64 | function dedicatedKeyPrompt() 65 | { 66 | echo(""); 67 | echo("**********************************************************"); 68 | echo("* *"); 69 | echo("* Authentication Key required for hosting internet game *"); 70 | echo("* Input key by via setKey(\"XXXXX-XXXX-XXXX-XXXX\"); *"); 71 | echo("* (Dont screw up) *"); 72 | echo("* *"); 73 | echo("**********************************************************"); 74 | echo(""); 75 | echo(""); 76 | } 77 | 78 | function setKey(%val) 79 | { 80 | %val = trim(%val); 81 | if (%val $= "") 82 | { 83 | return; 84 | } 85 | %val = strreplace(%val, "-", ""); 86 | %val = strreplace(%val, " ", ""); 87 | %val = trim(%val); 88 | %val = strupr(%val); 89 | setKeyDat(%val); 90 | Unlock(); 91 | dedicatedKeyCheck(); 92 | } 93 | 94 | function serverPart2() 95 | { 96 | if ($Server::Dedicated) 97 | { 98 | if (isUnlocked()) 99 | { 100 | if ($Server::LAN) 101 | { 102 | initDedicatedLAN(); 103 | } 104 | else 105 | { 106 | dedicatedKeyCheck(); 107 | } 108 | } 109 | else 110 | { 111 | dedicatedKeyPrompt(); 112 | } 113 | } 114 | else 115 | { 116 | initClient(); 117 | } 118 | if ($missionArg !$= "" && !$Server::Dedicated) 119 | { 120 | createServer("SinglePlayer", $missionArg); 121 | %conn = new GameConnection(ServerConnection); 122 | RootGroup.add(ServerConnection); 123 | %conn.setConnectArgs($pref::Player::LANName, $pref::Player::NetName, $Pref::Player::ClanPrefix, $Pref::Player::ClanSuffix); 124 | %conn.setJoinPassword($Client::Password); 125 | %conn.connectLocal(); 126 | } 127 | } 128 | 129 | -------------------------------------------------------------------------------- /v1/client/ui/demoBrickLimitGui.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(demoBrickLimitGui) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | 11 | new GuiWindowCtrl() 12 | { 13 | profile = "GuiWindowProfile"; 14 | horizSizing = "center"; 15 | vertSizing = "center"; 16 | position = "158 80"; 17 | extent = "323 334"; 18 | minExtent = "8 2"; 19 | visible = 1; 20 | text = "Demo Brick Limit Reached!"; 21 | maxLength = 255; 22 | resizeWidth = 0; 23 | resizeHeight = 0; 24 | canMove = 1; 25 | canClose = 1; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | closeCommand = "canvas.popDialog(demoBrickLimitGui);"; 30 | 31 | new GuiMLTextCtrl() 32 | { 33 | profile = "GuiMLTextProfile"; 34 | horizSizing = "center"; 35 | vertSizing = "bottom"; 36 | position = "29 35"; 37 | extent = "264 162"; 38 | minExtent = "8 2"; 39 | visible = 1; 40 | lineSpacing = 2; 41 | allowColorChars = 0; 42 | maxChars = -1; 43 | text = "You've run out of bricks!

The full of Blockland version lets you...

" @ "» Use up to 128,000 bricks!
" @ "» Play online!
" @ "» Much more!
"; 44 | maxBitmapHeight = -1; 45 | }; 46 | new GuiBitmapButtonCtrl() 47 | { 48 | profile = "BlockButtonProfile"; 49 | horizSizing = "center"; 50 | vertSizing = "top"; 51 | position = "58 205"; 52 | extent = "207 36"; 53 | minExtent = "8 2"; 54 | visible = 1; 55 | command = "gotoWebPage(\"Http://blockland.us/index.asp?p=store\");"; 56 | text = "Buy Now"; 57 | groupNum = -1; 58 | buttonType = "PushButton"; 59 | bitmap = "./button1"; 60 | mKeepCached = 0; 61 | mColor = "255 255 255 255"; 62 | wrap = 0; 63 | }; 64 | new GuiBitmapButtonCtrl() 65 | { 66 | profile = "BlockButtonProfile"; 67 | horizSizing = "center"; 68 | vertSizing = "top"; 69 | position = "58 245"; 70 | extent = "207 36"; 71 | minExtent = "8 2"; 72 | visible = 1; 73 | command = "canvas.pushDialog(keyGui);"; 74 | text = "Enter Key"; 75 | groupNum = -1; 76 | buttonType = "PushButton"; 77 | bitmap = "./button1"; 78 | mKeepCached = 0; 79 | mColor = "255 255 255 255"; 80 | wrap = 0; 81 | }; 82 | new GuiBitmapButtonCtrl(DBLG_StartOver) 83 | { 84 | profile = "BlockButtonProfile"; 85 | horizSizing = "right"; 86 | vertSizing = "top"; 87 | position = "18 297"; 88 | extent = "106 24"; 89 | minExtent = "8 2"; 90 | visible = 1; 91 | command = "commandtoServer('clearBricks');canvas.popDialog(demobricklimitgui);"; 92 | text = "Start Over"; 93 | groupNum = -1; 94 | buttonType = "PushButton"; 95 | bitmap = "./button1"; 96 | mKeepCached = 0; 97 | mColor = "255 255 255 128"; 98 | wrap = 0; 99 | }; 100 | }; 101 | }; 102 | -------------------------------------------------------------------------------- /v1/client/ui/manualJoin.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(manualJoin) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl() 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "208 152"; 18 | extent = "224 157"; 19 | minExtent = "8 2"; 20 | visible = 1; 21 | text = "Connect to IP"; 22 | maxLength = 255; 23 | resizeWidth = 0; 24 | resizeHeight = 0; 25 | canMove = 1; 26 | canClose = 1; 27 | canMinimize = 0; 28 | canMaximize = 0; 29 | minSize = "50 50"; 30 | closeCommand = "canvas.popdialog(\"manualJoin\");"; 31 | helpTag = 0; 32 | 33 | new GuiTextEditCtrl(MJ_txtIP) 34 | { 35 | profile = "GuiTextEditProfile"; 36 | horizSizing = "right"; 37 | vertSizing = "bottom"; 38 | position = "67 71"; 39 | extent = "139 18"; 40 | minExtent = "8 2"; 41 | visible = 1; 42 | maxLength = 255; 43 | historySize = 0; 44 | password = 0; 45 | tabComplete = 0; 46 | sinkAllKeyEvents = 0; 47 | helpTag = 0; 48 | }; 49 | new GuiBitmapButtonCtrl() 50 | { 51 | profile = "BlockButtonProfile"; 52 | horizSizing = "left"; 53 | vertSizing = "bottom"; 54 | position = "116 103"; 55 | extent = "91 38"; 56 | minExtent = "8 2"; 57 | visible = 1; 58 | command = "MJ_connect();"; 59 | text = "Connect >>"; 60 | groupNum = -1; 61 | buttonType = "PushButton"; 62 | bitmap = "./button2"; 63 | mKeepCached = 0; 64 | wrap = 0; 65 | }; 66 | new GuiTextCtrl() 67 | { 68 | profile = "GuiTextProfile"; 69 | horizSizing = "right"; 70 | vertSizing = "bottom"; 71 | position = "20 70"; 72 | extent = "47 18"; 73 | minExtent = "8 2"; 74 | visible = 1; 75 | text = "Server IP:"; 76 | maxLength = 255; 77 | helpTag = 0; 78 | }; 79 | new GuiTextEditCtrl(MJ_txtJoinPass) 80 | { 81 | profile = "GuiTextEditProfile"; 82 | horizSizing = "right"; 83 | vertSizing = "bottom"; 84 | position = "67 41"; 85 | extent = "139 18"; 86 | minExtent = "8 2"; 87 | visible = 1; 88 | maxLength = 255; 89 | historySize = 0; 90 | password = 1; 91 | tabComplete = 0; 92 | sinkAllKeyEvents = 0; 93 | helpTag = 0; 94 | }; 95 | new GuiTextCtrl() 96 | { 97 | profile = "GuiTextProfile"; 98 | horizSizing = "right"; 99 | vertSizing = "bottom"; 100 | position = "14 40"; 101 | extent = "53 18"; 102 | minExtent = "8 2"; 103 | visible = 1; 104 | text = "Password:"; 105 | maxLength = 255; 106 | helpTag = 0; 107 | }; 108 | new GuiBitmapButtonCtrl() 109 | { 110 | profile = "BlockButtonProfile"; 111 | horizSizing = "right"; 112 | vertSizing = "bottom"; 113 | position = "16 103"; 114 | extent = "91 38"; 115 | minExtent = "8 2"; 116 | visible = 1; 117 | command = "canvas.popDialog(manualJoin);"; 118 | text = "<< Cancel"; 119 | groupNum = -1; 120 | buttonType = "PushButton"; 121 | bitmap = "./button2"; 122 | mKeepCached = 0; 123 | wrap = 0; 124 | }; 125 | }; 126 | }; 127 | -------------------------------------------------------------------------------- /beta/client/init.cs: -------------------------------------------------------------------------------- 1 | function initClient() 2 | { 3 | echo("\n--------- Initializing Base: Client ---------"); 4 | $Server::Dedicated = 0; 5 | $Client::GameTypeQuery = "Blockland"; 6 | $Client::MissionTypeQuery = "Any"; 7 | initBaseClient(); 8 | initCanvas("Blockland"); 9 | exec("./scripts/audioProfiles.cs"); 10 | exec("./ui/PlayGui.gui"); 11 | exec("./ui/MainChatHud.gui"); 12 | exec("./ui/MessageHud.gui"); 13 | exec("./ui/playerList.gui"); 14 | exec("./ui/mainMenuGui.gui"); 15 | exec("./ui/aboutDlg.gui"); 16 | exec("./ui/startMissionGui.gui"); 17 | exec("./ui/joinServerGui.gui"); 18 | exec("./ui/joinServerPassGui.gui"); 19 | exec("./ui/endGameGui.gui"); 20 | exec("./ui/loadingGui.gui"); 21 | exec("./ui/optionsDlg.gui"); 22 | exec("./ui/remapDlg.gui"); 23 | exec("./ui/manualJoin.gui"); 24 | exec("./ui/filtersGui.gui"); 25 | exec("./ui/changeMapGui.gui"); 26 | exec("./ui/noHudGui.gui"); 27 | exec("./scripts/client.cs"); 28 | exec("./scripts/missionDownload.cs"); 29 | exec("./scripts/serverConnection.cs"); 30 | exec("./scripts/playerList.cs"); 31 | exec("./scripts/loadingGui.cs"); 32 | exec("./scripts/optionsDlg.cs"); 33 | exec("./scripts/chatHud.cs"); 34 | exec("./scripts/messageHud.cs"); 35 | exec("./scripts/playGui.cs"); 36 | exec("./scripts/centerPrint.cs"); 37 | exec("./scripts/game.cs"); 38 | exec("./scripts/msgCallbacks.cs"); 39 | exec("./scripts/startMissionGui.cs"); 40 | exec("./scripts/clientCmd.cs"); 41 | exec("./scripts/manualJoin.cs"); 42 | exec("./scripts/joinServerGui.cs"); 43 | exec("./scripts/joinServerPassGui.cs"); 44 | exec("./scripts/filtersGui.cs"); 45 | exec("./scripts/noHudGui.cs"); 46 | exec("./scripts/changeMapGui.cs"); 47 | exec("./scripts/default.bind.cs"); 48 | exec("./config.cs"); 49 | exec("./ui/adminGui.gui"); 50 | exec("./scripts/adminGui.cs"); 51 | exec("./ui/escapeMenu.gui"); 52 | exec("./scripts/escapeMenu.cs"); 53 | exec("./ui/adminLoginGui.gui"); 54 | exec("./scripts/adminLoginGui.cs"); 55 | exec("./ui/printSelectorDlg.gui"); 56 | exec("./scripts/printSelectorDlg.cs"); 57 | exec("./ui/brickSelectorDlg.gui"); 58 | exec("./scripts/brickSelectorDlg.cs"); 59 | exec("./scripts/brickControls.cs"); 60 | exec("./ui/saveBricksGui.gui"); 61 | exec("./ui/loadBricksGui.gui"); 62 | exec("./ui/loadBricksColorGui.gui"); 63 | exec("./scripts/saveBricks.cs"); 64 | exec("./ui/AvatarGui.gui"); 65 | exec("./scripts/AvatarGui.cs"); 66 | exec("./ui/autoUpdateGui.gui"); 67 | exec("./scripts/autoUpdate.cs"); 68 | exec("./scripts/mainMenuGui.cs"); 69 | exec("./scripts/whosTalking.cs"); 70 | exec("./ui/newMessageHud.gui"); 71 | exec("./scripts/newMessageHud.cs"); 72 | exec("./ui/newChatHud.gui"); 73 | exec("./scripts/newChatHud.cs"); 74 | setNetPort(0); 75 | setShadowDetailLevel($pref::shadows); 76 | setDefaultFov($pref::Player::defaultFov); 77 | setZoomSpeed($pref::Player::zoomSpeed); 78 | loadMainMenu(); 79 | updateTempBrickSettings(); 80 | if ($JoinGameAddress !$= "") 81 | { 82 | connect($JoinGameAddress, "", $pref::Player::Name); 83 | } 84 | } 85 | 86 | function loadMainMenu() 87 | { 88 | Canvas.setContent(MainMenuGui); 89 | Canvas.setCursor("DefaultCursor"); 90 | if (!$Pref::DontUpdate) 91 | { 92 | $AU_AutoClose = 1; 93 | Canvas.pushDialog(AutoUpdateGui); 94 | } 95 | } 96 | 97 | -------------------------------------------------------------------------------- /v1/client/ui/loadBricksColorGui.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(LoadBricksColorGui) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 2"; 9 | visible = 1; 10 | 11 | new GuiWindowCtrl() 12 | { 13 | profile = "BlockWindowProfile"; 14 | horizSizing = "center"; 15 | vertSizing = "center"; 16 | position = "191 115"; 17 | extent = "258 250"; 18 | minExtent = "8 2"; 19 | visible = 1; 20 | text = "Color Warning"; 21 | maxLength = 255; 22 | resizeWidth = 0; 23 | resizeHeight = 0; 24 | canMove = 1; 25 | canClose = 1; 26 | canMinimize = 0; 27 | canMaximize = 0; 28 | minSize = "50 50"; 29 | closeCommand = "canvas.popDialog(\"LoadBricksColorGui\");"; 30 | 31 | new GuiMLTextCtrl() 32 | { 33 | profile = "GuiMLTextProfile"; 34 | horizSizing = "right"; 35 | vertSizing = "bottom"; 36 | position = "11 34"; 37 | extent = "239 28"; 38 | minExtent = "8 2"; 39 | visible = 1; 40 | lineSpacing = 2; 41 | allowColorChars = 0; 42 | maxChars = -1; 43 | text = "The brick colors of this file are different then your current color set. What would you like to do?"; 44 | }; 45 | new GuiBitmapButtonCtrl(BTN_LoadBricksColor_Append) 46 | { 47 | profile = "BlockButtonProfile"; 48 | horizSizing = "center"; 49 | vertSizing = "bottom"; 50 | position = "7 151"; 51 | extent = "243 36"; 52 | minExtent = "8 2"; 53 | visible = 1; 54 | command = "ColorWarning_ClickAppend();"; 55 | text = "Add More Colors To Current Set"; 56 | groupNum = -1; 57 | buttonType = "PushButton"; 58 | bitmap = "./button1"; 59 | mKeepCached = 0; 60 | wrap = 0; 61 | }; 62 | new GuiBitmapButtonCtrl() 63 | { 64 | profile = "BlockButtonProfile"; 65 | horizSizing = "center"; 66 | vertSizing = "bottom"; 67 | position = "7 111"; 68 | extent = "243 36"; 69 | minExtent = "8 2"; 70 | visible = 1; 71 | command = "ColorWarning_ClickReplace();"; 72 | text = "Replace Current Color Set"; 73 | groupNum = -1; 74 | buttonType = "PushButton"; 75 | bitmap = "./button1"; 76 | mKeepCached = 0; 77 | wrap = 0; 78 | }; 79 | new GuiBitmapButtonCtrl() 80 | { 81 | profile = "BlockButtonProfile"; 82 | horizSizing = "center"; 83 | vertSizing = "bottom"; 84 | position = "7 71"; 85 | extent = "243 36"; 86 | minExtent = "8 2"; 87 | visible = 1; 88 | command = "ColorWarning_ClickMatch();"; 89 | text = "Find the Nearest Match from Current Set"; 90 | groupNum = -1; 91 | buttonType = "PushButton"; 92 | bitmap = "./button1"; 93 | mKeepCached = 0; 94 | wrap = 0; 95 | }; 96 | new GuiBitmapButtonCtrl() 97 | { 98 | profile = "BlockButtonProfile"; 99 | horizSizing = "center"; 100 | vertSizing = "bottom"; 101 | position = "83 197"; 102 | extent = "91 36"; 103 | minExtent = "8 2"; 104 | visible = 1; 105 | command = "ColorWarning_ClickCancel();"; 106 | accelerator = "escape"; 107 | text = "Cancel"; 108 | groupNum = -1; 109 | buttonType = "PushButton"; 110 | bitmap = "./button2"; 111 | mKeepCached = 0; 112 | wrap = 0; 113 | }; 114 | }; 115 | }; 116 | -------------------------------------------------------------------------------- /beta/ui/InspectAddFieldDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(InspectAddFieldDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl() 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "209 177"; 18 | extent = "221 125"; 19 | minExtent = "8 8"; 20 | visible = 1; 21 | text = "Add dynamic field..."; 22 | maxLength = 255; 23 | resizeWidth = 1; 24 | resizeHeight = 1; 25 | canMove = 1; 26 | canClose = 1; 27 | canMinimize = 1; 28 | canMaximize = 1; 29 | minSize = "50 50"; 30 | closeCommand = "Canvas.popDialog(InspectAddFieldDlg);"; 31 | helpTag = 0; 32 | 33 | new GuiTextCtrl() 34 | { 35 | profile = "GuiTextProfile"; 36 | horizSizing = "right"; 37 | vertSizing = "bottom"; 38 | position = "22 32"; 39 | extent = "30 18"; 40 | minExtent = "8 8"; 41 | visible = 1; 42 | text = "Name:"; 43 | maxLength = 255; 44 | helpTag = 0; 45 | }; 46 | new GuiTextCtrl() 47 | { 48 | profile = "GuiTextProfile"; 49 | horizSizing = "right"; 50 | vertSizing = "bottom"; 51 | position = "21 58"; 52 | extent = "31 18"; 53 | minExtent = "8 8"; 54 | visible = 1; 55 | text = "Value:"; 56 | maxLength = 255; 57 | helpTag = 0; 58 | }; 59 | new GuiTextEditCtrl(InspectAddFieldValue) 60 | { 61 | profile = "GuiTextEditProfile"; 62 | horizSizing = "right"; 63 | vertSizing = "bottom"; 64 | position = "62 58"; 65 | extent = "146 18"; 66 | minExtent = "8 8"; 67 | visible = 1; 68 | maxLength = 255; 69 | historySize = 0; 70 | password = 0; 71 | tabComplete = 0; 72 | sinkAllKeyEvents = 0; 73 | helpTag = 0; 74 | }; 75 | new GuiTextEditCtrl(InspectAddFieldName) 76 | { 77 | profile = "GuiTextEditProfile"; 78 | horizSizing = "right"; 79 | vertSizing = "bottom"; 80 | position = "62 32"; 81 | extent = "146 18"; 82 | minExtent = "8 8"; 83 | visible = 1; 84 | maxLength = 255; 85 | historySize = 0; 86 | password = 0; 87 | tabComplete = 0; 88 | sinkAllKeyEvents = 0; 89 | helpTag = 0; 90 | }; 91 | new GuiBitmapButtonCtrl() 92 | { 93 | profile = "BlockButtonProfile"; 94 | horizSizing = "right"; 95 | vertSizing = "bottom"; 96 | position = "122 85"; 97 | extent = "66 30"; 98 | minExtent = "8 2"; 99 | visible = 1; 100 | command = "Canvas.popDialog(InspectAddFieldDlg);"; 101 | accelerator = "escape"; 102 | text = "CANCEL"; 103 | groupNum = -1; 104 | buttonType = "PushButton"; 105 | bitmap = "~/client/ui/button2"; 106 | }; 107 | new GuiBitmapButtonCtrl() 108 | { 109 | profile = "BlockButtonProfile"; 110 | horizSizing = "right"; 111 | vertSizing = "bottom"; 112 | position = "28 85"; 113 | extent = "66 30"; 114 | minExtent = "8 2"; 115 | visible = 1; 116 | command = "canvas.popDialog(InspectAddFieldDlg);InspectAddFieldDlg.doAction();"; 117 | accelerator = "return"; 118 | text = "OK"; 119 | groupNum = -1; 120 | buttonType = "PushButton"; 121 | bitmap = "~/client/ui/button2"; 122 | }; 123 | }; 124 | }; 125 | -------------------------------------------------------------------------------- /v1/ui/InspectAddFieldDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(InspectAddFieldDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl() 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "center"; 16 | vertSizing = "center"; 17 | position = "209 177"; 18 | extent = "221 125"; 19 | minExtent = "8 8"; 20 | visible = 1; 21 | text = "Add dynamic field..."; 22 | maxLength = 255; 23 | resizeWidth = 1; 24 | resizeHeight = 0; 25 | canMove = 1; 26 | canClose = 1; 27 | canMinimize = 0; 28 | canMaximize = 0; 29 | minSize = "50 50"; 30 | closeCommand = "Canvas.popDialog(InspectAddFieldDlg);"; 31 | helpTag = 0; 32 | 33 | new GuiTextCtrl() 34 | { 35 | profile = "GuiTextProfile"; 36 | horizSizing = "right"; 37 | vertSizing = "bottom"; 38 | position = "22 32"; 39 | extent = "30 18"; 40 | minExtent = "8 8"; 41 | visible = 1; 42 | text = "Name:"; 43 | maxLength = 255; 44 | helpTag = 0; 45 | }; 46 | new GuiTextCtrl() 47 | { 48 | profile = "GuiTextProfile"; 49 | horizSizing = "right"; 50 | vertSizing = "bottom"; 51 | position = "21 58"; 52 | extent = "31 18"; 53 | minExtent = "8 8"; 54 | visible = 1; 55 | text = "Value:"; 56 | maxLength = 255; 57 | helpTag = 0; 58 | }; 59 | new GuiTextEditCtrl(InspectAddFieldValue) 60 | { 61 | profile = "GuiTextEditProfile"; 62 | horizSizing = "right"; 63 | vertSizing = "bottom"; 64 | position = "62 58"; 65 | extent = "146 18"; 66 | minExtent = "8 8"; 67 | visible = 1; 68 | maxLength = 255; 69 | historySize = 0; 70 | password = 0; 71 | tabComplete = 0; 72 | sinkAllKeyEvents = 0; 73 | helpTag = 0; 74 | }; 75 | new GuiTextEditCtrl(InspectAddFieldName) 76 | { 77 | profile = "GuiTextEditProfile"; 78 | horizSizing = "right"; 79 | vertSizing = "bottom"; 80 | position = "62 32"; 81 | extent = "146 18"; 82 | minExtent = "8 8"; 83 | visible = 1; 84 | maxLength = 255; 85 | historySize = 0; 86 | password = 0; 87 | tabComplete = 0; 88 | sinkAllKeyEvents = 0; 89 | helpTag = 0; 90 | }; 91 | new GuiBitmapButtonCtrl() 92 | { 93 | profile = "BlockButtonProfile"; 94 | horizSizing = "right"; 95 | vertSizing = "bottom"; 96 | position = "122 85"; 97 | extent = "66 30"; 98 | minExtent = "8 2"; 99 | visible = 1; 100 | command = "Canvas.popDialog(InspectAddFieldDlg);"; 101 | accelerator = "escape"; 102 | text = "CANCEL"; 103 | groupNum = -1; 104 | buttonType = "PushButton"; 105 | bitmap = "~/client/ui/button2"; 106 | mKeepCached = 0; 107 | }; 108 | new GuiBitmapButtonCtrl() 109 | { 110 | profile = "BlockButtonProfile"; 111 | horizSizing = "right"; 112 | vertSizing = "bottom"; 113 | position = "28 85"; 114 | extent = "66 30"; 115 | minExtent = "8 2"; 116 | visible = 1; 117 | command = "canvas.popDialog(InspectAddFieldDlg);InspectAddFieldDlg.doAction();"; 118 | accelerator = "return"; 119 | text = "OK"; 120 | groupNum = -1; 121 | buttonType = "PushButton"; 122 | bitmap = "~/client/ui/button2"; 123 | mKeepCached = 0; 124 | }; 125 | }; 126 | }; 127 | -------------------------------------------------------------------------------- /beta/client/ui/MainChatHud.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(MainChatHud) 2 | { 3 | profile = "GuiModelessDialogProfile"; 4 | horizSizing = "width"; 5 | vertSizing = "height"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | noCursor = 1; 12 | 13 | new GuiNoMouseCtrl() 14 | { 15 | profile = "GuiDefaultProfile"; 16 | horizSizing = "relative"; 17 | vertSizing = "bottom"; 18 | position = "0 0"; 19 | extent = "400 300"; 20 | minExtent = "8 8"; 21 | visible = 1; 22 | helpTag = 0; 23 | 24 | new GuiBitmapCtrl(OuterChatHud) 25 | { 26 | profile = "BlockChatTextShadowProfile"; 27 | horizSizing = "width"; 28 | vertSizing = "bottom"; 29 | position = "5 5"; 30 | extent = "390 140"; 31 | minExtent = "8 8"; 32 | visible = 1; 33 | wrap = 1; 34 | helpTag = 0; 35 | 36 | new GuiButtonCtrl(chatPageDown) 37 | { 38 | profile = "GuiButtonProfile"; 39 | horizSizing = "right"; 40 | vertSizing = "bottom"; 41 | position = "594 126"; 42 | extent = "36 14"; 43 | minExtent = "8 8"; 44 | visible = 0; 45 | text = "Dwn"; 46 | groupNum = -1; 47 | buttonType = "PushButton"; 48 | helpTag = 0; 49 | }; 50 | new GuiScrollCtrl(ChatScrollHud) 51 | { 52 | profile = "ChatHudScrollProfile"; 53 | horizSizing = "width"; 54 | vertSizing = "bottom"; 55 | position = "0 0"; 56 | extent = "390 140"; 57 | minExtent = "8 8"; 58 | visible = 1; 59 | willFirstRespond = 1; 60 | hScrollBar = "alwaysOff"; 61 | vScrollBar = "alwaysOff"; 62 | constantThumbHeight = 0; 63 | childMargin = "0 0"; 64 | helpTag = 0; 65 | 66 | new GuiMessageVectorCtrl(ChatHudShadow) 67 | { 68 | profile = "BlockChatTextShadowProfile"; 69 | horizSizing = "width"; 70 | vertSizing = "height"; 71 | position = "0 0"; 72 | extent = "386 14"; 73 | minExtent = "8 8"; 74 | visible = 1; 75 | lineSpacing = 0; 76 | lineContinuedIndex = 10; 77 | allowedMatches[0] = "http"; 78 | allowedMatches[1] = "tgeserver"; 79 | matchColor = "0 0 255 255"; 80 | maxColorIndex = 5; 81 | helpTag = 0; 82 | }; 83 | new GuiMessageVectorCtrl(ChatHud) 84 | { 85 | profile = "BlockChatTextProfile"; 86 | horizSizing = "width"; 87 | vertSizing = "height"; 88 | position = "0 0"; 89 | extent = "386 14"; 90 | minExtent = "8 8"; 91 | visible = 1; 92 | lineSpacing = 0; 93 | lineContinuedIndex = 10; 94 | allowedMatches[0] = "http"; 95 | allowedMatches[1] = "tgeserver"; 96 | matchColor = "0 0 255 255"; 97 | maxColorIndex = 5; 98 | helpTag = 0; 99 | }; 100 | }; 101 | }; 102 | new GuiSwatchCtrl(ChatWhosTalkingBox) 103 | { 104 | profile = "GuiDefaultProfile"; 105 | horizSizing = "width"; 106 | vertSizing = "bottom"; 107 | position = "5 145"; 108 | extent = "390 18"; 109 | minExtent = "8 2"; 110 | visible = 0; 111 | color = "0 0 128 128"; 112 | 113 | new GuiTextCtrl(chatWhosTalkingText) 114 | { 115 | profile = "HUDChatTextProfile"; 116 | horizSizing = "right"; 117 | vertSizing = "bottom"; 118 | position = "0 0"; 119 | extent = "630 18"; 120 | minExtent = "8 2"; 121 | visible = 1; 122 | maxLength = 255; 123 | }; 124 | }; 125 | }; 126 | }; 127 | -------------------------------------------------------------------------------- /v1/ui/LoadFileDlg.gui: -------------------------------------------------------------------------------- 1 | new GuiControl(LoadFileDlg) 2 | { 3 | profile = "GuiDefaultProfile"; 4 | horizSizing = "right"; 5 | vertSizing = "bottom"; 6 | position = "0 0"; 7 | extent = "640 480"; 8 | minExtent = "8 8"; 9 | visible = 1; 10 | helpTag = 0; 11 | 12 | new GuiWindowCtrl() 13 | { 14 | profile = "BlockWindowProfile"; 15 | horizSizing = "right"; 16 | vertSizing = "bottom"; 17 | position = "137 78"; 18 | extent = "378 326"; 19 | minExtent = "8 8"; 20 | visible = 1; 21 | text = "Load File..."; 22 | maxLength = 255; 23 | resizeWidth = 1; 24 | resizeHeight = 1; 25 | canMove = 1; 26 | canClose = 1; 27 | canMinimize = 1; 28 | canMaximize = 1; 29 | minSize = "50 50"; 30 | closeCommand = "Canvas.popDialog(LoadFileDlg);"; 31 | helpTag = 0; 32 | 33 | new GuiScrollCtrl() 34 | { 35 | profile = "GuiScrollProfile"; 36 | horizSizing = "right"; 37 | vertSizing = "bottom"; 38 | position = "4 26"; 39 | extent = "293 295"; 40 | minExtent = "8 8"; 41 | visible = 1; 42 | willFirstRespond = 1; 43 | hScrollBar = "dynamic"; 44 | vScrollBar = "alwaysOn"; 45 | constantThumbHeight = 0; 46 | childMargin = "0 0"; 47 | defaultLineHeight = 15; 48 | helpTag = 0; 49 | 50 | new GuiTextListCtrl(loadFileList) 51 | { 52 | profile = "GuiTextArrayProfile"; 53 | horizSizing = "right"; 54 | vertSizing = "bottom"; 55 | position = "1 1"; 56 | extent = "273 8"; 57 | minExtent = "8 8"; 58 | visible = 1; 59 | altCommand = "eval($loadFileCommand); Canvas.popDialog(LoadFileDlg);"; 60 | enumerate = 0; 61 | resizeCell = 1; 62 | columns = 0; 63 | fitParentWidth = 1; 64 | clipColumnText = 0; 65 | helpTag = 0; 66 | noDuplicates = "false"; 67 | }; 68 | }; 69 | new GuiBitmapButtonCtrl() 70 | { 71 | profile = "BlockButtonProfile"; 72 | horizSizing = "right"; 73 | vertSizing = "bottom"; 74 | position = "305 238"; 75 | extent = "60 30"; 76 | minExtent = "8 2"; 77 | visible = 1; 78 | command = "eval($loadFileCommand); Canvas.popDialog(LoadFileDlg);"; 79 | text = "Load"; 80 | groupNum = -1; 81 | buttonType = "PushButton"; 82 | bitmap = "~/client/ui/button2"; 83 | }; 84 | new GuiBitmapButtonCtrl() 85 | { 86 | profile = "BlockButtonProfile"; 87 | horizSizing = "right"; 88 | vertSizing = "bottom"; 89 | position = "305 278"; 90 | extent = "60 30"; 91 | minExtent = "8 2"; 92 | visible = 1; 93 | command = "Canvas.popDialog(LoadFileDlg);"; 94 | accelerator = "escape"; 95 | text = "Cancel"; 96 | groupNum = -1; 97 | buttonType = "PushButton"; 98 | bitmap = "~/client/ui/button2"; 99 | }; 100 | }; 101 | }; 102 | function fillFileList(%filespec, %ctrl) 103 | { 104 | %ctrl.clear(); 105 | %i = 0; 106 | %f = 0; 107 | for (%fld = getField(%filespec, 0); %fld !$= ""; %fld = getField(%filespec, %f++)) 108 | { 109 | for (%file = findFirstFile(%fld); %file !$= ""; %file = findNextFile(%fld)) 110 | { 111 | if (getSubStr(%file, 0, 4) !$= "CVS/") 112 | { 113 | %ctrl.addRow(%i++, %file); 114 | } 115 | } 116 | } 117 | %ctrl.sort(0); 118 | } 119 | 120 | function getLoadFilename(%filespec, %callback) 121 | { 122 | $loadFileCommand = "if(loadFileList.getSelectedId() >= 0)" @ %callback @ "(loadFileList.getValue());"; 123 | Canvas.pushDialog(LoadFileDlg, 99); 124 | fillFileList(%filespec, loadFileList); 125 | } 126 | 127 | --------------------------------------------------------------------------------