Game Development Community

found some hardcoded references to fps

by Tim Newell · in Torque Game Engine · 12/20/2001 (5:25 pm) · 3 replies

I found hardcoded references to the fps dir in the head build of December 19, 2001. I added my changes so if anyone sees that my changes are incorrect, please let me know. The following files had the hardcoded paths:

client/ui/startMissionGui.gui
in function startMissionGui::onWake()

%filespec = "fps/*.mis";

I changed to:

%filespec = $userMods @ "/*.mis";

client/ui/aboutDlg.gui
in function aboutDlg::onWake(%this)

"<bitmap:fps/client/ui/gglogo150.png>";

I changed to:

"<bitmap:" @ $userMods @ "/client/ui/gglogo150.png>";

client/scripts/optionsDlg.cs
in function OptionsDlg::onSleep(%this)

moveMap.save( "fps/client/config.cs" );

I changed to:

moveMap.save( $userMods @ "/client/config.cs" );

common/editor/editorGui.gui
in new GuiBitmapCtrl(ETerrainMaterialBitmap0) {

bitmap = "fps/data/terrains/grassland/grass";

I changed to:

bitmap = $userMods @ "/data/terrains/grassland/grass";

in new GuiBitmapCtrl(ETerrainMaterialBitmap1) 

bitmap = "fps/data/terrains/grassland/grass";

I changed to:

bitmap = $userMods @ "/data/terrains/grassland/grass";

in new GuiBitmapCtrl(ETerrainMaterialBitmap2) {

bitmap = "fps/data/terrains/grassland/grass";

I changed to:

bitmap = $userMods @ "/data/terrains/grassland/grass";

in new GuiBitmapCtrl(ETerrainMaterialBitmap3) {

bitmap = "fps/data/terrains/grassland/grass";

I changed to:

bitmap = $userMods @ "/data/terrains/grassland/grass";

in new GuiBitmapCtrl(ETerrainMaterialBitmap4) {

bitmap = "fps/data/terrains/grassland/grass";

I changed to:

bitmap = $userMods @ "/data/terrains/grassland/grass";

in new GuiBitmapCtrl(ETerrainMaterialBitmap5) {

bitmap = "fps/data/terrains/grassland/grass";

I changed to:

bitmap = $userMods @ "/data/terrains/grassland/grass";

editor/newMission.mis
in new Sky(Sky) 

materialList = "fps/data/skies/sky_sunset.dml";

I changed to:

materialList = $userMods @ "/data/skies/sky_sunset.dml";

in new TerrainBlock(Terrain) 

detailTexture = "fps/data/terrains/details/detail1";

I changed to:

detailTexture = $userMods @ "/data/terrains/details/detail1";

#1
12/20/2001 (7:33 pm)
Also I think this is a typo

in Rifle.cs

datablock ParticleData(RifleFireParticle)
{
textureName = "~/data/shapes/crossbow/smokeParticle";

(it is referencing crossbow's smokeParticle instead of the Rifle's...in case you were wondering what the typo was :) )
#2
12/21/2001 (5:36 pm)
I fixed the rifle.cs bug, thanks Tim. I did not implement your fps reference fixes though. $userMods contains all the mods currently loaded, so doing things like $userMods @ "/path" will only work if there is a single mod loaded.

I'll have to look at the fps references, certainly anything that's a property value (which uses the FilenameType) should be changed to use "~/path", as '~' is the current mod root. This doesn't work for everything though.
#3
12/21/2001 (7:33 pm)
Ahhh, I was wondering about that...Ill try that change in my code, thanks.