Category:Utilities: Difference between revisions

From COD Engine Research
Created page with "This wiki will use code from the following pages. These pages should be thought of as #includes in that at any point in this wiki a page may reference a typename, class, or te..."
 
No edit summary
Line 1: Line 1:
This wiki will use code from the following pages. These pages should be thought of as #includes in that at any point in this wiki a page may reference a typename, class, or template from this page.
This wiki will use code from the following pages. These pages should be thought of as #includes in that at any point in this wiki a page may reference a typename, class, or template from this page.
== ScriptStrings ==
== ScriptStrings ==
<syntaxhighlight lang="cpp">
#if defined(IW6) || defined(SH1) //If Ghosts or AW
short scr_string_t
#else
  short ScriptString;
  short ScriptString;
#endif
</syntaxhighlight>
Simple enough. In a zone file, the value will be the index of the string in the ScriptString array at the beginning of the zone. In memory, you can use the following function...
Simple enough. In a zone file, the value will be the index of the string in the ScriptString array at the beginning of the zone. In memory, you can use the following function...
  typedef const char * (__cdecl * SL_ConvertToString)(unsigned int stringValue);
  typedef const char * (__cdecl * SL_ConvertToString)(unsigned int stringValue);

Revision as of 00:30, 21 December 2014

This wiki will use code from the following pages. These pages should be thought of as #includes in that at any point in this wiki a page may reference a typename, class, or template from this page.

ScriptStrings

#if defined(IW6) || defined(SH1) //If Ghosts or AW
 short scr_string_t
#else
 short ScriptString;
#endif

Simple enough. In a zone file, the value will be the index of the string in the ScriptString array at the beginning of the zone. In memory, you can use the following function...

typedef const char * (__cdecl * SL_ConvertToString)(unsigned int stringValue);

snd_alias_list_name

This is only used by IW games to store references to sound assets. snd_alias_list_t is a sound asset header.

union snd_alias_list_name
{
  char * name;
  snd_alias_list_t * asset;
};

If the asset is in the zone, then it is simply a pointer to the name of the sound to use. Once the asset is loaded to memory, it gets replaced with a pointer to the actual sound asset.

Pages in category "Utilities"

This category contains only the following page.