diff --git a/doc/ChangeLog.html b/doc/ChangeLog.html index 124c7c095..4927130d7 100644 --- a/doc/ChangeLog.html +++ b/doc/ChangeLog.html @@ -36,6 +36,10 @@ <li>Future 1.19 Release<p> <ul> <li>+++ + <li>Changed the handling of contained units to a circular linked list (from Crestez Dan Leonard). + <li>Compacted Unit::Rescued and Unit::Rescued from (from Crestez Dan Leonard). + <li>Change Unit::Colors to a pointer(saves memory) (from Crestez Dan Leonard). + <li>Renamed project to Stratagus and fixed most internal references to the Freecraft name (From Ingo Ruhnke). <li>You can select two units on different land masses and they will both board (from Crestez Dan Leonard). <li>Set Harvest with right-click from a building (from Crestez Dan Leonard). <li>Fixed bug where transporter and unit follow each other (from Crestez Dan Leonard). diff --git a/src/action/action_attack.cpp b/src/action/action_attack.cpp index 2522f9d89..40f4e577e 100644 --- a/src/action/action_attack.cpp +++ b/src/action/action_attack.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/action/action_board.cpp b/src/action/action_board.cpp index ca3e2c467..8a1340778 100644 --- a/src/action/action_board.cpp +++ b/src/action/action_board.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -144,7 +144,6 @@ local int WaitForTransporter(Unit* unit) local void EnterTransporter(Unit* unit) { Unit* transporter; - int i; unit->Wait=1; unit->Orders[0].Action=UnitActionStill; @@ -175,24 +174,20 @@ local void EnterTransporter(Unit* unit) unit->Orders[0].Goal=NoUnitP; // - // Find free slot in transporter. + // Place the unit inside the transporter. // - for( i=0; i<(int)(sizeof(unit->OnBoard)/sizeof(*unit->OnBoard)); ++i ) { - if( transporter->OnBoard[i]==NoUnitP ) { - transporter->OnBoard[i]=unit; - // FIXME: reference counts? - transporter->Value++; - RemoveUnit(unit,transporter); - //Don't make anything funny after going out of the transporter. - // FIXME: This is probably wrong, but it works for me (n0b0dy) - unit->OrderCount=1; - unit->Orders[0].Action=UnitActionStill; - if( IsOnlySelected(transporter) ) { - UpdateButtonPanel(); - MustRedraw|=RedrawPanels; - } - return; + + if (transporter->InsideCount<transporter->Type->MaxOnBoard) { + RemoveUnit(unit,transporter); + //Don't make anything funny after going out of the transporter. + // FIXME: This is probably wrong, but it works for me (n0b0dy) + unit->OrderCount=1; + unit->Orders[0].Action=UnitActionStill; + if( IsOnlySelected(transporter) ) { + UpdateButtonPanel(); + MustRedraw|=RedrawPanels; } + return; } DebugLevel0Fn("No free slot in transporter\n"); } diff --git a/src/action/action_build.cpp b/src/action/action_build.cpp index 7a8fe4f0a..d539d927e 100644 --- a/src/action/action_build.cpp +++ b/src/action/action_build.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -372,7 +372,7 @@ global void HandleActionBuilded(Unit* unit) // // Building lumber mill, let worker automatic chopping wood. // - if( type->StoresWood ) { + if( type->Stores[WoodCost] ) { CommandHarvest(worker,unit->X+unit->Type->TileWidth/2, unit->Y+unit->Type->TileHeight/2,0); } diff --git a/src/action/action_demolish.cpp b/src/action/action_demolish.cpp index 1fa867fbc..335517291 100644 --- a/src/action/action_demolish.cpp +++ b/src/action/action_demolish.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/action/action_die.cpp b/src/action/action_die.cpp index 5ac5fea46..77146a26f 100644 --- a/src/action/action_die.cpp +++ b/src/action/action_die.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/action/action_follow.cpp b/src/action/action_follow.cpp index 915748823..7604d4d05 100644 --- a/src/action/action_follow.cpp +++ b/src/action/action_follow.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/action/action_harvest.cpp b/src/action/action_harvest.cpp index 2dfb7df72..605a8482d 100644 --- a/src/action/action_harvest.cpp +++ b/src/action/action_harvest.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -47,6 +47,7 @@ #include "map.h" #include "interface.h" #include "pathfinder.h" +#include "upgrade_structs.h" // FIXME: Should combine all the resource functions // FIXME: Should update buttons if the action changes? @@ -243,7 +244,7 @@ local int ChopWood(Unit* unit) // NOTE: unit->Orders[0].X && unit->Orders[0].Y holds return place. unit->Orders[0].X=unit->X; unit->Orders[0].Y=unit->Y; - if( !(destu=FindWoodDeposit(unit->Player,unit->X,unit->Y)) ) { + if( !(destu=FindDeposit(unit->Player,unit->X,unit->Y,WoodCost)) ) { unit->Orders[0].Action=UnitActionStill; unit->SubAction=0; } else { @@ -413,7 +414,7 @@ local int WaitInWoodDeposit(Unit* unit) // // Drop out unit at nearest point to target. // - destu=WoodDepositOnMap(unit->X,unit->Y); + destu=ResourceDepositOnMap(unit->X,unit->Y,WoodCost); DebugCheck( !destu ); // there must be a depot! DropOutNearest(unit diff --git a/src/action/action_minegold.cpp b/src/action/action_minegold.cpp index 90a1f39c7..07da720f8 100644 --- a/src/action/action_minegold.cpp +++ b/src/action/action_minegold.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -282,7 +282,7 @@ local int MineInGoldmine(Unit* unit) // // Find gold depot // - if( !(destu=FindGoldDeposit(unit,unit->X,unit->Y)) ) { + if( !(destu=FindDeposit(unit->Player,unit->X,unit->Y,GoldCost)) ) { if( mine ) { DropOutOnSide(unit,LookingW ,mine->Type->TileWidth,mine->Type->TileHeight); @@ -474,7 +474,7 @@ local int StoreGoldInDeposit(Unit* unit) DebugLevel3Fn("Waiting\n"); if( !unit->Value ) { - depot=GoldDepositOnMap(unit->X,unit->Y); + depot=ResourceDepositOnMap(unit->X,unit->Y,GoldCost); DebugCheck( !depot ); // Could be destroyed, but than we couldn't be in? diff --git a/src/action/action_move.cpp b/src/action/action_move.cpp index 13c2a9613..d23e4eb9e 100644 --- a/src/action/action_move.cpp +++ b/src/action/action_move.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -73,6 +73,7 @@ local int ActionMoveGeneric(Unit* unit,const Animation* anim) int i; int x; int y; + Unit *uninside; // FIXME: state 0?, should be wrong, should be Reset. // FIXME: Reset flag is cleared by HandleUnitAction. @@ -153,15 +154,15 @@ local int ActionMoveGeneric(Unit* unit,const Animation* anim) UpdateButtonPanel(); } + // Remark sight for units inside too. if ( unit->Type->Transporter ) { - for( i=0; i<MAX_UNITS_ONBOARD; ++i ) { - if( unit->OnBoard[i] != NoUnitP ) { - MapMarkNewSight(unit->OnBoard[i]->Player,x,y, - unit->OnBoard[i]->CurrentSightRange,xd,yd); - } + uninside=unit->UnitInside; + for( i=unit->InsideCount; i; uninside=uninside->NextContained,i-- ) { + MapMarkNewSight(uninside->Player,x,y,uninside->CurrentSightRange,xd,yd); } } + // Reveal Submarines and stuff. if( unit->Type->CanSeeSubmarine ) { MarkSubmarineSeen(unit->Player,x,y,unit->Stats->SightRange); } diff --git a/src/action/action_patrol.cpp b/src/action/action_patrol.cpp index 1ad8d6090..3863809cc 100644 --- a/src/action/action_patrol.cpp +++ b/src/action/action_patrol.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/action/action_repair.cpp b/src/action/action_repair.cpp index 223b4bcde..8d81c0814 100644 --- a/src/action/action_repair.cpp +++ b/src/action/action_repair.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/action/action_research.cpp b/src/action/action_research.cpp index 5b128269e..a5fbc9b2f 100644 --- a/src/action/action_research.cpp +++ b/src/action/action_research.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/action/action_resource.cpp b/src/action/action_resource.cpp index ca85094ff..60703c520 100644 --- a/src/action/action_resource.cpp +++ b/src/action/action_resource.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -58,12 +58,7 @@ typedef struct _resource_ { unsigned char Action; /// Unit action. int Frame; /// Frame for active resource Unit* (*ResourceOnMap)(int,int); /// Get the resource on map. - Unit* (*DepositOnMap)(int,int); /// Get the deposit on map. - /// Find the source of resource - Unit* (*FindResource)(const Player*,int,int); - /// Find the deposit of resource - Unit* (*FindDeposit)(const Unit*,int,int); - int Cost; /// How many can the unit carry. + int Cost; /// Resource type UnitType** Human; /// Human worker UnitType** HumanWithResource; /// Human worker with resource UnitType** Orc; /// Orc worker @@ -284,7 +279,7 @@ local int WaitInResource(Unit* unit,const Resource* resource) // // Find and send to resource deposit. // - if( !(depot=resource->FindDeposit(unit,unit->X,unit->Y)) ) { + if( !(depot=FindDeposit(unit->Player,unit->X,unit->Y,resource->Cost)) ) { if( source ) { DropOutOnSide(unit,LookingW ,source->Type->TileWidth,source->Type->TileHeight); @@ -463,7 +458,7 @@ local int WaitInDepot(Unit* unit,const Resource* resource) DebugLevel3Fn("Waiting\n"); if( !unit->Value ) { - depot=resource->DepositOnMap(unit->X,unit->Y); + depot=ResourceDepositOnMap(unit->X,unit->Y,resource->Cost); DebugCheck( !depot ); // Could be destroyed, but than we couldn't be in? @@ -474,7 +469,7 @@ local int WaitInDepot(Unit* unit,const Resource* resource) x=(int)unit->Orders[0].Arg1>>16; y=(int)unit->Orders[0].Arg1&0xFFFF; } - if( !(goal=resource->FindResource(unit->Player,x,y)) ) { + if( !(goal=FindOilPlatform(unit->Player,x,y)) ) { DropOutOnSide(unit,LookingW, depot->Type->TileWidth,depot->Type->TileHeight); unit->Orders[0].Action=UnitActionStill; @@ -618,9 +613,6 @@ local Resource ResourceOil[1] = { UnitActionHaulOil, 2, // FIXME: hardcoded. PlatformOnMap, - OilDepositOnMap, - FindOilPlatform, - FindOilDeposit, OilCost, // FIXME: The & could be removed. &UnitTypeHumanTanker, diff --git a/src/action/action_returngoods.cpp b/src/action/action_returngoods.cpp index d7c7a655c..367531d0f 100644 --- a/src/action/action_returngoods.cpp +++ b/src/action/action_returngoods.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -69,7 +69,7 @@ global void HandleActionReturnGoods(Unit* unit) // if( type==UnitTypeHumanWorkerWithGold || type==UnitTypeOrcWorkerWithGold ) { if( !unit->Orders[0].Goal ) { - if( !(destu=FindGoldDeposit(unit,unit->X,unit->Y)) ) { + if( !(destu=FindDeposit(unit->Player,unit->X,unit->Y,GoldCost)) ) { // No deposit -> can't return unit->Orders[0].Action=UnitActionStill; return; @@ -89,7 +89,7 @@ global void HandleActionReturnGoods(Unit* unit) if( type==UnitTypeHumanWorkerWithWood || type==UnitTypeOrcWorkerWithWood ) { if( !unit->Orders[0].Goal ) { - if( !(destu=FindWoodDeposit(unit->Player,unit->X,unit->Y)) ) { + if( !(destu=FindDeposit(unit->Player,unit->X,unit->Y,WoodCost)) ) { // No deposit -> can't return unit->Orders[0].Action=UnitActionStill; return; @@ -114,7 +114,7 @@ global void HandleActionReturnGoods(Unit* unit) if( type==UnitTypeHumanTankerFull || type==UnitTypeOrcTankerFull ) { if( !unit->Orders[0].Goal ) { - if( !(destu=FindOilDeposit(unit,unit->X,unit->Y)) ) { + if( !(destu=FindDeposit(unit->Player,unit->X,unit->Y,OilCost)) ) { // No deposit -> can't return unit->Orders[0].Action=UnitActionStill; return; diff --git a/src/action/action_spellcast.cpp b/src/action/action_spellcast.cpp index c2367a4c7..0c75e6ce9 100644 --- a/src/action/action_spellcast.cpp +++ b/src/action/action_spellcast.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/action/action_stand.cpp b/src/action/action_stand.cpp index e79d41635..44af7dfda 100644 --- a/src/action/action_stand.cpp +++ b/src/action/action_stand.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/action/action_still.cpp b/src/action/action_still.cpp index 5b9326412..fbdfc84f5 100644 --- a/src/action/action_still.cpp +++ b/src/action/action_still.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/action/action_train.cpp b/src/action/action_train.cpp index e82f6a153..6231c1515 100644 --- a/src/action/action_train.cpp +++ b/src/action/action_train.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -112,8 +112,12 @@ global void HandleActionTrain(Unit* unit) nunit->X=unit->X; nunit->Y=unit->Y; type=unit->Type; - // Set unit to belong to the building building it. - nunit->Next=unit; + + // Some guy made DropOutOnSide set unit to belong to the building + // training it. This was an ugly hack, setting X and Y is enough, + // no need to add the unit only to be removed. + nunit->X=unit->X; + nunit->Y=unit->Y; DropOutOnSide(nunit,LookingW,type->TileWidth,type->TileHeight); diff --git a/src/action/action_unload.cpp b/src/action/action_unload.cpp index 6d93d2699..826989a61 100644 --- a/src/action/action_unload.cpp +++ b/src/action/action_unload.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -257,6 +257,9 @@ local void LeaveTransporter(Unit* unit) stillonboard=0; goal=unit->Orders[0].Goal; + // + // Goal is the specific unit unit that you want to unload. + // This can be NULL, in case you want to unload everything. DebugLevel3Fn("Goal %p\n" _C_ goal); if( goal ) { unit->Orders[0].Goal=NoUnitP; @@ -271,28 +274,18 @@ local void LeaveTransporter(Unit* unit) RefsDebugCheck( !goal->Refs ); --goal->Refs; RefsDebugCheck( !goal->Refs ); - for( i=0; i<MAX_UNITS_ONBOARD; ++i ) { - if( goal==unit->OnBoard[i] ) { - goal->X=unit->X; - goal->Y=unit->Y; - if( UnloadUnit(goal) ) { - unit->OnBoard[i]=NoUnitP; - unit->Value--; - } - break; - } - } + goal->X=unit->X; + goal->Y=unit->Y; + // Try to unload the unit. If it doesn't work there is no problem. + UnloadUnit(goal); } else { - for( i=0; i<MAX_UNITS_ONBOARD; ++i ) { - if( (goal=unit->OnBoard[i]) ) { - goal->X=unit->X; - goal->Y=unit->Y; - if( UnloadUnit(goal) ) { - unit->OnBoard[i]=NoUnitP; - unit->Value--; - } else { - stillonboard++; - } + // Unload all units. + goal=unit->UnitInside; + for( i=unit->InsideCount; i; --i,goal=goal->NextContained) { + goal->X=unit->X; + goal->Y=unit->Y; + if( !UnloadUnit(goal) ) { + stillonboard++; } } } diff --git a/src/action/action_upgradeto.cpp b/src/action/action_upgradeto.cpp index 73cdc38a3..a8d23e454 100644 --- a/src/action/action_upgradeto.cpp +++ b/src/action/action_upgradeto.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/action/actions.cpp b/src/action/actions.cpp index 4fde356ca..db68b8274 100644 --- a/src/action/actions.cpp +++ b/src/action/actions.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/action/command.cpp b/src/action/command.cpp index 4bbda005b..3b4e0c20a 100644 --- a/src/action/command.cpp +++ b/src/action/command.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/ai/ai.cpp b/src/ai/ai.cpp index 7d595e047..bd83a5228 100644 --- a/src/ai/ai.cpp +++ b/src/ai/ai.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/ai/ai_building.cpp b/src/ai/ai_building.cpp index 4af213bba..e4be6fd57 100644 --- a/src/ai/ai_building.cpp +++ b/src/ai/ai_building.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -443,7 +443,7 @@ local int AiFindHallPlace(const Unit * worker, const UnitType * type, break; } // Town hall near mine - if( units[j]->Type->StoresGold ) { + if( units[j]->Type->Stores[GoldCost] ) { break; } // Town hall may not be near but we may be using it, check @@ -626,14 +626,14 @@ global int AiFindBuildingPlace(const Unit * worker, const UnitType * type, // // Find a good place for a new hall // - if( type->StoresGold && AiFindHallPlace(worker,type,dx,dy) ) { + if( type->Stores[GoldCost] && AiFindHallPlace(worker,type,dx,dy) ) { return 1; } // // Find a place near wood for a lumber mill // - if( type->StoresWood && AiFindLumberMillPlace(worker,type,dx,dy) ) { + if( type->Stores[WoodCost] && AiFindLumberMillPlace(worker,type,dx,dy) ) { return 1; } diff --git a/src/ai/ai_force.cpp b/src/ai/ai_force.cpp index fef04c0b8..e8506623b 100644 --- a/src/ai/ai_force.cpp +++ b/src/ai/ai_force.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -470,8 +470,9 @@ local void AiLoadForce(AiForce* force) } CommandBoard(unit,table[i],FlushCommands); ++o; - if( o==MAX_UNITS_ONBOARD ) { - DebugLevel0Fn("FIXME: next transporter\n"); + // FIXME + if( o==table[i]->Type->MaxOnBoard ) { + DebugLevel0Fn("FIXME: next transporter for AI boarding\n"); return; } } @@ -532,7 +533,6 @@ local void AiWaitLanded(AiForce* force) { AiUnit* aiunit; int i; - int j; DebugLevel0Fn("Waiting\n"); // @@ -544,13 +544,11 @@ local void AiWaitLanded(AiForce* force) if( aiunit->Unit->Type->Transporter ) { if( aiunit->Unit->Orders[0].Action==UnitActionStill ) { DebugLevel0Fn("Unloading\n"); - for( j=0; j<MAX_UNITS_ONBOARD; ++j ) { - if( aiunit->Unit->OnBoard[j] ) { - CommandUnload(aiunit->Unit,force->GoalX,force->GoalY, - NoUnitP,FlushCommands); - i=0; - break; - } + // Don't tell empty transporters to unload. + if (aiunit->Unit->InsideCount) { + CommandUnload(aiunit->Unit,force->GoalX,force->GoalY, + NoUnitP,FlushCommands); + i=0; } } else { i=0; diff --git a/src/ai/ai_local.h b/src/ai/ai_local.h index 891cb152e..dcfe8c137 100644 --- a/src/ai/ai_local.h +++ b/src/ai/ai_local.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/ai/ai_magic.cpp b/src/ai/ai_magic.cpp index 7926063ae..54c9b2ece 100644 --- a/src/ai/ai_magic.cpp +++ b/src/ai/ai_magic.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/ai/ai_plan.cpp b/src/ai/ai_plan.cpp index 0981e3829..7efa1aae2 100644 --- a/src/ai/ai_plan.cpp +++ b/src/ai/ai_plan.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -555,7 +555,7 @@ global int AiPlanAttack(AiForce* force) unit=AiPlayer->Player->Units[i]; if( unit->Type->Transporter && unit->Orders[0].Action==UnitActionStill - && unit->OrderCount==1 && !unit->OnBoard[0] ) { + && unit->OrderCount==1 ) { DebugLevel0Fn("Assign any transporter\n"); AiMarkWaterTransporter(unit,watermatrix); // FIXME: can be the wrong transporter. diff --git a/src/ai/ai_resource.cpp b/src/ai/ai_resource.cpp index ffa90868f..9c515ddad 100644 --- a/src/ai/ai_resource.cpp +++ b/src/ai/ai_resource.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -774,7 +774,7 @@ local Unit* AiFindGoldMine(const Unit* unit) // // Find the nearest gold depot // - if( (destu=FindGoldDeposit(unit,x,y)) ) { + if( (destu=FindDeposit(unit->Player,x,y,GoldCost)) ) { NearestOfUnit(destu,x,y,&destx,&desty); } bestd=99999; @@ -1079,7 +1079,7 @@ local int AiHarvest(Unit * unit) // // Find the nearest wood depot // - if( (destu=FindWoodDeposit(unit->Player,x,y)) ) { + if( (destu=FindDeposit(unit->Player,x,y,WoodCost)) ) { NearestOfUnit(destu,x,y,&destx,&desty); } bestd=99999; diff --git a/src/ai/old_ai.cpp b/src/ai/old_ai.cpp index 4ba48c3e5..25bab9d92 100644 --- a/src/ai/old_ai.cpp +++ b/src/ai/old_ai.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/ai/script_ai.cpp b/src/ai/script_ai.cpp index c2629c1eb..6b7f7f35d 100644 --- a/src/ai/script_ai.cpp +++ b/src/ai/script_ai.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/beos/beos.c b/src/beos/beos.c index 999160b4c..cc1baada2 100644 --- a/src/beos/beos.c +++ b/src/beos/beos.c @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/editor/editloop.cpp b/src/editor/editloop.cpp index 4f52ed3cb..7795d3f77 100644 --- a/src/editor/editloop.cpp +++ b/src/editor/editloop.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/editor/editor.cpp b/src/editor/editor.cpp index 347c4bb1e..1d4ba0432 100644 --- a/src/editor/editor.cpp +++ b/src/editor/editor.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/editor/edmap.cpp b/src/editor/edmap.cpp index 06c24321e..70befdb6a 100644 --- a/src/editor/edmap.cpp +++ b/src/editor/edmap.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/editor/script_editor.cpp b/src/editor/script_editor.cpp index 5b1abaf36..eab9c9f1e 100644 --- a/src/editor/script_editor.cpp +++ b/src/editor/script_editor.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/game/campaign.cpp b/src/game/campaign.cpp index 6847dcaea..2d35902b4 100644 --- a/src/game/campaign.cpp +++ b/src/game/campaign.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/game/game.cpp b/src/game/game.cpp index b71b6bc98..dbd6f4778 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -529,10 +529,10 @@ global void CreateGame(char* filename, WorldMap* map) for( i=0; i<NumUnits; ++i ) { // I don't really think that there can be any rescued // units at this point. - if (Units[i]->Rescued) { - Units[i]->Colors=Units[i]->RescuedFrom->UnitColors; + if (Units[i]->RescuedFrom) { + Units[i]->Colors=&Units[i]->RescuedFrom->UnitColors; } else { - Units[i]->Colors=Units[i]->Player->UnitColors; + Units[i]->Colors=&Units[i]->Player->UnitColors; } } diff --git a/src/game/intro.cpp b/src/game/intro.cpp index dcd3c0da9..b2a59351b 100644 --- a/src/game/intro.cpp +++ b/src/game/intro.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/game/loadgame.cpp b/src/game/loadgame.cpp index 5e02cc5f9..717a5e3d4 100644 --- a/src/game/loadgame.cpp +++ b/src/game/loadgame.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/game/savegame.cpp b/src/game/savegame.cpp index dc1129c4c..b725a38d5 100644 --- a/src/game/savegame.cpp +++ b/src/game/savegame.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/game/trigger.cpp b/src/game/trigger.cpp index 43becc99e..3976270d6 100644 --- a/src/game/trigger.cpp +++ b/src/game/trigger.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -492,7 +492,7 @@ local SCM CclIfRescuedNearUnit(SCM player,SCM operation,SCM quantity,SCM unit, // for( j=s=0; j<an; ++j ) { unit=around[j]; - if( unit->Rescued ) { // only rescued units + if( unit->RescuedFrom ) { // only rescued units // // Check unit type // diff --git a/src/include/actions.h b/src/include/actions.h index bd589d1d2..2fa77cfba 100644 --- a/src/include/actions.h +++ b/src/include/actions.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/ai.h b/src/include/ai.h index 89e913e74..1ca8007ea 100644 --- a/src/include/ai.h +++ b/src/include/ai.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/avi.h b/src/include/avi.h index 5046329ce..46f5944e3 100644 --- a/src/include/avi.h +++ b/src/include/avi.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/campaign.h b/src/include/campaign.h index 57d52540b..0e843377f 100644 --- a/src/include/campaign.h +++ b/src/include/campaign.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/cdaudio.h b/src/include/cdaudio.h index 81f1fdd52..ec8de18db 100644 --- a/src/include/cdaudio.h +++ b/src/include/cdaudio.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/commands.h b/src/include/commands.h index 16a43f46d..da0831cde 100644 --- a/src/include/commands.h +++ b/src/include/commands.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/construct.h b/src/include/construct.h index fd09b1f96..61de16f31 100644 --- a/src/include/construct.h +++ b/src/include/construct.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/cursor.h b/src/include/cursor.h index 14330da32..881df1b5f 100644 --- a/src/include/cursor.h +++ b/src/include/cursor.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/deco.h b/src/include/deco.h index c8420e8e4..fb1efe1b7 100644 --- a/src/include/deco.h +++ b/src/include/deco.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/depend.h b/src/include/depend.h index 0ab07fc25..916e05096 100644 --- a/src/include/depend.h +++ b/src/include/depend.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/editor.h b/src/include/editor.h index fb21676ac..1914edd66 100644 --- a/src/include/editor.h +++ b/src/include/editor.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/fc_types.h b/src/include/fc_types.h index 81f9b4c37..96e40aa4c 100644 --- a/src/include/fc_types.h +++ b/src/include/fc_types.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/font.h b/src/include/font.h index 44f7f3b03..6e7f97c54 100644 --- a/src/include/font.h +++ b/src/include/font.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/icons.h b/src/include/icons.h index 835997463..7301c4c41 100644 --- a/src/include/icons.h +++ b/src/include/icons.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/interface.h b/src/include/interface.h index dc391007f..c63807a28 100644 --- a/src/include/interface.h +++ b/src/include/interface.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/iocompat.h b/src/include/iocompat.h index 020630dd9..fd6171fa4 100644 --- a/src/include/iocompat.h +++ b/src/include/iocompat.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/iolib.h b/src/include/iolib.h index 537f12083..b29c026be 100644 --- a/src/include/iolib.h +++ b/src/include/iolib.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/map.h b/src/include/map.h index 2ab72c53d..bd5637c7d 100644 --- a/src/include/map.h +++ b/src/include/map.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/master.h b/src/include/master.h index 8d4bf5cc2..e68193407 100644 --- a/src/include/master.h +++ b/src/include/master.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/menus.h b/src/include/menus.h index ed4474a15..c5bf9dbd1 100644 --- a/src/include/menus.h +++ b/src/include/menus.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/minimap.h b/src/include/minimap.h index e1f0b9a03..a83df8961 100644 --- a/src/include/minimap.h +++ b/src/include/minimap.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/missile.h b/src/include/missile.h index a481739da..833c242f5 100644 --- a/src/include/missile.h +++ b/src/include/missile.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/movie.h b/src/include/movie.h index fa0dc03c2..20d8e960f 100644 --- a/src/include/movie.h +++ b/src/include/movie.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/myendian.h b/src/include/myendian.h index 18fd6074f..4a17a7860 100644 --- a/src/include/myendian.h +++ b/src/include/myendian.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/net_lowlevel.h b/src/include/net_lowlevel.h index 937feedab..a66894d3b 100644 --- a/src/include/net_lowlevel.h +++ b/src/include/net_lowlevel.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/netconnect.h b/src/include/netconnect.h index cba2ad431..0f4a39bb9 100644 --- a/src/include/netconnect.h +++ b/src/include/netconnect.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/network.h b/src/include/network.h index 0990da090..a92831b08 100644 --- a/src/include/network.h +++ b/src/include/network.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/pathfinder.h b/src/include/pathfinder.h index 2c16afc4c..1dc47754f 100644 --- a/src/include/pathfinder.h +++ b/src/include/pathfinder.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/player.h b/src/include/player.h index 38015aada..577c3879e 100644 --- a/src/include/player.h +++ b/src/include/player.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/pud.h b/src/include/pud.h index 7a8d325e1..277c185ea 100644 --- a/src/include/pud.h +++ b/src/include/pud.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/script.h b/src/include/script.h index 80a1c904d..0572ee0c0 100644 --- a/src/include/script.h +++ b/src/include/script.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/script_sound.h b/src/include/script_sound.h index 78be80f6e..6e76e97c2 100644 --- a/src/include/script_sound.h +++ b/src/include/script_sound.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/settings.h b/src/include/settings.h index 3bde9b1d6..b785b69d1 100644 --- a/src/include/settings.h +++ b/src/include/settings.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/sound.h b/src/include/sound.h index 1c03bbefc..82853e91c 100644 --- a/src/include/sound.h +++ b/src/include/sound.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/sound_id.h b/src/include/sound_id.h index dc28cf1a2..53bdfe3f6 100644 --- a/src/include/sound_id.h +++ b/src/include/sound_id.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/sound_server.h b/src/include/sound_server.h index a067fe0af..090b15f9b 100644 --- a/src/include/sound_server.h +++ b/src/include/sound_server.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/spells.h b/src/include/spells.h index 6ba81ce22..044501231 100644 --- a/src/include/spells.h +++ b/src/include/spells.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/stratagus.h b/src/include/stratagus.h index 47cbd3ece..16c13978f 100644 --- a/src/include/stratagus.h +++ b/src/include/stratagus.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/tileset.h b/src/include/tileset.h index 7aa5dbe02..e74601eab 100644 --- a/src/include/tileset.h +++ b/src/include/tileset.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/trigger.h b/src/include/trigger.h index e1146e375..3be1785e8 100644 --- a/src/include/trigger.h +++ b/src/include/trigger.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/ui.h b/src/include/ui.h index 138a3db9b..a8bf3566d 100644 --- a/src/include/ui.h +++ b/src/include/ui.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/unit.h b/src/include/unit.h index 1424618ad..bbb5dd5c1 100644 --- a/src/include/unit.h +++ b/src/include/unit.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -87,10 +87,33 @@ ** ** A generic link pointer. This member is currently used, if an ** unit is on the map, to link all units on the same map field -** together. This member points the the unit that the current -** is onboard/inside when a unit is removed (see Unit::Removed). -** F.E.: A worker is removed, if he is in a mine or depot. -** Or an unit is on board a transporter. +** together. This also links corpses and stuff. Also, this is +** used in memory management to link unused units. +** +** Unit::Container +** +** Pointer to the unit containing it, or NoUnitP if the unit is +** free. This points to the transporter for units on board, or to +** the building for peasants inside(when they are mining). +** +** Unit::UnitInside +** +** Pointer to the last unit added inside. Order doesn't really +** matter. All units inside are kept in a circular linked list. +** This is NoUnitP if there are no units inside. Multiple levels +** of inclusion are allowed, though not very usefull right now +** +** Unit::NextContained, Unit::PrevContained +** +** The next and previous element in the curent container. Bogus +** values allowed for units not contained. +** +** Unit::InsideCount +** +** The number of units inside the container. This used to be +** Value for transporters, but since gold mines also use this +** field, it has changed to InsideCount, to allow counting +** units inside a gold mine.) ** ** Unit::Name ** @@ -137,7 +160,7 @@ ** ** Player colors of the unit. Contains the hardware dependent ** pixel values for the player colors (palette index #208-#211). -** Setup from the global palette. +** Setup from the global palette. This is a pointer. ** @note Index #208-#211 are various SHADES of the team color ** (#208 is brightest shade, #211 is darkest shade) .... these ** numbers are NOT red=#208, blue=#209, etc @@ -286,8 +309,10 @@ ** Unit::Moving ** ** -** Unit::Rs +** Unit::RescuedFrom ** +** Pointer to the original owner of an unit. It will be NULL if +** the unit was not rescued. ** ** Unit::Revealer ** @@ -480,7 +505,14 @@ struct _unit_ { int Slot; /// Assigned slot number Unit** UnitSlot; /// Slot pointer of Units Unit** PlayerSlot; /// Slot pointer of Player->Units - Unit* Next; /// Generic link pointer (on map) + + Unit* Next; /// Generic link pointer (on map) + + unsigned InsideCount; /// Number of units inside. + Unit* UnitInside; /// Pointer to one of the units inside. + Unit* Container; /// Pointer to the unit containing it (or 0) + Unit* NextContained; /// Next unit in the container. + Unit* PrevContained; /// Previous unit in the container. char* Name; /// Unit own name @@ -494,7 +526,7 @@ struct _unit_ { int CurrentSightRange; /// Unit's Current Sight Range // DISPLAY: - UnitColors Colors; /// Player colors + UnitColors* Colors; /// Player colors signed char IX; /// X image displacement to map position signed char IY; /// Y image displacement to map position int Frame; /// Image frame: <0 is mirrored @@ -517,8 +549,8 @@ struct _unit_ { unsigned SeenState : 3; /// Unit seen build/upgrade state unsigned SeenDestroyed : 1; /// Unit seen destroyed or not unsigned Active : 1; /// Unit is active for AI - unsigned Rescued : 1; /// Unit is rescued Player* RescuedFrom; /// The original owner of a rescued unit. + /// NULL if the unit was not rescued. #define MaxMana 255 /// maximal mana for units unsigned Mana : 8; /// mana points @@ -553,9 +585,11 @@ struct _unit_ { unsigned Rs : 8; unsigned Revealer : 1; /// reveal the fog of war +#if 0 #define MAX_UNITS_ONBOARD 6 /// max number of units in transporter // FIXME: use the new next pointer Unit* OnBoard[MAX_UNITS_ONBOARD]; /// Units in transporter +#endif #define MAX_ORDERS 16 /// How many outstanding orders? char OrderCount; /// how many orders in queue @@ -737,6 +771,10 @@ extern Unit* MakeUnit(UnitType* type,Player* player); extern void PlaceUnit(Unit* unit,int x,int y); /// Create a new unit and place on map extern Unit* MakeUnitAndPlace(int x,int y,UnitType* type,Player* player); + /// Add an unit inside a container. Only deal with list stuff. +extern void AddUnitInContainer(Unit* unit, Unit* host); + /// Remove an unit from inside a container. Only deals with list stuff. +extern void RemoveUnitFromContainer(Unit* unit); /// Remove unit from map/groups/... extern void RemoveUnit(Unit* unit, Unit* host); /// Handle the loose of an unit (food,...) @@ -802,20 +840,16 @@ extern int CanBuildOn(int x,int y,int mask); /// FIXME: more docu extern int CanBuildUnitType(const Unit* unit,const UnitType* type,int x,int y); - /// Find nearest gold mine -extern Unit* FindGoldMine(const Unit*,int,int); - /// Find nearest gold deposit -extern Unit* FindGoldDeposit(const Unit*,int,int); - /// Find nearest wood deposit -extern Unit* FindWoodDeposit(const Player* player,int x,int y); - /// Find nearest oil deposit -extern Unit* FindOilDeposit(const Unit*,int x,int y); + /// Find nearest deposit +extern Unit* FindDeposit(const Player*,int x,int y,int resource); /// Find the next idle worker extern Unit* FindIdleWorker(const Player* player,const Unit* last); /// Find the nearest piece of wood in sight range extern int FindWoodInSight(const Unit* unit,int* x,int* y); - /// FIXME: more docu + /// Find gold mine +extern Unit* FindGoldMine(const Unit* unit,int x,int y); + /// Find oil platform extern Unit* FindOilPlatform(const Player* player,int x,int y); /// FIXME: more docu @@ -938,7 +972,6 @@ extern int FindAndSortUnits(const Viewport* vp, Unit** table); extern int SelectUnits(int x1,int y1,int x2,int y2,Unit** table); /// Select units on map tile extern int SelectUnitsOnTile(int x,int y,Unit** table); - /// Find all units of this type extern int FindUnitsByType(const UnitType* type,Unit** table); /// Find all units of this type of the player @@ -962,16 +995,12 @@ extern Unit* TransporterOnScreenMapPosition (int , int ); /// Return gold mine, if on map tile extern Unit* GoldMineOnMap(int tx,int ty); - /// Return gold deposit, if on map tile -extern Unit* GoldDepositOnMap(int tx,int ty); /// Return oil patch, if on map tile extern Unit* OilPatchOnMap(int tx,int ty); /// Return oil platform, if on map tile extern Unit* PlatformOnMap(int tx,int ty); - /// Return oil deposit, if on map tile -extern Unit* OilDepositOnMap(int tx,int ty); - /// Return wood deposit, if on map tile -extern Unit* WoodDepositOnMap(int tx,int ty); + /// Return resource deposit, if on map tile +extern Unit* ResourceDepositOnMap(int tx,int ty,int resource); /// Find best enemy in numeric range to attack extern Unit* AttackUnitsInDistance(Unit* unit,int range); diff --git a/src/include/unitsound.h b/src/include/unitsound.h index caba331e7..4f75b5241 100644 --- a/src/include/unitsound.h +++ b/src/include/unitsound.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/unittype.h b/src/include/unittype.h index 86063cb57..82991783c 100644 --- a/src/include/unittype.h +++ b/src/include/unittype.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -298,6 +298,10 @@ ** ** Can transport units ** +** UnitType::MaxOnBoard +** +** Maximum units on board (for transporters) +** ** UnitType::GivesOil ** ** We get here oil @@ -585,20 +589,22 @@ struct _unit_type_ { unsigned CowerWorker : 1; /// Is a worker, runs away if attcked unsigned Tanker : 1; /// FIXME: used? Can transport oil unsigned Transporter : 1; /// Can transport units + unsigned MaxOnBoard; /// Number of Transporter slots. unsigned GivesOil : 1; /// We get here oil +/* unsigned StoresWood : 1; /// We can store wood here unsigned StoresGold : 1; /// We can store oil/gold/wood here + unsigned StoresOil : 1; /// We can store oil here*/ + unsigned Stores[MaxCosts]; /// Resources that we can store here. unsigned Vanishes : 1; /// Corpes & destroyed places unsigned GroundAttack : 1; /// Can do command ground attack unsigned IsUndead : 1; /// Unit is already dead unsigned ShoreBuilding : 1; /// Building must be build on coast unsigned CanCastSpell : 1; /// Unit is able to use spells - unsigned StoresWood : 1; /// We can store wood here unsigned CanAttack : 1; /// Unit can attack unsigned Tower : 1; /// Unit can attack, but not move unsigned OilPatch : 1; /// Platform can be build here unsigned GoldMine : 1; /// Gold can be collected here unsigned Hero : 1; /// Is hero only used for triggers - unsigned StoresOil : 1; /// We can store oil here unsigned Volatile : 1; /// Invisiblity/unholy armor kills unit unsigned CowerMage : 1; /// FIXME: docu unsigned Organic : 1; /// Organic can be healed diff --git a/src/include/upgrade.h b/src/include/upgrade.h index d57383bca..94a7cee1e 100644 --- a/src/include/upgrade.h +++ b/src/include/upgrade.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/include/upgrade_structs.h b/src/include/upgrade_structs.h index 4e89c2c95..4e10c36c0 100644 --- a/src/include/upgrade_structs.h +++ b/src/include/upgrade_structs.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -48,7 +48,6 @@ -- Declarations ----------------------------------------------------------------------------*/ - /** ** Indices into costs/resource/income array. (A litte future here :) */ @@ -65,7 +64,7 @@ enum _costs_ { CoalCost, /// coal resource MaxCosts /// how many different costs -}; +} CostType; #define FoodCost MaxCosts #define ScoreCost MaxCosts+1 diff --git a/src/include/video.h b/src/include/video.h index 553063902..d1e49cf39 100644 --- a/src/include/video.h +++ b/src/include/video.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/map/map.cpp b/src/map/map.cpp index cfca60b32..6e6bfb4f5 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/map/map_draw.cpp b/src/map/map_draw.cpp index 6218c4f9e..151ce2e9c 100644 --- a/src/map/map_draw.cpp +++ b/src/map/map_draw.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/map/map_fog.cpp b/src/map/map_fog.cpp index cef37c270..fe1156419 100644 --- a/src/map/map_fog.cpp +++ b/src/map/map_fog.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/map/map_rock.cpp b/src/map/map_rock.cpp index a36ad5102..2c73f61f5 100644 --- a/src/map/map_rock.cpp +++ b/src/map/map_rock.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/map/map_save.cpp b/src/map/map_save.cpp index 928c046d2..99eb4a5f2 100644 --- a/src/map/map_save.cpp +++ b/src/map/map_save.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/map/map_wall.cpp b/src/map/map_wall.cpp index b178b26bc..c725b0192 100644 --- a/src/map/map_wall.cpp +++ b/src/map/map_wall.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/map/map_wood.cpp b/src/map/map_wood.cpp index 29d73d6b9..935b2a6c5 100644 --- a/src/map/map_wood.cpp +++ b/src/map/map_wood.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/map/minimap.cpp b/src/map/minimap.cpp index fb78b02f6..3562d5e11 100644 --- a/src/map/minimap.cpp +++ b/src/map/minimap.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/map/script_map.cpp b/src/map/script_map.cpp index f8e8be424..a0b2bb9e2 100644 --- a/src/map/script_map.cpp +++ b/src/map/script_map.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/map/script_tileset.cpp b/src/map/script_tileset.cpp index 3b68b6760..e8aa7f51f 100644 --- a/src/map/script_tileset.cpp +++ b/src/map/script_tileset.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/map/tileset.cpp b/src/map/tileset.cpp index a2cb7841e..de637c077 100644 --- a/src/map/tileset.cpp +++ b/src/map/tileset.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/network/commands.cpp b/src/network/commands.cpp index f0dc092e6..e1c3cd4be 100644 --- a/src/network/commands.cpp +++ b/src/network/commands.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/network/lowlevel.cpp b/src/network/lowlevel.cpp index 776278826..6b60c200e 100644 --- a/src/network/lowlevel.cpp +++ b/src/network/lowlevel.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -256,7 +256,8 @@ global unsigned long NetResolveHost(const char* host) if( addr==INADDR_NONE ) { struct hostent *he; - he=gethostbyname(host); + he=0; +// he=gethostbyname(host); if( he ) { addr=0; DebugCheck( he->h_length!=4 ); diff --git a/src/network/master.cpp b/src/network/master.cpp index 17276ccd1..6d2e312d7 100644 --- a/src/network/master.cpp +++ b/src/network/master.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/network/netconnect.cpp b/src/network/netconnect.cpp index efc2b440b..676b8b803 100644 --- a/src/network/netconnect.cpp +++ b/src/network/netconnect.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/network/network.cpp b/src/network/network.cpp index b209f2260..a0e6d9184 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/pathfinder/astar.cpp b/src/pathfinder/astar.cpp index 4ab77fbeb..1d6dfb406 100644 --- a/src/pathfinder/astar.cpp +++ b/src/pathfinder/astar.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/pathfinder/floodfill.cpp b/src/pathfinder/floodfill.cpp index c49731328..6c840c662 100644 --- a/src/pathfinder/floodfill.cpp +++ b/src/pathfinder/floodfill.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/pathfinder/hierarchical.h b/src/pathfinder/hierarchical.h index 05c4013ac..140e3ca0d 100644 --- a/src/pathfinder/hierarchical.h +++ b/src/pathfinder/hierarchical.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/pathfinder/pathfinder.cpp b/src/pathfinder/pathfinder.cpp index 8448bc3c7..bd91764c4 100644 --- a/src/pathfinder/pathfinder.cpp +++ b/src/pathfinder/pathfinder.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/pathfinder/pf_lowlevel.cpp b/src/pathfinder/pf_lowlevel.cpp index 4c5cf451c..35f447025 100644 --- a/src/pathfinder/pf_lowlevel.cpp +++ b/src/pathfinder/pf_lowlevel.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/pathfinder/region_groups.cpp b/src/pathfinder/region_groups.cpp index d4c10cb0c..ee0e0e10e 100644 --- a/src/pathfinder/region_groups.cpp +++ b/src/pathfinder/region_groups.cpp @@ -1,8 +1,7 @@ - // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/pathfinder/script_pathfinder.cpp b/src/pathfinder/script_pathfinder.cpp index e34d04f36..8ef38b641 100644 --- a/src/pathfinder/script_pathfinder.cpp +++ b/src/pathfinder/script_pathfinder.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/sound/arts_audio.cpp b/src/sound/arts_audio.cpp index 5df942684..856b9d45c 100644 --- a/src/sound/arts_audio.cpp +++ b/src/sound/arts_audio.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/sound/cdaudio.cpp b/src/sound/cdaudio.cpp index 2680ff5fb..bc42bca1a 100644 --- a/src/sound/cdaudio.cpp +++ b/src/sound/cdaudio.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/sound/cdda.cpp b/src/sound/cdda.cpp index cc0196281..f72b6c5d0 100644 --- a/src/sound/cdda.cpp +++ b/src/sound/cdda.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/sound/flac.cpp b/src/sound/flac.cpp index 295425810..63fd4e79f 100644 --- a/src/sound/flac.cpp +++ b/src/sound/flac.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/sound/mad.cpp b/src/sound/mad.cpp index 276ba3715..b9fe35e5f 100644 --- a/src/sound/mad.cpp +++ b/src/sound/mad.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/sound/music.cpp b/src/sound/music.cpp index c0cb01e87..7ff6f145f 100644 --- a/src/sound/music.cpp +++ b/src/sound/music.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/sound/ogg.cpp b/src/sound/ogg.cpp index f8d5d50d5..cc67eeec8 100644 --- a/src/sound/ogg.cpp +++ b/src/sound/ogg.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/sound/oss_audio.cpp b/src/sound/oss_audio.cpp index 0856dd4ed..69085adba 100644 --- a/src/sound/oss_audio.cpp +++ b/src/sound/oss_audio.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/sound/script_sound.cpp b/src/sound/script_sound.cpp index e6c830bfc..cc2ff2806 100644 --- a/src/sound/script_sound.cpp +++ b/src/sound/script_sound.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/sound/sdl_audio.cpp b/src/sound/sdl_audio.cpp index 33115f22f..e7c5d944e 100644 --- a/src/sound/sdl_audio.cpp +++ b/src/sound/sdl_audio.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/sound/sound.cpp b/src/sound/sound.cpp index 08c79048e..98abced61 100644 --- a/src/sound/sound.cpp +++ b/src/sound/sound.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/sound/sound_id.cpp b/src/sound/sound_id.cpp index dbf306a6d..adf2fe1f7 100644 --- a/src/sound/sound_id.cpp +++ b/src/sound/sound_id.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/sound/sound_server.cpp b/src/sound/sound_server.cpp index 994addb03..f64009c06 100644 --- a/src/sound/sound_server.cpp +++ b/src/sound/sound_server.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/sound/unitsound.cpp b/src/sound/unitsound.cpp index 8299bf3e5..65309cf4a 100644 --- a/src/sound/unitsound.cpp +++ b/src/sound/unitsound.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/sound/wav.cpp b/src/sound/wav.cpp index f8c7af318..dcb26c090 100644 --- a/src/sound/wav.cpp +++ b/src/sound/wav.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/stratagus/construct.cpp b/src/stratagus/construct.cpp index 172b9efd1..3b5a24dfb 100644 --- a/src/stratagus/construct.cpp +++ b/src/stratagus/construct.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/stratagus/groups.cpp b/src/stratagus/groups.cpp index 31370d8d0..99543a8b9 100644 --- a/src/stratagus/groups.cpp +++ b/src/stratagus/groups.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/stratagus/iolib.cpp b/src/stratagus/iolib.cpp index 91cb95d80..487eb0138 100644 --- a/src/stratagus/iolib.cpp +++ b/src/stratagus/iolib.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/stratagus/mainloop.cpp b/src/stratagus/mainloop.cpp index 6d80db3ae..77a0792ad 100644 --- a/src/stratagus/mainloop.cpp +++ b/src/stratagus/mainloop.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/stratagus/missile.cpp b/src/stratagus/missile.cpp index 4ccb0e01e..e16b55240 100644 --- a/src/stratagus/missile.cpp +++ b/src/stratagus/missile.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/stratagus/player.cpp b/src/stratagus/player.cpp index 8b39fe70f..f30542b66 100644 --- a/src/stratagus/player.cpp +++ b/src/stratagus/player.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/stratagus/pud.cpp b/src/stratagus/pud.cpp index 7940925fb..d2823b427 100644 --- a/src/stratagus/pud.cpp +++ b/src/stratagus/pud.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/stratagus/scm.cpp b/src/stratagus/scm.cpp index 929c7e767..a972345bc 100644 --- a/src/stratagus/scm.cpp +++ b/src/stratagus/scm.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/stratagus/script.cpp b/src/stratagus/script.cpp index cf8345ae9..b02a8da76 100644 --- a/src/stratagus/script.cpp +++ b/src/stratagus/script.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/stratagus/script_missile.cpp b/src/stratagus/script_missile.cpp index 686d97c8d..4a2c35157 100644 --- a/src/stratagus/script_missile.cpp +++ b/src/stratagus/script_missile.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/stratagus/script_player.cpp b/src/stratagus/script_player.cpp index 23725b827..469b73259 100644 --- a/src/stratagus/script_player.cpp +++ b/src/stratagus/script_player.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/stratagus/selection.cpp b/src/stratagus/selection.cpp index 70fb93c43..1214a073e 100644 --- a/src/stratagus/selection.cpp +++ b/src/stratagus/selection.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/stratagus/spells.cpp b/src/stratagus/spells.cpp index 1ea47e55c..b68a9cb42 100644 --- a/src/stratagus/spells.cpp +++ b/src/stratagus/spells.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/stratagus/stratagus.cpp b/src/stratagus/stratagus.cpp index 1afb735be..b9bcc05a9 100644 --- a/src/stratagus/stratagus.cpp +++ b/src/stratagus/stratagus.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/ui/botpanel.cpp b/src/ui/botpanel.cpp index 796a40c88..e9d16094f 100644 --- a/src/ui/botpanel.cpp +++ b/src/ui/botpanel.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -820,7 +820,7 @@ global void UpdateButtonPanel(void) buttonaction->ValueStr )=='R'; break; case ButtonUnload: - allow = Selected[0]->Value; + allow = (Selected[0]->Type->Transporter&&Selected[0]->InsideCount); break; case ButtonCancel: allow = 1; diff --git a/src/ui/button_checks.cpp b/src/ui/button_checks.cpp index 3dfa3b928..10f0cdf40 100644 --- a/src/ui/button_checks.cpp +++ b/src/ui/button_checks.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/ui/console.cpp b/src/ui/console.cpp index ef84efb72..54796bb1a 100644 --- a/src/ui/console.cpp +++ b/src/ui/console.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/ui/icons.cpp b/src/ui/icons.cpp index 7aef6f606..1d34577fc 100644 --- a/src/ui/icons.cpp +++ b/src/ui/icons.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp index 929d26c22..f573a52b7 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/ui/mainscr.cpp b/src/ui/mainscr.cpp index 917864b94..63f98f06d 100644 --- a/src/ui/mainscr.cpp +++ b/src/ui/mainscr.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -183,6 +183,7 @@ global void DrawUnitInfo(const Unit* unit) int i; int x; int y; + Unit* uins; type=unit->Type; stats=unit->Stats; @@ -279,7 +280,7 @@ global void DrawUnitInfo(const Unit* unit) // Draw unit kills and experience. // if( !OriginalLevel && stats->Level - && !(type->Transporter && unit->Value) ) { + && !(type->Transporter && unit->InsideCount) ) { sprintf(buf,"XP:~<%d~> Kills:~<%d~>",unit->XP,unit->Kills); VideoDrawTextCentered(x+114,y+8+15+33,GameFont,buf); } @@ -367,7 +368,7 @@ global void DrawUnitInfo(const Unit* unit) } } - if( type->StoresWood ) { + if( type->Stores[WoodCost] ) { VideoDrawText(x+20,y+8+78,GameFont,"Production"); VideoDrawText(x+22,y+8+93,GameFont,"Lumber:"); // I'm assuming that it will be short enough to fit in the space @@ -385,7 +386,7 @@ global void DrawUnitInfo(const Unit* unit) VideoDrawText(x+120,y+8+93,GameFont,buf); return; - } else if( type->StoresOil ) { + } else if( type->Stores[OilCost] ) { VideoDrawText(x+20,y+8+78,GameFont,"Production"); VideoDrawText(x+54,y+8+93,GameFont,"Oil:"); VideoDrawNumber(x+78,y+8+93,GameFont,DefaultIncomes[OilCost]); @@ -398,7 +399,7 @@ global void DrawUnitInfo(const Unit* unit) VideoDrawText(x+120,y+8+93,GameFont,buf); return; - } else if( type->StoresGold ) { + } else if( type->Stores[GoldCost] ) { VideoDrawText(x+20,y+8+61,GameFont,"Production"); VideoDrawText(x+43,y+8+77,GameFont,"Gold:"); VideoDrawNumber(x+78,y+8+77,GameFont,DefaultIncomes[GoldCost]); @@ -433,30 +434,25 @@ global void DrawUnitInfo(const Unit* unit) VideoDrawText(x+120,y+8+109,GameFont,buf); return; - } else if( type->Transporter && unit->Value ) { - for( i=0; i<6; ++i ) { - if( unit->OnBoard[i]!=NoUnitP ) { - DrawUnitIcon(unit->Player - ,unit->OnBoard[i]->Type->Icon.Icon + } else if( type->Transporter && unit->InsideCount ) { + uins=unit->UnitInside; + for( i=0; i<unit->InsideCount; ++i,uins=uins->NextContained ) { + DrawUnitIcon(unit->Player + ,uins->Type->Icon.Icon ,(ButtonAreaUnderCursor==ButtonAreaInfo && ButtonUnderCursor==i+3) - ? (IconActive|(MouseButtons&LeftButton)) : 0 + ? (IconActive|(MouseButtons&LeftButton)) : 0 ,TheUI.InfoButtons[i+3].X,TheUI.InfoButtons[i+3].Y); - UiDrawLifeBar(unit->OnBoard[i] - ,TheUI.InfoButtons[i+3].X,TheUI.InfoButtons[i+3].Y); - if( unit->OnBoard[i]->Type->CanCastSpell ) { - UiDrawManaBar(unit->OnBoard[i] - ,TheUI.InfoButtons[i+3].X,TheUI.InfoButtons[i+3].Y); - } - if( ButtonAreaUnderCursor==ButtonAreaInfo && ButtonUnderCursor==i+3 ) { - if( unit->OnBoard[i]->Name ) { - char buf[128]; - - sprintf(buf,"%s %s",unit->OnBoard[i]->Type->Name, - unit->OnBoard[i]->Name); - SetStatusLine(buf); - } else { - SetStatusLine(unit->OnBoard[i]->Type->Name); - } + UiDrawLifeBar(uins,TheUI.InfoButtons[i+3].X,TheUI.InfoButtons[i+3].Y); + if( uins->Type->CanCastSpell ) { + UiDrawManaBar(uins,TheUI.InfoButtons[i+3].X,TheUI.InfoButtons[i+3].Y); + } + if( ButtonAreaUnderCursor==ButtonAreaInfo && ButtonUnderCursor==i+3 ) { + if( uins->Name ) { + char buf[128]; + sprintf(buf,"%s %s",uins->Type->Name,uins->Name); + SetStatusLine(buf); + } else { + SetStatusLine(uins->Type->Name); } } } diff --git a/src/ui/menu_defs.inc b/src/ui/menu_defs.inc index e97d3db2c..a09232c30 100644 --- a/src/ui/menu_defs.inc +++ b/src/ui/menu_defs.inc @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/ui/menu_proc.cpp b/src/ui/menu_proc.cpp index b9d622a9e..e921f7aa4 100644 --- a/src/ui/menu_proc.cpp +++ b/src/ui/menu_proc.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/ui/menus.cpp b/src/ui/menus.cpp index a0d4753a4..e1d9e0463 100644 --- a/src/ui/menus.cpp +++ b/src/ui/menus.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/ui/mouse.cpp b/src/ui/mouse.cpp index 3176fb3b9..8d93191bd 100644 --- a/src/ui/mouse.cpp +++ b/src/ui/mouse.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -206,14 +206,14 @@ global void DoRightButton(int sx,int sy) if( UnitUnderCursor && (dest=UnitOnMapTile(x,y)) ) { if( dest->Player==unit->Player ) { dest->Blink=4; - if( dest->Type->StoresGold + if( dest->Type->Stores[GoldCost] && (type==UnitTypeOrcWorkerWithGold || type==UnitTypeHumanWorkerWithGold) ) { DebugLevel3("GOLD-DEPOSIT\n"); SendCommandReturnGoods(unit,dest,flush); continue; } - if( (dest->Type->StoresWood || dest->Type->StoresGold) + if( (dest->Type->Stores[WoodCost]) && (type==UnitTypeOrcWorkerWithWood || type==UnitTypeHumanWorkerWithWood) ) { DebugLevel3("WOOD-DEPOSIT\n"); @@ -278,7 +278,7 @@ global void DoRightButton(int sx,int sy) if( UnitUnderCursor && (dest=UnitOnMapTile(x,y)) && dest->Player==unit->Player ) { dest->Blink=4; - if( dest->Type->StoresOil ) { + if( dest->Type->Stores[OilCost] ) { DebugLevel3("OIL-DEPOSIT\n"); SendCommandReturnGoods(unit,dest,flush); continue; @@ -1326,6 +1326,8 @@ global void UIHandleButtonDown(unsigned button) static int OldShowAttackRange; static int OldShowReactionRange; static int OldValid; + Unit* uins; + int i; /** ** Detect long selection click, FIXME: tempory hack to test the feature. @@ -1533,11 +1535,16 @@ global void UIHandleButtonDown(unsigned button) } else if( ButtonUnderCursor>2 && ButtonUnderCursor<9 ) { if( NumSelected==1 && Selected[0]->Type->Transporter ) { if( !GameObserve && !GamePaused ) { - if( Selected[0]->OnBoard[ButtonUnderCursor-3] ) { + if (Selected[0]->InsideCount>=ButtonUnderCursor-3) { + // FIXME: should check if valid here. + // n0b0dy: check WHAT? + uins=Selected[0]->UnitInside; + for (i=0;i<ButtonUnderCursor-3;i++) + uins=uins->NextContained; SendCommandUnload(Selected[0], Selected[0]->X,Selected[0]->Y, - Selected[0]->OnBoard[ButtonUnderCursor-3], + uins, !(KeyModifiers&ModifierShift)); } } diff --git a/src/ui/script_ui.cpp b/src/ui/script_ui.cpp index 9adb75f1f..da99138ef 100644 --- a/src/ui/script_ui.cpp +++ b/src/ui/script_ui.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/ui/ui.cpp b/src/ui/ui.cpp index 81f8763e2..1d567ced7 100644 --- a/src/ui/ui.cpp +++ b/src/ui/ui.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/unit/depend.cpp b/src/unit/depend.cpp index 64985959a..4d265a3ad 100644 --- a/src/unit/depend.cpp +++ b/src/unit/depend.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/unit/script_unit.cpp b/src/unit/script_unit.cpp index 9f326a9e0..345033a5a 100644 --- a/src/unit/script_unit.cpp +++ b/src/unit/script_unit.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -515,6 +515,7 @@ local SCM CclUnit(SCM list) Player* player; int slot; int i; + int insidecount=-1; char* str; char* s; @@ -526,6 +527,7 @@ local SCM CclUnit(SCM list) type=NULL; seentype=NULL; player=NULL; + i=0; // // Parse the list: (still everything could be changed!) @@ -628,8 +630,6 @@ local SCM CclUnit(SCM list) unit->Removed=1; } else if( gh_eq_p(value,gh_symbol2scm("selected")) ) { unit->Selected=1; - } else if( gh_eq_p(value,gh_symbol2scm("rescued")) ) { - unit->Rescued=1; } else if( gh_eq_p(value,gh_symbol2scm("rescued-from")) ) { unit->RescuedFrom=&Players[gh_scm2int(gh_car(list))]; list=gh_cdr(list); @@ -719,16 +719,18 @@ local SCM CclUnit(SCM list) list=gh_cdr(list); } else if( gh_eq_p(value,gh_symbol2scm("revealer")) ) { unit->Revealer=1; - } else if( gh_eq_p(value,gh_symbol2scm("on-board")) ) { + } else if( gh_eq_p(value,gh_symbol2scm("units-contained-count")) ) { + insidecount=gh_scm2int(gh_car(list)); + list=gh_cdr(list); + } else if( gh_eq_p(value,gh_symbol2scm("units-contained")) ) { sublist=gh_car(list); list=gh_cdr(list); - for( i=0; i<MAX_UNITS_ONBOARD; ++i ) { - value=gh_vector_ref(sublist,gh_int2scm(i)); + for (i=0;i<insidecount;i++) { + value=gh_vector_ref(sublist,gh_int2scm(i)); if( !gh_null_p(value) ) { str=gh_scm2newstr(value,NULL); - slot=strtol(str+1,NULL,16); - unit->OnBoard[i]=UnitSlots[slot]; + AddUnitInContainer(UnitSlots[slot],unit); DebugCheck( !UnitSlots[slot] ); ++UnitSlots[slot]->Refs; free(str); @@ -828,8 +830,8 @@ local SCM CclUnit(SCM list) NewResetPath(unit); } // Fix Colors for rescued units. - if (unit->Rescued) { - unit->Colors=unit->RescuedFrom->UnitColors; + if (unit->RescuedFrom) { + unit->Colors=&unit->RescuedFrom->UnitColors; } DebugLevel3Fn("unit #%d parsed\n" _C_ slot); diff --git a/src/unit/script_unittype.cpp b/src/unit/script_unittype.cpp index d261a1e0e..125f2c5b3 100644 --- a/src/unit/script_unittype.cpp +++ b/src/unit/script_unittype.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -223,7 +223,7 @@ local SCM CclDefineUnitType(SCM list) type->DrawLevel=gh_scm2int(gh_car(list)); list=gh_cdr(list); } else if( gh_eq_p(value,gh_symbol2scm("max-on-board")) ) { - // FIXME: need to write code to use this + type->MaxOnBoard=gh_scm2int(gh_car(list)); list=gh_cdr(list); } else if( gh_eq_p(value,gh_symbol2scm("hit-points")) ) { type->_HitPoints=gh_scm2int(gh_car(list)); @@ -374,16 +374,26 @@ local SCM CclDefineUnitType(SCM list) type->Tanker=1; } else if( gh_eq_p(value,gh_symbol2scm("gives-oil")) ) { type->GivesOil=1; - } else if( gh_eq_p(value,gh_symbol2scm("stores-gold")) ) { - type->StoresGold=1; - } else if( gh_eq_p(value,gh_symbol2scm("stores-wood")) ) { - type->StoresWood=1; + } else if( gh_eq_p(value,gh_symbol2scm("can-store")) ) { + sublist=gh_car(list); + list=gh_cdr(list); + while( !gh_null_p(sublist) ) { + value=gh_car(sublist); + sublist=gh_cdr(sublist); + for( i=0; i<MaxCosts; ++i ) { + if( gh_eq_p(value,gh_symbol2scm(DefaultResourceNames[i])) ) { + type->Stores[i]=1; + break; + } + } + if( i==MaxCosts ) { + errl("Unsupported resource tag",value); + } + } } else if( gh_eq_p(value,gh_symbol2scm("oil-patch")) ) { type->OilPatch=1; } else if( gh_eq_p(value,gh_symbol2scm("gives-gold")) ) { type->GoldMine=1; - } else if( gh_eq_p(value,gh_symbol2scm("stores-oil")) ) { - type->StoresOil=1; } else if( gh_eq_p(value,gh_symbol2scm("vanishes")) ) { type->Vanishes=1; } else if( gh_eq_p(value,gh_symbol2scm("tower")) ) { diff --git a/src/unit/unit_ai.cpp b/src/unit/unit_ai.cpp index 1c8a93946..711a42ca2 100644 --- a/src/unit/unit_ai.cpp +++ b/src/unit/unit_ai.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/unit/unit_cache.cpp b/src/unit/unit_cache.cpp index e3b473792..5caad0647 100644 --- a/src/unit/unit_cache.cpp +++ b/src/unit/unit_cache.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/unit/unit_draw.cpp b/src/unit/unit_draw.cpp index 2e85de286..06e4e2769 100644 --- a/src/unit/unit_draw.cpp +++ b/src/unit/unit_draw.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -1046,14 +1046,7 @@ local void DrawDecoration(const Unit* unit,const UnitType* type,int x,int y) // Transporter with units on board. // } else if( unit->Type->Transporter ) { - // Count units on board. - // FIXME: We can do this nicer? - for( w=f=0; f<MAX_UNITS_ONBOARD; ++f ) { - if( unit->OnBoard[f] ) { - ++w; - } - } - DrawManaBar(x,y,type,MAX_UNITS_ONBOARD,w); + DrawManaBar(x,y,type,unit->Type->MaxOnBoard,unit->InsideCount); } } } @@ -1121,14 +1114,7 @@ local void DrawDecoration(const Unit* unit,const UnitType* type,int x,int y) // Transporter with units on board. // } else if( unit->Type->Transporter ) { - // Count units on board. - // FIXME: We can do this nicer? - for( w=f=0; f<MAX_UNITS_ONBOARD; ++f ) { - if( unit->OnBoard[f] ) { - ++w; - } - } - DrawManaSprite(x,y,type,MAX_UNITS_ONBOARD,w); + DrawManaSprite(x,y,type,unit->Type->MaxOnBoard,unit->InsideCount); } } } @@ -1689,20 +1675,20 @@ local void GraphicUnitPixels(const Unit* unit,const Graphic* sprite) switch( VideoBpp ) { case 8: *((struct __4pixel8__*)(((VMemType8*)sprite->Pixels)+208)) - =unit->Colors.Depth8; + =unit->Colors->Depth8; break; case 15: case 16: *((struct __4pixel16__*)(((VMemType16*)sprite->Pixels)+208)) - =unit->Colors.Depth16; + =unit->Colors->Depth16; break; case 24: *((struct __4pixel24__*)(((VMemType24*)sprite->Pixels)+208)) - =unit->Colors.Depth24; + =unit->Colors->Depth24; break; case 32: *((struct __4pixel32__*)(((VMemType32*)sprite->Pixels)+208)) - =unit->Colors.Depth32; + =unit->Colors->Depth32; break; } } diff --git a/src/unit/unit_find.cpp b/src/unit/unit_find.cpp index e5394703d..4f783dc90 100644 --- a/src/unit/unit_find.cpp +++ b/src/unit/unit_find.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -505,32 +505,6 @@ global Unit* GoldMineOnMap(int tx,int ty) return NoUnitP; } -/** -** Gold deposit on map tile -** -** @param tx X position on map, tile-based. -** @param ty Y position on map, tile-based. -** -** @return Returns the gold deposit if found, or NoUnitP. -*/ -global Unit* GoldDepositOnMap(int tx,int ty) -{ - Unit* table[UnitMax]; - int i; - int n; - - n=SelectUnitsOnTile(tx,ty,table); - for( i=0; i<n; ++i ) { - if( UnitUnusable(table[i]) ) { - continue; - } - if( table[i]->Type->StoresGold ) { - return table[i]; - } - } - return NoUnitP; -} - /** ** Oil patch on map tile ** @@ -581,14 +555,15 @@ global Unit* PlatformOnMap(int tx,int ty) } /** -** Oil deposit on map tile +** Resource deposit on map tile ** ** @param tx X position on map, tile-based. ** @param ty Y position on map, tile-based. +** @param resource resource type. ** -** @return Returns the oil deposit if found, or NoUnitP. +** @return Returns the deposit if found, or NoUnitP. */ -global Unit* OilDepositOnMap(int tx,int ty) +global Unit* ResourceDepositOnMap(int tx,int ty,int resource) { Unit* table[UnitMax]; int i; @@ -599,33 +574,7 @@ global Unit* OilDepositOnMap(int tx,int ty) if( UnitUnusable(table[i]) ) { continue; } - if( table[i]->Type->StoresOil ) { - return table[i]; - } - } - return NoUnitP; -} - -/** -** Wood deposit on map tile -** -** @param tx X position on map, tile-based. -** @param ty Y position on map, tile-based. -** -** @return Returns the wood deposit if found, or NoUnitP. -*/ -global Unit* WoodDepositOnMap(int tx,int ty) -{ - Unit* table[UnitMax]; - int i; - int n; - - n=SelectUnitsOnTile(tx,ty,table); - for( i=0; i<n; ++i ) { - if( UnitUnusable(table[i]) ) { - continue; - } - if( table[i]->Type->StoresWood || table[i]->Type->StoresGold ) { + if( table[i]->Type->Stores[resource] ) { return table[i]; } } diff --git a/src/unit/unit_save.cpp b/src/unit/unit_save.cpp index edd7c09b1..6a06184a8 100644 --- a/src/unit/unit_save.cpp +++ b/src/unit/unit_save.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/unit/unittype.cpp b/src/unit/unittype.cpp index ff41519e8..fdae9bb49 100644 --- a/src/unit/unittype.cpp +++ b/src/unit/unittype.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ @@ -462,19 +462,19 @@ global void ParsePudUDTA(const char* udta,int length __attribute__((unused))) unittype->Tanker=BIT(9,v); unittype->Transporter=BIT(10,v); unittype->GivesOil=BIT(11,v); - unittype->StoresGold=BIT(12,v); + unittype->Stores[GoldCost]=BIT(12,v); unittype->Vanishes=BIT(13,v); unittype->GroundAttack=BIT(14,v); unittype->IsUndead=BIT(15,v); unittype->ShoreBuilding=BIT(16,v); unittype->CanCastSpell=BIT(17,v); - unittype->StoresWood=BIT(18,v); + unittype->Stores[WoodCost]=BIT(18,v); unittype->CanAttack=BIT(19,v); unittype->Tower=BIT(20,v); unittype->OilPatch=BIT(21,v); unittype->GoldMine=BIT(22,v); unittype->Hero=BIT(23,v); - unittype->StoresOil=BIT(24,v); + unittype->Stores[OilCost]=BIT(24,v); unittype->Volatile=BIT(25,v); unittype->CowerMage=BIT(26,v); unittype->Organic=BIT(27,v); @@ -879,21 +879,26 @@ local void SaveUnitType(FILE* file,const UnitType* type,int all) if( type->GivesOil ) { fprintf(file," 'gives-oil\n"); } - if( type->StoresGold ) { - fprintf(file," 'stores-gold\n"); - } - if( type->StoresWood ) { - fprintf(file," 'stores-wood\n"); - } + + // Save store info. + for (flag=i=0;i<MaxCosts;i++) + if (type->Stores[i]) { + if (!flag) { + flag=1; + fprintf(file," 'can-store '(%s",DefaultResourceNames[i]); + } else { + fprintf(file," %s",DefaultResourceNames[i]); + } + } + if (flag) + fprintf(file,")"); + if( type->OilPatch ) { fprintf(file," 'oil-patch\n"); } if( type->GoldMine ) { fprintf(file," 'gives-gold\n"); } - if( type->StoresOil ) { - fprintf(file," 'stores-oil\n"); - } if( type->Vanishes ) { fprintf(file," 'vanishes\n"); diff --git a/src/unit/upgrade.cpp b/src/unit/upgrade.cpp index 299d3a159..6d76454b6 100644 --- a/src/unit/upgrade.cpp +++ b/src/unit/upgrade.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/video/X11.cpp b/src/video/X11.cpp index e39d3549a..1d2873d91 100644 --- a/src/video/X11.cpp +++ b/src/video/X11.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/video/_clip_rectangle b/src/video/_clip_rectangle index ab8708da3..5567342ac 100644 --- a/src/video/_clip_rectangle +++ b/src/video/_clip_rectangle @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/video/cursor.cpp b/src/video/cursor.cpp index ba12465b5..a4077bceb 100644 --- a/src/video/cursor.cpp +++ b/src/video/cursor.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/video/deco.cpp b/src/video/deco.cpp index 4a0ebc3ad..69995c370 100644 --- a/src/video/deco.cpp +++ b/src/video/deco.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/video/font.cpp b/src/video/font.cpp index 980da5992..a3ebd0d25 100644 --- a/src/video/font.cpp +++ b/src/video/font.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/video/graphic.cpp b/src/video/graphic.cpp index ccb450480..625bb969b 100644 --- a/src/video/graphic.cpp +++ b/src/video/graphic.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/video/intern_video.h b/src/video/intern_video.h index 43bf5c16d..c67264e5b 100644 --- a/src/video/intern_video.h +++ b/src/video/intern_video.h @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/video/linedraw.cpp b/src/video/linedraw.cpp index 9af98fa00..406fe393a 100644 --- a/src/video/linedraw.cpp +++ b/src/video/linedraw.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/video/movie.cpp b/src/video/movie.cpp index 198372de7..9b81c872e 100644 --- a/src/video/movie.cpp +++ b/src/video/movie.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/video/new_X11.cpp b/src/video/new_X11.cpp index e8a061f98..b6f6d5790 100644 --- a/src/video/new_X11.cpp +++ b/src/video/new_X11.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/video/png.cpp b/src/video/png.cpp index 5ae02ea65..dd1bc9d6c 100644 --- a/src/video/png.cpp +++ b/src/video/png.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/video/sdl.cpp b/src/video/sdl.cpp index a5e84ccf1..da4ec76f9 100644 --- a/src/video/sdl.cpp +++ b/src/video/sdl.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/video/sprite.cpp b/src/video/sprite.cpp index 70f34d783..e6f3b594b 100644 --- a/src/video/sprite.cpp +++ b/src/video/sprite.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/video/svgalib.cpp b/src/video/svgalib.cpp index 75a0c74d3..2fae575cb 100644 --- a/src/video/svgalib.cpp +++ b/src/video/svgalib.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/video/sweepline.cpp b/src/video/sweepline.cpp index f5deb26fe..367c2dd1a 100644 --- a/src/video/sweepline.cpp +++ b/src/video/sweepline.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/video/video.cpp b/src/video/video.cpp index 812a075c7..46937c25d 100644 --- a/src/video/video.cpp +++ b/src/video/video.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________ diff --git a/src/video/wince.cpp b/src/video/wince.cpp index 7db9d0e4e..13e9b7716 100644 --- a/src/video/wince.cpp +++ b/src/video/wince.cpp @@ -1,7 +1,7 @@ // _________ __ __ // / _____// |_____________ _/ |______ ____ __ __ ______ // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ +// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > // \/ \/ \//_____/ \/ // ______________________ ______________________