Where is the loader of Sound.tdf in the source?

Where is the loader of Sound.tdf in the source?

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Where is the loader of Sound.tdf in the source?

Post by PauloMorfeo »

What is my surprise when i find out that, beyond having:

Code: Select all

Select
Ok
Arrived
Cant
UnderAttack
Count#
CancelDestruct
, Classes of sound also have:

Code: Select all

Build
Repair
Working
UnitComplete
Activate
Deactivate
Cloak
Uncloak
So i try to find the C++ function in the source that loads the file sound.tdf but no luck. Can anyone point me to it?

The source code never lies.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

Thanks tobi. Following that, i ended up seeing in the same file, in lines 596+ (i would have found it before asking would i be less tired at the time, probably. Anyway, the way Spring loads the data is diferent than i would do it, one of the reasons i wouldn't search for that in there):

Code: Select all

	...
	LoadSound(tdfparser, ud.sounds.ok, "ok1");
	LoadSound(tdfparser, ud.sounds.select, "select1");
	LoadSound(tdfparser, ud.sounds.arrived, "arrived1");
	LoadSound(tdfparser, ud.sounds.build, "build");
	LoadSound(tdfparser, ud.sounds.activate, "activate");
	LoadSound(tdfparser, ud.sounds.deactivate, "deactivate");
	LoadSound(tdfparser, ud.sounds.cant, "cant");
	LoadSound(tdfparser, ud.sounds.underattack, "underattack");
}
Does that means that only those sounds are beeing loaded and the rest are not?
(funny thing the count# and canceldestruct are not there too, but i know those work...)

I tried the XTA and AA cloakable units and, in fact, they use the sounds of Ok1(?) for when a order of cloak/uncloak is issued (even though i don't know if they have those definid in sound.tfd).
Post Reply

Return to “Engine”