added everything

This commit is contained in:
Metario
2017-04-17 06:17:10 -06:00
commit 9c6ff74f19
6121 changed files with 1625704 additions and 0 deletions

23
example/demo/Env_Pack_EULA.TXT Executable file
View File

@ -0,0 +1,23 @@
End User License Agreement (EULA)
End User License Agreement (EULA)
End User License Agreement -- Terms and Conditions
END USER LICENSE AGREEMENT
YOU SHOULD CAREFULLY READ THE FOLLOWING TERMS AND CONDITIONS BEFORE USING THIS media, WHICH CAN BE DOWNLOADED OR DISTRIBUTED ON OTHER MEDIA FROM THE GARAGEGAMES WEB SITE, ALONG WITH ANY ACCOMPANYING DOCUMENTATION.
YOUR USE OF THIS media MEANS THAT YOU ACCEPT THESE TERMS AND CONDITIONS. IF YOU DO NOT ACCEPT THESE TERMS AND CONDITIONS, YOU SHOULD NOT USE THIS media. BY INSTALLING, DOWNLOADING, COPYING, OR OTHERWISE USING THE media, YOU ACKNOWLEDGE THAT YOU HAVE READ THESE TERMS AND CONDITIONS, UNDERSTAND THEM, AND AGREE TO BE BOUND BY THEM. IF YOU DO NOT AGREE TO THESE TERMS AND CONDITIONS, YOU SHOULD NOT USE THIS media.
End User License Terms:
1. SINGLE COPY media LICENSE: This media is copyrighted and protected by law and international treaty. You may download this media through a web browser or copy it from GarageGames approved distributed media onto a single computer for use in the creation of one released software product, unless specifically licensed to do otherwise by Gremlin Studios. This is a license, not a transfer of title, and you may not (a) create derivative works based on this media for retail sale or distribution by any means other than as provided by this argreement;(b) transfer this media or the documentation in whole or in part to another person without Gremlin Studios<6F>s permission;(c) remove any copyright or other Gremlin Studios proprietary notices; (g) transfer this media to another person. You agree to prevent any copying of this media that you download for your use from the Garage Games web site.
2. OWNERSHIP: This media and all Gremlin Studios information on the GarageGames web site is proprietary material of Gremlin Studios and except as provided for by this argreement, may not be copied, reproduced, published, uploaded, posted, transmitted, or distributed in any way, without Gremlin Studios prior written permission. Except as expressly provided herein, Gremlin Studios and its suppliers do not grant any express or implied right to you under any patents, copyrights, trademarks, or trade secret information of Gremlin Studios or its suppliers.
3. TERMINATION OF THIS LICENSE: Gremlin Studios may terminate this license at any time if you are in breach of the terms and conditions of use. Upon such termination you must and agree to immediately destroy all copies of this media and all of its accompanying documentation.
4. DISCLAIMER AND WARRANTY: Gremlin Studios provides the products related to this agreement "AS IS" without warranty of any kind. Gremlin Studios makes no warranties either express or implied in conjunction with any content published at GarageGames. Should the media prove defective in any respect, the licensee not the licensor or its suppliers or resellers assumes the entire cost of any service and repair.
5. CHOICE OF LAW: This agreement will be governed by the laws of the State of Oregon, U.S.A., excluding its conflict of law provisions. Unless otherwise agreed in writing, all disputes relating to this Agreement shall be subject to final and binding arbitration in Lane County, Oregon, with the losing party paying all costs of arbitration.

514
example/demo/Env_Pack_readme.txt Executable file
View File

@ -0,0 +1,514 @@
Readme for Content Packs
August 13th, 2004
(C) 2004 Timothy Aste
http://www.gremlinstudios.com
Distributed by Garage Games
http://www.garagegames.com
Please read the licensing agreement and special notes before using this content, thanks.
Always back up your work!
-------------------------------------
Table of Contents
X.1 - Version History
X.2 - Quick Setup Guide
1 - Introduction
2 - About the packs
3 - Special Notes**
4 - Help! It doesn't work!
5 - Credits & Special Thanks
-------------------------------------
x.1
-Added collision meshes to rock objects in Environment Pack
-Added collision meshes to deadtree objects in Environment Pack
-Updated Documenation
-Included .MAX 5.0 files for all DTS shapes
-Fixed a typo in Rpgville1.mis
x.2
-Quick Setup Guide
Just want to pop this stuff in Torque and play? Well this is what you have to do:
I am using Starter.FPS as the demo I'm working with, from Torque 1.3
1- When you open the Content pack, you will see a subdirectory called "textures"
2- Copy the entire contents of "textures" into "../yourtorque/starter.fps/data/interiors/"
Keep in mind it's important that they stay in the high level directory "interiors"
3- Create a new subdirectory inside "interiors" for the content packs contents named after
the content pack, for example "buildings" or "castles" or "misc." depending on what your
copying and what your preferences for labeling things are.
4- Go back to the content pack directory and locate the subdirectory labeled "compiled" or
"precompiled".
5- Copy the entire contents of the "compiled"/"precompiled" directory over to the new
subdirectory you just made in "interiors". For example, if I were using the building pack,
I would copy all the files from "Building_Pack/Compiled/" to
"../yourtorque/Starter.FPS/interiors/buildings", and /buildings being the name of the
direcotry you just made in step 3.
6- Go back to step 1 & repeat this process for each content pack you have. When coping new
textures, you may be asked to over-write some textures, this is ok because there is a little
overlap in some textures between packs.
7- If your newer to Torque, **PLEASE** read the Special Notes & Help it Doesn't work sections
of this readme file. This will explain the following: Common problems & fixes, how to make
the windmill blades animate, how to set up environment effects, how to piece together
multiple piece buildings and where to locate prearranged multiple piece buildings that you
can just copy & paste into your mission file, and other misc. stuff. PLEASE read this.
1 ------ Introduction: A note from the designer
-----------------------------------------------------
This content pack was designed as part of a whole interchanging system of packs that work extremely
well with each other for the best results. To read more about the other packs available in this
series, please check out http://www.garagegames.com
The content packs started as a personal challenge (and practice of course) in late June of 2004. I
wanted to see if I could design a whole town, so I just sat down and began chipping away at it
learning the ins and out's of Torque. After posting some of my playing around up on
Garagegames.com I received an overwhelming response and demand for high quality assets similar to
what I had been "playing" around with and I was quickly contacted by Josh Williams of GarageGames
and we laid down a roadmap for a content pack plan which over the course of a month became content
"packs". This is my first attempt at a professional product so please give me a slack, and feel free
to email me criticisms or problems and I will try to respond as best and fast as I can. I would of given
these away for free, but I think GG would of murdered me! :)
The assets in the content pack are made to be used in a variety of game genres from RPG, to FPS, to
even RTS. Much, much time went into detailing each and every asset to work across as many mediums as
possible while providing as much variety as possible without losing their connection to each other.
I hope you enjoy these packs as much as I've enjoyed the journey of making them from their random
beginning to their fantastic end. Please feel free to drop me a line at tim@gremlinstudios.com and
show off how you are using them!
2 ------ About the Packs
-----------------------------------------------------
Buildings Pack
--------------
This content pack includes 27 high quality buildings of all shapes and sizes.
Every building comes portaled and with 3-6 levels of detail to optimize frame rates on all systems.
No expense was spared in decorating the interiors or exteriors. There are enough buildings here to
put together a whole small town, enjoy!
- 2 Bars
- 2 Large Houses
- 5 Medium Houses
- 5 Small Houses
- 3 Medium Shops
- 3 Small Shops
- 3 Taverns
- 1 Church
---1 Altar
---1 Pew
- 1 Windmill
---1 Animated Windmill Fan
Castle Pack
-----------
This content pack includes 69 high quality modular infrastructure units of all shapes and sizes to
build larger complex systems. Every object comes with 3-6 levels of detail to optimize frame rates on
all systems. Every prop here was design to be used as a modular unit to piece together to create
large complex structures of any shape and size to fit what you need!
- 1 Four-Piece Castle Set
- 3 Road pieces
- 2 Stone Walls
- 2 Metal Walls
- 4 Palisade Walls
- 2 Two story Corners
- 2 Two Story City Walls
- 1 One Story Corner
- 3 One Story City Walls
- 2 Gates
- 7 Piece Aqua duct System
- 4 Foot Bridges
- 1 Rope Bridge
- 1 Stone Bridge
- 2 Large Signs
- 4 Medium Signs
- 3 Small Signs
- 3 Piece Skywalk System
- 9 Staircases
- 3 Watch Towers
- 3 Wells
- 4 Columns
Outside Accessories Pack
------------------------
This content pack includes 57 high quality props of all shapes and sizes. Every object comes with
3-6 levels of detail to optimize frame rates on all systems. Use the props in-game to decorate your
town with flair or take the source .maps and hardcode them as prefabs into any project to give it
that special touch!
- 4 Banners
- 1 Large Town bell
- 3 Carts
- 2 Clotheslines
- 2 Market Stands
- 1 Construction Site Kit
---3 Bases
---2 Planks
---2 Scaffolding Pieces
---3 Poles
- 6 Fences
- 1 Firepit
- 1 Gallows
- 1 Hitching Post
- 3 Outdoor Lanterns
- 1 Outdoor Stove
- 3 Shacks
- 1 Smithy Kit
---1 Anvil
---1 Forge
- 1 Tent
- 11 Piece Tombstone Kit
- 1 Trough
- 1 Waterbased Kit
---1 Rowboat
---1 Oar
---1 Coiled Rope
---1 Large Dock
Furniture Pack ETA: November 2004
-------------
This content pack includes 36 high quality props of all shapes and sizes. Every object comes with
3-6 levels of detail to optimize frame rates on all systems. Use the props to decorate lavish
interiors in-game or take the source art and import them into your map files to hard code them in as
prefabs! This list is not final and is likely to grow and change!
- 5 Benches
- 1 Bucket
- 3 Bottles
- 1 Wine Rack
- 3 Cupboards
- 2 Bookcases
- 1 Keg
- 3 Ladders
- 5 Painting
- 1 Tapestry
- 1 Plant Pot
- 7 Tables
- 1 Tailor Kit
---1 Loom
---1 Spinning Wheel
1 - Training Bag
Environment Pack
----------------
This pack contains three distinct new environmental settings that provide just the kick-start you
need to a great looking demo or game. Optimized for Torque, this contains great new environmental
settings, terrains, skies, and environmental objects.
- 3 New Precipitation Environments (Sandstorm, Snowstorm & Improved Heavy Rain)
- 3 Terrain Settings (Snow land, Wasteland & Grassland)
- 2 New Skyboxes (Apocalypse & Stormy Sky)
- 3 New Grass Files
- 5 Bonus Detail Textures
- 3 Storm Ambiences
- 3 Dead Trees
- 5 Rocks
- 4 Trees
Free Stuff
----------
Tons of content was created for the use of the content packs, but not all of it got used! We had to
cut some things and had some excess textures but instead of wasting them we are providing them free
of charge back to the community royalty-free to be put to good use in a good home. Be sure to get
this free download from http://www.garagegames.com
- 61 Bonus Textures
- 1 Tavern Ambience
- 3 Dynamic Music Cut Songs
3 ------ Special notes
-----------------------------------------------------
Please make backups before overwriting or changing any files.
1. Windmill Fan Blades
========================
In the building pack, the Windmill's Fan blades are animated to spin and are a .DTS object (with a
.3DS source for non Torque users). If you are going to be using these fan blades in Torque, you will
need to incorporate the script filed used to animate the object. The script file is located with the
fan source and is called "fan.cs". Copy this file into your "./torque/demo/server/scripts/..."
directory. Next, you will need to call this file from "game.cs" located in the same directory. Open
up "game.cs" and add the line: " exec("./fan.cs"); " to the existing exec commands found at the
start of the file. Save and now your fan should spin when added to the world! If you run into
problems, please be sure to check your syntax is right (no extra characters anywhere) and that your
paths are pointing in the right direction first.
2. Multiple Piece Buildings
========================
For Torque users, due to the outdated limitations on the current map2dif build, some objects that
are highly detailed or particularly large had to be built and split up into separate pieces in order
for them to work crash free or compile. These objects are labeled as such and must be easily
rearranged within Torque's Mission Editor in order to be a complete unit. Some objects were also
split up to allow flexibility in arrange the design. To see how a multiple piece object is put
together, please open up the respective demo mission included with each pack. In the castle pack,
many infrastructure objects are units that are made to be put together to create complex systems.
For example, the city wall set has multiple walls and jointing corners so you can create a city wall
to conform to any shape you need all right within Torque itself with little performance hit! Again,
please check the demo missions to see how these systems are used.
3. Zones inside Zones kill your framerate! ** Important
========================
In the Torque Engine, having interiors inside interiors can cause problems when done in mass amounts
because of zoning problems and anomalies that can occur. The engine sometimes tries to create a
unique zone for each DIF objects and this means that by placing the DIF based example furniture
inside a building within Torque itself could lead to being a real big performance killer. The
optimal way to utilize the furniture props is to take them source files and copy the source art
directly into whatever building you wish to have it within and compile it that way with furniture
included. If that's confusing, what that basically means is using DIF Furniture objects inside DIF
buildings in large amounts is very bad for performance. The DIF examples were included solely for
the demo and are not meant to be placed within DIF buildings!
4. Environment Pack Scripting
========================
If your using Torque and wish to take advantage of the Environment pack, you will need to incorporate
the new enviroment.cs file which includes the settings for the precipitation effects. You will need
to be using a build of Torque that included the New Precipitation code implemented in June, 2004. Be
sure to backup any and all files before changing or overwriting the current files. To add these
settings, copy enviroment.cs into "./torque/server/scripts/...". For advanced users, you can simply
append the current enviroment.cs with the data located in the Environment Packs enviroment.cs. Also,
be sure that game.cs is making a call to enviroment.cs (see Special Note #1 for info on how to do
this).
5. Locating pre-built DIF & DTS files in your new pack
========================
Pre-built versions of every asset that requires some sort of compiling or exporting are located for
your convenience in the "./precompiled/" directory located within every content pack.
6. MAP files
========================
After much deliberation, arguing, cursing, and sleepless nights the decision was made to restrict
distribution of the brushed based Geometry to the universal .MAP format due to it's simple internal
format and compatibility with the most platforms. The idea to distribute Quark & Hammer based
formats were on the table because of their advanced ability, but it increased the distribution size
and there were some issues concerning legalities and licensing. All 1000+ map files have been tested
to be able to import into Hammer 3.5, Quark 6.4 Alpha, Q3Radiant, and Conitec Game Studio A6 WED.
There is currently an issue with Game Studio WED being able to import the .map files because of a
.map formatting inconsistency, but this can be easily worked around but opening the .map file within
Hammer, Quark, or Radiant and re-exporting/saving the .map.
7. Texture Size ** Important
========================
In the packs, I have all the default texture sizes at 512x512 at their MAXIMUM texture size. Depending
on your system you will more than likely have to scale textures down that are being used depending on
how much video ram you have available and what your target system is, please consider this! Without
resizing these textures, you may have horribly slow frame-rates when you really start to get many many
textures on the screen. I included all textures at their maximum recommended size so you as the
end-user have this option on how you want to resize what textures and where so you can get the best
results possible custom to your product or project.
8. Inside the buildings!
========================
Every building as a equally detailed interior, albeit a bit empty to allow for maximum furniture
arrangement of your choice. Also, most interiors were lit on a custom lighting setup in a very specific
(and dark) way, you will more than likely have to adjust the omni_lights inside the .map files to your
custom setup depending on what mood you are trying to set, otherwise you may get very dark results!
9. Environment Pack Mission Files
================================
It's recommended you look and use the precipitation objects in the example mission files directory
located in the environment pack base directory. Many of the weather effects shown in the demos and
screenshots were created using these exact overlaying precipitation effects!
10. Castle Pack Mission File
================================
It's recommended you also look at the mission file included with the castle pack to see how the 4
piece castle is set up according to it's design.
4 ------ Help! It doesn't work!
-----------------------------------------------------
Q: I was able to load the Interiors into Torque, but they are all black? WTF is up with that?
A: You will have to relight the scene before you see textures on the exteriors of DIF files. To do
this in stock Torque, open up the Mission Editor (Default F11) and press ALT+L. You can also save and
then reload the mission if this feature is unavailable to you.\
===========
Q: Everything seems so dark/light, how can I fix this?
A: For the exteriors of buildings you will have to edit the Suns Values. You can do this by opening
up the Sun in the Torque mission editor and goin from there. Color is the suns brightness value while
ambient is the sun shadows and other ambient features. It's a good idea to keep a nice contracts
between these too with your Sun Value at a medium level and the Shadows at a dark level. Note that
putting these two values exactly the same will wash out the textures very badly.
As far as upping the interior lighting inside the interiors, you will have to unfortunately recompile
the DIF itself using map2dif & your favorite torque mapping tool. Open the map itself (this will
always be mapname_0.map, the _0 is the highest level of detail and the only level with an inside),
then look for entitity's called omni_lights and adjust their values as you see fit.
Please keep in mind this content pack was designed on the Synapse Gaming Lighting Pack* and the way
the lights look and work on various platforms and versions of Torque is liable to be very different.
Thanks for understanding and please email me** if you want any advice or help on adjusting and
recompiling maps.
*http://www.synapsegaming.com
**tima@garagegames.com
===========
Q: Help, when I try to load an interior or mission with an interior in it, torque quits to the main
menu with a "resource not found" type error.
A: This error is more than likely from not being able to find the textures when trying to add the DIF
files to the mision. Be sure to put your textures in a place where Torque can find them, the best
place would be:
.../YourTorqueGame/data/interiors/
And be sure to have your DIF files *IN* that same directory, or within a sub-directory branching out
of that directory such as:
../YourTorqueGame/data/interiors/walls/
===========
Q: When I add foliage, I get white blocks?
A: This is a similiar error as from the last question, be sure that all your paths are pointing to
the correct files, as this error is caused from not finding a texture that is required.
===========
Q: The precipitation effects do not look like those in the movies, what am I doing wrong?
A: The precipitation effects done in the screenshots, demos, and movies were done by using a
combination of both predefined effects in environment.cs USED IN CONJUNCTION WITH the Sky/Wind
Settings & Mission Precipitation Datablock Settings. To copy these effects, open up the example
mission files included with the environment pack and copy the datablocks specified with the
precipitation effects & skybox over to your own mission file. Also be sure to link the environment.cs
file in your TOrqueGame/Server/Scripts/ directory if you haven't already, more info on how to do this
is located above in the readme.
===========
Q: Certain large buildings are in multiple pieces, how the heck do I get them to go together?
A: Due to constraints on MAP2DIF (the interior exporting tool) some buildings had to be split up
into multiple pieces to export right. A big example of this would be the Castle in the Castle pack.
These pieces needs to be rearranged inside of the Torque mission editor in order to look right. For
the castle pack, a demo mission was included under CastlePack/Mission/ which includes a "pre-arranged"
castle for you, so all you have to do is open the mission file in a text editor & copy the Interior
Instance data blocks over to your own mission file and then open the mission file and move all the
pieces (as a whole) to where you want the castle. Hopefully this will save you some time.
===========
Q: I have the combo pack and I put everything in one lump directory but now I can't find some find
certain files, were they not included?
A: Chances are you happed to overwrite some files by accident. As is shown in the
YourContentPack/Geometry/ directory the files themselves are split down into subdirectories and
inside some of these subdirectories some files will be labeled as med1, med2 in shops and med1, med2
in houses, etc. etc. The best way to avoid this is to simply keep the directory structure and not lump
everything in the same directory. Please, always keep in mind that the textures being used have to be
in the same directory or a directory higher, so it's always the safest bet to keep them in
/data/interiors/ if your working out of that directory.
===========
Q: The grass looked fuller and thicker in the screenshots, why?
A: The screenshots were taken on a very high end system and the foliage count was upped to 14,000 on
grass1 in rpgville1.mis. Feel free to experiment to find something that works for you.
===========
Q: Can I get a copy of the demo mission used in the videos?
A: Yes, it is now freely available at http://www.gremlinstudios.com/promo/demomission.zip
Please keep in mind this will be useless without owning all four content packs as it uses all four
in combination.
===========
Q: I have a lot of buildings in now and it runs very sluggish!
A: There are two causes usually for this straight out of the box, 1) You need to resize your textures to
be much smaller as they are eating up VRAM very fast, please read the section on Resizing textures above
in the special note sections. 2) The LOD's intial pop is too high for what your trying to do, you will have
to recompile the buildings your using to have a faster initial LOD pop than it's default. Having 4 levels of
detail is great but it won't do you any good if you have 30 buildings onscreen and they don't skip down to
the next level of detail at 1000 meters! :)
Adjust LOD is an advanced Map Modelling Technique and in the interest of time I recommend browsing the Torque
Website resources section & Forums for how to do this. I am also available for email support by using the
content pack product page support feature or emailing me at tim@garagegames.com and I will try to help as best
I can as fast as I can. Thanks.
5 ------ Credits & Special Thanks
-----------------------------------------------------
About Tim Aste:
Timothy Aste - (Artist, GarageGames.com, Inc.)
Tim Aste is a former freelance Graphic Designer educated at the Ringling School of Art and Design.
Tim attracted the attention of GarageGames, Inc. with his 3-D and Level Design work and since has
moved out to Eugene to work on the Torque Shader Engine and beyond. He recently was a speaker at
Indie Games Con '04 and presented an updated Torque Shader Engine Demo which he recently designed.
Developed By:
--------------------------
Timothy Aste
http://www.gremlinstudios.com
GarageGames liaison:
--------------------------
Josh Williams
Demo Technology Developed By:
--------------------------
Matt Fairfax
Brave Tree Productions
Windmill Animation By:
--------------------------
Craig Fortune
http://www.craigfortune.com
Special Thanks:
--------------------------
GarageGames
http://www.garagegames.com
--Ben Garney
--Jay Moore
--Josh Williams
Brave Tree Productions:
http://www.bravetree.com
--Matt Fairfax
--Joe Maruschak
Burnt Wasp:
http://www.burntwasp.com/
--Tom Bampton
--Craig Fortune
--Nauris Krauze
The Render Engine:
--Brett Fattori
http://www.renderengine.com
Synapse Gaming
--John Kabus
http://www.synapsegaming.com

327
example/demo/ReadMe.html Executable file
View File

@ -0,0 +1,327 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<title>Torque Game Engine Demo Application</title>
<html>
<body>
<!-------------------------------------------------------->
<h1>Torque Game Engine Demo</h1>
<p>
Welcome to the Torque Game Engine Demo Application.
</p>
<ul>
<li><a href="#overview">Overview</a></li>
<li><a href="#gg">GarageGames</a></li>
<li><a href="#torque">Torque Game Engine</a></li>
<li><a href="#requirements" >System Requirements</a></li>
<ul>
<li><a href="#win32">Win32</a></li>
<li><a href="#mac">Mac OS</a></li>
<li><a href="#unix">Linux</a></li>
</ul>
<li><a href="#runapp" >Running the Application</a></li>
<ul>
<li><a href="#synopsis">Command Line Arguments</a></li>
<li><a href="#keys">Keybindings</a></li>
</ul>
</ul>
</p>
<hr><h3 id="overview">Overview</h3>
<p>
This is a demo of the features available in the Torque Game Engine, an extremely affordable, full featured game engine technology from GarageGames.com, Inc.
</p>
<hr><h3 id="gg">GarageGames</h3>
<p>
<a href="http://www.garagegames.com">GarageGames.com</a> is a unique Internet
publishing label for independent games and gamemakers. We are a band of
professional gaming industry veterans committed to publishing truly
original and exciting titles on our own terms. Our mission?
To provide the independent developer with tools, knowledge,
co-conspirators - whatever is needed to unleash the creative spirit and
get great innovative independent games to market.
</p>
<hr><h3 id="torque">Torque Game Engine</h3>
<p>
The
<a href="http://www.garagegames.com/pg/product/view.php?id=1">Torque Game
Engine</a> (TGE) is the game engine that powers Tribes 2 developed by
Dynamix. TGE is a full featured AAA title engine with the latest in
scripting, geometry, particle effects, animation and texturing, as well
as award winning multi-player networking code. Check out the
<a href="http://www.garagegames.com/pg/product/view.php?id=1#features">feature
list</a> for more details. For $100 per programmer, you get the source
to the engine of a major product from a major game publisher! Not
possible? Check the
<a href="http://www.garagegames.com/index.php?sec=mg&mod=resource&page=category&qid=122">FAQ</a>
for the details.
</p>
<hr><h3 id="requirements">System Requirements</h3>
<p>
The application is released on both the Windows (Windows 98/SE/ME/2K/XP) and
Mac OS X platforms. See the following OS specific sections for more information.
</p>
<h4 id="win32">Windows</h4>
<p>
Under windows the engine will run either OpenGL or DirectX.
OpenGL and DirectX drivers are typically bundled together by
video card manufactureres and are constantly being updated. Make sure
you have the latest drivers for your particular video card.
</p>
<p>
<dl>
<dt>Required Hardware:
<dd>
<ul>
<li>Pentium II/400 - AMD/400 (or better), 128MB RAM, 20+GB HD</li>
<li>Windows 98/NT4+SP3/2K/XP</li>
<li>AGP Radeon or GeForce class w/32MB (Radeon 8500 or GeForce3 w/64MB highly recommended)</li>
</ul>
</dd>
</dt>
<dt>Required Software:</b>
<dd>
<ul>
<li>Latest drivers for Video board</li>
<li><a href="http://www.microsoft.com/downloads/search.aspx?displaylang=en&categoryid=2">DirectX</a> version 8.0 or later.</li>
<li><a href="http://www.openal.org">OpenAL</a> Runtime or SDK Installation</li>
</ul>
</dd>
</dt>
</dl>
</p>
<h4 id="mac">Mac OS</h4>
<p>
<dl>
<dt>Required Hardware:
<dd>
<ul>
<li>G3/G4 400Mhz (or better), 128MB RAM, 20+GB HD</li>
<li>MacOS 9 or X</li>
<li>AGP Radeon or GeForce class w/32MB (Radeon 8500 or GeForce3 w/64MB highly recommended)</li>
</ul>
</dd>
</dt>
<dt>Required Software:</b>
<dd>
<ul>
<li>9: Latest DrawSprocket and InputSprocket libraries/extensions installed and active</li>
<li>9&X: Latest drivers for Video board</li>
<li>9&X: TCP/IP properly configured</li>
<li>9&X: <a href="http://www.openal.org">OpenAL</a> Runtime or SDK Installation</li>
</ul>
</dd>
</dt>
</dl>
</p>
<h4 id="unix">Linux</h4>
<p>
<dl>
<dt>Required Hardware:
<dd>
<ul>
<li>Pentium II/400 - AMD/400 (or better), 128+MB RAM</li>
<li>NVIDIA 3D card recommended. Other cards may work but are untested.</li>
</ul>
</dd>
</dt>
<dt>Required Software:</b>
<dd>
<ul>
<li>XFree86 4.0 or greater with a appropriate 3D drivers (GLX/DRI)
for your video card.</li>
<li>Kernel 2.4.17 is not recommended.</li>
<li>The prebuilt binary packages require the following dynamic link libraries:</li>
<ul>
<li>libm.so.6</li>
<li>libdl.so.2</li>
<li>libpthread.so.0</li>
<li>libc.so.6</li>
<li>/lib/ld-linux.so.2</li>
</ul>
</ul>
</dd>
</dt>
</dl>
</p>
<hr><h3 id="runapp">Running the Application</h3>
<p>The demo may be run in two modes: with or without the client interface.
Running the client graphics interface is the default behavior. Running
the app. in "dedicated" mode skips the graphics and client interface
initialization. This mode is used to run dedicated game servers and
consumes less resources, but is not directly playable. You must connect
to a dedicated server using another instances of the demo app running in
client mode. Example of dedicated mode using command line arguments:</p>
<pre>
cd "c:\Program Files\Torque Game Engine Demo"
demo -dedicated -mission demo\data\missions\stronghold.mis
</pre>
<p>Games (servers) can also be hosted through the client interface, and a
client may play the game being hosted.</p>
<p><b>Note:</b> for Mac users, command line arguments can be placed
in a text file called <i>maccmdline.txt</i> in the same directory as the demo
executable.
</p>
<h4 id="synopsis">Command Line Arguments</h4>
<p>
demo
[-fullscreen] [-windowed] [-noSound] [-openGL] [-directX]
[-autoVideo] [-prefs file] [-dedicated]
[-mission mission] [-log level]
[-mod modName] [-game gameName] [-show shapeFile]
[-console] [-jSave file] [-jPlay file] [-jDebug file]
[-help]
</p>
<p>
<table>
<tr>
<td width=50>&nbsp;</td>
<td width=100>-fullscreen</td><td>Run in fullscreen mode</td>
</tr>
<tr>
<td></td><td>-windowed</td><td>Run in a window</td>
</tr>
<tr>
<td></td><td>-noSound</td><td>Dsisable sound</td>
</tr>
<tr>
<td></td><td>-openGL</td><td>Use the OpenGL driver</td>
</tr>
<tr>
<td></td><td>-directX</td><td>Use the DirectX driver</td>
</tr>
<tr>
<td></td><td>-autoVideo</td><td>Autodetect the video driver</td>
</tr>
<tr>
<td></td><td>-prefs</td><td>Load the given config file</td>
</tr>
<tr>
<td></td><td>-dedicated</td><td>Run as a dedicated server</td>
</tr>
<tr>
<td></td><td>-mission mission</td><td>Load the given mission.</td>
</tr>
<tr>
<td></td><td>-log level</td><td>Set the log level = [0,1,2]</td>
</tr>
<tr>
<td></td><td>-mod modName</td><td>Load the specified mod</td>
</tr>
<tr>
<td></td><td>-game gameName</td><td>Load the specified game, clears all previously loaded mods</td>
</tr>
<tr>
<td></td><td>-show [file.dts]</td><td>Start the Show mod and optionally load the specified file</td>
</tr>
<tr>
<td></td><td>-console</td><td>Start up a seperate console window</td>
</tr>
<tr>
<td></td><td>-jSave file</td><td>Record a journal</td>
</tr>
<tr>
<td></td><td>-jPlay file</td><td>Play back a journal</td>
</tr>
<tr>
<td></td><td>-jDebug file</td><td>Same as jPlay, except that a debug
break (int3) is issued when the journal ends</td>
</tr>
<tr>
<td></td><td>-help</td><td>Display this help to the console</td>
</tr>
</table>
</p>
<h4 id='keys'>Key Bindings</h4>
<p>
The client default key bindings for the demo game. The script
file which binds these keys can be found in
the <i>torque/fps/client/scripts/default.bind.cs</i>
file. Here are some of the current bindings:
</p>
<p>
<table>
<tr>
<td width=50>&nbsp;</td>
<td width=100 spansize=2><b>Movement</b></td>
</tr>
<tr>
<td></td><td>w</td><td>Forward</td>
</tr>
<tr>
<td></td><td>s</td><td>Backward</td>
</tr>
<tr>
<td></td><td>a</td><td>Left</td>
</tr>
<tr>
<td></td><td>d</td><td>Right</td>
</tr>
<tr>
<td></td><td>space</td><td>Jump / Brake</td>
</tr>
<tr>
<td></td><td spansize=2><br><b>View Control</b></td>
</tr>
<tr>
<td></td><td>e</td><td>Zoom</td>
</tr>
<tr>
<td></td><td>r</td><td>Set Zoom FOV</td>
</tr>
<tr>
<td></td><td>TAB</td><td>First/Third person</td>
</tr>
<tr>
<td></td><td>alt c</td><td>Toggle between camera and player</td>
</tr>
<tr>
<td></td><td spansize=2><br><b>Chat Messaging</b></td>
</tr>
<tr>
<td></td><td>u</td><td>Send chat message</td>
</tr>
<tr>
<td></td><td spansize=2><br><b>Misc. Functions</b></td>
</tr>
<tr>
<td></td><td>Ctrl-O</td><td>In-game options dialog</td>
</tr>
<tr>
<td></td><td>F1</td><td>In-game help dialog box</td>
</tr>
<tr>
<td></td><td>F2</td><td>Score board</td>
</tr>
<tr>
<td></td><td spansize=2><br><b>Mission Editing</b></td>
</tr>
<tr>
<td></td><td>F7</td><td>Switch contol to the player and position him at the camera</td>
</tr>
<tr>
<td></td><td>F8</td><td>Switch contol to the camera and position it at the player</td>
</tr>
<tr>
<td></td><td>F9</td><td>Toggle between outline, interior debug, and normal rendering modes</td>
</tr>
</table>
</p>
<!-------------------------------------------------------->
</body>
</html>

34
example/demo/client/config.cs Executable file
View File

@ -0,0 +1,34 @@
// Torque Input Map File
if (isObject(moveMap)) moveMap.delete();
new ActionMap(moveMap);
moveMap.bindCmd(keyboard, "escape", "", "escapeFromGame();");
moveMap.bind(keyboard, "f2", showPlayerList);
moveMap.bind(keyboard, "f5", toggleParticleEditor);
moveMap.bind(keyboard, "a", moveleft);
moveMap.bind(keyboard, "d", moveright);
moveMap.bind(keyboard, "left", moveleft);
moveMap.bind(keyboard, "right", moveright);
moveMap.bind(keyboard, "w", moveforward);
moveMap.bind(keyboard, "s", movebackward);
moveMap.bind(keyboard, "up", moveforward);
moveMap.bind(keyboard, "down", movebackward);
moveMap.bind(keyboard, "space", jump);
moveMap.bind(keyboard, "r", setZoomFOV);
moveMap.bind(keyboard, "e", toggleZoom);
moveMap.bind(keyboard, "z", toggleFreeLook);
moveMap.bind(keyboard, "tab", toggleFirstPerson);
moveMap.bind(keyboard, "alt c", toggleCamera);
moveMap.bind(keyboard, "ctrl w", celebrationWave);
moveMap.bind(keyboard, "ctrl s", celebrationSalute);
moveMap.bind(keyboard, "ctrl k", suicide);
moveMap.bindCmd(keyboard, "1", "commandToServer(\'use\',\"Crossbow\");", "");
moveMap.bind(keyboard, "u", toggleMessageHud);
moveMap.bind(keyboard, "pageup", pageMessageHudUp);
moveMap.bind(keyboard, "pagedown", pageMessageHudDown);
moveMap.bind(keyboard, "p", resizeMessageHud);
moveMap.bind(keyboard, "f8", dropCameraAtPlayer);
moveMap.bind(keyboard, "f7", dropPlayerAtCamera);
moveMap.bind(keyboard, "ctrl o", bringUpOptions);
moveMap.bind(mouse0, "xaxis", yaw);
moveMap.bind(mouse0, "yaxis", pitch);
moveMap.bind(mouse0, "button0", mouseFire);

69
example/demo/client/defaults.cs Executable file
View File

@ -0,0 +1,69 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
// The master server is declared with the server defaults, which is
// loaded on both clients & dedicated servers. If the server mod
// is not loaded on a client, then the master must be defined.
// $pref::Master[0] = "2:master.garagegames.com:28002";
$pref::Player::Name = "Visitor";
$pref::Player::defaultFov = 90;
$pref::Player::zoomSpeed = 0;
$pref::Net::LagThreshold = 400;
$pref::Net::Port = 28000;
$pref::shadows = "2";
$pref::HudMessageLogSize = 40;
$pref::ChatHudLength = 1;
$pref::Input::LinkMouseSensitivity = 1;
$pref::Input::MouseEnabled = 0;
$pref::Input::JoystickEnabled = 0;
$pref::Input::KeyboardTurnSpeed = 0.1;
$pref::sceneLighting::cacheSize = 20000;
$pref::sceneLighting::purgeMethod = "lastCreated";
$pref::sceneLighting::cacheLighting = 1;
$pref::sceneLighting::terrainGenerateLevel = 1;
$pref::ts::detailAdjust = 0.45;
$pref::Terrain::DynamicLights = 1;
$pref::Interior::TexturedFog = 0;
$pref::Video::displayDevice = "OpenGL";
$pref::Video::allowOpenGL = 1;
$pref::Video::allowD3D = 1;
$pref::Video::preferOpenGL = 1;
$pref::Video::appliedPref = 0;
$pref::Video::disableVerticalSync = 1;
$pref::Video::monitorNum = 0;
$pref::Video::windowedRes = "800 600";
$pref::Video::fullScreen = "0";
$Pref::Video::Resolution = "800 600 32";
$pref::Video::screenShotSession = 0;
$pref::Video::screenShotFormat = "PNG";
$pref::OpenGL::force16BitTexture = "0";
$pref::OpenGL::forcePalettedTexture = "0";
$pref::OpenGL::maxHardwareLights = 3;
$pref::VisibleDistanceMod = 1.0;
$pref::Audio::driver = "OpenAL";
$pref::Audio::forceMaxDistanceUpdate = 0;
$pref::Audio::environmentEnabled = 0;
$pref::Audio::masterVolume = 0.8;
$pref::Audio::channelVolume1 = 0.8;
$pref::Audio::channelVolume2 = 0.8;
$pref::Audio::channelVolume3 = 0.8;
$pref::Audio::channelVolume4 = 0.8;
$pref::Audio::channelVolume5 = 0.8;
$pref::Audio::channelVolume6 = 0.8;
$pref::Audio::channelVolume7 = 0.8;
$pref::Audio::channelVolume8 = 0.8;

Binary file not shown.

191
example/demo/client/init.cs Executable file
View File

@ -0,0 +1,191 @@
//-----------------------------------------------------------------------------
// Variables used by client scripts & code. The ones marked with (c)
// are accessed from code. Variables preceeded by Pref:: are client
// preferences and stored automatically in the ~/client/prefs.cs file
// in between sessions.
//
// (c) Client::MissionFile Mission file name
// ( ) Client::Password Password for server join
// (?) Pref::Player::CurrentFOV
// (?) Pref::Player::DefaultFov
// ( ) Pref::Input::KeyboardTurnSpeed
// (c) pref::Master[n] List of master servers
// (c) pref::Net::RegionMask
// (c) pref::Client::ServerFavoriteCount
// (c) pref::Client::ServerFavorite[FavoriteCount]
// .. Many more prefs... need to finish this off
// Moves, not finished with this either...
// (c) firstPerson
// $mv*Action...
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function initClient()
{
echo("\n--------- Initializing MOD: Torque Demo Client ---------");
// Make sure this variable reflects the correct state.
$Server::Dedicated = false;
// Game information used to query the master server
$CLient::GameType = "";
$Client::GameTypeQuery = "";
$Client::MissionTypeQuery = "Any";
//
exec("./ui/customProfiles.cs"); // override the base profiles if necessary
// The common module provides basic client functionality
initBaseClient();
// Always start up the shell in 800x600. If the pref is not set, then it
// will defaul to 800x600 in the platform code.
if ($Pref::Video::Resolution !$= "") {
$width = getWord($pref::Video::resolution,0);
if ($width < 800) {
$pref::Video::resolution = "800 600" SPC getWord($pref::Video::resolution,2);
echo("Forcing resolution to 800 x 600");
}
}
// InitCanvas starts up the graphics system.
// The canvas needs to be constructed before the gui scripts are
// run because many of the controls assume the canvas exists at
// load time.
initCanvas("Torque Game Engine");
/// Load client-side Audio Profiles/Descriptions
exec("./scripts/audioProfiles.cs");
// Load up the Game GUIs
exec("./ui/defaultGameProfiles.cs");
exec("./ui/PlayGui.gui");
exec("./ui/SceneGui.gui");
//exec("./ui/pageGui.gui");
exec("./ui/ChatHud.gui");
exec("./ui/playerList.gui");
// Load up the shell GUIs
exec("./ui/overlayDlg.gui");
exec("./ui/mainMenuGui.gui");
exec("./ui/aboutDlg.gui");
exec("./ui/startMissionGui.gui");
exec("./ui/joinServerGui.gui");
exec("./ui/loadingGui.gui");
exec("./ui/endGameGui.gui");
exec("./ui/optionsDlg.gui");
exec("./ui/remapDlg.gui");
exec("./ui/StartupGui.gui");
// Demo page & scene gui
exec("./ui/MainMenuDlg.gui");
//exec("./ui/overview_main.gui");
exec("./ui/features/features_main.gui");
exec("./ui/products/product_main.gui");
exec("./ui/AnimationSceneGui.gui");
exec("./ui/DetailSceneGui.gui");
exec("./ui/MountingSceneGui.gui");
exec("./ui/DemoEditorAlert.gui");
// Client scripts
exec("./scripts/client.cs");
exec("./scripts/game.cs");
exec("./scripts/missionDownload.cs");
exec("./scripts/serverConnection.cs");
exec("./scripts/playerList.cs");
exec("./scripts/loadingGui.cs");
exec("./scripts/optionsDlg.cs");
exec("./scripts/chatHud.cs");
exec("./scripts/messageHud.cs");
exec("./scripts/mainMenuGui.cs");
exec("./scripts/playGui.cs");
exec("./scripts/sceneGui.cs");
exec("./scripts/joinServerGui.cs");
exec("./scripts/startMissionGui.cs");
exec("./scripts/centerPrint.cs");
exec("./scripts/DemoEditorAlert.cs");
// load menu thread data
exec("./menu_threads.cs");
// Default player key bindings
exec("./scripts/default.bind.cs");
exec("./config.cs");
// Really shouldn't be starting the networking unless we are
// going to connect to a remote server, or host a multi-player
// game.
setNetPort(0);
// Copy saved script prefs into C++ code.
setShadowDetailLevel( $pref::shadows );
setDefaultFov( $pref::Player::defaultFov );
setZoomSpeed( $pref::Player::zoomSpeed );
// Start up the main menu... this is separated out into a
// method for easier mod override.
if ($JoinGameAddress !$= "") {
// If we are instantly connecting to an address, load the
// main menu then attempt the connect.
loadMainMenu();
connect($JoinGameAddress, "", $Pref::Player::Name);
}
else {
// Otherwise go to the splash screen.
Canvas.setCursor("DefaultCursor");
loadStartup();
}
}
//-----------------------------------------------------------------------------
function loadMainMenu()
{
// Startup the client with the Main menu...
Canvas.setContent( MainMenuGui );
checkAudioInit();
Canvas.setCursor("DefaultCursor");
}
function loadFeatureMission()
{
// Display the loading GUI
Canvas.setContent(LoadingGui);
LOAD_MapName.setText( "Creating Feature Game" );
LOAD_MapDescription.setText( "<font:Arial:16>Please wait while the feature game is started...");
Canvas.repaint();
// Start up the server..
createServer("SinglePlayer", expandFileName("~/data/missions/features.mis"));
%conn = new GameConnection(ServerConnection);
RootGroup.add(ServerConnection);
%conn.setConnectArgs($pref::Player::Name);
%conn.setJoinPassword($Client::Password);
%conn.connectLocal();
}
function checkAudioInit()
{
if($Audio::initFailed)
{
MessageBoxOK("Audio Initialization Failed",
"The OpenAL audio system failed to initialize. " @
"You can get the most recent OpenAL drivers <a:www.garagegames.com/docs/torque/gstarted/openal.html>here</a>.");
}
}

BIN
example/demo/client/init.cs.dso Executable file

Binary file not shown.

View File

@ -0,0 +1,54 @@
// Stack used to track what gui thread we are viewing
new SimSet(menu_thread_stack);
// Define various topic threads
new SimSet(main_menu_thread);
main_menu_thread.add(MainMenuDlg);
new SimSet(overview_thread);
//overview_thread.add(overview_main);
new SimSet(features_thread);
features_thread.add(features_main);
new SimSet(products_thread);
products_thread.add(product_main);
package AutoLoad_GuiMLTextCtrl_Contents
{
function GuiMLTextCtrl::onWake(%this)
{
if (%this.filename !$= "")
{
%fo = new FileObject();
%fo.openForRead(%this.filename);
%text = "";
while(!%fo.isEOF())
%text = %text @ %fo.readLine() @ "\n";
%fo.delete();
%this.setText(%text);
}
//parent::onWake(%this);
}
function gotoWebPage(%url)
{
if(isFullScreen())
toggleFullScreen();
Parent::gotoWebPage(%url);
}
function GuiMLTextCtrl::onURL(%this, %url)
{
if (getSubStr(%url, 0, 9) $= "gamelink ")
eval( getSubStr(%url, 9, 1024) );
else
gotoWebPage( %url );
}
};
activatePackage(AutoLoad_GuiMLTextCtrl_Contents);

Binary file not shown.

130
example/demo/client/prefs.cs Executable file
View File

@ -0,0 +1,130 @@
$pref::Audio::channelVolume1 = 0.8;
$pref::Audio::channelVolume2 = 0.8;
$pref::Audio::channelVolume3 = 0.8;
$pref::Audio::channelVolume4 = 0.8;
$pref::Audio::channelVolume5 = 0.8;
$pref::Audio::channelVolume6 = 0.8;
$pref::Audio::channelVolume7 = 0.8;
$pref::Audio::channelVolume8 = 0.8;
$pref::Audio::driver = "OpenAL";
$pref::Audio::environmentEnabled = 0;
$pref::Audio::forceMaxDistanceUpdate = 0;
$pref::Audio::masterVolume = 0.8;
$pref::backgroundSleepTime = "3000";
$pref::ChatHudLength = 1;
$pref::CloudsOn = "1";
$pref::Decal::decalTimeout = "5000";
$pref::Decal::maxNumDecals = "256";
$pref::decalsOn = "1";
$pref::Editor::visibleDistance = "2100";
$pref::enableBadWordFilter = "1";
$pref::environmentMaps = "1";
$pref::HudMessageLogSize = 40;
$pref::Input::JoystickEnabled = "0";
$pref::Input::KeyboardEnabled = "1";
$pref::Input::KeyboardTurnSpeed = 0.1;
$pref::Input::LinkMouseSensitivity = 1;
$pref::Input::MouseEnabled = "0";
$pref::Interior::detailAdjust = "1";
$pref::Interior::DynamicLights = "1";
$pref::Interior::LightUpdatePeriod = "66";
$pref::Interior::lockArrays = "1";
$pref::Interior::sgDetailMaps = "1";
$pref::Interior::ShowEnvironmentMaps = "1";
$pref::Interior::TexturedFog = "0";
$pref::Interior::VertexLighting = "0";
$pref::LightManager::sgBlendedTerrainDynamicLighting = "1";
$pref::LightManager::sgDynamicLightingOcclusionQuality = "1";
$pref::LightManager::sgDynamicParticleSystemLighting = "1";
$pref::LightManager::sgDynamicShadowQuality = "0";
$pref::LightManager::sgLightingProfileAllowShadows = "1";
$pref::LightManager::sgLightingProfileQuality = "0";
$pref::LightManager::sgMaxBestLights = "10";
$pref::LightManager::sgMultipleDynamicShadows = "1";
$pref::LightManager::sgUseDynamicShadows = "1";
$pref::Master0 = "2:master.garagegames.com:28002";
$Pref::Net::LagThreshold = "400";
$pref::Net::PacketRateToClient = "10";
$pref::Net::PacketRateToServer = "32";
$pref::Net::PacketSize = "200";
$pref::Net::Port = 28000;
$pref::NumCloudLayers = "3";
$pref::OpenGL::allowCompression = "0";
$pref::OpenGL::allowTexGen = "1";
$pref::OpenGL::disableARBMultitexture = "0";
$pref::OpenGL::disableARBTextureCompression = "0";
$pref::OpenGL::disableEXTCompiledVertexArray = "0";
$pref::OpenGL::disableEXTFogCoord = "0";
$pref::OpenGL::disableEXTPalettedTexture = "0";
$pref::OpenGL::disableEXTTexEnvCombine = "0";
$pref::OpenGL::disableSubImage = "0";
$pref::OpenGL::force16BitTexture = "0";
$pref::OpenGL::forcePalettedTexture = "0";
$pref::OpenGL::gammaCorrection = "0.5";
$pref::OpenGL::maxHardwareLights = 3;
$pref::OpenGL::noDrawArraysAlpha = "0";
$pref::OpenGL::noEnvColor = "0";
$pref::OpenGL::textureAnisotropy = "0";
$pref::OpenGL::textureTrilinear = "0";
$Pref::player::CurrentFOV = 45;
$pref::Player::defaultFov = 90;
$pref::Player::Name = "Visitor";
$pref::Player::renderMyItems = "1";
$pref::Player::renderMyPlayer = "1";
$pref::Player::zoomSpeed = 0;
$Pref::ResourceManager::excludedDirectories = ".svn;CVS";
$pref::sceneLighting::cacheLighting = 1;
$pref::sceneLighting::cacheSize = 20000;
$pref::sceneLighting::purgeMethod = "lastCreated";
$pref::sceneLighting::terrainGenerateLevel = 1;
$Pref::Server::AdminPassword = "";
$Pref::Server::BanTime = 1800;
$Pref::Server::ConnectionError = "You do not have the correct version of Torque demo or the resources needed to play on this server, please contact the server operator or visit the <a:www.garagegames.com/mg/projects/torque1>Torque</a> project web site for more information.";
$Pref::Server::FloodProtectionEnabled = 1;
$Pref::Server::Info = "This is a Torque Demo server.";
$Pref::Server::KickBanTime = 300;
$Pref::Server::MaxChatLen = 120;
$Pref::Server::MaxPlayers = 64;
$Pref::Server::Name = "Torque Demo Server";
$Pref::Server::Password = "";
$Pref::Server::Port = 28000;
$Pref::Server::RegionMask = 2;
$Pref::Server::TimeLimit = 20;
$pref::shadows = "2";
$pref::SkyOn = "1";
$pref::Terrain::dynamicLights = "1";
$pref::Terrain::enableDetails = "1";
$pref::Terrain::enableEmbossBumps = "1";
$pref::Terrain::screenError = "4";
$pref::Terrain::texDetail = "0";
$pref::Terrain::textureCacheSize = "512";
$pref::timeManagerProcessInterval = "0";
$pref::TS::autoDetail = "1";
$pref::TS::detailAdjust = "1";
$pref::TS::fogTexture = "0";
$pref::TS::screenError = "10";
$pref::TS::skipFirstFog = "0";
$pref::TS::skipLoadDLs = "0";
$pref::TS::skipRenderDLs = "0";
$pref::TS::UseTriangles = "0";
$pref::Video::allowD3D = "1";
$pref::Video::allowOpenGL = "1";
$pref::Video::appliedPref = "1";
$pref::Video::clipHigh = "0";
$pref::Video::defaultsRenderer = "ATI Radeon HD 4800 Series";
$pref::Video::defaultsVendor = "ATI Technologies Inc.";
$pref::Video::deleteContext = "1";
$pref::Video::disableVerticalSync = 1;
$pref::Video::displayDevice = "OpenGL";
$pref::Video::fullScreen = "0";
$pref::Video::monitorNum = 0;
$pref::Video::only16 = "0";
$pref::Video::preferOpenGL = "1";
$pref::Video::profiledRenderer = "ATI Radeon HD 4800 Series";
$pref::Video::profiledVendor = "ATI Technologies Inc.";
$Pref::Video::Resolution = "800 600 32";
$pref::Video::safeModeOn = "1";
$pref::Video::screenShotFormat = "PNG";
$pref::Video::screenShotSession = 0;
$pref::Video::windowedRes = "800 600";
$pref::visibleDistanceMod = "1";

View File

@ -0,0 +1,18 @@
//-----------------------------------------------------------------------------
// Torque Engine
//
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
function DemoEditorAlert::onWake(%this)
{
%text = "Welcome to the mission editor!\n\n";
%text = %text @ "You can move objects by clicking on them and dragging with the mouse.\n\n";
%text = %text @ "Right click and drag anywhere on the scene to change your view angle.\n\n";
%text = %text @ "Use the w,s,a,d keys to fly around!\n\n";
%text = %text @ "Hit F11 again to return to the demo.\n\n Have fun!";
EditorAlertText.setText(%text);
DemoEditorAlert.helpTag = DemoEditorAlert.helpTag + 1;
}

Binary file not shown.

View File

@ -0,0 +1,40 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
// Channel assignments (channel 0 is unused in-game).
$GuiAudioType = 1;
$SimAudioType = 2;
$MessageAudioType = 3;
new AudioDescription(AudioGui)
{
volume = 1.0;
isLooping= false;
is3D = false;
type = $GuiAudioType;
};
new AudioDescription(AudioMessage)
{
volume = 1.0;
isLooping= false;
is3D = false;
type = $MessageAudioType;
};
new AudioProfile(AudioButtonOver)
{
filename = "~/data/sound/gui/buttonOver.ogg";
description = "AudioGui";
preload = true;
};
new AudioProfile(AudioStartup)
{
filename = "~/data/sound/gui/startup.ogg";
description = "AudioGui";
preload = true;
};

Binary file not shown.

View File

@ -0,0 +1,78 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
$centerPrintActive = 0;
$bottomPrintActive = 0;
// Selectable window sizes
$CenterPrintSizes[1] = 20;
$CenterPrintSizes[2] = 36;
$CenterPrintSizes[3] = 56;
// time is specified in seconds
function clientCmdCenterPrint( %message, %time, %size )
{
// if centerprint already visible, reset text and time.
if ($centerPrintActive) {
if (centerPrintDlg.removePrint !$= "")
cancel(centerPrintDlg.removePrint);
}
else {
CenterPrintDlg.visible = 1;
$centerPrintActive = 1;
}
CenterPrintText.setText( "<just:center>" @ %message );
CenterPrintDlg.extent = firstWord(CenterPrintDlg.extent) @ " " @ $CenterPrintSizes[%size];
if (%time > 0)
centerPrintDlg.removePrint = schedule( ( %time * 1000 ), 0, "clientCmdClearCenterPrint" );
}
// time is specified in seconds
function clientCmdBottomPrint( %message, %time, %size )
{
// if bottomprint already visible, reset text and time.
if ($bottomPrintActive) {
if( bottomPrintDlg.removePrint !$= "")
cancel(bottomPrintDlg.removePrint);
}
else {
bottomPrintDlg.setVisible(true);
$bottomPrintActive = 1;
}
bottomPrintText.setText( "<just:center>" @ %message );
bottomPrintDlg.extent = firstWord(bottomPrintDlg.extent) @ " " @ $CenterPrintSizes[%size];
if (%time > 0)
bottomPrintDlg.removePrint = schedule( ( %time * 1000 ), 0, "clientCmdClearbottomPrint" );
}
function BottomPrintText::onResize(%this, %width, %height)
{
%this.position = "0 0";
}
function CenterPrintText::onResize(%this, %width, %height)
{
%this.position = "0 0";
}
//-------------------------------------------------------------------------------------------------------
function clientCmdClearCenterPrint()
{
$centerPrintActive = 0;
CenterPrintDlg.visible = 0;
CenterPrintDlg.removePrint = "";
}
function clientCmdClearBottomPrint()
{
$bottomPrintActive = 0;
BottomPrintDlg.visible = 0;
BottomPrintDlg.removePrint = "";
}

Binary file not shown.

View File

@ -0,0 +1,286 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Message Hud
//-----------------------------------------------------------------------------
// chat hud sizes
$outerChatLenY[1] = 72;
$outerChatLenY[2] = 140;
$outerChatLenY[3] = 200;
// Only play sound files that are <= 5000ms in length.
$MaxMessageWavLength = 5000;
// Helper function to play a sound file if the message indicates.
// Returns starting position of wave file indicator.
function playMessageSound(%message, %voice, %pitch)
{
// Search for wav tag marker.
%wavStart = strstr(%message, "~w");
if (%wavStart == -1) {
return -1;
}
%wav = getSubStr(%message, %wavStart + 2, 1000);
if (%voice !$= "") {
%wavFile = "~/data/sound/voice/" @ %voice @ "/" @ %wav;
}
else {
%wavFile = "~/data/sound/" @ %wav;
}
if (strstr(%wavFile, ".wav") != (strlen(%wavFile) - 4)) {
%wavFile = %wavFile @ ".wav";
}
// XXX This only expands to a single filepath, of course; it
// would be nice to support checking in each mod path if we
// have multiple mods active.
%wavFile = ExpandFilename(%wavFile);
if ((%pitch < 0.5) || (%pitch > 2.0)) {
%pitch = 1.0;
}
%wavLengthMS = alxGetWaveLen(%wavFile) * %pitch;
if (%wavLengthMS == 0) {
error("** WAV file \"" @ %wavFile @ "\" is nonexistent or sound is zero-length **");
}
else if (%wavLengthMS <= $MaxMessageWavLength) {
if ($ClientChatHandle[%sender] != 0) {
alxStop($ClientChatHandle[%sender]);
}
$ClientChatHandle[%sender] = alxCreateSource(AudioMessage, %wavFile);
if (%pitch != 1.0) {
alxSourcef($ClientChatHandle[%sender], "AL_PITCH", %pitch);
}
alxPlay($ClientChatHandle[%sender]);
}
else {
error("** WAV file \"" @ %wavFile @ "\" is too long **");
}
return %wavStart;
}
// All messages are stored in this HudMessageVector, the actual
// MainChatHud only displays the contents of this vector.
new MessageVector(HudMessageVector);
$LastHudTarget = 0;
//-----------------------------------------------------------------------------
function onChatMessage(%message, %voice, %pitch)
{
// XXX Client objects on the server must have voiceTag and voicePitch
// fields for values to be passed in for %voice and %pitch... in
// this example mod, they don't have those fields.
// Clients are not allowed to trigger general game sounds with their
// chat messages... a voice directory MUST be specified.
if (%voice $= "") {
%voice = "default";
}
// See if there's a sound at the end of the message, and play it.
if ((%wavStart = playMessageSound(%message, %voice, %pitch)) != -1) {
// Remove the sound marker from the end of the message.
%message = getSubStr(%message, 0, %wavStart);
}
// Chat goes to the chat HUD.
if (getWordCount(%message)) {
ChatHud.addLine(%message);
}
}
function onServerMessage(%message)
{
// See if there's a sound at the end of the message, and play it.
if ((%wavStart = playMessageSound(%message)) != -1) {
// Remove the sound marker from the end of the message.
%message = getSubStr(%message, 0, %wavStart);
}
// Server messages go to the chat HUD too.
if (getWordCount(%message)) {
ChatHud.addLine(%message);
}
}
//-----------------------------------------------------------------------------
// MainChatHud methods
//-----------------------------------------------------------------------------
function MainChatHud::onWake( %this )
{
// set the chat hud to the users pref
%this.setChatHudLength( $Pref::ChatHudLength );
}
//------------------------------------------------------------------------------
function MainChatHud::setChatHudLength( %this, %length )
{
OuterChatHud.resize(firstWord(OuterChatHud.position), getWord(OuterChatHud.position, 1),
firstWord(OuterChatHud.extent), $outerChatLenY[%length]);
ChatScrollHud.scrollToBottom();
ChatPageDown.setVisible(false);
}
//------------------------------------------------------------------------------
function MainChatHud::nextChatHudLen( %this )
{
%len = $pref::ChatHudLength++;
if ($pref::ChatHudLength == 4)
$pref::ChatHudLength = 1;
%this.setChatHudLength($pref::ChatHudLength);
}
//-----------------------------------------------------------------------------
// ChatHud methods
// This is the actual message vector/text control which is part of
// the MainChatHud dialog
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function ChatHud::addLine(%this,%text)
{
//first, see if we're "scrolled up"...
%textHeight = %this.profile.fontSize;
if (%textHeight <= 0)
%textHeight = 12;
%chatScrollHeight = getWord(%this.getGroup().getGroup().extent, 1);
%chatPosition = getWord(%this.extent, 1) - %chatScrollHeight + getWord(%this.position, 1);
%linesToScroll = mFloor((%chatPosition / %textHeight) + 0.5);
if (%linesToScroll > 0)
%origPosition = %this.position;
//add the message...
while( !chatPageDown.isVisible() && HudMessageVector.getNumLines() && (HudMessageVector.getNumLines() >= $pref::HudMessageLogSize))
{
%tag = HudMessageVector.getLineTag(0);
if(%tag != 0)
%tag.delete();
HudMessageVector.popFrontLine();
}
HudMessageVector.pushBackLine(%text, $LastHudTarget);
$LastHudTarget = 0;
//now that we've added the message, see if we need to reset the position
if (%linesToScroll > 0)
{
chatPageDown.setVisible(true);
%this.position = %origPosition;
}
else
chatPageDown.setVisible(false);
}
//-----------------------------------------------------------------------------
function ChatHud::pageUp(%this)
{
// Find out the text line height
%textHeight = %this.profile.fontSize;
if (%textHeight <= 0)
%textHeight = 12;
// Find out how many lines per page are visible
%chatScrollHeight = getWord(%this.getGroup().getGroup().extent, 1);
if (%chatScrollHeight <= 0)
return;
%pageLines = mFloor(%chatScrollHeight / %textHeight) - 1;
if (%pageLines <= 0)
%pageLines = 1;
// See how many lines we actually can scroll up:
%chatPosition = -1 * getWord(%this.position, 1);
%linesToScroll = mFloor((%chatPosition / %textHeight) + 0.5);
if (%linesToScroll <= 0)
return;
if (%linesToScroll > %pageLines)
%scrollLines = %pageLines;
else
%scrollLines = %linesToScroll;
// Now set the position
%this.position = firstWord(%this.position) SPC (getWord(%this.position, 1) + (%scrollLines * %textHeight));
// Display the pageup icon
chatPageDown.setVisible(true);
}
//-----------------------------------------------------------------------------
function ChatHud::pageDown(%this)
{
// Find out the text line height
%textHeight = %this.profile.fontSize;
if (%textHeight <= 0)
%textHeight = 12;
// Find out how many lines per page are visible
%chatScrollHeight = getWord(%this.getGroup().getGroup().extent, 1);
if (%chatScrollHeight <= 0)
return;
%pageLines = mFloor(%chatScrollHeight / %textHeight) - 1;
if (%pageLines <= 0)
%pageLines = 1;
// See how many lines we actually can scroll down:
%chatPosition = getWord(%this.extent, 1) - %chatScrollHeight + getWord(%this.position, 1);
%linesToScroll = mFloor((%chatPosition / %textHeight) + 0.5);
if (%linesToScroll <= 0)
return;
if (%linesToScroll > %pageLines)
%scrollLines = %pageLines;
else
%scrollLines = %linesToScroll;
// Now set the position
%this.position = firstWord(%this.position) SPC (getWord(%this.position, 1) - (%scrollLines * %textHeight));
// See if we have should (still) display the pagedown icon
if (%scrollLines < %linesToScroll)
chatPageDown.setVisible(true);
else
chatPageDown.setVisible(false);
}
//-----------------------------------------------------------------------------
// Support functions
//-----------------------------------------------------------------------------
function pageUpMessageHud()
{
ChatHud.pageUp();
}
function pageDownMessageHud()
{
ChatHud.pageDown();
}
function cycleMessageHudSize()
{
MainChatHud.nextChatHudLen();
}

Binary file not shown.

View File

@ -0,0 +1,32 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Server Admin Commands
//-----------------------------------------------------------------------------
function SAD(%password)
{
if (%password !$= "")
commandToServer('SAD', %password);
}
function SADSetPassword(%password)
{
commandToServer('SADSetPassword', %password);
}
//----------------------------------------------------------------------------
// Misc server commands
//----------------------------------------------------------------------------
function clientCmdSyncClock(%time)
{
// Store the base time in the hud control it will automatically increment.
if (isObject(HudClock))
HudClock.setTime(%time);
}

Binary file not shown.

View File

@ -0,0 +1,395 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
if ( isObject( moveMap ) )
moveMap.delete();
new ActionMap(moveMap);
if ( isObject( racingMap ) )
racingMap.delete();
new ActionMap(racingMap);
//------------------------------------------------------------------------------
// Non-remapable binds
//------------------------------------------------------------------------------
function escapeFromGame()
{
if ( $Server::ServerType $= "SinglePlayer" )
MessageBoxYesNo( "Quit Demo", "Exit from the demo?", "disconnect();", "");
else
MessageBoxYesNo( "Disconnect", "Disconnect from the server?", "disconnect();", "");
}
moveMap.bindCmd(keyboard, "escape", "", "escapeFromGame();");
function showPlayerList(%val)
{
if(%val)
PlayerListGui.toggle();
}
moveMap.bind( keyboard, F2, showPlayerList );
moveMap.bind( keyboard, F5, toggleParticleEditor);
//------------------------------------------------------------------------------
// Movement Keys
//------------------------------------------------------------------------------
$movementSpeed = 1; // m/s
function setSpeed(%speed)
{
if(%speed)
$movementSpeed = %speed;
}
function moveleft(%val)
{
$mvLeftAction = %val;
}
function moveright(%val)
{
$mvRightAction = %val;
}
function moveforward(%val)
{
$mvForwardAction = %val;
}
function movebackward(%val)
{
$mvBackwardAction = %val;
}
function moveup(%val)
{
$mvUpAction = %val;
}
function movedown(%val)
{
$mvDownAction = %val;
}
function turnLeft( %val )
{
$mvYawRightSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0;
}
function turnRight( %val )
{
$mvYawLeftSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0;
}
function panUp( %val )
{
$mvPitchDownSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0;
}
function panDown( %val )
{
$mvPitchUpSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0;
}
function getMouseAdjustAmount(%val)
{
// based on a default camera fov of 90'
return(%val * ($cameraFov / 90) * 0.01);
}
function yaw(%val)
{
$mvYaw += getMouseAdjustAmount(%val);
}
function pitch(%val)
{
$mvPitch += getMouseAdjustAmount(%val);
}
function jump(%val)
{
$mvTriggerCount2++;
}
racingMap.bind( keyboard, a, turnleft );
racingMap.bind( keyboard, d, turnright );
racingMap.bind( keyboard, left, turnleft );
racingMap.bind( keyboard, right, turnright );
moveMap.bind( keyboard, a, moveleft );
moveMap.bind( keyboard, d, moveright );
moveMap.bind( keyboard, left, moveleft );
moveMap.bind( keyboard, right, moveright );
moveMap.bind( keyboard, w, moveforward );
moveMap.bind( keyboard, s, movebackward );
moveMap.bind( keyboard, up, moveforward );
moveMap.bind( keyboard, down, movebackward );
moveMap.bind( keyboard, space, jump );
moveMap.bind( mouse, xaxis, yaw );
moveMap.bind( mouse, yaxis, pitch );
//------------------------------------------------------------------------------
// Mouse Trigger
//------------------------------------------------------------------------------
function mouseFire(%val)
{
$mvTriggerCount0++;
}
function altTrigger(%val)
{
$mvTriggerCount1++;
}
moveMap.bind( mouse, button0, mouseFire );
//moveMap.bind( mouse, button1, altTrigger );
//------------------------------------------------------------------------------
// Zoom and FOV functions
//------------------------------------------------------------------------------
if($Pref::player::CurrentFOV $= "")
$Pref::player::CurrentFOV = 45;
function setZoomFOV(%val)
{
if(%val)
toggleZoomFOV();
}
function toggleZoom( %val )
{
if ( %val )
{
$ZoomOn = true;
setFov( $Pref::player::CurrentFOV );
}
else
{
$ZoomOn = false;
setFov( $Pref::player::DefaultFov );
}
}
moveMap.bind(keyboard, r, setZoomFOV);
moveMap.bind(keyboard, e, toggleZoom);
//------------------------------------------------------------------------------
// Camera & View functions
//------------------------------------------------------------------------------
function toggleFreeLook( %val )
{
if ( %val )
$mvFreeLook = true;
else
$mvFreeLook = false;
}
$firstPerson = true;
function toggleFirstPerson(%val)
{
if (%val)
{
$firstPerson = !$firstPerson;
ServerConnection.setFirstPerson($firstPerson);
}
}
function toggleCamera(%val)
{
if (%val)
{
// Since we want the free cam to strafe but the WheeledVehicle
// to turn we need to do a little ActionMap wizardry
%control = ServerConnection.getControlObject();
if (%control.getClassName() $= "Camera")
racingMap.push();
else
racingMap.pop();
commandToServer('ToggleCamera');
}
}
moveMap.bind( keyboard, z, toggleFreeLook );
moveMap.bind(keyboard, tab, toggleFirstPerson );
moveMap.bind(keyboard, "alt c", toggleCamera);
//------------------------------------------------------------------------------
// Misc. Player stuff
//------------------------------------------------------------------------------
function celebrationWave(%val)
{
if(%val)
commandToServer('playCel', "wave");
}
function celebrationSalute(%val)
{
if(%val)
commandToServer('playCel', "salute");
}
function suicide(%val)
{
if(%val)
commandToServer('suicide');
}
moveMap.bind(keyboard, "ctrl w", celebrationWave);
moveMap.bind(keyboard, "ctrl s", celebrationSalute);
moveMap.bind(keyboard, "ctrl k", suicide);
//------------------------------------------------------------------------------
// Item manipulation
//------------------------------------------------------------------------------
moveMap.bindCmd(keyboard, "1", "commandToServer('use',\"Crossbow\");", "");
//------------------------------------------------------------------------------
// Message HUD functions
//------------------------------------------------------------------------------
function pageMessageHudUp( %val )
{
if ( %val )
pageUpMessageHud();
}
function pageMessageHudDown( %val )
{
if ( %val )
pageDownMessageHud();
}
function resizeMessageHud( %val )
{
if ( %val )
cycleMessageHudSize();
}
moveMap.bind(keyboard, u, toggleMessageHud );
//moveMap.bind(keyboard, y, teamMessageHud );
moveMap.bind(keyboard, "pageUp", pageMessageHudUp );
moveMap.bind(keyboard, "pageDown", pageMessageHudDown );
moveMap.bind(keyboard, "p", resizeMessageHud );
//------------------------------------------------------------------------------
// Demo recording functions
//------------------------------------------------------------------------------
function startRecordingDemo( %val )
{
// if ( %val )
// beginDemoRecord();
error( "** This function has temporarily been disabled! **" );
}
function stopRecordingDemo( %val )
{
// if ( %val )
// stopRecord();
error( "** This function has temporarily been disabled! **" );
}
//moveMap.bind( keyboard, F3, startRecordingDemo );
//moveMap.bind( keyboard, F4, stopRecordingDemo );
//------------------------------------------------------------------------------
// Helper Functions
//------------------------------------------------------------------------------
function dropCameraAtPlayer(%val)
{
if (%val)
commandToServer('dropCameraAtPlayer');
}
function dropPlayerAtCamera(%val)
{
if (%val)
commandToServer('DropPlayerAtCamera');
}
moveMap.bind(keyboard, "F8", dropCameraAtPlayer);
moveMap.bind(keyboard, "F7", dropPlayerAtCamera);
function bringUpOptions(%val)
{
if(%val)
Canvas.pushDialog(OptionsDlg);
}
moveMap.bind(keyboard, "ctrl o", bringUpOptions);
//------------------------------------------------------------------------------
// Dubuging Functions
//------------------------------------------------------------------------------
$MFDebugRenderMode = 0;
function cycleDebugRenderMode(%val)
{
if (!%val)
return;
if (getBuildString() $= "Debug")
{
if($MFDebugRenderMode == 0)
{
// Outline mode, including fonts so no stats
$MFDebugRenderMode = 1;
GLEnableOutline(true);
}
else if ($MFDebugRenderMode == 1)
{
// Interior debug mode
$MFDebugRenderMode = 2;
GLEnableOutline(false);
setInteriorRenderMode(7);
showInterior();
}
else if ($MFDebugRenderMode == 2)
{
// Back to normal
$MFDebugRenderMode = 0;
setInteriorRenderMode(0);
GLEnableOutline(false);
show();
}
}
else
{
echo("Debug render modes only available when running a Debug build.");
}
}
GlobalActionMap.bind(keyboard, "F9", cycleDebugRenderMode);
//------------------------------------------------------------------------------
// Misc.
//------------------------------------------------------------------------------
GlobalActionMap.bind(keyboard, "tilde", toggleConsole);
GlobalActionMap.bindCmd(keyboard, "alt k", "cls();","");
GlobalActionMap.bindCmd(keyboard, "alt enter", "", "toggleFullScreen();");
GlobalActionMap.bindCmd(keyboard, "F1", "", "contextHelp();");

Binary file not shown.

View File

@ -0,0 +1,53 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// Game start / end events sent from the server
//----------------------------------------------------------------------------
function clientCmdGameStart(%seq)
{
PlayerListGui.zeroScores();
}
function clientCmdGameEnd(%seq)
{
// Stop local activity... the game will be destroyed on the server
alxStopAll();
// Copy the current scores from the player list into the
// end game gui (bit of a hack for now).
EndGameGuiList.clear();
for (%i = 0; %i < PlayerListGuiList.rowCount(); %i++) {
%text = PlayerListGuiList.getRowText(%i);
%id = PlayerListGuiList.getRowId(%i);
EndGameGuiList.addRow(%id,%text);
}
EndGameGuiList.sortNumerical(1,false);
// Display the end-game screen
Canvas.setContent(EndGameGui);
}
//----------------------------------------------------------------------------
// Game gui
//----------------------------------------------------------------------------
// Initialize GameGUI to the default gui screen.
$Client::GameGUI = "PlayGUI";
function clientCmdSetGameGui(%gui)
{
// The GameGUI isn't loaded here directly. Game gui is normally loaded
// when the client first recieves a control object from the server. (This is
// handled by the GameConnection scripts, located in serverConnection.cs)
// But if we aren't in the editor and the game is currently in progress,
// then we probably should load the gui...
$Client::GameGUI = %gui;
}

Binary file not shown.

View File

@ -0,0 +1,145 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//----------------------------------------
function JoinServerGui::onWake()
{
// Double check the status. Tried setting this the control
// inactive to start with, but that didn't seem to work.
//JS_joinServer.setActive(JS_serverList.rowCount() > 0);
// Override the next page command...
OverlayNextPage.setVisible(true);
OverlayNextPage.command = "JoinServerGui.join();";
// Set our query and mission types to the demo game type
$Client::GameTypeQuery = $Client::GameType;
$Client::MissionTypeQuery = "any";
}
//----------------------------------------
function JoinServerGui::query(%this)
{
queryMasterServer(
0, // Query flags
$Client::GameTypeQuery, // gameTypes
$Client::MissionTypeQuery, // missionType
0, // minPlayers
100, // maxPlayers
0, // maxBots
2, // regionMask
0, // maxPing
100, // minCPU
0 // filterFlags
);
}
//----------------------------------------
function JoinServerGui::queryLan(%this)
{
queryLANServers(
28000, // lanPort for local queries
0, // Query flags
$Client::GameTypeQuery, // gameTypes
$Client::MissionTypeQuery, // missionType
0, // minPlayers
100, // maxPlayers
0, // maxBots
2, // regionMask
0, // maxPing
100, // minCPU
0 // filterFlags
);
}
//----------------------------------------
function JoinServerGui::cancel(%this)
{
cancelServerQuery();
JS_queryStatus.setVisible(false);
}
//----------------------------------------
function JoinServerGui::join(%this)
{
cancelServerQuery();
%id = JS_serverList.getSelectedId();
// The server info index is stored in the row along with the
// rest of displayed info.
%index = getField(JS_serverList.getRowTextById(%id),3);
if (setServerInfo(%index)) {
%conn = new GameConnection(ServerConnection);
%conn.setConnectArgs($pref::Player::Name);
%conn.setJoinPassword($Client::Password);
%conn.connect($ServerInfo::Address);
}
else
MessageBoxOk("No Server Selected","You need to select a server. Press either of the Query buttons to list available servers or go back to the previous page to create your own.");
}
//----------------------------------------
function JoinServerGui::exit(%this)
{
cancelServerQuery();
Canvas.setContent(StartMissionGui);
}
//----------------------------------------
function JoinServerGui::update(%this)
{
// Copy the servers into the server list.
JS_queryStatus.setVisible(false);
JS_serverList.clear();
%sc = getServerCount();
for (%i = 0; %i < %sc; %i++) {
setServerInfo(%i);
JS_serverList.addRow(%i,
$ServerInfo::Name TAB
$ServerInfo::Ping TAB
$ServerInfo::PlayerCount @ "/" @ $ServerInfo::MaxPlayers TAB
%i); // ServerInfo index stored also
}
JS_serverList.sort(0);
JS_serverList.setSelectedRow(0);
JS_serverList.scrollVisible(0);
//JS_joinServer.setActive(JS_serverList.rowCount() > 0);
}
//----------------------------------------
function onServerQueryStatus(%status, %msg, %value)
{
// Update query status
// States: start, update, ping, query, done
// value = % (0-1) done for ping and query states
if (!JS_queryStatus.isVisible())
JS_queryStatus.setVisible(true);
switch$ (%status) {
case "start":
//JS_joinServer.setActive(false);
JS_queryMaster.setActive(false);
JS_statusText.setText(%msg);
JS_statusBar.setValue(0);
JS_serverList.clear();
case "ping":
JS_statusText.setText("Ping Servers");
JS_statusBar.setValue(%value);
case "query":
JS_statusText.setText("Query Servers");
JS_statusBar.setValue(%value);
case "done":
JS_queryMaster.setActive(true);
JS_queryStatus.setVisible(false);
JoinServerGui.update();
}
}

Binary file not shown.

View File

@ -0,0 +1,46 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//------------------------------------------------------------------------------
function LoadingGui::onAdd(%this)
{
%this.qLineCount = 0;
}
//------------------------------------------------------------------------------
function LoadingGui::onWake(%this)
{
// Play sound...
CloseMessagePopup();
// Push the menu system
Canvas.pushdialog(OverlayDlg);
// Initialize overlay buttons
OverlayNextPage.setVisible(false);
OverlayPrevPage.setVisible(true);
OverlayPrevPage.command = "disconnect();";
//
LoadingProgressTxt.setValue("WAITING FOR SERVER");
}
//------------------------------------------------------------------------------
function LoadingGui::onSleep(%this)
{
// Clear the load info:
if ( %this.qLineCount !$= "" )
{
for ( %line = 0; %line < %this.qLineCount; %line++ )
%this.qLine[%line] = "";
}
%this.qLineCount = 0;
LOAD_MapName.setText( "" );
LOAD_MapDescription.setText( "" );
LoadingProgress.setValue( 0 );
// Stop sound...
}

Binary file not shown.

View File

@ -0,0 +1,181 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// MainMenuGui is the main Control through which the game shell is viewed.
//-----------------------------------------------------------------------------
function MainMenuGui::onWake(%this)
{
%this.pushThread(main_menu_thread);
BottomDesc.setVisible(false);
}
//-------------------------------------
function MainMenuGui::getThread(%this)
{
%top = menu_thread_stack.getCount();
if (%top > 0)
return menu_thread_stack.getObject(%top-1);
else
return 0;
}
//-------------------------------------
function MainMenuGui::popCurrent(%this)
{
if (%thread = %this.getThread())
{
Canvas.popDialog(%thread.getObject(%thread.page));
echo ("POP Current: " @ %thread.getName() @ " page: " @ %thread.page);
}
}
//-------------------------------------
function MainMenuGui::pushThread(%this, %thread)
{
echo ("PushThread: " @ %thread.getname());
%this.popCurrent();
%thread.page = 0;
menu_thread_stack.add(%thread);
%this.update();
}
//-------------------------------------
function MainMenuGui::popThread(%this)
{
if (%thread = %this.getThread())
{
echo ("PopThread: " @ %thread.getname());
%this.popCurrent();
menu_thread_stack.remove(%thread);
%this.update();
}
}
//-------------------------------------
function MainMenuGui::isNextPage(%this)
{
if ( !(%thread = %this.getThread()) )
return false;
echo ("isNext: " @ %thread.page @ " - " @ %thread.getCount());
return %thread.page < (%thread.getCount() - 1);
}
//-------------------------------------
function MainMenuGui::isPrevPage(%this)
{
if ( !(%thread = %this.getThread()) )
return false;
return %thread.page > 0;
}
//-------------------------------------
function MainMenuGui::isPrevThread(%this)
{
return menu_thread_stack.getCount() > 1;
}
//-------------------------------------
function MainMenuGui::nextPage(%this)
{
if (%this.isNextPage())
{
%this.popCurrent();
%thread = %this.getThread();
%thread.page = (%thread.page+1);
%this.update();
}
else
%this.popThread();
}
//-------------------------------------
function MainMenuGui::prevPage(%this)
{
if (%this.isPrevPage())
{
%this.popCurrent();
%thread = %this.getThread();
%thread.page = (%thread.page-1);
%this.update();
}
}
//-------------------------------------
function MainMenuGui::update(%this)
{
if (Canvas.getContent().getName() $= "GuiEditorGui")
{
%this.popCurrent();
Canvas.popdialog(OverlayDlg);
return;
}
if (%thread = %this.getThread())
{
echo ("Update: " @ %thread.getName() @ " page: " @ %thread.page);
%page = %thread.getObject(%thread.page);
// Setup default overlay buttons
OverlayTitle.setVisible(false);
OverlayTitle2.setVisible(true);
OverlayTitle2.setText("<just:left><color:000000>" @ %page.title);
OverlayDesc.setText("");
OverlayNextPage.setVisible(%this.isNextPage() || (%this.isPrevPage() && %this.isPrevThread()));
OverlayNextPage.command = "MainMenuGui.nextPage();";
OverlayPrevPage.setVisible(%this.isPrevPage());
OverlayPrevPage.command = "MainMenuGui.prevPage();";
if (!%this.isPrevPage())
{
if (%this.isPrevThread())
{
OverlayPrevPage.setVisible(true);
OverlayPrevPage.command = "MainMenuGui.popThread();";
}
}
// Push the current page
Canvas.pushDialog(%page);
// make sure The Overlay is on top
Canvas.popdialog(OverlayDlg);
Canvas.pushdialog(OverlayDlg);
}
}
//-------------------------------------
function MainMenuGui::onSleep(%this)
{
}
//-------------------------------------
function MainMenuGui::goHome(%this)
{
disconnect();
if (Canvas.getContent() != %this.getId())
Canvas.pushDialog(%this);
else {
while (%this.isPrevThread())
%this.popThread();
}
}

Binary file not shown.

View File

@ -0,0 +1,112 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// Enter Chat Message Hud
//----------------------------------------------------------------------------
//------------------------------------------------------------------------------
function MessageHud::open(%this)
{
%offset = 6;
if(%this.isVisible())
return;
if(%this.isTeamMsg)
%text = "TEAM:";
else
%text = "GLOBAL:";
MessageHud_Text.setValue(%text);
%windowPos = "0 " @ ( getWord( outerChatHud.position, 1 ) + getWord( outerChatHud.extent, 1 ) + 1 );
%windowExt = getWord( OuterChatHud.extent, 0 ) @ " " @ getWord( MessageHud_Frame.extent, 1 );
%textExtent = getWord(MessageHud_Text.extent, 0) + 14;
%ctrlExtent = getWord(MessageHud_Frame.extent, 0);
Canvas.pushDialog(%this);
messageHud_Frame.position = %windowPos;
messageHud_Frame.extent = %windowExt;
MessageHud_Edit.position = setWord(MessageHud_Edit.position, 0, %textExtent + %offset);
MessageHud_Edit.extent = setWord(MessageHud_Edit.extent, 0, %ctrlExtent - %textExtent - (2 * %offset));
%this.setVisible(true);
deactivateKeyboard();
MessageHud_Edit.makeFirstResponder(true);
}
//------------------------------------------------------------------------------
function MessageHud::close(%this)
{
if(!%this.isVisible())
return;
Canvas.popDialog(%this);
%this.setVisible(false);
if ( $enableDirectInput )
activateKeyboard();
MessageHud_Edit.setValue("");
}
//------------------------------------------------------------------------------
function MessageHud::toggleState(%this)
{
if(%this.isVisible())
%this.close();
else
%this.open();
}
//------------------------------------------------------------------------------
function MessageHud_Edit::onEscape(%this)
{
MessageHud.close();
}
//------------------------------------------------------------------------------
function MessageHud_Edit::eval(%this)
{
%text = trim(%this.getValue());
if(%text !$= "")
{
if(MessageHud.isTeamMsg)
commandToServer('teamMessageSent', %text);
else
commandToServer('messageSent', %text);
}
MessageHud.close();
}
//----------------------------------------------------------------------------
// MessageHud key handlers
function toggleMessageHud(%make)
{
if(%make)
{
MessageHud.isTeamMsg = false;
MessageHud.toggleState();
}
}
function teamMessageHud(%make)
{
if(%make)
{
MessageHud.isTeamMsg = true;
MessageHud.toggleState();
}
}

Binary file not shown.

View File

@ -0,0 +1,154 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// Mission Loading & Mission Info
// The mission loading server handshaking is handled by the
// common/client/missingLoading.cs. This portion handles the interface
// with the game GUI.
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// Loading Phases:
// Phase 1: Download Datablocks
// Phase 2: Download Ghost Objects
// Phase 3: Scene Lighting
//----------------------------------------------------------------------------
// Phase 1
//----------------------------------------------------------------------------
function onMissionDownloadPhase1(%missionName, %musicTrack)
{
// Close and clear the message hud (in case it's open)
MessageHud.close();
//cls();
// Reset the loading progress controls:
LoadingProgress.setValue(0);
LoadingProgressTxt.setValue("LOADING DATABLOCKS");
}
function onPhase1Progress(%progress)
{
LoadingProgress.setValue(%progress);
Canvas.repaint();
}
function onPhase1Complete()
{
}
//----------------------------------------------------------------------------
// Phase 2
//----------------------------------------------------------------------------
function onMissionDownloadPhase2()
{
// Reset the loading progress controls:
LoadingProgress.setValue(0);
LoadingProgressTxt.setValue("LOADING OBJECTS");
Canvas.repaint();
}
function onPhase2Progress(%progress)
{
LoadingProgress.setValue(%progress);
Canvas.repaint();
}
function onPhase2Complete()
{
}
function onFileChunkReceived(%fileName, %ofs, %size)
{
LoadingProgress.setValue(%ofs / %size);
LoadingProgressTxt.setValue("Downloading " @ %fileName @ "...");
}
//----------------------------------------------------------------------------
// Phase 3
//----------------------------------------------------------------------------
function onMissionDownloadPhase3()
{
LoadingProgress.setValue(0);
LoadingProgressTxt.setValue("LIGHTING MISSION");
Canvas.repaint();
}
function onPhase3Progress(%progress)
{
LoadingProgress.setValue(%progress);
}
function onPhase3Complete()
{
LoadingProgress.setValue( 1 );
$lightingMission = false;
}
//----------------------------------------------------------------------------
// Mission loading done!
//----------------------------------------------------------------------------
function onMissionDownloadComplete()
{
// Client will shortly be dropped into the game, so this is
// good place for any last minute gui cleanup.
}
//------------------------------------------------------------------------------
// Before downloading a mission, the server transmits the mission
// information through these messages.
//------------------------------------------------------------------------------
addMessageCallback( 'MsgLoadInfo', handleLoadInfoMessage );
addMessageCallback( 'MsgLoadDescripition', handleLoadDescriptionMessage );
addMessageCallback( 'MsgLoadInfoDone', handleLoadInfoDoneMessage );
//------------------------------------------------------------------------------
function handleLoadInfoMessage( %msgType, %msgString, %mapName ) {
// Need to pop up the loading gui to display this stuff.
if (!LoadingGui.isAwake())
Canvas.setContent("LoadingGui");
// Clear all of the loading info lines:
for( %line = 0; %line < LoadingGui.qLineCount; %line++ )
LoadingGui.qLine[%line] = "";
LoadingGui.qLineCount = 0;
//
LOAD_MapName.setText( %mapName );
}
//------------------------------------------------------------------------------
function handleLoadDescriptionMessage( %msgType, %msgString, %line )
{
LoadingGui.qLine[LoadingGui.qLineCount] = %line;
LoadingGui.qLineCount++;
// Gather up all the previous lines, append the current one
// and stuff it into the control
%text = "<spush><font:Arial:16>";
for( %line = 0; %line < LoadingGui.qLineCount - 1; %line++ )
%text = %text @ LoadingGui.qLine[%line] @ " ";
%text = %text @ LoadingGui.qLine[%line] @ "<spop>";
LOAD_MapDescription.setText( %text );
}
//------------------------------------------------------------------------------
function handleLoadInfoDoneMessage( %msgType, %msgString )
{
// This will get called after the last description line is sent.
}

Binary file not shown.

View File

@ -0,0 +1,618 @@
function OptionsDlg::onWake(%this)
{
OptGraphicsButton.performClick();
%buffer = getDisplayDeviceList();
%count = getFieldCount( %buffer );
OptGraphicsDriverMenu.clear();
OptScreenshotMenu.init();
OptScreenshotMenu.setValue($pref::Video::screenShotFormat);
for(%i = 0; %i < %count; %i++)
OptGraphicsDriverMenu.add(getField(%buffer, %i), %i);
%selId = OptGraphicsDriverMenu.findText( $pref::Video::displayDevice );
if ( %selId == -1 )
%selId = 0; // How did THAT happen?
OptGraphicsDriverMenu.setSelected( %selId );
OptGraphicsDriverMenu.onSelect( %selId, "" );
// Audio
OptAudioUpdate();
OptAudioVolumeMaster.setValue($pref::Audio::masterVolume);
OptAudioVolumeShell.setValue( $pref::Audio::channelVolume[$GuiAudioType]);
OptAudioVolumeSim.setValue( $pref::Audio::channelVolume[$SimAudioType]);
OptAudioDriverList.clear();
OptAudioDriverList.add("OpenAL", 1);
OptAudioDriverList.add("none", 2);
%selId = OptAudioDriverList.findText($pref::Audio::driver);
if ( %selId == -1 )
%selId = 0; // How did THAT happen?
OptAudioDriverList.setSelected( %selId );
OptAudioDriverList.onSelect( %selId, "" );
OptRemapList.fillList();
}
function OptionsDlg::onSleep(%this)
{
// write out the control config into the demo/client/config.cs file
moveMap.save( "demo/client/config.cs" );
}
function OptGraphicsDriverMenu::onSelect( %this, %id, %text )
{
// Attempt to keep the same res and bpp settings:
if ( OptGraphicsResolutionMenu.size() > 0 )
%prevRes = OptGraphicsResolutionMenu.getText();
else
%prevRes = getWords( $pref::Video::resolution, 0, 1 );
// Check if this device is full-screen only:
if ( isDeviceFullScreenOnly( %this.getText() ) )
{
OptGraphicsFullscreenToggle.setValue( true );
OptGraphicsFullscreenToggle.setActive( false );
OptGraphicsFullscreenToggle.onAction();
}
else
OptGraphicsFullscreenToggle.setActive( true );
if ( OptGraphicsFullscreenToggle.getValue() )
{
if ( OptGraphicsBPPMenu.size() > 0 )
%prevBPP = OptGraphicsBPPMenu.getText();
else
%prevBPP = getWord( $pref::Video::resolution, 2 );
}
// Fill the resolution and bit depth lists:
OptGraphicsResolutionMenu.init( %this.getText(), OptGraphicsFullscreenToggle.getValue() );
OptGraphicsBPPMenu.init( %this.getText() );
// Try to select the previous settings:
%selId = OptGraphicsResolutionMenu.findText( %prevRes );
if ( %selId == -1 )
%selId = 0;
OptGraphicsResolutionMenu.setSelected( %selId );
if ( OptGraphicsFullscreenToggle.getValue() )
{
%selId = OptGraphicsBPPMenu.findText( %prevBPP );
if ( %selId == -1 )
%selId = 0;
OptGraphicsBPPMenu.setSelected( %selId );
OptGraphicsBPPMenu.setText( OptGraphicsBPPMenu.getTextById( %selId ) );
}
else
OptGraphicsBPPMenu.setText( "Default" );
}
function OptGraphicsResolutionMenu::init( %this, %device, %fullScreen )
{
%this.clear();
%resList = getResolutionList( %device );
%resCount = getFieldCount( %resList );
%deskRes = getDesktopResolution();
%count = 0;
for ( %i = 0; %i < %resCount; %i++ )
{
%res = getWords( getField( %resList, %i ), 0, 1 );
// Don't allow resolutions with a width less than 800
if ( firstWord( %res ) < 800 )
{
continue;
}
// Only add to list if it isn't there already:
if ( %this.findText( %res ) == -1 )
{
%this.add( %res, %count );
%count++;
}
}
}
function OptGraphicsFullscreenToggle::onAction(%this)
{
//Parent::onAction();
%prevRes = OptGraphicsResolutionMenu.getText();
// Update the resolution menu with the new options
OptGraphicsResolutionMenu.init( OptGraphicsDriverMenu.getText(), %this.getValue() );
// Set it back to the previous resolution if the new mode supports it.
%selId = OptGraphicsResolutionMenu.findText( %prevRes );
if ( %selId == -1 )
%selId = 0;
OptGraphicsResolutionMenu.setSelected( %selId );
}
function OptGraphicsBPPMenu::init( %this, %device )
{
%this.clear();
if ( %device $= "Voodoo2" )
%this.add( "16", 0 );
else
{
%resList = getResolutionList( %device );
%resCount = getFieldCount( %resList );
%count = 0;
for ( %i = 0; %i < %resCount; %i++ )
{
%bpp = getWord( getField( %resList, %i ), 2 );
// Only add to list if it isn't there already:
if ( %this.findText( %bpp ) == -1 )
{
%this.add( %bpp, %count );
%count++;
}
}
}
}
function OptScreenshotMenu::init( %this )
{
if( %this.findText("PNG") == -1 )
%this.add("PNG", 0);
if( %this.findText("JPEG") == - 1 )
%this.add("JPEG", 1);
}
function optionsDlg::applyGraphics( %this )
{
%newDriver = OptGraphicsDriverMenu.getText();
%newRes = OptGraphicsResolutionMenu.getText();
%newBpp = OptGraphicsBPPMenu.getText();
%newFullScreen = OptGraphicsFullscreenToggle.getValue();
$pref::Video::screenShotFormat = OptScreenshotMenu.getText();
if ( %newDriver !$= $pref::Video::displayDevice )
{
setDisplayDevice( %newDriver, firstWord( %newRes ), getWord( %newRes, 1 ), %newBpp, %newFullScreen );
//OptionsDlg::deviceDependent( %this );
}
else
setScreenMode( firstWord( %newRes ), getWord( %newRes, 1 ), %newBpp, %newFullScreen );
}
$RemapCount = 0;
$RemapName[$RemapCount] = "Forward";
$RemapCmd[$RemapCount] = "moveforward";
$RemapCount++;
$RemapName[$RemapCount] = "Backward";
$RemapCmd[$RemapCount] = "movebackward";
$RemapCount++;
$RemapName[$RemapCount] = "Strafe Left";
$RemapCmd[$RemapCount] = "moveleft";
$RemapCount++;
$RemapName[$RemapCount] = "Strafe Right";
$RemapCmd[$RemapCount] = "moveright";
$RemapCount++;
$RemapName[$RemapCount] = "Turn Left";
$RemapCmd[$RemapCount] = "turnLeft";
$RemapCount++;
$RemapName[$RemapCount] = "Turn Right";
$RemapCmd[$RemapCount] = "turnRight";
$RemapCount++;
$RemapName[$RemapCount] = "Look Up";
$RemapCmd[$RemapCount] = "panUp";
$RemapCount++;
$RemapName[$RemapCount] = "Look Down";
$RemapCmd[$RemapCount] = "panDown";
$RemapCount++;
$RemapName[$RemapCount] = "Jump";
$RemapCmd[$RemapCount] = "jump";
$RemapCount++;
$RemapName[$RemapCount] = "Fire Weapon";
$RemapCmd[$RemapCount] = "mouseFire";
$RemapCount++;
$RemapName[$RemapCount] = "Adjust Zoom";
$RemapCmd[$RemapCount] = "setZoomFov";
$RemapCount++;
$RemapName[$RemapCount] = "Toggle Zoom";
$RemapCmd[$RemapCount] = "toggleZoom";
$RemapCount++;
$RemapName[$RemapCount] = "Free Look";
$RemapCmd[$RemapCount] = "toggleFreeLook";
$RemapCount++;
$RemapName[$RemapCount] = "Switch 1st/3rd";
$RemapCmd[$RemapCount] = "toggleFirstPerson";
$RemapCount++;
$RemapName[$RemapCount] = "Chat to Everyone";
$RemapCmd[$RemapCount] = "toggleMessageHud";
$RemapCount++;
$RemapName[$RemapCount] = "Message Hud PageUp";
$RemapCmd[$RemapCount] = "pageMessageHudUp";
$RemapCount++;
$RemapName[$RemapCount] = "Message Hud PageDown";
$RemapCmd[$RemapCount] = "pageMessageHudDown";
$RemapCount++;
$RemapName[$RemapCount] = "Resize Message Hud";
$RemapCmd[$RemapCount] = "resizeMessageHud";
$RemapCount++;
$RemapName[$RemapCount] = "Show Scores";
$RemapCmd[$RemapCount] = "showPlayerList";
$RemapCount++;
$RemapName[$RemapCount] = "Animation - Wave";
$RemapCmd[$RemapCount] = "celebrationWave";
$RemapCount++;
$RemapName[$RemapCount] = "Animation - Salute";
$RemapCmd[$RemapCount] = "celebrationSalute";
$RemapCount++;
$RemapName[$RemapCount] = "Suicide";
$RemapCmd[$RemapCount] = "suicide";
$RemapCount++;
$RemapName[$RemapCount] = "Toggle Camera";
$RemapCmd[$RemapCount] = "toggleCamera";
$RemapCount++;
$RemapName[$RemapCount] = "Drop Camera at Player";
$RemapCmd[$RemapCount] = "dropCameraAtPlayer";
$RemapCount++;
$RemapName[$RemapCount] = "Drop Player at Camera";
$RemapCmd[$RemapCount] = "dropPlayerAtCamera";
$RemapCount++;
$RemapName[$RemapCount] = "Bring up Options Dialog";
$RemapCmd[$RemapCount] = "bringUpOptions";
$RemapCount++;
function restoreDefaultMappings()
{
moveMap.delete();
exec( "~/scripts/default.bind.cs" );
OptRemapList.fillList();
}
function getMapDisplayName( %device, %action )
{
if ( %device $= "keyboard" )
return( %action );
else if ( strstr( %device, "mouse" ) != -1 )
{
// Substitute "mouse" for "button" in the action string:
%pos = strstr( %action, "button" );
if ( %pos != -1 )
{
%mods = getSubStr( %action, 0, %pos );
%object = getSubStr( %action, %pos, 1000 );
%instance = getSubStr( %object, strlen( "button" ), 1000 );
return( %mods @ "mouse" @ ( %instance + 1 ) );
}
else
error( "Mouse input object other than button passed to getDisplayMapName!" );
}
else if ( strstr( %device, "joystick" ) != -1 )
{
// Substitute "joystick" for "button" in the action string:
%pos = strstr( %action, "button" );
if ( %pos != -1 )
{
%mods = getSubStr( %action, 0, %pos );
%object = getSubStr( %action, %pos, 1000 );
%instance = getSubStr( %object, strlen( "button" ), 1000 );
return( %mods @ "joystick" @ ( %instance + 1 ) );
}
else
{
%pos = strstr( %action, "pov" );
if ( %pos != -1 )
{
%wordCount = getWordCount( %action );
%mods = %wordCount > 1 ? getWords( %action, 0, %wordCount - 2 ) @ " " : "";
%object = getWord( %action, %wordCount - 1 );
switch$ ( %object )
{
case "upov": %object = "POV1 up";
case "dpov": %object = "POV1 down";
case "lpov": %object = "POV1 left";
case "rpov": %object = "POV1 right";
case "upov2": %object = "POV2 up";
case "dpov2": %object = "POV2 down";
case "lpov2": %object = "POV2 left";
case "rpov2": %object = "POV2 right";
default: %object = "??";
}
return( %mods @ %object );
}
else
error( "Unsupported Joystick input object passed to getDisplayMapName!" );
}
}
return( "??" );
}
function buildFullMapString( %index )
{
%name = $RemapName[%index];
%cmd = $RemapCmd[%index];
%temp = moveMap.getBinding( %cmd );
if ( %temp $= "" )
return %name TAB "";
%mapString = "";
%count = getFieldCount( %temp );
for ( %i = 0; %i < %count; %i += 2 )
{
if ( %mapString !$= "" )
%mapString = %mapString @ ", ";
%device = getField( %temp, %i + 0 );
%object = getField( %temp, %i + 1 );
%mapString = %mapString @ getMapDisplayName( %device, %object );
}
return %name TAB %mapString;
}
function OptRemapList::fillList( %this )
{
%this.clear();
for ( %i = 0; %i < $RemapCount; %i++ )
%this.addRow( %i, buildFullMapString( %i ) );
}
//------------------------------------------------------------------------------
function OptRemapList::doRemap( %this )
{
%selId = %this.getSelectedId();
%name = $RemapName[%selId];
OptRemapText.setValue( "REMAP \"" @ %name @ "\"" );
OptRemapInputCtrl.index = %selId;
Canvas.pushDialog( RemapDlg );
}
//------------------------------------------------------------------------------
function redoMapping( %device, %action, %cmd, %oldIndex, %newIndex )
{
//%actionMap.bind( %device, %action, $RemapCmd[%newIndex] );
moveMap.bind( %device, %action, %cmd );
OptRemapList.setRowById( %oldIndex, buildFullMapString( %oldIndex ) );
OptRemapList.setRowById( %newIndex, buildFullMapString( %newIndex ) );
}
//------------------------------------------------------------------------------
function findRemapCmdIndex( %command )
{
for ( %i = 0; %i < $RemapCount; %i++ )
{
if ( %command $= $RemapCmd[%i] )
return( %i );
}
return( -1 );
}
/// This unbinds actions beyond %count associated to the
/// particular moveMap %commmand.
function unbindExtraActions( %command, %count )
{
%temp = moveMap.getBinding( %command );
if ( %temp $= "" )
return;
%count = getFieldCount( %temp ) - ( %count * 2 );
for ( %i = 0; %i < %count; %i += 2 )
{
%device = getField( %temp, %i + 0 );
%action = getField( %temp, %i + 1 );
moveMap.unbind( %device, %action );
}
}
function OptRemapInputCtrl::onInputEvent( %this, %device, %action )
{
//error( "** onInputEvent called - device = " @ %device @ ", action = " @ %action @ " **" );
Canvas.popDialog( RemapDlg );
// Test for the reserved keystrokes:
if ( %device $= "keyboard" )
{
// Cancel...
if ( %action $= "escape" )
{
// Do nothing...
return;
}
}
%cmd = $RemapCmd[%this.index];
%name = $RemapName[%this.index];
// Grab the friendly display name for this action
// which we'll use when prompting the user below.
%mapName = getMapDisplayName( %device, %action );
// Get the current command this action is mapped to.
%prevMap = moveMap.getCommand( %device, %action );
// If nothing was mapped to the previous command
// mapping then it's easy... just bind it.
if ( %prevMap $= "" )
{
unbindExtraActions( %cmd, 1 );
moveMap.bind( %device, %action, %cmd );
OptRemapList.setRowById( %this.index, buildFullMapString( %this.index ) );
return;
}
// If the previous command is the same as the
// current then they hit the same input as what
// was already assigned.
if ( %prevMap $= %cmd )
{
unbindExtraActions( %cmd, 0 );
moveMap.bind( %device, %action, %cmd );
OptRemapList.setRowById( %this.index, buildFullMapString( %this.index ) );
return;
}
// Look for the index of the previous mapping.
%prevMapIndex = findRemapCmdIndex( %prevMap );
// If we get a negative index then the previous
// mapping was to an item that isn't included in
// the mapping list... so we cannot unmap it.
if ( %prevMapIndex == -1 )
{
MessageBoxOK( "Remap Failed", "\"" @ %mapName @ "\" is already bound to a non-remappable command!" );
return;
}
// Setup the forced remapping callback command.
%callback = "redoMapping(" @ %device @ ", \"" @ %action @ "\", \"" @
%cmd @ "\", " @ %prevMapIndex @ ", " @ %this.index @ ");";
// Warn that we're about to remove the old mapping and
// replace it with another.
%prevCmdName = $RemapName[%prevMapIndex];
MessageBoxYesNo( "Warning",
"\"" @ %mapName @ "\" is already bound to \""
@ %prevCmdName @ "\"!\nDo you wish to replace this mapping?",
%callback, "" );
}
// Audio
function OptAudioUpdate()
{
// set the driver text
%text = "Vendor: " @ alGetString("AL_VENDOR") @
"\nVersion: " @ alGetString("AL_VERSION") @
"\nRenderer: " @ alGetString("AL_RENDERER") @
"\nExtensions: " @ alGetString("AL_EXTENSIONS");
OptAudioInfo.setText(%text);
}
// Channel 0 is unused in-game, but is used here to test master volume.
new AudioDescription(AudioChannel0)
{
volume = 1.0;
isLooping= false;
is3D = false;
type = 0;
};
new AudioDescription(AudioChannel1)
{
volume = 1.0;
isLooping= false;
is3D = false;
type = 1;
};
new AudioDescription(AudioChannel2)
{
volume = 1.0;
isLooping= false;
is3D = false;
type = 2;
};
new AudioDescription(AudioChannel3)
{
volume = 1.0;
isLooping= false;
is3D = false;
type = 3;
};
new AudioDescription(AudioChannel4)
{
volume = 1.0;
isLooping= false;
is3D = false;
type = 4;
};
new AudioDescription(AudioChannel5)
{
volume = 1.0;
isLooping= false;
is3D = false;
type = 5;
};
new AudioDescription(AudioChannel6)
{
volume = 1.0;
isLooping= false;
is3D = false;
type = 6;
};
new AudioDescription(AudioChannel7)
{
volume = 1.0;
isLooping= false;
is3D = false;
type = 7;
};
new AudioDescription(AudioChannel8)
{
volume = 1.0;
isLooping= false;
is3D = false;
type = 8;
};
$AudioTestHandle = 0;
function OptAudioUpdateMasterVolume(%volume)
{
if (%volume == $pref::Audio::masterVolume)
return;
alxListenerf(AL_GAIN_LINEAR, %volume);
$pref::Audio::masterVolume = %volume;
if (!alxIsPlaying($AudioTestHandle))
{
$AudioTestHandle = alxCreateSource("AudioChannel0", expandFilename("~/data/sound/testing.ogg"));
alxPlay($AudioTestHandle);
}
}
function OptAudioUpdateChannelVolume(%channel, %volume)
{
if (%channel < 1 || %channel > 8)
return;
if (%volume == $pref::Audio::channelVolume[%channel])
return;
alxSetChannelVolume(%channel, %volume);
$pref::Audio::channelVolume[%channel] = %volume;
if (!alxIsPlaying($AudioTestHandle))
{
$AudioTestHandle = alxCreateSource("AudioChannel"@%channel, expandFilename("~/data/sound/testing.ogg"));
alxPlay($AudioTestHandle);
}
}
function OptAudioDriverList::onSelect( %this, %id, %text )
{
if (%text $= "")
return;
if ($pref::Audio::driver $= %text)
return;
$pref::Audio::driver = %text;
OpenALInit();
}

Binary file not shown.

View File

@ -0,0 +1,134 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// PageGui is the main TSControl through which the game is viewed.
// The PageGui also contains the hud controls.
//-----------------------------------------------------------------------------
function PageGui::onWake(%this)
{
%this.pageNumber = 0;
}
function PageGui::onSleep(%this)
{
}
function PageGui::pageName(%this, %index)
{
if (%index $= "")
{
%index = %this.pageNumber;
echo ("PAGE: " @ %this.pageNumber);
}
return %this.thread @ "_page" @ %index;
}
function PageGui::isNextPage(%this)
{
for (%num = %this.pageNumber + 1; !isObject(%this.pageName(%num)); %num += 1)
if (%num > 100)
return false;
return true;
}
function PageGui::isPrevPage(%this)
{
for (%num = %this.pageNumber - 1; !isObject(%this.pageName(%num)); %num -= 1)
if (%num < 0)
return false;
return true;
}
function PageGui::pushThread(%this, %thread)
{
if (%this.thread !$= "" )
%this.threadStack = %this.thread @ " " @ %this.pageNUmber @ " " @ %this.threadStack;
%this.popPage();
%this.thread = %thread;
%this.pushPage(1);
%this.status();
}
function PageGui::popThread(%this)
{
if (%this.threadStack !$= "" )
{
%this.popPage();
%this.thread = firstWord(%this.threadStack);
%this.threadStack = removeWord(%this.threadStack, 0);
%this.pageNumber = firstWord(%this.threadStack);
%this.threadStack = removeWord(%this.threadStack, 0);
}
else
%this.thread = "";
%this.status();
}
function PageGui::status(%this)
{
echo ("----------------------");
echo ("THREADSTACK: " @ %this.threadStack);
echo ("THREAD: " @ %this.thread);
echo ("PAGE: " @ %this.pageNumber);
}
function PageGui::popPage(%this)
{
echo ("POP: " @ %this.pageName());
if (%this.pageNumber > 0)
Canvas.popDialog(%this.pageName());
}
function PageGui::pushPage(%this, %pageNumber)
{
// Load up the new page
%this.pageNumber = %pageNumber;
%page = %this.pageName();
Canvas.pushDialog(%page);
// Update the arrows to reflect next/prev page availabilty
PageGuiNextPage.setVisible(%this.isNextPage());
//PageGuiPrevPage.setVisible(%this.isPrevPage());
// Extract demo text from page object
PageGuiTitle.setText(
"<font:Arial Bold:32><color:ffffff><just:right>" @
%page.title);
%this.status();
}
function PageGui::setPageNumber(%this,%pageNumber)
{
// Pop off any current page...
%this.popPage();
// Load up the new page
%this.pushPage(%pageNumber);
}
function PageGui::nextPage(%this)
{
if (%this.isNextPage())
%this.setPageNumber(%this.pageNumber + 1);
}
function PageGui::prevPage(%this)
{
if (%this.isPrevPage())
%this.setPageNumber(%this.pageNumber - 1);
else
{
%this.popThread();
if (%this.thread !$= "")
%this.pushPage(%this.pageNumber);
else
Canvas.setContent(mainMenuGui);
}
}

View File

@ -0,0 +1,52 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// PlayGui is the main TSControl through which the game is viewed.
// The PlayGui also contains the hud controls.
//-----------------------------------------------------------------------------
function PlayGui::onWake(%this)
{
// Turn off any shell sounds...
// alxStop( ... );
$enableDirectInput = "1";
activateDirectInput();
// Message hud dialog
Canvas.pushDialog( MainChatHud );
chatHud.attach(HudMessageVector);
// just update the action map here
moveMap.push();
// hack city - these controls are floating around and need to be clamped
schedule(0, 0, "refreshCenterTextCtrl");
schedule(0, 0, "refreshBottomTextCtrl");
}
function PlayGui::onSleep(%this)
{
Canvas.popDialog( MainChatHud );
// pop the keymaps
moveMap.pop();
}
//-----------------------------------------------------------------------------
function refreshBottomTextCtrl()
{
BottomPrintText.position = "0 0";
}
function refreshCenterTextCtrl()
{
CenterPrintText.position = "0 0";
}

Binary file not shown.

View File

@ -0,0 +1,32 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Hook into the client update messages to maintain our player list
// and scoreboard.
//-----------------------------------------------------------------------------
addMessageCallback('MsgClientJoin', handleClientJoin);
addMessageCallback('MsgClientDrop', handleClientDrop);
addMessageCallback('MsgClientScoreChanged', handleClientScoreChanged);
//-----------------------------------------------------------------------------
function handleClientJoin(%msgType, %msgString, %clientName, %clientId,
%guid, %score, %isAI, %isAdmin, %isSuperAdmin )
{
PlayerListGui.update(%clientId,detag(%clientName),%isSuperAdmin,
%isAdmin,%isAI,%score);
}
function handleClientDrop(%msgType, %msgString, %clientName, %clientId)
{
PlayerListGui.remove(%clientId);
}
function handleClientScoreChanged(%msgType, %msgString, %score, %clientId)
{
PlayerListGui.updateScore(%clientId,%score);
}

Binary file not shown.

View File

@ -0,0 +1,88 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// SceneGui is the main TSControl through which the demo is viewed.
// The SceneGui also contains the hud controls.
//-----------------------------------------------------------------------------
function SceneGui::onWake(%this)
{
// Turn off any shell sounds...
// alxStop( ... );
$enableDirectInput = "1";
activateDirectInput();
// Update the action map
moveMap.push();
// Push the menu system
//OverlayBuyNow.setVisible(false);
Canvas.pushdialog(OverlayDlg);
}
function SceneGui::onSleep(%this)
{
// pop the keymaps
moveMap.pop();
}
function SceneGui::isNextScene(%this)
{
return %this.sceneNumber < ("MissionGroup/Scenes".getCount() - 1);
}
function SceneGui::isPrevScene(%this)
{
return %this.sceneNumber > 0;
}
function SceneGui::setSceneNumber(%this,%sceneNumber)
{
// Set the current room # and update the arrows
%this.sceneNumber = %sceneNumber;
// Update the navigation buttons
BottomDesc.setVisible(true);
OverlayNextPage.setVisible(true);
OverlayNextPage.command = %this.isNextScene()? "SceneGui.nextScene();" : "escapeFromGame();";
OverlayPrevPage.setVisible(true); //%this.isPrevScene());
OverlayPrevPage.command = "SceneGui.prevScene();";
// Activate the scene object
%room = Scene::activateScene(%this.sceneNumber);
// Extract demo text from room object
OverlayTitle2.setVisible(false);
OverlayTitle.setVisible(true);
OverlayTitle.setText(
"<just:left><color:000000>" @
%room.title);
OverlayDesc.setText(
"<just:left><color:252525>" @
%room.description);
}
function SceneGui::nextScene(%this)
{
if (%this.isNextScene())
%this.setSceneNumber(%this.sceneNumber + 1);
}
function SceneGui::prevScene(%this)
{
if (%this.isPrevScene())
%this.setSceneNumber(%this.sceneNumber - 1);
else
escapeFromGame();
}
function SceneGui::getSceneName(%this)
{
return "MissionGroup/Scenes".getObject(%this.sceneNumber).getName();
}

Binary file not shown.

View File

@ -0,0 +1,168 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
// Functions dealing with connecting to a server
//-----------------------------------------------------------------------------
// Server connection error
//-----------------------------------------------------------------------------
addMessageCallback( 'MsgConnectionError', handleConnectionErrorMessage );
function handleConnectionErrorMessage(%msgType, %msgString, %msgError)
{
// On connect the server transmits a message to display if there
// are any problems with the connection. Most connection errors
// are game version differences, so hopefully the server message
// will tell us where to get the latest version of the game.
$ServerConnectionErrorMessage = %msgError;
}
//----------------------------------------------------------------------------
// GameConnection client callbacks
//----------------------------------------------------------------------------
function GameConnection::initialControlSet(%this)
{
echo ("*** Initial Control Object");
// The first control object has been set by the server
// and we are now ready to go.
// first check if the editor is active
if (!Editor::checkActiveLoadDone())
{
// Activate if not already set...
if (Canvas.getContent() != $Client::GameGUI.getId())
Canvas.setContent($Client::GameGUI);
}
}
function GameConnection::setLagIcon(%this, %state)
{
if (%this.getAddress() $= "local")
return;
LagIcon.setVisible(%state $= "true");
}
function GameConnection::onConnectionAccepted(%this)
{
// Called on the new connection object after connect() succeeds.
LagIcon.setVisible(false);
}
function GameConnection::onConnectionTimedOut(%this)
{
// Called when an established connection times out
disconnectedCleanup();
MessageBoxOK( "TIMED OUT", "The server connection has timed out.");
}
function GameConnection::onConnectionDropped(%this, %msg)
{
// Established connection was dropped by the server
disconnectedCleanup();
MessageBoxOK( "DISCONNECT", "The server has dropped the connection: " @ %msg);
}
function GameConnection::onConnectionError(%this, %msg)
{
// General connection error, usually raised by ghosted objects
// initialization problems, such as missing files. We'll display
// the server's connection error message.
disconnectedCleanup();
MessageBoxOK( "DISCONNECT", $ServerConnectionErrorMessage @ " (" @ %msg @ ")" );
}
//----------------------------------------------------------------------------
// Connection Failed Events
//----------------------------------------------------------------------------
function GameConnection::onConnectRequestRejected( %this, %msg )
{
switch$(%msg)
{
case "CR_INVALID_PROTOCOL_VERSION":
%error = "Incompatible protocol version: Your game version is not compatible with this server.";
case "CR_INVALID_CONNECT_PACKET":
%error = "Internal Error: badly formed network packet";
case "CR_YOUAREBANNED":
%error = "You are not allowed to play on this server.";
case "CR_SERVERFULL":
%error = "This server is full.";
case "CHR_PASSWORD":
// XXX Should put up a password-entry dialog.
if ($Client::Password $= "")
MessageBoxOK( "REJECTED", "That server requires a password.");
else {
$Client::Password = "";
MessageBoxOK( "REJECTED", "That password is incorrect.");
}
return;
case "CHR_PROTOCOL":
%error = "Incompatible protocol version: Your game version is not compatible with this server.";
case "CHR_CLASSCRC":
%error = "Incompatible game classes: Your game version is not compatible with this server.";
case "CHR_INVALID_CHALLENGE_PACKET":
%error = "Internal Error: Invalid server response packet";
default:
%error = "Connection error. Please try another server. Error code: (" @ %msg @ ")";
}
disconnectedCleanup();
MessageBoxOK( "REJECTED", %error);
}
function GameConnection::onConnectRequestTimedOut(%this)
{
disconnectedCleanup();
MessageBoxOK( "TIMED OUT", "Your connection to the server timed out." );
}
//-----------------------------------------------------------------------------
// Disconnect
//-----------------------------------------------------------------------------
function disconnect()
{
// Delete the connection if it's still there.
if (isObject(ServerConnection))
ServerConnection.delete();
disconnectedCleanup();
// Call destroyServer in case we're hosting
destroyServer();
}
function disconnectedCleanup()
{
// Clear misc script stuff
HudMessageVector.clear();
// Terminate all playing sounds
alxStopAll();
if (isObject(MusicPlayer))
MusicPlayer.stop();
//
LagIcon.setVisible(false);
PlayerListGui.clear();
// Clear all print messages
clientCmdclearBottomPrint();
clientCmdClearCenterPrint();
// Back to the launch screen
if (Canvas.getContent() != MainMenuGui.getId())
Canvas.setContent(MainMenuGui);
// Dump anything we're not using
clearTextureHolds();
purgeResources();
}

Binary file not shown.

View File

@ -0,0 +1,96 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//----------------------------------------
function StartMissionGui::onWake(%this)
{
SM_missionList.clear();
%i = 0;
for(%file = findFirstFile($Server::MissionFileSpec); %file !$= ""; %file = findNextFile($Server::MissionFileSpec))
if (strStr(%file, "/CVS/") == -1)
SM_missionList.addRow(%i++, getMissionDisplayName(%file) @ "\t" @ %file );
SM_missionList.sort(0);
SM_missionList.setSelectedRow(0);
SM_missionList.scrollVisible(0);
// Override the next page command...
OverlayNextPage.command = "StartMissionGui.nextPage();";
}
//----------------------------------------
function StartMissionGui::nextPage(%this)
{
if (StartMissionGuiCheck.getValue()) {
Canvas.setContent(LoadingGui);
LOAD_MapName.setText( "Creating Server" );
LOAD_MapDescription.setText( "<font:Arial:16>Please wait while the local server is started... this server will be open to local lan and internet connections.");
Canvas.repaint();
%this.startServer();
}
else
MainMenuGui.nextPage();
}
function StartMissionGui::startServer(%this)
{
createServer("MultiPlayer", expandFileName("~/data/missions/"@$Client::GameType@".mis"));
%conn = new GameConnection(ServerConnection);
RootGroup.add(ServerConnection);
%conn.setConnectArgs($pref::Player::Name);
%conn.setJoinPassword($Client::Password);
%conn.connectLocal();
}
//----------------------------------------
function StartMissionGuiText::onWake(%this)
{
// Indicate which text is to be displayed in the ML text control...
%this.fileName = "demo/client/ui/missions/start_" @ $Client::GameType @ ".txt";
echo("FileName: " @ %this.fileName);
Parent::onWake(%this);
}
//----------------------------------------
function getMissionDisplayName( %missionFile )
{
%file = new FileObject();
%MissionInfoObject = "";
if ( %file.openForRead( %missionFile ) ) {
%inInfoBlock = false;
while ( !%file.isEOF() ) {
%line = %file.readLine();
%line = trim( %line );
if( %line $= "new ScriptObject(MissionInfo) {" )
%inInfoBlock = true;
else if( %inInfoBlock && %line $= "};" ) {
%inInfoBlock = false;
%MissionInfoObject = %MissionInfoObject @ %line;
break;
}
if( %inInfoBlock )
%MissionInfoObject = %MissionInfoObject @ %line @ " ";
}
%file.close();
}
%MissionInfoObject = "%MissionInfoObject = " @ %MissionInfoObject;
eval( %MissionInfoObject );
%file.delete();
if( %MissionInfoObject.name !$= "" )
return %MissionInfoObject.name;
else
return fileBase(%missionFile);
}

Binary file not shown.

View File

@ -0,0 +1,8 @@
<lmargin%:5><rmargin%:95><font:Arial:16>Thank you for checking out the Torque Game Engine Demo.
Visit <a:www.garagegames.com/makegames/>GarageGames Torque Store</a> to learn about other products that will help you make your game as well as the other engines and tools that round out the Torque Development Platform.
<font:Arial Bold:16>About GarageGames.com:<font:Arial:16>
<a:www.garagegames.com>GarageGames'</a> mission is simple: to create truly innovative, feature-rich, yet affordable, tools and resources for developers at any level. It's this technical expertise, front-line experience, and commitment to originality that has already changed the industry with our Torque gaming platform.
<font:Arial Bold:16>About the Torque Game Engine:<font:Arial:16> The <a:www.garagegames.com/products/1>Torque Game Engine</a> is a cross platform commercial quality AAA game engine with seamless indoor/outdoor rendering engine, state of the art skeletal animation, drag and drop GUI creation and a built-in world editor. TGE also features the latest in scripting, geometry, particle effects, and award winning multi-player networking code. TGE started life as the technology behind Tribes, Starsiege, and Tribes 2 and is currently being used by thousands of developers around the world to make innovative games such as <a:www.garagegames.com/products/15>MarbleBlast Gold</a> , <a:www.garagegames.com/products/5>Orbz</a> , <a:www.garagegames.com/products/12>ThinkTanks</a> , <a:www.garagegames.com/products/58>RocketBowl Plus</a> , <a:www.garagegames.com/products/29>DH: Lore Invasion</a> , and more.

View File

@ -0,0 +1,68 @@
<just:center><lmargin%:5><rmargin%:95><font:Arial Bold:20>Torque Game Engine Demo Credits...
<bitmap:demo/client/ui/seperator>
<font:Arial Bold:20>GarageGames.com Staff<font:Arial:16>
<a:www.garagegames.com/my/home/view.profile.php?qid=3>Jeff "MotoMan" Tunnell</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=1>Tim "Slacker" Gift</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=2>Rick "Entropy" Overman</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=55>Mark "Got Milk?" Frohnmayer</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=32699>Timothy Aste</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=4517>Robert Blanchet Jr.</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=70688>Thomas Buscaglia</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=26331>Chris Calef</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=5249>Justin DuJardin</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=6452>Clark Fagot</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=985>Matt Fairfax</a>
<a:www.www.garagegames.com/my/home/view.profile.php?qid=5318>Nate Feyma</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=10309>Jacob Fike</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=17830>Eric Fritz</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=8863>Ben Garney</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=75501>Kenneth Holst</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=54612>Davey Jackson</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=33542>Matthew Langley</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=36339>Adam Larson</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=1449>Joe Maruschak</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=22782>Mark McCoy</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=46929>Karen Peal</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=6645>John Quigley</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=5030>Brian "Twitch" Ramage</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=10513>Paul Scott</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=69526>Sean Sullivan</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=5263>Alex Swanson</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=71087>James Wiley</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=20592>Josh Williams</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=370>Pat "Killer Bunny" Wilson</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=37827>Zachary Zadell</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=34977>Stephen Zepp</a>
<bitmap:demo/client/ui/seperator>
<font:Arial Bold:20>Special Thanks<font:Arial:16>
<a:www.garagegames.com/my/home/view.profile.php?qid=56310>Jon Jorajuria</a>
...for revamping the audio of the 1.5 demo!
<a:www.garagegames.com/my/home/view.profile.php?qid=44513>Todd Pickens</a>
...for donating
<a:www.garagegames.com/products/104>FPS Environment Pack Art!</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=21036>John Kabus</a>
...for his work with the Torque Lighting Kit!
<a:www.garagegames.com/my/home/view.profile.php?qid=37490>Joshua Dallman</a>
...for
<a:www.redthumbgames.com>Red Thumb Game's</a>
contribution of Skybox starter material!
<a:www.garagegames.com/company/associates/>GarageGames Associates</a>
Some open-source textures used courtesy of...
<a:wadfather.planethalflife.gamespy.com/new/>WAD Father - Graphics for Game Developers</a>
<bitmap:demo/client/ui/seperator>
<font:Arial Bold:20>Torque Engine Original Programmers<font:Arial:16>
<a:www.garagegames.com/my/home/view.profile.php?qid=438>Dave "Symlink" Moore</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=572>John "Uberbob" Folliard</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=4872>Greg "Jett" Lancaster</a>
<a:www.garagegames.com/my/home/view.profile.php?qid=6019>Tim "Kidney Thief" Anderson</a>
John "Sne/\ker" Alden
Lincoln "Missing" Hutton
Brad "BigDevDawg" Heinz
Shawn Eastley

View File

@ -0,0 +1,25 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>Default Game Control Setup...<font:Arial:16>
<tab:105,200>
<font:Arial Bold:16>Movement<font:Arial:16>
W Forward
S Backward
A Step left
D Step right
Space Jump
Mouse Button Fire
<font:Arial Bold:16>View Control<font:Arial:16>
E Zoom
R Set zoom FOV
TAB First/Third person camera
Alt-C Toggle between camera/player
<font:Arial Bold:16>Chat<font:Arial:16>
U Send public chat message
<font:Arial Bold:16>Misc Functions<font:Arial:16>
Ctrl-O Open in-game options dialog
F7 Drop the player at the camera
F8 Drop the camera at the player
F10 Open GUI editor
F11 Open Mission/World editor

View File

@ -0,0 +1,55 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(AnimationSceneGUI) {
profile = "GuiModelessDialogProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 2";
visible = "1";
helpTag = "0";
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "466 191";
extent = "140 30";
minExtent = "8 2";
visible = "1";
command = "AnimationOrcPlay(\"celwave\");";
helpTag = "0";
text = "Wave";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "467 231";
extent = "140 30";
minExtent = "8 2";
visible = "1";
command = "AnimationOrcPlay(\"celsalute\");";
helpTag = "0";
text = "Salute";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "467 276";
extent = "138 30";
minExtent = "8 2";
visible = "1";
command = "AnimationOrcPlay(\"range\");";
helpTag = "0";
text = "Range Test";
groupNum = "-1";
buttonType = "PushButton";
};
};
//--- OBJECT WRITE END ---

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,61 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(DemoEditorAlert) {
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "800 600";
MinExtent = "8 8";
Visible = "1";
helpTag = "0";
new GuiWindowCtrl() {
Profile = "GuiWindowProfile";
HorizSizing = "center";
VertSizing = "center";
position = "200 80";
Extent = "400 440";
MinExtent = "300 200";
Visible = "1";
text = "Mission Editor";
maxLength = "255";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "1";
canMinimize = "1";
canMaximize = "1";
MinSize = "50 50";
closeCommand = "Canvas.popDialog(DemoEditorAlert);";
helpTag = "0";
new GuiMLTextCtrl(EditorAlertText) {
Profile = "GuiMediumTextProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "20 40";
Extent = "380 264";
MinExtent = "8 8";
Visible = "1";
lineSpacing = "12";
allowColorChars = "1";
maxChars = "-1";
helpTag = "0";
};
new GuiButtonCtrl(OkayButton) {
Profile = "GuiOkayButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "130 370";
Extent = "140 30";
MinExtent = "8 2";
Visible = "1";
text = "Okay";
groupNum = "-1";
buttonType = "PushButton";
command = "Canvas.popDialog(DemoEditorAlert);";
};
};
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,39 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(DetailSceneGui) {
profile = "GuiModelessDialogProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "800 600";
minExtent = "8 2";
visible = "1";
helpTag = "0";
new GuiControl() {
profile = "GuiWindowProfile";
horizSizing = "left";
vertSizing = "top";
position = "587 464";
extent = "190 30";
minExtent = "8 2";
visible = "1";
helpTag = "0";
new GuiSliderCtrl(DetailSceneSlider) {
profile = "GuiSliderProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "6 5";
extent = "178 21";
minExtent = "8 2";
visible = "1";
variable = "value";
altCommand = "OrcDetailScene.slider();";
range = "0.000000 1.000000";
ticks = "10";
value = "1";
helpTag = "0";
};
};
};
//--- OBJECT WRITE END ---

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 KiB

Binary file not shown.

View File

@ -0,0 +1,41 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(MountingSceneGui) {
profile = "GuiModelessDialogProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 2";
visible = "1";
helpTag = "0";
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "466 191";
extent = "140 30";
minExtent = "8 2";
visible = "1";
command = "mountDetailOrc(CrossbowImage,0);";
helpTag = "0";
text = "Crossbow";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "467 231";
extent = "140 30";
minExtent = "8 2";
visible = "1";
command = "mountDetailOrc(FlagPoleImage,1);";
helpTag = "0";
text = "Flag";
groupNum = "-1";
buttonType = "PushButton";
};
};
//--- OBJECT WRITE END ---

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,17 @@
//--- OBJECT WRITE BEGIN ---
new GameTSCtrl(SceneGui) {
profile = "GuiContentProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0 ";
extent = "640 480";
minExtent = "8 8";
visible = "1";
cameraZRot = "0";
forceFOV = "0";
helpTag = "0";
roomNumber = "1";
};
//--- OBJECT WRITE END ---

Binary file not shown.

BIN
example/demo/client/ui/Splash.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

View File

@ -0,0 +1,43 @@
//--- OBJECT WRITE BEGIN ---
new GuiFadeinBitmapCtrl(StartupGui) {
profile = "GuiInputCtrlProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./GarageGames";
wrap = "0";
fadeinTime = "125";
waitTime = "3000";
fadeoutTime = "125";
};
//--- OBJECT WRITE END ---
function loadStartup()
{
StartupGui.done = false;
Canvas.setContent( StartupGui );
schedule(100, 0, checkStartupDone );
alxPlay(AudioStartup);
}
//-------------------------------------
function StartupGui::click()
{
StartupGui.done = true;
}
//-------------------------------------
function checkStartupDone()
{
if (StartupGui.done)
loadMainMenu();
else
schedule(100, 0, checkStartupDone );
}

Binary file not shown.

View File

@ -0,0 +1,162 @@
//--- OBJECT WRITE BEGIN ---
new GuiChunkedBitmapCtrl(TheoraGui) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "800 600";
minExtent = "8 2";
visible = "1";
bitmap = "./background";
useVariable = "0";
tile = "0";
new GuiTheoraCtrl(theo) {
profile = "GuiDefaultProfile";
horizSizing = "relative";
vertSizing = "relative";
position = "120 25";
extent = "560 420";
minExtent = "8 2";
visible = "1";
done = "0";
stopOnSleep = "0";
backgroundColor = "0 0 0 255";
};
new GuiBitmapButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "relative";
vertSizing = "relative";
position = "30 475";
extent = "220 40";
minExtent = "8 2";
visible = "1";
command = "Theo.setFile(\"demo/data/video/320x240.ogg\");";
text = "Button";
groupNum = "-1";
buttonType = "PushButton";
bitmap = "./button";
helpTag = "0";
new GuiMLTextCtrl() {
profile = "GuiMLTextNoSelectProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "9 7";
extent = "260 14";
minExtent = "8 2";
visible = "1";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
text = "<color:ffffff><font:Arial Bold:14>Simple test pattern, no sound.";
helpTag = "0";
};
};
new GuiBitmapButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "relative";
vertSizing = "relative";
position = "30 535";
extent = "220 40";
minExtent = "8 2";
visible = "1";
command = "Theo.setFile(\"demo/data/video/videotestsrc.ogg\");";
text = "Button";
groupNum = "-1";
buttonType = "PushButton";
bitmap = "./button";
helpTag = "0";
new GuiMLTextCtrl() {
profile = "GuiMLTextNoSelectProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "9 7";
extent = "260 14";
minExtent = "8 2";
visible = "1";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
text = "<color:ffffff><font:Arial Bold:14>The test pattern, at high resolution.";
helpTag = "0";
};
};
new GuiBitmapButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "relative";
vertSizing = "relative";
position = "550 535";
extent = "220 40";
minExtent = "8 2";
visible = "1";
command = "Theo.setFile(\"demo/data/video/demovid.ogg\");";
text = "Button";
groupNum = "-1";
buttonType = "PushButton";
bitmap = "./button";
helpTag = "0";
new GuiMLTextCtrl() {
profile = "GuiMLTextNoSelectProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "9 7";
extent = "176 14";
minExtent = "8 2";
visible = "1";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
text = "<color:ffffff><font:Arial Bold:14>A demo of some of Torque's lovely goodness.";
helpTag = "0";
};
};
new GuiBitmapButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "relative";
vertSizing = "relative";
position = "550 475";
extent = "220 40";
minExtent = "8 2";
visible = "1";
command = "Theo.setFile(\"demo/data/video/soundtest.ogg\");";
text = "Button";
groupNum = "-1";
buttonType = "PushButton";
bitmap = "./button";
helpTag = "0";
new GuiMLTextCtrl() {
profile = "GuiMLTextNoSelectProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "9 7";
extent = "260 14";
minExtent = "8 2";
visible = "1";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
text = "<color:ffffff><font:Arial Bold:14>A tone and sound synch test.";
helpTag = "0";
};
};
new GuiBitmapButtonCtrl(LeaveTheoraButton) {
profile = "GuiButtonProfile";
horizSizing = "relative";
vertSizing = "relative";
position = "384 555";
extent = "32 32";
minExtent = "8 2";
visible = "1";
command = "Canvas.setContent(mainMenuGui);";
text = "Button";
groupNum = "-1";
buttonType = "PushButton";
bitmap = "./arrows/arrow_left";
helpTag = "0";
};
};
//--- OBJECT WRITE END ---

View File

@ -0,0 +1,96 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
//
// Copyright (c) 2001 GarageGames.Com
//-----------------------------------------------------------------------------
//--- OBJECT WRITE BEGIN ---
new GuiControl(aboutDlg) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiWindowCtrl() {
profile = "GuiWindowProfile";
horizSizing = "center";
vertSizing = "center";
position = "132 88";
extent = "376 303";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "About...";
maxLength = "255";
resizeWidth = "0";
resizeHeight = "0";
canMove = "1";
canClose = "1";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
closeCommand = "Canvas.popDialog(aboutDlg);";
new GuiMLTextCtrl(aboutText) {
profile = "GuiMLTextProfile";
horizSizing = "width";
vertSizing = "relative";
position = "19 36";
extent = "336 241";
minExtent = "8 8";
visible = "1";
helpTag = "0";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
text = "This is a test";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "303 268";
extent = "60 23";
minExtent = "8 8";
visible = "1";
command = "Canvas.popDialog(aboutDlg);";
helpTag = "0";
text = "OK";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "12 268";
extent = "76 23";
minExtent = "8 8";
visible = "1";
command = "getHelp(\"4. License\");";
helpTag = "0";
text = "License...";
};
};
};
//--- OBJECT WRITE END ---
function aboutDlg::onWake(%this)
{
%text="<just:center><font:Arial Bold:20>Torque 1.5 Demo\n"@
"<font:Arial:12>"@ getCompileTimeString() @", "@ getBuildString() @"Build\n\n"@
"<font:Arial:16>Copyright (c) 2001 <a:www.garagegames.com>GarageGames.Com</a>\n"@
"<bitmap:demo/client/ui/gglogo150>";
aboutText.setText(%text);
}
function aboutText::onURL(%this, %url)
{
echo(%this);
echo(%url);
gotoWebPage( %url );
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 832 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,160 @@
//-----------------------------------------------------------------------------
// Chat edit window
//-----------------------------------------------------------------------------
new GuiControl(MessageHud)
{
profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "0";
noCursor = true;
new GuiBitmapBorderCtrl(MessageHud_Frame) {
profile = "ChatHudBorderProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "120 375";
extent = "400 40";
minExtent = "8 8";
visible = "1";
new GuiBitmapCtrl() {
profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "height";
position = "8 8";
extent = "384 24";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./hudfill";
wrap = "0";
};
new GuiTextCtrl(MessageHud_Text)
{
profile = "ChatHudTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "14 12";
extent = "10 22";
minExtent = "8 8";
visible = "1";
};
new GuiTextEditCtrl(MessageHud_Edit)
{
profile = "ChatHudEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 13";
extent = "10 22";
minExtent = "8 8";
visible = "1";
altCommand = "$ThisControl.eval();";
escapeCommand = "MessageHud_Edit.onEscape();";
historySize = "5";
maxLength = "120";
};
};
};
//--- OBJECT WRITE BEGIN ---
new GuiControl(MainChatHud) {
profile = "GuiModelessDialogProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
noCursor = "1";
new GuiControl() {
profile = "GuiDefaultProfile";
horizSizing = "relative";
vertSizing = "bottom";
position = "0 0";
extent = "400 300";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiBitmapBorderCtrl(OuterChatHud) {
profile = "ChatHudBorderProfile";
horizSizing = "width";
vertSizing = "bottom";
position = "0 0";
extent = "272 88";
minExtent = "8 8";
visible = "1";
helpTag = "0";
useVariable = "0";
tile = "0";
new GuiBitmapCtrl() {
profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "height";
position = "8 8";
extent = "256 72";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./hudfill";
wrap = "0";
};
new GuiButtonCtrl(chatPageDown) {
profile = "GuiButtonProfile";
horizSizing = "left";
vertSizing = "top";
position = "220 58";
extent = "36 14";
minExtent = "8 8";
visible = "0";
helpTag = "0";
text = "Dwn";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiScrollCtrl(ChatScrollHud) {
profile = "ChatHudScrollProfile";
horizSizing = "width";
vertSizing = "height";
position = "8 8";
extent = "256 72";
minExtent = "8 8";
visible = "1";
helpTag = "0";
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "alwaysOff";
constantThumbHeight = "0";
childMargin = "0 0";
new GuiMessageVectorCtrl(ChatHud) {
profile = "ChatHudMessageProfile";
horizSizing = "width";
vertSizing = "height";
position = "1 1";
extent = "252 16";
minExtent = "8 8";
visible = "1";
helpTag = "0";
lineSpacing = "0";
lineContinuedIndex = "10";
allowedMatches[0] = "http";
allowedMatches[1] = "tgeserver";
matchColor = "0 0 255 255";
maxColorIndex = "5";
};
};
};
};
};
//--- OBJECT WRITE END ---

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Some files were not shown because too many files have changed in this diff Show More