From cbed652d05582db17292768c9e5c99ee03f065d2 Mon Sep 17 00:00:00 2001 From: avolkov Date: Mon, 9 Jul 2007 19:41:49 +0000 Subject: [PATCH] Some cleanup of earlier ship struct work; comments git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2800 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/build.c | 1 - sc2/src/sc2code/comm.c | 1 - sc2/src/sc2code/displist.h | 6 ++++++ sc2/src/sc2code/element.h | 1 - sc2/src/sc2code/globdata.c | 2 -- sc2/src/sc2code/hyper.c | 1 - sc2/src/sc2code/ipdisp.c | 2 +- sc2/src/sc2code/planets/genpet.c | 1 - 8 files changed, 7 insertions(+), 8 deletions(-) diff --git a/sc2/src/sc2code/build.c b/sc2/src/sc2code/build.c index 706a2b52d..788eff06e 100644 --- a/sc2/src/sc2code/build.c +++ b/sc2/src/sc2code/build.c @@ -384,7 +384,6 @@ CloneShipFragment (COUNT shipIndex, QUEUE *pDstQueue, COUNT crew_level) ShipFragPtr->which_side = TemplatePtr->ship_flags & (GOOD_GUY | BAD_GUY); ShipFragPtr->captains_name_index = captains_name_index; - // XXX: SHIP_INFO struct copy ShipFragPtr->race_strings = TemplatePtr->race_strings; ShipFragPtr->icons = TemplatePtr->icons; ShipFragPtr->melee_icon = TemplatePtr->melee_icon; diff --git a/sc2/src/sc2code/comm.c b/sc2/src/sc2code/comm.c index 2e1d59170..165bba5a1 100644 --- a/sc2/src/sc2code/comm.c +++ b/sc2/src/sc2code/comm.c @@ -1718,7 +1718,6 @@ RaceCommunication (void) hStarShip = GetStarShipFromIndex (&GLOBAL (npc_built_ship_q), i); FragPtr = LockShipFrag (&GLOBAL (npc_built_ship_q), hStarShip); - // XXX: SHIP_INFO struct copy BSIPtr = &EncounterPtr->ShipList[i]; BSIPtr->race_id = FragPtr->race_id; BSIPtr->crew_level = FragPtr->crew_level; diff --git a/sc2/src/sc2code/displist.h b/sc2/src/sc2code/displist.h index 4876b67b0..e5f45ea49 100644 --- a/sc2/src/sc2code/displist.h +++ b/sc2/src/sc2code/displist.h @@ -23,6 +23,12 @@ #include "libs/memlib.h" #include "port.h" +// Note that we MUST use the QUEUE_TABLE variant at this time, because +// certain gameplay elements depend on it. Namely, the maximum number +// of HyperSpace encounter globes chasing the player is defined by the +// allocated size of the encounter_q. If switched to non-table variant, +// the max number of encounters will be virtually unlimited the way the +// code works now. #define QUEUE_TABLE #ifdef QUEUE_TABLE diff --git a/sc2/src/sc2code/element.h b/sc2/src/sc2code/element.h index 503e6a96b..0f88dc8e8 100644 --- a/sc2/src/sc2code/element.h +++ b/sc2/src/sc2code/element.h @@ -127,7 +127,6 @@ struct element BYTE mass_points; /* Also: system loc for IP flagship */ BYTE turn_wait; - /* Also: group_id for IP groups */ BYTE thrust_wait; VELOCITY_DESC velocity; INTERSECT_CONTROL IntersectControl; diff --git a/sc2/src/sc2code/globdata.c b/sc2/src/sc2code/globdata.c index 7b1f0884b..daf68db00 100644 --- a/sc2/src/sc2code/globdata.c +++ b/sc2/src/sc2code/globdata.c @@ -239,7 +239,6 @@ InitSIS (void) hMasterShip = FindMasterShip (ship_ref); MasterPtr = LockMasterShip (&master_q, hMasterShip); // Grab a copy of loaded icons and strings (not owned) - // XXX: SHIP_INFO struct copy copyFleetInfo (FleetPtr, &MasterPtr->ShipInfo, &MasterPtr->Fleet); UnlockMasterShip (&master_q, hMasterShip); @@ -251,7 +250,6 @@ InitSIS (void) FALSE); if (RDPtr) { // Grab a copy of loaded icons and strings - // XXX: SHIP_INFO struct copy copyFleetInfo (FleetPtr, &RDPtr->ship_info, &RDPtr->fleet); // avail_race_q owns these resources now diff --git a/sc2/src/sc2code/hyper.c b/sc2/src/sc2code/hyper.c index 5a2316cfd..d5f63adae 100644 --- a/sc2/src/sc2code/hyper.c +++ b/sc2/src/sc2code/hyper.c @@ -961,7 +961,6 @@ AddEncounterElement (ENCOUNTER *EncounterPtr, POINT *puniverse) hStarShip = GetStarShipFromIndex (&GLOBAL (avail_race_q), Type); FleetPtr = LockFleetInfo (&GLOBAL (avail_race_q), hStarShip); - // XXX: SHIP_INFO struct copy BSIPtr->race_id = Type; BSIPtr->crew_level = FleetPtr->crew_level; BSIPtr->max_crew = FleetPtr->max_crew; diff --git a/sc2/src/sc2code/ipdisp.c b/sc2/src/sc2code/ipdisp.c index a8770102c..0f8aea8a8 100644 --- a/sc2/src/sc2code/ipdisp.c +++ b/sc2/src/sc2code/ipdisp.c @@ -582,7 +582,7 @@ spawn_ip_group (IP_GROUP *GroupPtr) LockElement (hIPSHIPElement, &IPSHIPElementPtr); // XXX: turn_wait hack is not actually used anywhere - IPSHIPElementPtr->turn_wait = GroupPtr->group_id; + //IPSHIPElementPtr->turn_wait = GroupPtr->group_id; IPSHIPElementPtr->mass_points = 1; IPSHIPElementPtr->hit_points = 1; IPSHIPElementPtr->state_flags = diff --git a/sc2/src/sc2code/planets/genpet.c b/sc2/src/sc2code/planets/genpet.c index c5e8110e0..dacf0d331 100644 --- a/sc2/src/sc2code/planets/genpet.c +++ b/sc2/src/sc2code/planets/genpet.c @@ -54,7 +54,6 @@ ZapToUrquanEncounter (void) EncounterPtr->radius = TemplatePtr->actual_strength; EncounterPtr->SD.Type = URQUAN_SHIP; EncounterPtr->SD.Index = MAKE_BYTE (1, 0) | ONE_SHOT_ENCOUNTER; - // XXX: SHIP_INFO struct copy BSIPtr = &EncounterPtr->ShipList[0]; BSIPtr->race_id = URQUAN_SHIP; BSIPtr->crew_level = TemplatePtr->crew_level;