Files
source/TileEngine/TileDat.cpp
T
Wanne 7ca53fadc7 *** MERGED source code from development trunk revision 4890 up to latest current revision 5105 ***
Development Trunk (now obsolete): https://ja2svn.dyndns.org/source/ja2/branches/Wanne/JA2%201.13%20MP
A detailed list of all the features (changes) is visible in the history log of the development trunk:

INFO: There will be no further development in the development source trunk, so is obsolete from now on!

This commit contains the following features (bugfixes are not listed):

- New Feature: Show merc ranks in Strategy Screen before merc name
o Toggle on/off in the ingame options screen
o For each experience level (0-10) there are defined rank names in the language specific text files
o Additional language text that is not translated yet is marked with // TODO.Translate

- New Feature: Faster Bobby Ray Shipments
o This feature is selectable in the ja2_options.ini
o When activated Bobby Ray shipments will be really fast
-> Overnight Express: 5 - 7 hours
-> Air Service: 10, 12 or 14 hours
-> Standard Service: 15, 18 or 21 hours
o In a multiplayer game, this feature is disabled (because shipment arrive immediately in the destination sector)

- New Feature: AP cost for manipulating the merc inventory
o This feature is selectable in the start new game screen
o For example, putting a weapon from hand in the backpack costs APs
o The AP costs are defined in the APBPConstants.ini
o In a multiplayer game, this feature is disabled

- New Feature: Added possibility to set individual Gear Kit names
o Set individual names in the optional new tag <mGearKitName> inside the <GEARKIT> root element (File: TableData\MercStartingGear.xml)

- New Feature: Externalized the maximum purchase amount (JA2 vanilla: 10) for Bobby Rays purchases per shipment
o Define the max. amount in the ja2_options.ini: BOBBY_RAY_MAX_PURCHASE_AMOUNT, Range: 10 - 100)
o Nice scrolling bars to scroll through all the purchases

- New Feature: Now it is possible to walk on "water" tiles or handle those tiles like "normal" tiles 
o (instead of showing the swimming animation and counting the APs for swimming), when the soldier is located on the second level (level > 0)

- New Feature: Externalized AIM Veterans laptop site
o Add maximum of 4 pages
o Add  new AIM to veterans page, and remove AIM from veterans page.
o New XML file: OldAIMArchive.xml (language specific XML files: *.OldAIMArchive.xml)

- New Feature: Added possibility to choose from 254 IMP faces
o Modified IMPPortraits.xml
o Added new GameDir folder "IMPFaces" which contains the IMP face portraits
o Moved IMP faces in the new "IMPFaces" folder

- New Feature: ARSP - All Resolution Support Project
o See here: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=298698&page=1
o Support any kind of screen resolution. This works by choosing the matching full supported resolution (640x480, 800x600, 1024x768) and then centering the graphics
o See ja2.ini for defining the screen resolution

- New Feature: AI Turn Speed Up (FF-MOD)
o see here: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=298699#Post298699
o When this feature is activated it allows fast enemy turns
o New entry in ja2.ini to enable this feature: HIGHSPEED_TIMER = TRUE
o Turn on/off auto fast turns in ingame options
o New ja2_options.ini settings for fine tuning: [Clock Settings] ini block

- New Feature: "Lock" / "Release" mouse cursor in tactical windowed mode, so the mouse can stay within window boundary
o This is very helpful for doing scrolling with the mouse (by moving the mouse to the window edge) in windowed mode
o You can toggle on/off the feature by pressing CTRL + Z. It is also possible to press CTRL + Y. So the user can decide which fits better :)
o Whenever you toggle on/off a screen message appears on the tactical log to notify the player

- New Feature: Weapon overheating
o Basically, every shot fired from a gun increases its temperature. On higher temperatures, the gun jams more frequently
o On/off toggle in the ingame options
o Graphical thermometer indication on the weapon picture
o New ja2_options.ini section with a few options, Section: [Tactical Weapon Overheating Settings]
o XML changes (New Tags)
--> AmmoTypes.xml: <temperatureModificator>
--> Items.xml: <barrel>, <usOverheatingCooldownFactor>
--> Weapons.xml: <usOverheatingJamThreshold>, <usOverheatingDamageThreshold>, <usOverheatingSingleShotTemperature>
o Added a few barells to Items.xml (end of the file)
o more infos: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=301059&page=1

- New Feature: Resting weapons on a surfaces
o You can now rest your weapon on crates, low walls, rocks, debris, open windows etc. while you are crouched. Resting will give yu the superior gun handling modifiers from PRONE position.
o A little 'A' on your gun indicates if you are resting it or not.
o Both settings can be turned on and off in Ja2_Options.ini under 'Tactical Gameplay Settings'

- New Feature: Externalized option on whether mercs can exit sector using grid exit in turn based mode
o new ja2_options.ini property: GRID_EXIT_IN_TURNBASED
o This ini setting does not affect leaving sectors on map edges

- Rework/Update: Ammo boxes and Ammo crates
o Ammo crate items added for remaining calibers.  Tweaked prices to correspond to magazines, tweaked capacities and weights to be reasonable (~800 or less).
o Shift-R reload now looks at both boxes and crates in sector items and merc's inventory to reload, and tops off magazines in inventory as well.  Only possible outside of combat.
o Ctrl-Shift-A still creates crates as per usual, with some fixes to ensure all ammo is caught on the first press.
o Shift-A now creates ammo boxes in the same loop.  They mostly behave like crates, but fit in mercs inventories.
o Ammo boxes are available to purchase at BR and tony, sam, etc.  Individual magazines/drums/etc are no longer available.
o Removed ammo crate xml tag.  Added ubMagType tag to Magazines array.  This allows us to differentiate between magazines, bullets, boxes and crates.
o Changed ammo filtering in BR's to display boxes appropriately.  Added back the "Mag:" display (changed text to "Size:")
o Added ja2set.dat.xml file (WF map version in WF maps folder) to be used instead of ja2set.dat file (ja2.ini setting added) For now, if you want to play vanilla instead, just change the setting in the ini (see comments in file).
o Added P4-P9Items image files (up to 5k images each) and tileslots.  1.13 core items will continue to use Guns and P1-P3Items for the foreseeable future.  P4-P9 can be used by customizers/modders to avoid conflicts with Guns/P1-P3 items.  TODO: Need to discuss a strategy for this in the forums.
o Added in Ambient/0.bad and 32.bad to avoid an exception in the code.
o Updated the XML Editor
o Standardized the text on all the ammo items.

- New Multiplayer Feature: Sharing same FOV (field of view) in a coop/team-dm (for friendly teams) game
o You will also see enemies, that your teammate sees

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5108 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-03-23 18:46:54 +00:00

949 lines
23 KiB
C++

#ifdef PRECOMPILEDHEADERS
#include "TileEngine All.h"
#else
#include "tiledef.h"
#include "worlddef.h"
#endif
INT16 gOpenDoorList[20] =
{
FIRSTDOOR1,
SECONDDOOR1,
THIRDDOOR1,
FOURTHDOOR1,
FIRSTDOOR6,
SECONDDOOR6,
THIRDDOOR6,
FOURTHDOOR6,
FIRSTDOOR11,
SECONDDOOR11,
THIRDDOOR11,
FOURTHDOOR11,
FIRSTDOOR16,
SECONDDOOR16,
THIRDDOOR16,
FOURTHDOOR16,
-1
};
INT16 gOpenDoorShadowList[20] =
{
FIRSTDOORSH1,
SECONDDOORSH1,
THIRDDOORSH1,
FOURTHDOORSH1,
FIRSTDOORSH6,
SECONDDOORSH6,
THIRDDOORSH6,
FOURTHDOORSH6,
FIRSTDOORSH11,
SECONDDOORSH11,
THIRDDOORSH11,
FOURTHDOORSH11,
FIRSTDOORSH16,
SECONDDOORSH16,
THIRDDOORSH16,
FOURTHDOORSH16,
-1
};
INT16 gClosedDoorList[20] =
{
FIRSTDOOR5,
SECONDDOOR5,
THIRDDOOR5,
FOURTHDOOR5,
FIRSTDOOR10,
SECONDDOOR10,
THIRDDOOR10,
FOURTHDOOR10,
FIRSTDOOR15,
SECONDDOOR15,
THIRDDOOR15,
FOURTHDOOR15,
FIRSTDOOR20,
SECONDDOOR20,
THIRDDOOR20,
FOURTHDOOR20,
-1
};
INT16 gClosedDoorShadowList[20] =
{
FIRSTDOORSH5,
SECONDDOORSH5,
THIRDDOORSH5,
FOURTHDOORSH5,
FIRSTDOORSH10,
SECONDDOORSH10,
THIRDDOORSH10,
FOURTHDOORSH10,
FIRSTDOORSH15,
SECONDDOORSH15,
THIRDDOORSH15,
FOURTHDOORSH15,
FIRSTDOORSH20,
SECONDDOORSH20,
THIRDDOORSH20,
FOURTHDOORSH20,
-1
};
// REVERSE BUDDIES FROM SHADOW BACK TO STRUCT
INT16 gReverseShadowBuddys[] =
{
FIRSTCLIFFSHADOW, FIRSTCLIFFSHADOW1, FIRSTCLIFF1,
FIRSTSHADOW, FIRSTSHADOW1, FIRSTOSTRUCT1,
SECONDSHADOW, SECONDSHADOW1, SECONDOSTRUCT1,
THIRDSHADOW, THIRDSHADOW1, THIRDOSTRUCT1,
FOURTHSHADOW, FOURTHSHADOW1, FOURTHOSTRUCT1,
FIFTHSHADOW, FIFTHSHADOW1, FIFTHOSTRUCT1,
SIXTHSHADOW, SIXTHSHADOW1, SIXTHOSTRUCT1,
SEVENTHSHADOW, SEVENTHSHADOW1, SEVENTHOSTRUCT1,
EIGHTSHADOW, EIGHTSHADOW1, EIGHTOSTRUCT1,
FIRSTFULLSHADOW, FIRSTFULLSHADOW1, FIRSTFULLSTRUCT1,
SECONDFULLSHADOW, SECONDFULLSHADOW1, SECONDFULLSTRUCT1,
THIRDFULLSHADOW, THIRDFULLSHADOW1, THIRDFULLSTRUCT1,
FOURTHFULLSHADOW, FOURTHFULLSHADOW1, FOURTHFULLSTRUCT1,
FIRSTDOORSHADOW, FIRSTDOORSH1, FIRSTDOOR1,
SECONDDOORSHADOW, SECONDDOORSH1, SECONDDOOR1,
THIRDDOORSHADOW, THIRDDOORSH1, THIRDDOOR1,
FOURTHDOORSHADOW, FOURTHDOORSH1, FOURTHDOOR1,
//FENCE
FENCESHADOW, FENCESHADOW1, FENCESTRUCT1,
// VEHICLES
FIRSTVEHICLESHADOW, FIRSTVEHICLESHADOW1, FIRSTVEHICLE1,
SECONDVEHICLESHADOW, SECONDVEHICLESHADOW1, SECONDVEHICLE1,
//DebrisSTRUCT
FIRSTDEBRISSTRUCTSHADOW, FIRSTDEBRISSTRUCTSHADOW1, FIRSTDEBRISSTRUCT1,
SECONDDEBRISSTRUCTSHADOW, SECONDDEBRISSTRUCTSHADOW1, SECONDDEBRISSTRUCT1,
NINTHOSTRUCTSHADOW, NINTHOSTRUCTSHADOW1, NINTHOSTRUCT1,
TENTHOSTRUCTSHADOW, TENTHOSTRUCTSHADOW1, TENTHOSTRUCT1,
FIRSTLARGEEXPDEBRISSHADOW, FIRSTLARGEEXPDEBRISSHADOW1, FIRSTLARGEEXPDEBRIS1,
SECONDLARGEEXPDEBRISSHADOW, SECONDLARGEEXPDEBRISSHADOW1, SECONDLARGEEXPDEBRIS1,
-1
};
// SHADOW BUDDIES FROM STRUCT FORWARD TO SHADOW
INT16 gForwardShadowBuddys[] =
{
FIRSTCLIFF, FIRSTCLIFF1, FIRSTCLIFFSHADOW1,
FIRSTOSTRUCT, FIRSTOSTRUCT1, FIRSTSHADOW1,
SECONDOSTRUCT, SECONDOSTRUCT1, SECONDSHADOW1,
THIRDOSTRUCT, THIRDOSTRUCT1, THIRDSHADOW1,
FOURTHOSTRUCT, FOURTHOSTRUCT1, FOURTHSHADOW1,
FIFTHOSTRUCT, FIFTHOSTRUCT1, FIFTHSHADOW1,
SIXTHOSTRUCT, SIXTHOSTRUCT1, SIXTHSHADOW1,
SEVENTHOSTRUCT, SEVENTHOSTRUCT1, SEVENTHSHADOW1,
EIGHTOSTRUCT, EIGHTOSTRUCT1, EIGHTSHADOW1,
FIRSTFULLSTRUCT, FIRSTFULLSTRUCT1, FIRSTFULLSHADOW1,
SECONDFULLSTRUCT, SECONDFULLSTRUCT1, SECONDFULLSHADOW1,
THIRDFULLSTRUCT, THIRDFULLSTRUCT1, THIRDFULLSHADOW1,
FOURTHFULLSTRUCT, FOURTHFULLSTRUCT1, FOURTHFULLSHADOW1,
FIRSTDOOR, FIRSTDOOR1, FIRSTDOORSH1,
SECONDDOOR, SECONDDOOR1, SECONDDOORSH1,
THIRDDOOR, THIRDDOOR1, THIRDDOORSH1,
FOURTHDOOR, FOURTHDOOR1, FOURTHDOORSH1,
//FENCE
FENCESTRUCT, FENCESTRUCT1, FENCESHADOW1,
// VEHICLE
FIRSTVEHICLE, FIRSTVEHICLE1, FIRSTVEHICLESHADOW1,
SECONDVEHICLE, SECONDVEHICLE1, SECONDVEHICLESHADOW1,
FIRSTDEBRISSTRUCT, FIRSTDEBRISSTRUCT1, FIRSTDEBRISSTRUCTSHADOW1,
SECONDDEBRISSTRUCT, SECONDDEBRISSTRUCT1, SECONDDEBRISSTRUCTSHADOW1,
NINTHOSTRUCT, NINTHOSTRUCT1, NINTHOSTRUCTSHADOW1,
TENTHOSTRUCT, TENTHOSTRUCT1, TENTHOSTRUCTSHADOW1,
FIRSTLARGEEXPDEBRIS, FIRSTLARGEEXPDEBRIS1, FIRSTLARGEEXPDEBRISSHADOW1,
SECONDLARGEEXPDEBRIS, SECONDLARGEEXPDEBRIS1, SECONDLARGEEXPDEBRISSHADOW1,
-1
};
// Global variable used to initialize tile database with full tile spec
UINT8 gFullBaseTileValues[] =
{
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // First Texture
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // Second Texture
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // Third Texture
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // Forth Texture
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // Fifth Texture
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // Sixth Texture
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // Seventh Texture
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // Water1 Texture
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // Water2 Texture
};
STR gTileSurfaceName[NUMBEROFTILETYPES] =
{
"TEXTURE1",
"TEXTURE2",
"TEXTURE3",
"TEXTURE4",
"TEXTURE5",
"TEXTURE6",
"TEXTURE7",
"WATER1",
"DEEP WATER",
"FIRSTCLIFFHANG",
"FIRSTCLIFF",
"FIRSTCLIFFSHADOW",
"OSTRUCT1",
"OSTRUCT2",
"OSTRUCT3",
"OSTRUCT4",
"OSTRUCT5",
"OSTRUCT6",
"OSTRUCT7",
"OSTRUCT8",
"OFSTRUCT1",
"OFSTRUCT2",
"PLACEHOLDER1",
"PLACEHOLDER2",
"SHADOW1",
"SHADOW2",
"SHADOW3",
"SHADOW4",
"SHADOW5",
"SHADOW6",
"SHADOW7",
"SHADOW8",
"FSHADOW1",
"FSHADOW2",
"PLACEHOLDER3",
"PLACEHOLDER4",
"WALL1",
"WALL2",
"WALL3",
"WALL4",
"DOOR1",
"DOOR2",
"DOOR3",
"DOOR4",
"DOORSH1",
"DOORSH2",
"DOORSH3",
"DOORSH4",
"SLANTFLATPEICE",
"ANOTHERDEBRIS",
"ROADPIECES",
"WINDOW4",
"DECORATIONS1",
"DECORATIONS2",
"DECORATIONS3",
"DECORATIONS4",
"WALLDECAL1",
"WALLDECAL2",
"WALLDECAL3",
"WALLDECAL4",
"FLOOR1",
"FLOOR2",
"FLOOR3",
"FLOOR4",
"ROOF1",
"ROOF2",
"ROOF3",
"ROOF4",
"SROOF1",
"SROOF2",
"ONROOF1",
"ONROOF2",
"MOCKF1",
"ISTRUCT1",
"ISTRUCT2",
"ISTRUCT3",
"ISTRUCT4",
"FIRSTCISTRCUT",
"FIRSTROAD",
"ROCKS",
"WOOD",
"WEEDS",
"GRASS",
"SAND",
"MISC",
"ANIOSTRUCT",
"FENCESTRUCT",
"FENCESHADOW",
"FIRSTVEHICLE",
"SECONDVEHICLE",
"FIRSTVEHICLESHADOW",
"SECONDVEHICLESHADOW",
"MISC2",
"FIRSTDEBRISSTRUCT",
"SECONDDEBRISSTRUCT",
"FIRSTDEBRISSTRUCTSHADOW",
"SECONDDEBRISSTRUCTSHADOW",
"NINTHOSTRUCT",
"TENTHOSTRUCT",
"NINTHOSTRUCTSHADOW",
"TENTHOSTRUCTSHADOW",
"FIRSTEXPLODEDEBRIS",
"SECONDEXPLODEDEBRIS",
"FIRSTLARGEEXPLODEDEBRIS",
"SECONDLARGEEXPLODEDEBRIS",
"FIRSTLARGEEXPLODEDEBRISSHADOW",
"SECONDLARGEEXPLODEDEBRISSHADOW",
"FIFTHISTRUCT",
"SIXTHISTRUCT",
"SEVENTHISTRUCT",
"EIGHTISTRUCT",
"FIRSTHIGHROOF",
"SECONDHIGHROOF",
"WALLDECAL5",
"WALLDECAL6",
"WALLDECAL7",
"WALLDECAL8",
"HUMANBLOOD",
"CREATUREBLOOD",
"FIRSTSWITCHES",
// ABSOLUTELY NO STUFF PAST HERE!
// CAN BE SAVED IN THE MAP DIRECTLY!
"REVEALEDSLANTROOF",
"1stREVEALEDHIGHROOF",
"2ndREVEALEDHIGHROOF",
"GUNS",
"ITEMS",
"ITEMS2",
"GLASSSHATTER",
"ITEMS3",
"BODYBLOW",
"EXITTEXTURE",
"FOOTPRINTS",
"POINTERS",
"POINTERS2",
"POINTERS3",
"GOODRUN",
"GOODWALK",
"GOODSWAT",
"GOODSCOOT",
"CONFIRMMOVE",
"VEHICLEMOVE",
"ACTIONTWO",
"BADMARKER",
"GRING",
"ROTATINGKEY",
"SELRING",
"SPECIAL",
"BULLET",
"MISS1",
"MISS2",
"MISS3",
"WIREFRAME"
};
UINT16 gNumTilesPerType[ NUMBEROFTILETYPES ] =
{
FIRSTTEXTURE35 - FIRSTTEXTURE1 + 1,
SECONDTEXTURE35 - SECONDTEXTURE1 + 1,
THIRDTEXTURE35 - THIRDTEXTURE1 + 1,
FOURTHTEXTURE35 - FOURTHTEXTURE1 + 1,
FIFTHTEXTURE35 - FIFTHTEXTURE1 + 1,
SIXTHTEXTURE37 - SIXTHTEXTURE1 + 1,
SEVENTHTEXTURE49 - SEVENTHTEXTURE1 + 1,
REGWATERTEXTURE50 - REGWATERTEXTURE1 + 1,
DEEPWATERTEXTURE37 - DEEPWATERTEXTURE1 + 1,
FIRSTCLIFFHANG17 - FIRSTCLIFFHANG1 + 1,
FIRSTCLIFF17 - FIRSTCLIFF1 + 1,
FIRSTCLIFFSHADOW17 - FIRSTCLIFFSHADOW1 + 1, // Med hill
FIRSTOSTRUCT12 - FIRSTOSTRUCT1 + 1,
SECONDOSTRUCT12 - SECONDOSTRUCT1 + 1,
THIRDOSTRUCT12 - THIRDOSTRUCT1 + 1,
FOURTHOSTRUCT12 - FOURTHOSTRUCT1 + 1, // Fourth OSTRUCT
FIFTHOSTRUCT12 - FIFTHOSTRUCT1 + 1, // Fifth OSTRUCT
SIXTHOSTRUCT12 - SIXTHOSTRUCT1 + 1, // Sixth OSTRUCT
SEVENTHOSTRUCT12 - SEVENTHOSTRUCT1 + 1, // Seventh OSTRUCT
EIGHTOSTRUCT12 - EIGHTOSTRUCT1 + 1, // Eigth OSTRUCT
FIRSTFULLSTRUCT12 - FIRSTFULLSTRUCT1 + 1,
SECONDFULLSTRUCT12 - SECONDFULLSTRUCT1 + 1,
THIRDFULLSTRUCT2 - THIRDFULLSTRUCT1 + 1,
FOURTHFULLSTRUCT2 - FOURTHFULLSTRUCT1 + 1,
FIRSTSHADOW12 - FIRSTSHADOW1 + 1,
SECONDSHADOW12 - SECONDSHADOW1 + 1,
THIRDSHADOW12 - THIRDSHADOW1 + 1,
FOURTHSHADOW12 - FOURTHSHADOW1 + 1,
FIFTHSHADOW12 - FIFTHSHADOW1 + 1,
SIXTHSHADOW12 - SIXTHSHADOW1 + 1,
SEVENTHSHADOW12 - SEVENTHSHADOW1 + 1,
EIGHTSHADOW12 - EIGHTSHADOW1 + 1,
FIRSTFULLSHADOW12 - FIRSTFULLSHADOW1 + 1,
SECONDFULLSHADOW12 - SECONDFULLSHADOW1 + 1,
THIRDFULLSHADOW2 - THIRDFULLSHADOW1 + 1,
FOURTHFULLSHADOW2 - FOURTHFULLSHADOW1 + 1,
FIRSTWALL65 - FIRSTWALL1 + 1,
SECONDWALL65 - SECONDWALL1 + 1,
THIRDWALL65 - THIRDWALL1 + 1,
FOURTHWALL65 - FOURTHWALL1 + 1,
FIRSTDOOR20 - FIRSTDOOR1 + 1,
SECONDDOOR20 - SECONDDOOR1 + 1,
THIRDDOOR20 - THIRDDOOR1 + 1,
FOURTHDOOR20 - FOURTHDOOR1 + 1,
FIRSTDOORSH20 - FIRSTDOORSH1 + 1,
SECONDDOORSH20 - SECONDDOORSH1 + 1,
THIRDDOORSH20 - THIRDDOORSH1 + 1,
FOURTHDOORSH20 - FOURTHDOORSH1 + 1,
SLANTROOFCEILING2 - SLANTROOFCEILING1 + 1,
ANOTHERDEBRIS10 - ANOTHERDEBRIS1 + 1,
ROADPIECES400 - ROADPIECES001 + 1,
FOURTHWINDOW2 - FOURTHWINDOW1 + 1,
FIRSTDECORATIONS10 - FIRSTDECORATIONS1 + 1,
SECONDDECORATIONS10 - SECONDDECORATIONS1 + 1,
THIRDDECORATIONS10 - THIRDDECORATIONS1 + 1,
FOURTHDECORATIONS10 - FOURTHDECORATIONS1 + 1,
FIRSTWALLDECAL10 - FIRSTWALLDECAL1 + 1,
SECONDWALLDECAL10 - SECONDWALLDECAL1 + 1,
THIRDWALLDECAL10 - THIRDWALLDECAL1 + 1,
FOURTHWALLDECAL10 - FOURTHWALLDECAL1 + 1,
FIRSTFLOOR8 - FIRSTFLOOR1 + 1,
SECONDFLOOR8 - SECONDFLOOR1 + 1,
THIRDFLOOR8 - THIRDFLOOR1 + 1,
FOURTHFLOOR8 - FOURTHFLOOR1 + 1,
FIRSTROOF14 - FIRSTROOF1 + 1,
SECONDROOF14 - SECONDROOF1 + 1,
THIRDROOF14 - THIRDROOF1 + 1,
FOURTHROOF14 - FOURTHROOF1 + 1,
FIRSTSLANTROOF20 - FIRSTSLANTROOF1 + 1,
SECONDSLANTROOF20 - SECONDSLANTROOF1 + 1,
FIRSTONROOF12 - FIRSTONROOF1 + 1,
SECONDONROOF12 - SECONDONROOF1 + 1,
1,
FIRSTISTRUCT24 - FIRSTISTRUCT1 + 1,
SECONDISTRUCT24 - SECONDISTRUCT1 + 1,
THIRDISTRUCT24 - THIRDISTRUCT1 + 1,
FOURTHISTRUCT24 - FOURTHISTRUCT1 + 1,
FIRSTCISTRUCT24 - FIRSTCISTRUCT1 + 1,
FIRSTROAD35 - FIRSTROAD1 + 1,
DEBRISROCKS10 - DEBRISROCKS1 + 1,
DEBRISWOOD10 - DEBRISWOOD1 + 1,
DEBRISWEEDS10 - DEBRISWEEDS1 + 1,
DEBRISGRASS10 - DEBRISGRASS1 + 1,
DEBRISSAND10 - DEBRISSAND1 + 1,
DEBRISMISC10 - DEBRISMISC1 + 1,
ANIOSTRUCT20 - ANIOSTRUCT1 + 1,
FENCESTRUCT23 - FENCESTRUCT1 + 1,
FENCESHADOW23 - FENCESHADOW1 + 1,
FIRSTVEHICLE12 - FIRSTVEHICLE1 + 1,
SECONDVEHICLE12 - SECONDVEHICLE1 + 1,
FIRSTVEHICLESHADOW12 - FIRSTVEHICLESHADOW1 + 1,
SECONDVEHICLESHADOW12 - SECONDVEHICLESHADOW1 + 1,
DEBRIS2MISC10 - DEBRIS2MISC1 + 1,
FIRSTDEBRISSTRUCT10 - FIRSTDEBRISSTRUCT1 + 1,
SECONDDEBRISSTRUCT10 - SECONDDEBRISSTRUCT1 + 1,
FIRSTDEBRISSTRUCTSHADOW10 - FIRSTDEBRISSTRUCTSHADOW1 + 1,
SECONDDEBRISSTRUCTSHADOW10 - SECONDDEBRISSTRUCTSHADOW1 + 1,
NINTHOSTRUCT12 - NINTHOSTRUCT1 + 1,
TENTHOSTRUCT12 - TENTHOSTRUCT1 + 1,
NINTHOSTRUCTSHADOW12 - NINTHOSTRUCTSHADOW1 + 1,
TENTHOSTRUCTSHADOW12 - TENTHOSTRUCTSHADOW1 + 1,
FIRSTEXPLDEBRIS40 - FIRSTEXPLDEBRIS1 + 1,
SECONDEXPLDEBRIS40 - SECONDEXPLDEBRIS1 + 1,
FIRSTLARGEEXPDEBRIS10 - FIRSTLARGEEXPDEBRIS1 + 1,
SECONDLARGEEXPDEBRIS10 - SECONDLARGEEXPDEBRIS1 + 1,
FIRSTLARGEEXPDEBRISSHADOW10 - FIRSTLARGEEXPDEBRISSHADOW1 + 1,
SECONDLARGEEXPDEBRISSHADOW10 - SECONDLARGEEXPDEBRISSHADOW1 + 1,
FIFTHISTRUCT24 - FIFTHISTRUCT1 + 1,
SIXTHISTRUCT24 - SIXTHISTRUCT1 + 1,
SEVENTHISTRUCT24 - SEVENTHISTRUCT1 + 1,
EIGHTISTRUCT24 - EIGHTISTRUCT1 + 1,
FIRSTHIGHROOF15 - FIRSTHIGHROOF1 + 1,
SECONDHIGHROOF15 - SECONDHIGHROOF1 + 1,
FIFTHWALLDECAL10 - FIFTHWALLDECAL1 + 1,
SIXTHWALLDECAL10 - SIXTHWALLDECAL1 + 1,
SEVENTHWALLDECAL10 - SEVENTHWALLDECAL1 + 1,
EIGTHWALLDECAL10 - EIGTHWALLDECAL1 + 1,
HUMANBLOOD16 - HUMANBLOOD1 + 1,
CREATUREBLOOD16 - CREATUREBLOOD1 + 1,
FIRSTSWITCHES21 - FIRSTSWITCHES1 + 1,
// NO SAVED STUFF AFTER HERE!
REVEALEDSLANTROOFS8 - REVEALEDSLANTROOFS1 + 1,
FIRSTREVEALEDHIGHROOFS11 - FIRSTREVEALEDHIGHROOFS1 + 1,
SECONDREVEALEDHIGHROOFS11 - SECONDREVEALEDHIGHROOFS1 + 1,
GUN5000 - GUN1 + 1,
P1ITEM5000 - P1ITEM1 + 1,
P2ITEM5000 - P2ITEM1 + 1,
WINDOWSHATTER20 - WINDOWSHATTER1 + 1,
P3ITEM5000 - P3ITEM1 + 1,
BODYEXPLOSION15 - BODYEXPLOSION1 + 1,
EXITTEXTURE35 - EXITTEXTURE1 + 1,
FOOTPRINTS80 - FOOTPRINTS1 + 1,
FIRSTPOINTERS24 - FIRSTPOINTERS1 + 1,
SECONDPOINTERS8 - SECONDPOINTERS1 + 1,
THIRDPOINTERS3 - THIRDPOINTERS1 + 1,
GOODRUN11 - GOODRUN1 + 1,
GOODWALK11 - GOODWALK1 + 1,
GOODSWAT11 - GOODSWAT1 + 1,
GOODPRONE11 - GOODPRONE1 + 1,
CONFIRMMOVE11 - CONFIRMMOVE1 + 1,
VEHICLEMOVE10 - VEHICLEMOVE1 + 1,
ACTIONTWO11 - ACTIONTWO1 + 1,
BADMARKER11 - BADMARKER1 + 1,
GOODRING10 - GOODRING1 + 1,
ROTATINGKEY8 - ROTATINGKEY1 + 1,
SELRING10 - SELRING1 + 1,
SPECIALTILE_COVER_5 - SPECIALTILE_MAPEXIT + 1,
BULLETTILE2 - BULLETTILE1 + 1,
FIRSTMISS5 - FIRSTMISS1 + 1,
SECONDMISS5 - SECONDMISS1 + 1,
THIRDMISS14 - THIRDMISS1 + 1,
WIREFRAMES15 - WIREFRAMES1 + 1,
//MM: New item tileslots start here
P4ITEM5000 - P4ITEM1 + 1,
P5ITEM5000 - P5ITEM1 + 1,
P6ITEM5000 - P6ITEM1 + 1,
P7ITEM5000 - P7ITEM1 + 1,
P8ITEM5000 - P8ITEM1 + 1,
P9ITEM5000 - P9ITEM1 + 1
};
UINT8 gTileTypeLogicalHeight[ NUMBEROFTILETYPES ] =
{
2, // First texture
2, // Second texture
2, // Third texture
2, // Forth texture
2, // Fifth texture
2, // Sixth texture
2, // Seventh texture
10, // First water
10 // Second water
};
void SetSpecificDatabaseValues( UINT16 usType, UINT16 uiDatabaseElem, TILE_ELEMENT *TileElement, BOOLEAN fUseRaisedObjectType )
{
UINT8 ubLoop;
INT16 sIndexDiff;
UINT32 cnt;
// SETUP BUDDYS FOR SHADOWS
cnt = 0;
while( gReverseShadowBuddys[ cnt ] != -1 )
{
// IF WE ARE A SHADOW TYPE
if ( usType == gReverseShadowBuddys[ cnt ] )
{
TileElement->sBuddyNum = gReverseShadowBuddys[ cnt + 2 ] + ( uiDatabaseElem - gReverseShadowBuddys[ cnt + 1 ] );
// Check flags and made the same, take from buddy's
TileElement->uiFlags |= gTileDatabase[ TileElement->sBuddyNum ].uiFlags;
}
cnt+=3;
};
// SETUP BUDDYS THAT GO FROM STRUCT TO SHADOW
cnt = 0;
while( gForwardShadowBuddys[ cnt ] != -1 )
{
// IF WE ARE A SHADOW TYPE
if ( usType == gForwardShadowBuddys[ cnt ] )
{
TileElement->sBuddyNum = gForwardShadowBuddys[ cnt + 2 ] + ( uiDatabaseElem - gForwardShadowBuddys[ cnt + 1 ] );
// Set flag indicating such
TileElement->uiFlags |= HAS_SHADOW_BUDDY;
}
cnt+=3;
};
if ( uiDatabaseElem >= FIRSTDOOR1 &&
uiDatabaseElem <= FOURTHDOORSH20 )
{
// Door anims
// Open
cnt = 0;
while( gOpenDoorList[ cnt ] != -1 )
{
// IF WE ARE A SHADOW TYPE
if ( uiDatabaseElem == gOpenDoorList[ cnt ] )
{
// Allocate Animated tile data
AllocateAnimTileData( TileElement, 5 );
TileElement->pAnimData->bCurrentFrame = 0;
for (ubLoop = 0; ubLoop < TileElement->pAnimData->ubNumFrames; ubLoop++)
{
TileElement->pAnimData->pusFrames[ubLoop] = uiDatabaseElem + ubLoop;
}
}
cnt++;
};
// Open Shadow
cnt = 0;
while( gOpenDoorShadowList[ cnt ] != -1 )
{
// IF WE ARE A SHADOW TYPE
if ( uiDatabaseElem == gOpenDoorShadowList[ cnt ] )
{
// Allocate Animated tile data
AllocateAnimTileData( TileElement, 5 );
TileElement->pAnimData->bCurrentFrame = 0;
for (ubLoop = 0; ubLoop < TileElement->pAnimData->ubNumFrames; ubLoop++)
{
TileElement->pAnimData->pusFrames[ubLoop] = uiDatabaseElem + ubLoop;
}
}
cnt++;
};
// Closed
cnt = 0;
while( gClosedDoorList[ cnt ] != -1 )
{
// IF WE ARE A SHADOW TYPE
if ( uiDatabaseElem == gClosedDoorList[ cnt ] )
{
// Allocate Animated tile data
AllocateAnimTileData( TileElement, 5 );
TileElement->pAnimData->bCurrentFrame = 0;
for (ubLoop = 0; ubLoop < TileElement->pAnimData->ubNumFrames; ubLoop++)
{
TileElement->pAnimData->pusFrames[ubLoop] = uiDatabaseElem - ubLoop;
}
}
cnt++;
};
// Open Shadow
cnt = 0;
while( gClosedDoorShadowList[ cnt ] != -1 )
{
// IF WE ARE A SHADOW TYPE
if ( uiDatabaseElem == gClosedDoorShadowList[ cnt ] )
{
// Allocate Animated tile data
AllocateAnimTileData( TileElement, 5 );
TileElement->pAnimData->bCurrentFrame = 0;
for (ubLoop = 0; ubLoop < TileElement->pAnimData->ubNumFrames; ubLoop++)
{
TileElement->pAnimData->pusFrames[ubLoop] = uiDatabaseElem - ubLoop;
}
}
cnt++;
};
}
if ( uiDatabaseElem == FIRSTMISS1 )
{
// Allocate Animated tile data
AllocateAnimTileData( TileElement, 5 );
TileElement->pAnimData->bCurrentFrame = 0;
for (ubLoop = 0; ubLoop < TileElement->pAnimData->ubNumFrames; ubLoop++)
{
TileElement->pAnimData->pusFrames[ubLoop] = uiDatabaseElem + ubLoop;
}
}
if ( uiDatabaseElem >= FIRSTMISS1 &&
uiDatabaseElem <= FIRSTMISS5 )
{
TileElement->uiFlags |= DYNAMIC_TILE;
}
if ( uiDatabaseElem == WINDOWSHATTER1 || uiDatabaseElem == WINDOWSHATTER6 || uiDatabaseElem == WINDOWSHATTER11 || uiDatabaseElem == WINDOWSHATTER16 )
{
// Allocate Animated tile data
AllocateAnimTileData( TileElement, 5 );
TileElement->pAnimData->bCurrentFrame = 0;
for (ubLoop = 0; ubLoop < TileElement->pAnimData->ubNumFrames; ubLoop++)
{
TileElement->pAnimData->pusFrames[ubLoop] = uiDatabaseElem + ubLoop;
}
}
if ( uiDatabaseElem >= WINDOWSHATTER1 &&
uiDatabaseElem <= WINDOWSHATTER20 )
{
TileElement->uiFlags |= DYNAMIC_TILE;
}
// if ( usType == FIRSTEXPLOSION )
// {
// TileElement->uiFlags |= DYNAMIC_TILE;
// }
if ( usType == BODYEXPLOSION )
{
TileElement->uiFlags |= DYNAMIC_TILE;
}
if ( usType == FIRSTROAD )
{
TileElement->uiFlags |= ROAD_TILE;
}
// SET FLAGS FOR OBJECTS PEICES WHICH USE PROPER Z
if ( fUseRaisedObjectType )
{
TileElement->uiFlags |= OBJECTLAYER_USEZHEIGHT;
}
// OFFSET SLANTED ROOFS TO HEIGHT OF WALLS
if ( uiDatabaseElem >= FIRSTROOF1 &&
uiDatabaseElem <= SECONDSLANTROOF20 )
{
//TileElement->sOffsetHeight = WALL_HEIGHT;
}
// Set flag for full 3d tiles, as well as the dynamic flag for the folliage
if ( uiDatabaseElem >= FIRSTFULLSTRUCT1 &&
uiDatabaseElem <= SECONDFULLSTRUCT12 )
{
//TileElement->uiFlags |= FULL3D_TILE;
sIndexDiff = uiDatabaseElem - gTileTypeStartIndex[ usType ];
// Every second set as dynamic
if ( ( ( sIndexDiff ) % 3 ) == 1 )
{
TileElement->uiFlags |= DYNAMIC_TILE;
}
// Set every first as full tile
if ( ( ( sIndexDiff ) % 3 ) == 0 )
{
TileElement->uiFlags |= FULL3D_TILE;
}
}
//Ignore height for cliffs ie: if we rasie the land, do not offset the cliff
if ( uiDatabaseElem >= FIRSTCLIFFHANG1 &&
uiDatabaseElem <= FIRSTCLIFFSHADOW17 )
{
if ( usType == FIRSTCLIFFHANG )
{
TileElement->uiFlags |= CLIFFHANG_TILE;
}
TileElement->uiFlags |= IGNORE_WORLD_HEIGHT;
}
if ( uiDatabaseElem >= FIRSTWALL1 &&
uiDatabaseElem <= FOURTHWALL65 )
{
TileElement->uiFlags |= WALL_TILE;
}
// Set a-frames heigher!
if ( uiDatabaseElem >= FIRSTWALL1 &&
uiDatabaseElem <= FOURTHWALL47 )
{
// Set these ones higher ( for roof pieces )
if ( uiDatabaseElem >= ( gTileTypeStartIndex[ usType ] + WALL_AFRAME_START ) &&
uiDatabaseElem <= ( gTileTypeStartIndex[ usType ] + WALL_AFRAME_END ) )
{
//TileElement->sOffsetHeight = WALL_HEIGHT;
TileElement->uiFlags |= AFRAME_TILE;
}
}
// Set UI Elements to be dynamic
if ( uiDatabaseElem >= FOOTPRINTS1 &&
uiDatabaseElem <= THIRDPOINTERS2 )
{
TileElement->uiFlags |= DYNAMIC_TILE;
TileElement->uiFlags |= OBJECTLAYER_USEZHEIGHT;
}
// Set UI Elements to use object z level
if ( usType >= FOOTPRINTS &&
usType <= LASTUIELEM )
{
TileElement->uiFlags |= OBJECTLAYER_USEZHEIGHT;
}
// Set UI Elements to use object z level
if ( usType >= HUMANBLOOD &&
usType <= CREATUREBLOOD )
{
TileElement->uiFlags |= OBJECTLAYER_USEZHEIGHT;
}
// Set UI Elements to use object z level
if ( usType >= GUNS &&
usType <= P2ITEMS )
{
TileElement->uiFlags |= OBJECTLAYER_USEZHEIGHT;
}
if ( usType == P3ITEMS )
{
TileElement->uiFlags |= OBJECTLAYER_USEZHEIGHT;
}
if ( usType >= FIRSTEXPLDEBRIS && usType <= SECONDEXPLDEBRIS )
{
TileElement->uiFlags |= OBJECTLAYER_USEZHEIGHT;
}
if ( uiDatabaseElem >= FIRSTDOOR1 &&
uiDatabaseElem <= FOURTHDOORSH20 )
{
//TileElement->uiFlags |= DYNAMIC_TILE;
}
// Set UI Elements to be dynamic
if ( uiDatabaseElem == MOCKFLOOR1 )
{
TileElement->uiFlags |= DYNAMIC_TILE;
}
if ( usType == BULLETTILE )
{
TileElement->uiFlags |= DYNAMIC_TILE;
}
if ( usType == WIREFRAMES )
{
//TileElement->uiFlags |= DYNAMIC_TILE;
}
// Set full tile flag for floors
if ( uiDatabaseElem >= FIRSTFLOOR1 &&
uiDatabaseElem <= FOURTHFLOOR8 )
{
TileElement->ubFullTile = 1;
}
if ( uiDatabaseElem >= FIRSTTEXTURE1 &&
uiDatabaseElem <= DEEPWATERTEXTURE10 )
{
// Set tile 'fullness' attribute
TileElement->ubFullTile = gFullBaseTileValues[ uiDatabaseElem ];
}
if ( usType >= FIRSTONROOF && usType <= SECONDONROOF )
{
// Set height!
//TileElement->sOffsetHeight = WALL_HEIGHT;
}
if ( uiDatabaseElem >= REGWATERTEXTURE18 && uiDatabaseElem <= REGWATERTEXTURE50 || uiDatabaseElem == REGWATERTEXTURE ||
uiDatabaseElem == REGWATERTEXTURE12 || uiDatabaseElem == REGWATERTEXTURE14 || uiDatabaseElem == REGWATERTEXTURE16 )
{
TileElement->ubTerrainID = FLAT_GROUND;
}
if ( ( usType >= FIRSTROOF && usType <= SECONDSLANTROOF ) || usType == FIRSTHIGHROOF || usType == SECONDHIGHROOF )
{
TileElement->uiFlags |= ROOF_TILE;
}
}