Untangling ship queues: update the current state of affairs
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2783 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+9
-14
@@ -3,34 +3,31 @@ The various ship queues used in the game:
|
||||
GlobData.Game_state.avail_race_q:
|
||||
Contains all the ships from the enum from races.h that defines
|
||||
NUM_AVAILABLE_RACES.
|
||||
Elements are of type EXTENDED_SHIP_FRAGMENT.
|
||||
Elements are of type EXTENDED_SHIP_FRAGMENT (to become FLEET_INFO).
|
||||
It contains information about the various races, not really about
|
||||
specific ships.
|
||||
Filled in InitSIS().
|
||||
RaceDescPtr is an actual pointer, but to EXTENDED_SHIP_INFO
|
||||
and not RACE_DESC
|
||||
Partially included in savegames.
|
||||
|
||||
GlobData.Game_state.built_ship_q:
|
||||
The fleet accompanying the flagship.
|
||||
Elements are of type SHIP_FRAGMENT.
|
||||
RaceDescPtr is abused to store the captain's name index.
|
||||
and the side that this ship is on (always GOOD_GUY here).
|
||||
which_side is always GOOD_GUY here.
|
||||
Partially included in savegames.
|
||||
|
||||
master_q:
|
||||
Queue of all the ships that exist in the game.
|
||||
Elements are of type SHIP_FRAGMENT.
|
||||
Elements are of type SHIP_FRAGMENT (to become MASTER_SHIP_INFO).
|
||||
Sorted on the (abbreviated) race name (see doc/racestrings).
|
||||
Filled in LoadMasterShipList().
|
||||
RaceDescPtr is an actual pointer, but to SHIP_INFO and not RACE_DESC
|
||||
|
||||
GlobData.Game_state.npc_built_ship_q:
|
||||
The npc ships in an encounter. Empty when not in an encounter.
|
||||
Elements are of type SHIP_FRAGMENT.
|
||||
The npc ships in an encounter, or list of ship groups when in IP;
|
||||
empty otherwise.
|
||||
Elements are of type SHIP_FRAGMENT. IP group list will most likely
|
||||
change to contain GROUP_INFO instead.
|
||||
For encounters with an infinite number of ships, the queue consists
|
||||
of a single ship with ShipInfo.crew_level set to (BYTE)~0.
|
||||
RaceDescPtr is abused to store the captain's name index.
|
||||
and the side that this ship is on.
|
||||
Partially included in savegames.
|
||||
|
||||
@@ -38,10 +35,8 @@ race_q[NUM_PLAYERS]:
|
||||
Contains the ships participating in a battle for each player.
|
||||
Elements are of type STARSHIP.
|
||||
Filled in BuildBattle().
|
||||
RaceDescPtr is abused to store the captain's name index,
|
||||
until the ship is loaded in spawn_ship(), at which time
|
||||
it becomes an actual pointer to RACE_DESC.
|
||||
and the side that this ship is on.
|
||||
RaceDescPtr points to a loaded ship's descriptor once the ship data
|
||||
is loaded in spawn_ship(); NULL otherwise.
|
||||
|
||||
|
||||
Other queues:
|
||||
|
||||
Reference in New Issue
Block a user