New feature (by DepressivesBrot): Molle Items

- individual LBE gear can be created via MOLLE items. For each LBE item, there's a definition which pockets may be changed and how much space the new pockets may take up in total.
- If there's a free pocket slot and enough space -> attach item and enable pocket.
- for further description, see Doc/Design Document- MOLLE.txt

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5441 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2012-08-02 22:30:15 +00:00
parent 832335d904
commit 3077e27d9f
65 changed files with 766 additions and 294 deletions
+1 -1
View File
@@ -435,7 +435,7 @@ void BuildingDrawRoomNumCallback(GUI_BUTTON *btn, INT32 reason)
{
SetEditorBuildingTaskbarMode( BUILDING_DRAW_ROOMNUM );
iDrawMode = DRAW_MODE_ROOMNUM;
gubCurrRoomNumber = gubMaxRoomNumber;
gusCurrRoomNumber = gusMaxRoomNumber;
}
}
+5 -3
View File
@@ -78,7 +78,9 @@ typedef struct
BOOLEAN fLightSaved; //determines that a light has been saved
UINT8 ubLightRadius; //the radius of the light to build if undo is called
UINT8 ubLightID; //only applies if a light was saved.
UINT8 ubRoomNum;
//DBrot: More Rooms
//UINT8 ubRoomNum;
UINT16 usRoomNum;
} undo_struct;
// Undo stack node
@@ -481,7 +483,7 @@ BOOLEAN AddToUndoListCmd( INT32 iMapIndex, INT32 iCmdCount )
}
// copy the room number information (it's not in the mapelement structure)
pUndoInfo->ubRoomNum = gubWorldRoomInfo[ iMapIndex ];
pUndoInfo->usRoomNum = gusWorldRoomInfo[ iMapIndex ];
pUndoInfo->fLightSaved = FALSE;
pUndoInfo->ubLightRadius = 0;
@@ -613,7 +615,7 @@ BOOLEAN ExecuteUndoList( void )
SwapMapElementWithWorld( iUndoMapIndex, gpTileUndoStack->pData->pMapTile );
// copy the room number information back
gubWorldRoomInfo[ iUndoMapIndex ] = gpTileUndoStack->pData->ubRoomNum;
gusWorldRoomInfo[ iUndoMapIndex ] = gpTileUndoStack->pData->usRoomNum;
// Now we smooth out the changes...
//SmoothUndoMapTileTerrain( iUndoMapIndex, gpTileUndoStack->pData->pMapTile );
+15 -12
View File
@@ -32,8 +32,11 @@
BOOLEAN fBuildingShowRoofs, fBuildingShowWalls, fBuildingShowRoomInfo;
UINT16 usCurrentMode;
UINT8 gubCurrRoomNumber;
UINT8 gubMaxRoomNumber;
//DBrot: More Rooms
//UINT8 gubCurrRoomNumber;
//UINT8 gubMaxRoomNumber;
UINT16 gusCurrRoomNumber;
UINT16 gusMaxRoomNumber;
BOOLEAN gfEditingDoor;
//BEGINNNING OF BUILDING INITIALIZATION FUNCTIONS
@@ -43,7 +46,7 @@ void GameInitEditorBuildingInfo()
fBuildingShowWalls = TRUE;
fBuildingShowRoomInfo = FALSE;
usCurrentMode = BUILDING_PLACE_WALLS;
gubCurrRoomNumber = gubMaxRoomNumber = 1;
gusCurrRoomNumber = gusMaxRoomNumber = 1;
}
//BEGINNING OF BUILDING UTILITY FUNCTIONS
@@ -92,7 +95,7 @@ void UpdateBuildingsInfo()
SetFontForeground( FONT_LTBLUE );
mprintfEditor( iScreenWidthOffset + 390, 2 * iScreenHeightOffset + 362, iUpdateBuildingsInfoText[4]);
SetFontForeground( FONT_GRAY2 );
mprintfEditor( iScreenWidthOffset + 437, 2 * iScreenHeightOffset + 404, iUpdateBuildingsInfoText[5] );
mprintfEditor( iScreenWidthOffset + 452, 2 * iScreenHeightOffset + 404, iUpdateBuildingsInfoText[5] );
}
//Uses a recursive method to elimate adjacent tiles of structure information.
@@ -112,7 +115,7 @@ void KillBuilding( INT32 iMapIndex )
fFound |= RemoveAllLandsOfTypeRange( iMapIndex, FIRSTFLOOR, LASTFLOOR );
EraseBuilding( iMapIndex );
gubWorldRoomInfo[ iMapIndex ] = 0;
gusWorldRoomInfo[ iMapIndex ] = 0;
if( !fFound )
{
@@ -736,25 +739,25 @@ void SetupTextInputForBuildings()
CHAR16 str[4];
InitTextInputModeWithScheme( DEFAULT_SCHEME );
AddUserInputField( NULL ); //just so we can use short cut keys while not typing.
swprintf( str, L"%d", gubMaxRoomNumber );
AddTextInputField( iScreenWidthOffset + 410, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
swprintf( str, L"%d", gusMaxRoomNumber );
AddTextInputField( iScreenWidthOffset + 410, 2 * iScreenHeightOffset + 400, 40, 15, MSYS_PRIORITY_NORMAL, str, 5, INPUTTYPE_NUMERICSTRICT );
}
void ExtractAndUpdateBuildingInfo()
{
CHAR16 str[4];
CHAR16 str[5];
INT32 temp;
//extract light1 colors
temp = min( GetNumericStrictValueFromField( 1 ), 255 );
temp = min( GetNumericStrictValueFromField( 1 ), 65535 );
if( temp != -1 )
{
gubCurrRoomNumber = (UINT8)temp;
gusCurrRoomNumber = (UINT16)temp;
}
else
{
gubCurrRoomNumber = 0;
gusCurrRoomNumber = 0;
}
swprintf( str, L"%d", gubCurrRoomNumber );
swprintf( str, L"%d", gusCurrRoomNumber );
SetInputFieldStringWith16BitString( 1, str );
SetActiveField( 0 );
}
+5 -2
View File
@@ -8,8 +8,11 @@
#include "vobject_blitters.h"
extern BOOLEAN fBuildingShowRoofs, fBuildingShowWalls, fBuildingShowRoomInfo;
extern UINT8 gubCurrRoomNumber;
extern UINT8 gubMaxRoomNumber;
//DBrot: More Rooms
//extern UINT8 gubCurrRoomNumber;
//extern UINT8 gubMaxRoomNumber;
extern UINT16 gusCurrRoomNumber;
extern UINT16 gusMaxRoomNumber;
void SetupTextInputForBuildings();
void ExtractAndUpdateBuildingInfo();
+1 -1
View File
@@ -1103,7 +1103,7 @@ UINT32 ProcessFileIO()
AnalyseCaveMapForStructureInfo();
AddLockedDoorCursors();
gubCurrRoomNumber = gubMaxRoomNumber;
gusCurrRoomNumber = gusMaxRoomNumber;
UpdateRoofsView();
UpdateWallsView();
ShowLightPositionHandles();
+3 -3
View File
@@ -287,12 +287,12 @@ void PasteSingleRoof( INT32 iMapIndex )
PasteSingleWallCommon( iMapIndex );
}
void PasteRoomNumber( INT32 iMapIndex, UINT8 ubRoomNumber )
void PasteRoomNumber( INT32 iMapIndex, UINT16 usRoomNumber )
{
if( gubWorldRoomInfo[ iMapIndex ] != ubRoomNumber )
if( gusWorldRoomInfo[ iMapIndex ] != usRoomNumber )
{
AddToUndoList( iMapIndex );
gubWorldRoomInfo[ iMapIndex ] = ubRoomNumber;
gusWorldRoomInfo[ iMapIndex ] = usRoomNumber;
}
}
+1 -1
View File
@@ -47,7 +47,7 @@ void PasteSingleDecoration( INT32 iMapIndex );
void PasteSingleDecal( INT32 iMapIndex );
void PasteSingleFloor( INT32 iMapIndex );
void PasteSingleToilet( INT32 iMapIndex );
void PasteRoomNumber( INT32 iMapIndex, UINT8 ubRoomNumber );
void PasteRoomNumber( INT32 iMapIndex, UINT16 usRoomNumber );
void PasteSingleWallCommon( INT32 iMapIndex );
+6 -6
View File
@@ -1599,7 +1599,7 @@ void HandleKeyboardShortcuts( )
usRoofType = FIRSTROOF;
for( i = 0; i < WORLD_MAX; i++ )
{
if( gubWorldRoomInfo[ i ] )
if( gusWorldRoomInfo[ i ] )
{
AddToUndoList( i );
RemoveAllRoofsOfTypeRange( i, FIRSTTEXTURE, LASTITEM );
@@ -4221,14 +4221,14 @@ void ProcessAreaSelection( BOOLEAN fWithLeftButton )
break;
case DRAW_MODE_ROOMNUM:
DrawObjectsBasedOnSelectionRegion();
if( gubCurrRoomNumber > 0 )
if( gusCurrRoomNumber > 0 )
{
gubCurrRoomNumber++;
gubMaxRoomNumber++;
gusCurrRoomNumber++;
gusMaxRoomNumber++;
if( iCurrentTaskbar == TASK_BUILDINGS && TextInputMode() )
{
CHAR16 str[4];
swprintf( str, L"%d", gubCurrRoomNumber );
swprintf( str, L"%d", gusCurrRoomNumber );
SetInputFieldStringWith16BitString( 1, str );
SetActiveField( 0 );
}
@@ -4295,7 +4295,7 @@ void DrawObjectsBasedOnSelectionRegion()
case DRAW_MODE_OSTRUCTS: PasteStructure( iMapIndex ); break;
case DRAW_MODE_OSTRUCTS1: PasteStructure1( iMapIndex ); break;
case DRAW_MODE_OSTRUCTS2: PasteStructure2( iMapIndex ); break;
case DRAW_MODE_ROOMNUM: PasteRoomNumber( iMapIndex, gubCurrRoomNumber ); break;
case DRAW_MODE_ROOMNUM: PasteRoomNumber( iMapIndex, gusCurrRoomNumber ); break;
default: return; //no point in continuing...
}
}
+1 -1
View File
@@ -733,7 +733,7 @@ void EraseBuilding( INT32 iMapIndex )
EraseRoof( iMapIndex );
EraseFloor( iMapIndex );
EraseWalls( iMapIndex );
gubWorldRoomInfo[ iMapIndex ] = 0;
gusWorldRoomInfo[ iMapIndex ] = 0;
}
//Specialized function that will delete only the TOP_RIGHT oriented wall in the gridno to the left
+40
View File
@@ -260,6 +260,10 @@ BOOLEAN LoadGameSettings()
#endif
gGameSettings.fOptions[TOPTION_ENABLE_INVENTORY_POPUPS] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_ENABLE_INVENTORY_POPUPS" , TRUE ); // the_bob : enable popups for picking items from sector inv
gGameSettings.fOptions[TOPTION_SHOW_LAST_ENEMY] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_LAST_ENEMY" , FALSE );
gGameSettings.fOptions[TOPTION_SHOW_LBE_CONTENT] = iniReader.ReadBoolean("JA2 Game Settings","TOPTION_SHOW_LBE_CONTENT" , TRUE );
gGameSettings.fOptions[NUM_ALL_GAME_OPTIONS] = iniReader.ReadBoolean("JA2 Game Settings","NUM_ALL_GAME_OPTIONS" , FALSE );
@@ -421,6 +425,8 @@ BOOLEAN SaveGameSettings()
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
settings << "TOPTION_AUTO_FAST_FORWARD_MODE = " << (gGameSettings.fOptions[TOPTION_AUTO_FAST_FORWARD_MODE] ? "TRUE" : "FALSE" ) << endl;
#endif
settings << "TOPTION_SHOW_LAST_ENEMY = " << (gGameSettings.fOptions[TOPTION_SHOW_LAST_ENEMY] ? "TRUE" : "FALSE" ) << endl;
settings << "TOPTION_SHOW_LBE_CONTENT = " << (gGameSettings.fOptions[TOPTION_SHOW_LBE_CONTENT] ? "TRUE" : "FALSE" ) << endl;
#ifdef ENABLE_ZOMBIES
settings << "TOPTION_ZOMBIES = " << (gGameSettings.fOptions[TOPTION_ZOMBIES] ? "TRUE" : "FALSE" ) << endl;
@@ -557,6 +563,8 @@ void InitGameSettings()
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
gGameSettings.fOptions[ TOPTION_AUTO_FAST_FORWARD_MODE ] = FALSE;
#endif
gGameSettings.fOptions[TOPTION_SHOW_LAST_ENEMY] = FALSE;
gGameSettings.fOptions[TOPTION_SHOW_LBE_CONTENT] = TRUE;
#ifdef ENABLE_ZOMBIES
gGameSettings.fOptions[ TOPTION_ZOMBIES ] = FALSE; // Flugente Zombies 1.0
@@ -1828,6 +1836,13 @@ void LoadGameExternalOptions()
//gGameExternalOptions.fSaveGameSlot = iniReader.ReadBoolean("Extension","SAVE_GAMES_SLOT",FALSE);
gGameExternalOptions.fSaveGameSlot = TRUE;
//DBrot: settings for the new show remaining hostiles feature
gGameExternalOptions.ubMarkerMode = iniReader.ReadInteger("Overhead Map Settings", "MARKER_MODE", 0, 0, 2);
gGameExternalOptions.ubGridResolutionDay = iniReader.ReadInteger("Overhead Map Settings", "DAYTIME_PRECISION", 0, 0, 5);
gGameExternalOptions.ubGridResolutionNight = iniReader.ReadInteger("Overhead Map Settings", "NIGHTTIME_PRECISION", 0, 0, 5);
gGameExternalOptions.ubSoldiersLeft = iniReader.ReadInteger("Overhead Map Settings", "MAX_SOLDIERS_LEFT", 1, 1, 64);
gGameExternalOptions.fRobotNoReadytime = iniReader.ReadBoolean("Tactical Gameplay Settings", "ROBOT_NO_READYTIME", FALSE);
// WANNE: This is just a debug setting. Only in debug version we set that property to TRUE.
// In Release version this should always be set to FALSE
@@ -2149,6 +2164,31 @@ void LoadModSettings(){
gModSettings.iFinalCrateGrid = iniReader.ReadInteger("Rebel Hideout", "FINAL_CRATE_GRID", 8207);
gModSettings.usCrateTileDef = iniReader.ReadInteger("Rebel Hideout", "CRATE_TILE_DEF", 411);
gModSettings.usTrapdoorTileDef = iniReader.ReadInteger("Rebel Hideout", "TRAPDOOR_TILE_DEF", 2041);
gModSettings.usPornShopRoomHans = iniReader.ReadInteger("San Mona", "PORN_SHOP_ROOM_HANS", 49);
gModSettings.iHansGridNo = iniReader.ReadInteger("San Mona", "HANS_POSTION", 13523);
gModSettings.usPornShopRoomBrenda = iniReader.ReadInteger("San Mona", "PORN_SHOP_ROOM_BRENDA", 47);
gModSettings.usPornShopRoomTony = iniReader.ReadInteger("San Mona", "PORN_SHOP_ROOM_TONY", 50);
gModSettings.usLeatherShop = iniReader.ReadInteger("San Mona", "ANGELS_LEATHERSHOP", 2);
gModSettings.iBambiDoorGridNo = iniReader.ReadInteger("San Mona", "DOOR_TO_BAMBIS_ROOM", 12290);
gModSettings.iCarlaDoorGridNo = iniReader.ReadInteger("San Mona", "DOOR_TO_CARLAS_ROOM", 13413);
gModSettings.iCindyDoorGridNo = iniReader.ReadInteger("San Mona", "DOOR_TO_CINDYS_ROOM", 11173);
gModSettings.iMariaDoorGridNo = iniReader.ReadInteger("San Mona", "DOOR_TO_MARIAS_ROOM", 10852);
gModSettings.usBrothelRoomRangeStart = iniReader.ReadInteger("San Mona", "FIRST_ROOM_IN_BROTHEL", 91);
gModSettings.usBrothelRoomRangeEnd = iniReader.ReadInteger("San Mona", "LAST_ROOM_IN_BROTHEL", 119);
gModSettings.usBrothelGuardRoom = iniReader.ReadInteger("San Mona", "BROTHEL_GUARD_ROOM", 110);
gModSettings.iBrothelDoor1 = iniReader.ReadInteger("San Mona", "BROTHEL_DOOR_1", 11010);
gModSettings.iBrothelDoor2 = iniReader.ReadInteger("San Mona", "BROTHEL_DOOR_2", 11176);
gModSettings.iBrothelDoor3 = iniReader.ReadInteger("San Mona", "BROTHEL_DOOR_3", 11177);
gModSettings.ubOmertaDropOffX = iniReader.ReadInteger("Gear Dropoff", "OMERTA_DROPOFF_X", 9);
gModSettings.ubOmertaDropOffY = iniReader.ReadInteger("Gear Dropoff", "OMERTA_DROPOFF_Y", 1);
gModSettings.ubOmertaDropOffZ = iniReader.ReadInteger("Gear Dropoff", "OMERTA_DROPOFF_Z", 0);
gModSettings.iOmertaDropOff = iniReader.ReadInteger("Gear Dropoff", "OMERTA_DROPOFF_GRIDNO", 4868);
}
INT16 DynamicAdjustAPConstants(INT16 iniReadValue, INT16 iniDefaultValue, BOOLEAN reverse)
+38
View File
@@ -101,6 +101,9 @@ enum
TOPTION_ENABLE_INVENTORY_POPUPS, // the_bob : enable popups for picking items from sector inv
TOPTION_SHOW_LAST_ENEMY, //DBrot: show approximate locations for the last enemies
TOPTION_SHOW_LBE_CONTENT, //DBrot: toggle between the content of an lbe and its attachments
// arynn: Debug/Cheat
TOPTION_CHEAT_MODE_OPTIONS_HEADER,
TOPTION_FORCE_BOBBY_RAY_SHIPMENTS, // force all pending Bobby Ray shipments
@@ -1145,6 +1148,14 @@ typedef struct
UINT8 ubMapItemChanceOverride; //Madd: special map override, mostly for debugging
UINT8 ubNumPItems; //Madd: set number of PItem files to be used - default 3
BOOLEAN fUseXmlTileSets; //Madd: move this variable here, it should be mod dependent
UINT8 ubMarkerMode; //DBrot: how should we mark the last hostile area?
UINT8 ubSoldiersLeft; //DBrot: how many soldiers may still be standing for this to become active
UINT8 ubGridResolutionDay; //DBrot: how precise we want to show their location
UINT8 ubGridResolutionNight; //DBrot: how precise we want to show their location - adjust for shorter night time ranges ... or don't
BOOLEAN fRobotNoReadytime; //DBrot: should the robot need to ready his gun?
} GAME_EXTERNAL_OPTIONS;
typedef struct
@@ -1529,6 +1540,33 @@ typedef struct
UINT16 usCrateTileDef;
UINT16 usTrapdoorTileDef;
//San Mona C5
//Porn Quest
UINT16 usPornShopRoomHans;
INT32 iHansGridNo;
UINT16 usPornShopRoomBrenda;
UINT16 usPornShopRoomTony;
//Brothel Quests
UINT16 usLeatherShop;
INT32 iCarlaDoorGridNo;
INT32 iCindyDoorGridNo;
INT32 iBambiDoorGridNo;
INT32 iMariaDoorGridNo;
UINT16 usBrothelRoomRangeStart;
UINT16 usBrothelRoomRangeEnd;
UINT16 usBrothelGuardRoom;
INT32 iBrothelDoor1;
INT32 iBrothelDoor2;
INT32 iBrothelDoor3;
//Leave Stuff
UINT8 ubOmertaDropOffX;
UINT8 ubOmertaDropOffY;
UINT8 ubOmertaDropOffZ;
INT32 iOmertaDropOff;
}MOD_SETTINGS;
+2 -1
View File
@@ -20,8 +20,9 @@ extern CHAR16 zTrackingNumber[16];
//
// Keeps track of the saved game version. Increment the saved game version whenever
// you will invalidate the saved game file
#define SAVE_GAME_VERSION 133 // 132 //131 //125 //124 //114 //113 //112 //111 //110 //109 //108 //107 //106 //105 //104 //103 //102 //101 //100 // 99
#define SAVE_GAME_VERSION 134 // 133 // 132 //131 //125 //124 //114 //113 //112 //111 //110 //109 //108 //107 //106 //105 //104 //103 //102 //101 //100 // 99
#define MORE_ROOMS 134 // changed room numbers from 8 to 16 bit by DBrot
#define FOOD_CHANGES 133 // changes for food system
#define ZOMBIE_CHANGES 132 // Included some changes for Zombies
#define JA25_UB_INTEGRATION 131 // Before this, the JA25 Unfinished Business code was not integrated (see "Builddefines.h" JA2UB)
+10 -3
View File
@@ -1362,12 +1362,16 @@ BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool for
numBytesRead = ReadFieldByField( hFile, &this->ubQuoteActionID, sizeof(this->ubQuoteActionID), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->bMechanical, sizeof(this->bMechanical), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->ubInvUndroppable, sizeof(this->ubInvUndroppable), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, this->ubRoomRangeStart, sizeof(this->ubRoomRangeStart), sizeof(UINT8), numBytesRead);
//DBrot: More rooms
numBytesRead = ReadFieldByField( hFile, this->usRoomRangeStart, sizeof(this->usRoomRangeStart), sizeof(UINT16), numBytesRead);
numBytesRead = ReadFieldByField( hFile, this->bMercTownReputation, sizeof(this->bMercTownReputation), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, this->usStatChangeChances, sizeof(this->usStatChangeChances), sizeof(UINT16), numBytesRead);
numBytesRead = ReadFieldByField( hFile, this->usStatChangeSuccesses, sizeof(this->usStatChangeSuccesses), sizeof(UINT16), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->ubStrategicInsertionCode, sizeof(this->ubStrategicInsertionCode), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, this->ubRoomRangeEnd, sizeof(this->ubRoomRangeEnd), sizeof(UINT8), numBytesRead);
//DBrot: More rooms
numBytesRead = ReadFieldByField( hFile, this->usRoomRangeEnd, sizeof(this->usRoomRangeEnd), sizeof(UINT16), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->ubLastQuoteSaid, sizeof(this->ubLastQuoteSaid), sizeof(UINT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->bRace, sizeof(this->bRace), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField( hFile, &this->bNationality, sizeof(this->bNationality), sizeof(INT8), numBytesRead);
@@ -1434,16 +1438,19 @@ BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool for
//numBytesRead = ReadFieldByField( hFile, &this->endOfPOD, sizeof(this->endOfPOD), sizeof(char), numBytesRead);
while( (numBytesRead % 2) != 0 )
numBytesRead = ReadFieldByField(hFile, &filler, sizeof(filler), sizeof(UINT8), numBytesRead);
//DBrot: More rooms
int size;
if ( numBytesRead != SIZEOF_MERCPROFILESTRUCT_POD )
{
return(FALSE);
}
int size;
if ( !FileRead( hFile, &size, sizeof(int), &uiNumBytesRead ) )
{
return(FALSE);
}
inv.resize(size);
bInvStatus.resize(size);
bInvNumber.resize(size);
+29 -18
View File
@@ -6993,15 +6993,17 @@ UINT32 sGridNo;
INT16 sTeleportSpot;
INT16 sDoorSpot;
UINT8 ubDirection;
UINT8 ubRoom, ubOldRoom;
//DBrot: More Rooms
//UINT8 ubRoom, ubOldRoom;
UINT16 usRoom, usOldRoom;
ubID = WhoIsThere2( sGridNo, 0 );
if ( (ubID != NOBODY) && (MercPtrs[ ubID ]->bTeam == gbPlayerNum) )
{
if ( InARoom( sGridNo, &ubRoom ) && InARoom( MercPtrs[ ubID ]->sOldGridNo, &ubOldRoom ) && ubOldRoom != ubRoom )
if ( InARoom( sGridNo, &usRoom ) && InARoom( MercPtrs[ ubID ]->sOldGridNo, &usOldRoom ) && usOldRoom != usRoom )
{
// also require there to be a miniskirt civ in the room
if ( HookerInRoom( ubRoom ) )
if ( HookerInRoom( usRoom ) )
{
// stop the merc...
@@ -7073,11 +7075,12 @@ UINT32 sGridNo;
{
if (i == 1 ) sGridNo = lua_tointeger(L,i);
}
UINT8 ubRoom;
if ( InAHiddenRoom( sGridNo, &ubRoom ) )
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
if ( InAHiddenRoom( sGridNo, &usRoom ) )
{
RemoveRoomRoof( sGridNo, ubRoom, NULL );
RemoveRoomRoof( sGridNo, usRoom, NULL );
}
return 0;
@@ -7656,16 +7659,18 @@ static int l_PlayerInARoom (lua_State *L)
{
UINT8 n = lua_gettop(L);
int i;
UINT8 ubRoom,ubRoom2;
//DBrot: More Rooms
//UINT8 ubRoom,ubRoom2;
UINT16 usRoom, usRoom2;
UINT32 sGridNo;
BOOLEAN Bool;
for (i= 1; i<=n; i++ )
{
if (i == 1 ) sGridNo = lua_tointeger(L,i);
if (i == 2 ) ubRoom2 = lua_tointeger(L,i);
if (i == 2 ) usRoom2 = lua_tointeger(L,i);
}
if ( InARoom( sGridNo, &ubRoom ) && ubRoom == ubRoom2 )
if ( InARoom( sGridNo, &usRoom ) && usRoom == usRoom2 )
{
Bool = TRUE;
}
@@ -9882,17 +9887,21 @@ static int l_NPCInRoomRange (lua_State *L)
BOOLEAN Bool = FALSE;
UINT8 ubProfileID = 0;
UINT8 ubRoomID1 = 0;
UINT8 ubRoomID2 = 0;
//DBrot: More Rooms
//UINT8 ubRoomID1 = 0;
//UINT8 ubRoomID2 = 0;
UINT16 usRoomID1 = 0;
UINT16 usRoomID2 = 0;
for (i= 1; i<=n; i++ )
{
if (i == 1 ) ubProfileID = lua_tointeger(L,i);
if (i == 2 ) ubRoomID1 = lua_tointeger(L,i);
if (i == 3 ) ubRoomID2 = lua_tointeger(L,i);
if (i == 2 ) usRoomID1 = lua_tointeger(L,i);
if (i == 3 ) usRoomID2 = lua_tointeger(L,i);
}
Bool = NPCInRoomRange( ubProfileID, ubRoomID1,ubRoomID2 );
Bool = NPCInRoomRange( ubProfileID, usRoomID1,usRoomID2 );
lua_pushboolean(L, Bool);
@@ -9907,15 +9916,17 @@ static int l_NPCInRoom (lua_State *L)
BOOLEAN Bool = FALSE;
UINT8 ubProfileID = 0;
UINT8 ubRoomID = 0;
//DBrot: More Rooms
//UINT8 ubRoomID = 0;
UINT16 usRoomID = 0;
for (i= 1; i<=n; i++ )
{
if (i == 1 ) ubProfileID = lua_tointeger(L,i);
if (i == 2 ) ubRoomID = lua_tointeger(L,i);
if (i == 2 ) usRoomID = lua_tointeger(L,i);
}
Bool = NPCInRoom( ubProfileID, ubRoomID );
Bool = NPCInRoom( ubProfileID, usRoomID );
lua_pushboolean(L, Bool);
+4 -2
View File
@@ -6016,10 +6016,12 @@ BOOLEAN CanCharacterMoveInStrategic( SOLDIERTYPE *pSoldier, INT8 *pbErrorNumber
if ( ( pSoldier->sSectorX == 12 ) && ( pSoldier->sSectorY == MAP_ROW_L ) && ( pSoldier->bSectorZ == 0 ) &&
( !pSoldier->flags.fBetweenSectors ) && gMercProfiles[ ELDIN ].bMercStatus != MERC_IS_DEAD )
{
UINT8 ubRoom, cnt;
//DBrot: More Rooms
UINT8 /*ubRoom,*/ cnt;
UINT16 usRoom;
SOLDIERTYPE * pSoldier2;
if ( InARoom( pSoldier->sGridNo, &ubRoom ) && ubRoom >= 22 && ubRoom <= 41 )
if ( InARoom( pSoldier->sGridNo, &usRoom ) && usRoom >= 22 && usRoom <= 41 )
{
cnt = gTacticalStatus.Team[ gbPlayerNum ].bFirstID;
+15 -13
View File
@@ -356,25 +356,25 @@ BOOLEAN CheckNPCIsRPC( UINT8 ubProfileID )
}
return( (pNPC->ubWhatKindOfMercAmI == MERC_TYPE__NPC ) );
}
BOOLEAN NPCInRoom( UINT8 ubProfileID, UINT8 ubRoomID )
//DBrot: More Rooms
BOOLEAN NPCInRoom( UINT8 ubProfileID, UINT16 usRoomID )
{
SOLDIERTYPE * pNPC;
pNPC = FindSoldierByProfileID( ubProfileID, FALSE );
if ( !pNPC || (gubWorldRoomInfo[ pNPC->sGridNo ] != ubRoomID) )
if ( !pNPC || (gusWorldRoomInfo[ pNPC->sGridNo ] != usRoomID) )
{
return( FALSE );
}
return( TRUE );
}
BOOLEAN NPCInRoomRange( UINT8 ubProfileID, UINT8 ubRoomID1, UINT8 ubRoomID2 )
//DBrot: More Rooms
BOOLEAN NPCInRoomRange( UINT8 ubProfileID, UINT16 usRoomID1, UINT16 usRoomID2 )
{
SOLDIERTYPE * pNPC;
pNPC = FindSoldierByProfileID( ubProfileID, FALSE );
if ( !pNPC || (gubWorldRoomInfo[ pNPC->sGridNo ] < ubRoomID1) || (gubWorldRoomInfo[ pNPC->sGridNo ] > ubRoomID2) )
if ( !pNPC || (gusWorldRoomInfo[ pNPC->sGridNo ] < usRoomID1) || (gusWorldRoomInfo[ pNPC->sGridNo ] > usRoomID2) )
{
return( FALSE );
}
@@ -384,7 +384,9 @@ BOOLEAN NPCInRoomRange( UINT8 ubProfileID, UINT8 ubRoomID1, UINT8 ubRoomID2 )
BOOLEAN PCInSameRoom( UINT8 ubProfileID )
{
SOLDIERTYPE * pNPC;
UINT8 ubRoom;
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
INT8 bLoop;
SOLDIERTYPE * pSoldier;
@@ -393,14 +395,14 @@ BOOLEAN PCInSameRoom( UINT8 ubProfileID )
{
return( FALSE );
}
ubRoom = gubWorldRoomInfo[ pNPC->sGridNo ];
usRoom = gusWorldRoomInfo[ pNPC->sGridNo ];
for ( bLoop = gTacticalStatus.Team[ gbPlayerNum ].bFirstID; bLoop <= gTacticalStatus.Team[ gbPlayerNum ].bLastID; bLoop++ )
{
pSoldier = MercPtrs[ bLoop ];
if ( pSoldier && pSoldier->bActive && pSoldier->bInSector )
{
if ( gubWorldRoomInfo[ pSoldier->sGridNo ] == ubRoom )
if ( gusWorldRoomInfo[ pSoldier->sGridNo ] == usRoom )
{
return( TRUE );
}
@@ -790,7 +792,7 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
gubFact[FACT_BRENDA_IN_STORE_AND_ALIVE] = FALSE;
}
// ensure in a building and nearby
else if ( !(NPCInRoom( 85, 47 ) ) )
else if ( !(NPCInRoom( 85, gModSettings.usPornShopRoomBrenda ) ) )
{
gubFact[FACT_BRENDA_IN_STORE_AND_ALIVE] = FALSE;
}
@@ -823,7 +825,7 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
gubFact[usFact] = (NumWoundedMercsNearby( ubProfileID ) > 1);
break;
case FACT_HANS_AT_SPOT:
gubFact[usFact] = CheckNPCAt( 117, 13523 );
gubFact[usFact] = CheckNPCAt( 117, gModSettings.iHansGridNo );
break;
case FACT_MULTIPLE_MERCS_CLOSE:
gubFact[usFact] = ( NumMercsNear( ubProfileID, 3 ) > 1 );
@@ -841,7 +843,7 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
gubFact[usFact] = CheckNPCIsEPC( SKYRIDER );
break;
case FACT_MARIA_ESCORTED_AT_LEATHER_SHOP:
gubFact[usFact] = ( CheckNPCIsEPC( MARIA ) && (NPCInRoom( MARIA, 2 )) );
gubFact[usFact] = ( CheckNPCIsEPC( MARIA ) && (NPCInRoom( MARIA, gModSettings.usLeatherShop )) );
break;
case FACT_PC_STRONG_AND_LESS_THAN_3_MALES_PRESENT:
gubFact[usFact] = ( CheckTalkerStrong() && (NumMalesPresent( ubProfileID ) < 3) );
@@ -1150,7 +1152,7 @@ BOOLEAN CheckFact( UINT16 usFact, UINT8 ubProfileID )
break;
case FACT_TONY_IN_BUILDING:
gubFact[usFact] = CheckNPCSector( TONY, 5, MAP_ROW_C, 0 ) && NPCInRoom( TONY, 50 );
gubFact[usFact] = CheckNPCSector( TONY, 5, MAP_ROW_C, 0 ) && NPCInRoom( TONY, gModSettings.usPornShopRoomTony );
break;
case FACT_SHANK_SPEAKING:
+11 -8
View File
@@ -566,14 +566,14 @@ enum Facts
#define LOST_SHIPMENT_GRIDNO 2
// omerta positions
#define OMERTA_LEAVE_EQUIP_SECTOR_X 9
#define OMERTA_LEAVE_EQUIP_SECTOR_Y 1
#define OMERTA_LEAVE_EQUIP_SECTOR_Z 0
#define OMERTA_LEAVE_EQUIP_GRIDNO 4868
#define OMERTA_LEAVE_EQUIP_SECTOR_X gModSettings.ubOmertaDropOffX //9
#define OMERTA_LEAVE_EQUIP_SECTOR_Y gModSettings.ubOmertaDropOffY //1
#define OMERTA_LEAVE_EQUIP_SECTOR_Z gModSettings.ubOmertaDropOffZ //0
#define OMERTA_LEAVE_EQUIP_GRIDNO gModSettings.iOmertaDropOff //4868
// NB brothel rooms 88-90 removed because they are the antechamber
#define IN_BROTHEL( room ) (gWorldSectorX == 5 && gWorldSectorY == MAP_ROW_C && (room) >= 91 && (room) <= 119)
#define IN_BROTHEL_GUARD_ROOM( room ) ( room == 110 )
#define IN_BROTHEL( room ) (gWorldSectorX == 5 && gWorldSectorY == MAP_ROW_C && (room) >= gModSettings.usBrothelRoomRangeStart && (room) <= gModSettings.usBrothelRoomRangeEnd) //91,119
#define IN_BROTHEL_GUARD_ROOM( room ) ( room == gModSettings.usBrothelGuardRoom ) //110
#define IN_KINGPIN_HOUSE( room ) ( gWorldSectorX == 5 && gWorldSectorY == MAP_ROW_D && (room) >= 30 && (room) <= 39 )
@@ -616,8 +616,11 @@ extern BOOLEAN CheckIfMercIsNearNPC( SOLDIERTYPE *pMerc, UINT8 ubProfileId );
extern INT8 NumWoundedMercsNearby( UINT8 ubProfileID );
extern INT8 NumMercsNear( UINT8 ubProfileID, UINT8 ubMaxDist );
extern BOOLEAN CheckNPCIsEPC( UINT8 ubProfileID );
extern BOOLEAN NPCInRoom( UINT8 ubProfileID, UINT8 ubRoomID );
extern BOOLEAN NPCInRoomRange( UINT8 ubProfileID, UINT8 ubRoomID1, UINT8 ubRoomID2 );
//DBrot: More Rooms
//extern BOOLEAN NPCInRoom( UINT8 ubProfileID, UINT8 ubRoomID );
//extern BOOLEAN NPCInRoomRange( UINT8 ubProfileID, UINT8 ubRoomID1, UINT8 ubRoomID2 );
extern BOOLEAN NPCInRoom( UINT8 ubProfileID, UINT16 usRoomID );
extern BOOLEAN NPCInRoomRange( UINT8 ubProfileID, UINT16 usRoomID1, UINT16 usRoomID2 );
extern BOOLEAN PCInSameRoom( UINT8 ubProfileID );
extern INT8 NumMalesPresent( UINT8 ubProfileID );
extern BOOLEAN FemalePresent( UINT8 ubProfileID );
+16 -8
View File
@@ -39,7 +39,9 @@ extern void RecalculateOppCntsDueToBecomingNeutral( SOLDIERTYPE * pSoldier );
void ExitBoxing( void )
{
UINT8 ubRoom;
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
SOLDIERTYPE * pSoldier;
UINT32 uiLoop;
UINT8 ubPass;
@@ -57,7 +59,7 @@ void ExitBoxing( void )
if ( pSoldier != NULL )
{
if ( ( pSoldier->flags.uiStatusFlags & SOLDIER_BOXER ) && InARoom( pSoldier->sGridNo, &ubRoom ) && ubRoom == BOXING_RING )
if ( ( pSoldier->flags.uiStatusFlags & SOLDIER_BOXER ) && InARoom( pSoldier->sGridNo, &usRoom ) && usRoom == BOXING_RING )
{
if ( pSoldier->flags.uiStatusFlags & SOLDIER_PC )
{
@@ -182,7 +184,9 @@ UINT8 CountPeopleInBoxingRing( void )
{
SOLDIERTYPE * pSoldier;
UINT32 uiLoop;
UINT8 ubRoom;
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
UINT8 ubTotalInRing = 0;
for ( uiLoop = 0; uiLoop < guiNumMercSlots; uiLoop++ )
@@ -191,7 +195,7 @@ UINT8 CountPeopleInBoxingRing( void )
if ( pSoldier != NULL )
{
if ( InARoom( pSoldier->sGridNo, &ubRoom ) && ubRoom == BOXING_RING)
if ( InARoom( pSoldier->sGridNo, &usRoom ) && usRoom == BOXING_RING)
{
ubTotalInRing++;
}
@@ -205,7 +209,9 @@ void CountPeopleInBoxingRingAndDoActions( void )
{
UINT32 uiLoop;
UINT8 ubTotalInRing = 0;
UINT8 ubRoom;
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
UINT8 ubPlayersInRing = 0;
SOLDIERTYPE * pSoldier;
SOLDIERTYPE * pInRing[2] = { NULL, NULL };
@@ -217,7 +223,7 @@ void CountPeopleInBoxingRingAndDoActions( void )
if ( pSoldier != NULL )
{
if ( InARoom( pSoldier->sGridNo, &ubRoom ) && ubRoom == BOXING_RING)
if ( InARoom( pSoldier->sGridNo, &usRoom ) && usRoom == BOXING_RING)
{
if ( ubTotalInRing < 2 )
{
@@ -488,9 +494,11 @@ BOOLEAN AnotherFightPossible( void )
void BoxingMovementCheck( SOLDIERTYPE * pSoldier )
{
UINT8 ubRoom;
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
if ( InARoom( pSoldier->sGridNo, &ubRoom ) && ubRoom == BOXING_RING)
if ( InARoom( pSoldier->sGridNo, &usRoom ) && usRoom == BOXING_RING)
{
// someone moving in/into the ring
CountPeopleInBoxingRingAndDoActions();
+5 -2
View File
@@ -35,6 +35,7 @@
#include "ai.h"
#include "Soldier macros.h"
#include "Event Pump.h"
#include "GameSettings.h"
#endif
#include "fresh_header.h"
#include "connect.h"
@@ -433,10 +434,12 @@ void InteractWithOpenableStruct( SOLDIERTYPE *pSoldier, STRUCTURE *pStructure, U
void ProcessImplicationsOfPCMessingWithDoor( SOLDIERTYPE * pSoldier )
{
UINT8 ubRoom;
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
SOLDIERTYPE * pGoon;
// if player is hacking at a door in the brothel and a kingpin guy can see him
if ( (InARoom( pSoldier->sGridNo, &ubRoom ) && IN_BROTHEL( ubRoom )) || (gWorldSectorX == 5 && gWorldSectorY == MAP_ROW_D && gbWorldSectorZ == 0 && (pSoldier->sGridNo == 11010 || pSoldier->sGridNo == 11177 || pSoldier->sGridNo == 11176 ) ) )
if ( (InARoom( pSoldier->sGridNo, &usRoom ) && IN_BROTHEL( usRoom )) || (gWorldSectorX == 5 && gWorldSectorY == MAP_ROW_D && gbWorldSectorZ == 0 && (pSoldier->sGridNo == gModSettings.iBrothelDoor1 || pSoldier->sGridNo == gModSettings.iBrothelDoor2 || pSoldier->sGridNo == gModSettings.iBrothelDoor3 ) ) )//11010,11177,11176
{
UINT8 ubLoop;
+4 -2
View File
@@ -4410,7 +4410,9 @@ INT32 AdjustGridNoForItemPlacement( SOLDIERTYPE *pSoldier, INT32 sGridNo )
void StartBombMessageBox( SOLDIERTYPE * pSoldier, INT32 sGridNo )
{
UINT8 ubRoom;
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
gpTempSoldier = pSoldier;
gsTempGridNo = sGridNo;
@@ -4436,7 +4438,7 @@ void StartBombMessageBox( SOLDIERTYPE * pSoldier, INT32 sGridNo )
// Check what sector we are in....
if ( gWorldSectorX == 3 && gWorldSectorY == MAP_ROW_O && gbWorldSectorZ == 0 )
{
if ( InARoom( pSoldier->sGridNo, &ubRoom ) && ubRoom == 4 )
if ( InARoom( pSoldier->sGridNo, &usRoom ) && usRoom == 4 )
{
pSoldier->DoMercBattleSound( BATTLE_SOUND_OK1 );
+4 -2
View File
@@ -986,7 +986,9 @@ void SetUIMouseCursor( )
if ( gfUIShowExitExitGrid )
{
INT32 usMapPos;
UINT8 ubRoomNum;
//DBrot: More Rooms
//UINT8 ubRoomNum;
UINT16 usRoomNum;
gfUIDisplayActionPoints = FALSE;
ErasePath( TRUE );
@@ -996,7 +998,7 @@ void SetUIMouseCursor( )
if ( gusSelectedSoldier != NOBODY && MercPtrs[ gusSelectedSoldier ]->pathing.bLevel == 0 )
{
// ATE: Is this place revealed?
if ( !InARoom( usMapPos, &ubRoomNum ) || ( InARoom( usMapPos, &ubRoomNum ) && gpWorldLevelData[ usMapPos ].uiFlags & MAPELEMENT_REVEALED ) )
if ( !InARoom( usMapPos, &usRoomNum ) || ( InARoom( usMapPos, &usRoomNum ) && gpWorldLevelData[ usMapPos ].uiFlags & MAPELEMENT_REVEALED ) )
{
if ( sOldExitGridNo != usMapPos )
{
+14 -10
View File
@@ -1876,7 +1876,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
SetGroupSectorValue( gModSettings.ubHideoutSectorX, gModSettings.ubHideoutSectorY, gModSettings.ubHideoutSectorZ, pSoldier->ubGroupID );
// Set insertion gridno
if ( bNumDone < 6 )
if ( bNumDone < 10 )
{
// Set next sectore
//DBrot: Grids
@@ -2167,7 +2167,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
SetGroupSectorValue( gModSettings.ubHideoutSurfaceX, gModSettings.ubHideoutSurfaceY, gModSettings.ubHideoutSurfaceZ, pSoldier->ubGroupID );
// Set insertion gridno
if ( bNumDone < 8 )
if ( bNumDone < 12 )
{
// Set next sectore
pSoldier->sSectorX = gModSettings.ubHideoutSurfaceX;
@@ -2511,25 +2511,25 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
case NPC_ACTION_OPEN_CARLAS_DOOR:
if (usActionCode == NPC_ACTION_OPEN_CARLAS_DOOR )
{
sGridNo = 12290; //dnl!!!
sGridNo = gModSettings.iCarlaDoorGridNo; //12290; //dnl!!!
}
// fall through
case NPC_ACTION_OPEN_CINDYS_DOOR:
if (usActionCode == NPC_ACTION_OPEN_CINDYS_DOOR )
{
sGridNo = 13413; //dnl!!!
sGridNo = gModSettings.iCindyDoorGridNo; //13413; //dnl!!!
}
// fall through
case NPC_ACTION_OPEN_BAMBIS_DOOR:
if (usActionCode == NPC_ACTION_OPEN_BAMBIS_DOOR )
{
sGridNo = 11173; //dnl!!!
sGridNo = gModSettings.iBambiDoorGridNo; //11173; //dnl!!!
}
// fall through
case NPC_ACTION_OPEN_MARIAS_DOOR:
if (usActionCode == NPC_ACTION_OPEN_MARIAS_DOOR )
{
sGridNo = 10852; //dnl!!!
sGridNo = gModSettings.iMariaDoorGridNo; //10852; //dnl!!!
}
// JA3Gold: unlock the doors instead of opening them
{
@@ -3235,9 +3235,11 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
pSoldier = FindSoldierByProfileID( KINGPIN, FALSE );
if (pSoldier)
{
UINT8 ubRoom;
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
if ( InARoom( pSoldier->sGridNo, &ubRoom ) && (ubRoom == 1 || ubRoom == 2 || ubRoom == 3 ) )
if ( InARoom( pSoldier->sGridNo, &usRoom ) && (usRoom == 1 || usRoom == 2 || usRoom == 3 ) )
{ // Kingpin is in the club
TriggerNPCRecord( DARREN, 31 );
break;
@@ -4286,9 +4288,11 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
{
if ( gpSrcSoldier )
{
UINT8 ubRoom;
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
if ( InARoom( gpSrcSoldier->sGridNo, &ubRoom ) && (ubRoom == 49) )
if ( InARoom( gpSrcSoldier->sGridNo, &usRoom ) && (usRoom == gModSettings.usPornShopRoomHans) )
{
TriggerNPCRecord( HANS, 18 );
}
+4
View File
@@ -742,11 +742,13 @@ void InitDescStatCoords(OBJECTTYPE *pObject)
//Loop throught the attachments and get their slot id's
for (UINT8 x = 0; x < usAttachmentSlotIndexVector.size(); x++){
//WarmSteel - Tell this slot where it's supposed to be.
if(AttachmentSlots[usAttachmentSlotIndexVector[x]].fBigSlot){
SetupItemDescAttachmentsXY(x, AttachmentSlots[usAttachmentSlotIndexVector[x]].usDescPanelPosX, AttachmentSlots[usAttachmentSlotIndexVector[x]].usDescPanelPosY, SM_INV_SLOT_HEIGHT, ATTACH_SLOT_BIG_WIDTH, INV_BAR_DX-9, INV_BAR_DY);
} else {
SetupItemDescAttachmentsXY(x, AttachmentSlots[usAttachmentSlotIndexVector[x]].usDescPanelPosX, AttachmentSlots[usAttachmentSlotIndexVector[x]].usDescPanelPosY, SM_INV_SLOT_HEIGHT, ATTACH_SLOT_WIDTH, INV_BAR_DX-9, INV_BAR_DY);
}
}
}
//Not a valid item for NAS, use default
@@ -766,11 +768,13 @@ void InitDescStatCoords(OBJECTTYPE *pObject)
{
for (UINT8 x = 0; x < usAttachmentSlotIndexVector.size(); x++){
//WarmSteel - Tell this slot where it's supposed to be.
if(AttachmentSlots[usAttachmentSlotIndexVector[x]].fBigSlot){
SetupItemDescAttachmentsXY(x, AttachmentSlots[usAttachmentSlotIndexVector[x]].usDescPanelPosX, AttachmentSlots[usAttachmentSlotIndexVector[x]].usDescPanelPosY, SM_INV_SLOT_HEIGHT, ATTACH_SLOT_BIG_WIDTH, INV_BAR_DX-9, INV_BAR_DY);
} else {
SetupItemDescAttachmentsXY(x, AttachmentSlots[usAttachmentSlotIndexVector[x]].usDescPanelPosX, AttachmentSlots[usAttachmentSlotIndexVector[x]].usDescPanelPosY, SM_INV_SLOT_HEIGHT, ATTACH_SLOT_WIDTH, INV_BAR_DX-9, INV_BAR_DY);
}
}
}
//Not a valid item for NAS, use default
+15 -6
View File
@@ -1041,7 +1041,7 @@ void GenerateConsString( STR16 zItemCons, OBJECTTYPE * pObject, UINT32 uiPixLimi
BOOLEAN UseNASDesc(OBJECTTYPE *pObject){
if(pObject->exists() == FALSE)
return FALSE;
if(guiCurrentScreen == MAP_SCREEN && Item[pObject->usItem].usItemClass == IC_LBEGEAR && UsingNewAttachmentSystem()==true)
if(guiCurrentScreen == MAP_SCREEN && Item[pObject->usItem].usItemClass == IC_LBEGEAR && UsingNewAttachmentSystem()==true && gGameSettings.fOptions[TOPTION_SHOW_LBE_CONTENT])
return FALSE; // the map screen can't support NAS and LBEGEAR.
return (/*Item[pObject->usItem].usItemClass != IC_LBEGEAR && Item[pObject->usItem].usItemClass != IC_MONEY && */UsingNewAttachmentSystem()==true);
}
@@ -2521,10 +2521,15 @@ void INVRenderINVPanelItem( SOLDIERTYPE *pSoldier, INT16 sPocket, UINT8 fDirtyLe
case VEST_PACK:
case COMBAT_PACK:
case BACKPACK:
lbePocket =
(pSoldier->inv[icLBE[sPocket]].exists() == false)
? LoadBearingEquipment[Item[icDefault[sPocket]].ubClassIndex].lbePocketIndex[icPocket[sPocket]]
: LoadBearingEquipment[Item[pSoldier->inv[icLBE[sPocket]].usItem].ubClassIndex].lbePocketIndex[icPocket[sPocket]];
if(pSoldier->inv[icLBE[sPocket]].exists() == false){
lbePocket = LoadBearingEquipment[Item[icDefault[sPocket]].ubClassIndex].lbePocketIndex[icPocket[sPocket]];
}else{
lbePocket = LoadBearingEquipment[Item[pSoldier->inv[icLBE[sPocket]].usItem].ubClassIndex].lbePocketIndex[icPocket[sPocket]];
if( lbePocket == 0 && LoadBearingEquipment[Item[pSoldier->inv[icLBE[sPocket]].usItem].ubClassIndex].lbePocketsAvailable & (UINT16)pow((double)2, icPocket[sPocket])){
lbePocket = GetPocketFromAttachment(&pSoldier->inv[icLBE[sPocket]], icPocket[sPocket]);
}
}
iClass = Item[pSoldier->inv[sPocket].usItem].usItemClass;
if(icLBE[sPocket] == BPACKPOCKPOS && !(pSoldier->flags.ZipperFlag) && (gTacticalStatus.uiFlags & INCOMBAT))
lbePocket = 0;
@@ -6305,6 +6310,9 @@ INT8 DetermineShowLBE( )
if (iResolution >= _640x480 && iResolution < _800x600)
return -1;
if(!gGameSettings.fOptions[TOPTION_SHOW_LBE_CONTENT] && guiCurrentItemDescriptionScreen == MAP_SCREEN)
return -1;
if(!UsingNewInventorySystem())
{
return -1;
@@ -6684,8 +6692,9 @@ void RenderItemDescriptionBox( )
// CHRISL: This block will display misc information for items stored in LBE Pockets
// Display LBENODE attached items
if(UsingNewInventorySystem() == true && Item[gpItemDescObject->usItem].usItemClass == IC_LBEGEAR)
if(UsingNewInventorySystem() == true && Item[gpItemDescObject->usItem].usItemClass == IC_LBEGEAR && (gGameSettings.fOptions[TOPTION_SHOW_LBE_CONTENT] || guiCurrentItemDescriptionScreen != MAP_SCREEN))
{
RenderLBENODEItems( gpItemDescObject, gubItemDescStatusIndex );
}
+11 -2
View File
@@ -657,7 +657,7 @@ extern OBJECTTYPE gTempObject;
#define AC_DEFUSE 0x00200000 //2097152 // defuse item for bombs
#define AC_IRONSIGHT 0x00400000 //4194304 // for attachable Iron Sights
#define AC_FEEDER 0x00800000 //8388608 // allow external feeding
#define AC_MISC13 0x01000000 //16777216
#define AC_MODPOUCH 0x01000000 //16777216 // for new modular pouches
#define AC_MISC14 0x02000000 //33554432
#define AC_MISC15 0x04000000 //67108864
#define AC_MISC16 0x08000000 //134217728
@@ -1027,8 +1027,12 @@ public:
UINT32 lbeClass;
UINT32 lbeCombo;
UINT8 lbeFilledSize;
//DBrot: MOLLE
UINT8 lbeAvailableVolume;
UINT16 lbePocketsAvailable;
char POD;
std::vector<UINT8> lbePocketIndex;
};
#define SIZEOF_LBETYPE offsetof( LBETYPE, POD )
extern std::vector<LBETYPE> LoadBearingEquipment;
@@ -1039,7 +1043,8 @@ typedef enum eLBE_CLASS // Designation of lbeClass
COMBAT_PACK,
BACKPACK,
LBE_POCKET,
OTHER_POCKET
OTHER_POCKET,
MOD_POCKET //DBrot: added mod_pocket to identify modular pouches
};
@@ -1054,6 +1059,8 @@ public:
UINT8 pSilhouette;
UINT16 pType;
UINT32 pRestriction;
//DBrot: MOLLE
UINT8 pVolume;
char POD;
std::vector<UINT8> ItemCapacityPerSize;
};
@@ -1541,6 +1548,8 @@ typedef struct
UINT16 usDescPanelPosY;
BOOLEAN fMultiShot;
BOOLEAN fBigSlot;
//DBrot: MOLLE
UINT8 ubPocketMapping;
} AttachmentSlotStruct;
extern AttachmentSlotStruct AttachmentSlots[MAXITEMS+1];
+60 -2
View File
@@ -1489,8 +1489,11 @@ UINT8 ItemSlotLimit( OBJECTTYPE * pObject, INT16 bSlot, SOLDIERTYPE *pSoldier, B
}
else {
pIndex = LoadBearingEquipment[Item[pSoldier->inv[icLBE[bSlot]].usItem].ubClassIndex].lbePocketIndex[icPocket[bSlot]];
if( pIndex == 0 && LoadBearingEquipment[Item[pSoldier->inv[icLBE[bSlot]].usItem].ubClassIndex].lbePocketsAvailable & (UINT16)pow((double)2, icPocket[bSlot])){
pIndex = GetPocketFromAttachment(&pSoldier->inv[icLBE[bSlot]], icPocket[bSlot]);
}
}
}
//We need to actually check the size of the largest stored item as well as the size of the current item
if(cntAttach == TRUE)
@@ -2243,7 +2246,7 @@ UINT8 AttachmentAPCost( UINT16 usAttachment, OBJECTTYPE * pObj, SOLDIERTYPE * pS
//in the slot we're trying to attach to.
BOOLEAN ValidItemAttachmentSlot( OBJECTTYPE * pObj, UINT16 usAttachment, BOOLEAN fAttemptingAttachment, BOOLEAN fDisplayMessage, UINT8 subObject, INT16 slotCount, BOOLEAN fIgnoreAttachmentInSlot, OBJECTTYPE ** ppAttachInSlot, std::vector<UINT16> usAttachmentSlotIndexVector)
{
BOOLEAN fSimilarItems = FALSE, fSameItem = FALSE;
BOOLEAN fSimilarItems = FALSE, fSameItem = FALSE, fNoSpace = FALSE;
UINT16 usSimilarItem = NOTHING;
INT16 ubSlotIndex = 0;
INT32 iLoop2 = 0;
@@ -2275,11 +2278,18 @@ BOOLEAN ValidItemAttachmentSlot( OBJECTTYPE * pObj, UINT16 usAttachment, BOOLEAN
{
for(int i = 0;i<sizeof(IncompatibleAttachments);i++)
{
if ( FindAttachment(pObj, usAttachment, subObject) != 0 && !IsAttachmentClass(usAttachment, AC_GRENADE|AC_ROCKET ) )
if ( FindAttachment(pObj, usAttachment, subObject) != 0 && !IsAttachmentClass(usAttachment, AC_GRENADE|AC_ROCKET|AC_MODPOUCH ) )
{//Search for identical attachments unless we're dealing with rifle grenades
//DBrot: or pouches
fSameItem = TRUE;
break;
}
if (Item[pObj->usItem].usItemClass == IC_LBEGEAR && Item[usAttachment].usItemClass == IC_LBEGEAR){
if(LoadBearingEquipment[Item[pObj->usItem].ubClassIndex].lbeAvailableVolume < (GetVolumeAlreadyTaken(pObj) + LBEPocketType[LoadBearingEquipment[Item[usAttachment].ubClassIndex].lbePocketIndex[0]].pVolume)){
fNoSpace = TRUE;
break;
}
}
if ( IncompatibleAttachments[i][0] == NONE )
break;
if ( IncompatibleAttachments[i][0] == usAttachment && FindAttachment (pObj,IncompatibleAttachments[i][1],subObject) != 0 )
@@ -2363,6 +2373,11 @@ BOOLEAN ValidItemAttachmentSlot( OBJECTTYPE * pObj, UINT16 usAttachment, BOOLEAN
if (fDisplayMessage) ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_UI_FEEDBACK, Message[ STR_ATTACHMENT_ALREADY ] );
return( FALSE );
}
else if (fNoSpace)
{ //DBrot: TODO - temporary string
if (fDisplayMessage) ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_UI_FEEDBACK, Message[ STR_ATTACHMENT_ALREADY ] );
return( FALSE );
}
else if ( !foundValidAttachment && fDisplayMessage && !ValidMerge( usAttachment, pObj->usItem ) )
{
//We don't want a message if we might be merging this little thingey later.
@@ -5361,7 +5376,15 @@ std::vector<UINT16> GetItemSlots(OBJECTTYPE* pObj, UINT8 subObject, BOOLEAN fAtt
magSize--;
else if(AttachmentSlots[sCount].fMultiShot)
continue;
if(Item[pObj->usItem].usItemClass == IC_LBEGEAR && AttachmentSlots[sCount].ubPocketMapping > 0){
if(LoadBearingEquipment[Item[pObj->usItem].ubClassIndex].lbePocketsAvailable & (UINT16)pow((double)2, AttachmentSlots[sCount].ubPocketMapping - 1)){
tempItemSlots.push_back(AttachmentSlots[sCount].uiSlotIndex);
}
}else{
tempItemSlots.push_back(AttachmentSlots[sCount].uiSlotIndex);
}
}
}
if(slotSize == tempItemSlots.size()){ //we didn't find a layout specific slot so try to find a default layout slot
@@ -5991,6 +6014,10 @@ BOOLEAN CanItemFitInPosition( SOLDIERTYPE *pSoldier, OBJECTTYPE *pObj, INT8 bPos
if(icLBE[bPos] == BPACKPOCKPOS && (!(pSoldier->flags.ZipperFlag) || (pSoldier->flags.ZipperFlag && gAnimControl[pSoldier->usAnimState].ubEndHeight == ANIM_STAND)) && (gTacticalStatus.uiFlags & INCOMBAT))
return( FALSE );
lbePocket = (pSoldier->inv[icLBE[bPos]].exists() == false) ? LoadBearingEquipment[Item[icDefault[bPos]].ubClassIndex].lbePocketIndex[icPocket[bPos]] : LoadBearingEquipment[Item[pSoldier->inv[icLBE[bPos]].usItem].ubClassIndex].lbePocketIndex[icPocket[bPos]];
if( lbePocket == 0 && LoadBearingEquipment[Item[pSoldier->inv[icLBE[bPos]].usItem].ubClassIndex].lbePocketsAvailable & (UINT16)pow((double)2, icPocket[bPos])){
lbePocket = GetPocketFromAttachment(&pSoldier->inv[icLBE[bPos]], icPocket[bPos]);
}
pRestrict = LBEPocketType[lbePocket].pRestriction;
if(pRestrict != 0)
if(!(pRestrict & Item[pObj->usItem].usItemClass))
@@ -13570,6 +13597,37 @@ BOOLEAN HasAttachmentOfClass( OBJECTTYPE * pObj, UINT32 aFlag )
return( FALSE );
}
//DBrot: calculate the volume already taken up by other pouches attached to this carrier
UINT8 GetVolumeAlreadyTaken(OBJECTTYPE * pObj){
UINT8 sum=0;
if ( pObj->exists() )
{
// check all attachments
attachmentList::iterator iterend = (*pObj)[0]->attachments.end();
for (attachmentList::iterator iter = (*pObj)[0]->attachments.begin(); iter != iterend; ++iter)
{
if ( iter->exists() && Item[iter->usItem].usItemClass == IC_LBEGEAR){
sum += LBEPocketType[LoadBearingEquipment[Item[iter->usItem].ubClassIndex].lbePocketIndex[0]].pVolume;
}
}
}
return sum;
}
//DBrot: search the attachments for a pocket
INT16 GetPocketFromAttachment(OBJECTTYPE * pObj, UINT8 pMap){
std::vector<UINT16> usAttachmentSlotIndexVector = GetItemSlots(pObj);
OBJECTTYPE* pAttachment; // = (*pObject)[ubStatusIndex]->GetAttachmentAtIndex(slotCount);
UINT16 slotCount;
for (slotCount = 0; slotCount < usAttachmentSlotIndexVector.size(); slotCount++ ){
if(AttachmentSlots[usAttachmentSlotIndexVector[slotCount]].ubPocketMapping -1 == pMap){
pAttachment = (*pObj)[0]->GetAttachmentAtIndex(slotCount);
if(pAttachment->exists() && Item[pAttachment->usItem].usItemClass == IC_LBEGEAR){
return(LoadBearingEquipment[Item[pAttachment->usItem].ubClassIndex].lbePocketIndex[0]);
}
}
}
return 0;
}
extern void HandleSight(SOLDIERTYPE *pSoldier, UINT8 ubSightFlags);
+3
View File
@@ -478,4 +478,7 @@ OBJECTTYPE* GetExternalFeedingObject(SOLDIERTYPE* pSoldier, OBJECTTYPE * pObject
BOOLEAN DeductBulletViaExternalFeeding(SOLDIERTYPE* pSoldier, OBJECTTYPE * pObject);
//DBrot: get the volume of all attached pouches
UINT8 GetVolumeAlreadyTaken(OBJECTTYPE * pObj);
INT16 GetPocketFromAttachment(OBJECTTYPE * pObj, UINT8 pMap);
#endif
+3 -2
View File
@@ -172,8 +172,9 @@ extern void SetSoldierAniSpeed( SOLDIERTYPE *pSoldier );
extern void HandleExplosionQueue( void );
extern void UpdateForContOverPortrait( SOLDIERTYPE *pSoldier, BOOLEAN fOn );
extern void HandleSystemNewAISituation( SOLDIERTYPE *pSoldier, BOOLEAN fResetABC );
extern BOOLEAN NPCInRoom( UINT8 ubProfileID, UINT8 ubRoomID );
//DBrot: More Rooms
//extern BOOLEAN NPCInRoom( UINT8 ubProfileID, UINT8 ubRoomID );
extern BOOLEAN NPCInRoom( UINT8 ubProfileID, UINT16 usRoomID );
extern INT8 gbInvalidPlacementSlot[ NUM_INV_SLOTS ];
+3
View File
@@ -2971,6 +2971,9 @@ INT16 GetAPsToReadyWeapon( SOLDIERTYPE *pSoldier, UINT16 usAnimState )
//{
//return( APBPConstants[AP_READY_DUAL] );
//}
if ( AM_A_ROBOT( pSoldier ) && gGameExternalOptions.fRobotNoReadytime);
return 0;
if ( pSoldier->IsValidSecondHandShot( ) )
{
//Madd: return the greater of the two weapons + 1:
+4 -3
View File
@@ -1122,10 +1122,11 @@ void AddCrowToCorpse( ROTTING_CORPSE *pCorpse )
INT32 sGridNo;
UINT8 ubDirection;
SOLDIERTYPE *pSoldier;
UINT8 ubRoomNum;
//DBrot: More Rooms
//UINT8 ubRoomNum;
UINT16 usRoomNum;
// No crows inside :(
if ( InARoom( pCorpse->def.sGridNo, &ubRoomNum ) )
if ( InARoom( pCorpse->def.sGridNo, &usRoomNum ) )
{
return;
}
+4 -2
View File
@@ -948,7 +948,9 @@ INT32 FindRandomGridNoFromSweetSpot( SOLDIERTYPE *pSoldier, INT32 sSweetGridNo,
INT32 sTop, sBottom;
INT32 sLeft, sRight;
INT32 cnt1, cnt2;
UINT8 ubRoomNum;
//DBrot: More Rooms
//UINT8 ubRoomNum;
UINT16 usRoomNum;
//Save AI pathing vars. changing the distlimit restricts how
//far away the pathing will consider.
@@ -1006,7 +1008,7 @@ INT32 FindRandomGridNoFromSweetSpot( SOLDIERTYPE *pSoldier, INT32 sSweetGridNo,
// If we are a crow, we need this additional check
if ( pSoldier->ubBodyType == CROW )
{
if ( !InARoom( sGridNo, &ubRoomNum ) )
if ( !InARoom( sGridNo, &usRoomNum ) )
{
fFound = TRUE;
}
+2 -2
View File
@@ -1272,7 +1272,7 @@ MERCPROFILESTRUCT& MERCPROFILESTRUCT::operator=(const OLD_MERCPROFILESTRUCT_101&
memcpy( &(this->bBuddy), &(src.bBuddy), 5 * sizeof (UINT8));
memcpy( &(this->bHated), &(src.bHated), 5 * sizeof (UINT8));
memcpy( &(this->ubRoomRangeStart), &(src.ubRoomRangeStart), 2 * sizeof (UINT8));
memcpy( &(this->usRoomRangeStart), &(src.ubRoomRangeStart), 2 * sizeof (UINT8));
memcpy( &(this->bMercTownReputation), &(src.bMercTownReputation), 20 * sizeof (INT8));
memcpy( &(this->usApproachFactor), &(src.usApproachFactor), 4 * sizeof (UINT16));
@@ -1282,7 +1282,7 @@ MERCPROFILESTRUCT& MERCPROFILESTRUCT::operator=(const OLD_MERCPROFILESTRUCT_101&
memcpy( &(this->usStatChangeChances), &(src.usStatChangeChances), 12 * sizeof (UINT16));// used strictly for balancing, never shown!
memcpy( &(this->usStatChangeSuccesses), &(src.usStatChangeSuccesses), 12 * sizeof (UINT16));// used strictly for balancing, never shown!
memcpy( &(this->ubRoomRangeEnd), &(src.ubRoomRangeEnd), 2 * sizeof (UINT8));
memcpy( &(this->usRoomRangeEnd), &(src.ubRoomRangeEnd), 2 * sizeof (UINT8));
memcpy( &(this->bHatedTime), &(src.bHatedTime), 5 * sizeof (INT8));
memcpy( &(this->bHatedCount), &(src.bHatedCount), 5 * sizeof (INT8));
+4 -2
View File
@@ -661,7 +661,9 @@ BOOLEAN AddPlacementToWorld( SOLDIERINITNODE *curr, GROUP *pGroup = NULL )
// quest-related overrides
if ( gWorldSectorX == 5 && gWorldSectorY == MAP_ROW_C )
{
UINT8 ubRoom;
//DBrot: More rooms
//UINT8 ubRoom;
UINT16 usRoom;
// Kinpin guys might be guarding Tony
if ( tempDetailedPlacement.ubCivilianGroup == KINGPIN_CIV_GROUP && ( gTacticalStatus.fCivGroupHostile[ KINGPIN_CIV_GROUP ] == CIV_GROUP_WILL_BECOME_HOSTILE || ( (gubQuest[ QUEST_KINGPIN_MONEY ] == QUESTINPROGRESS) && (CheckFact( FACT_KINGPIN_CAN_SEND_ASSASSINS, KINGPIN )) ) ) )
@@ -700,7 +702,7 @@ BOOLEAN AddPlacementToWorld( SOLDIERINITNODE *curr, GROUP *pGroup = NULL )
// she shouldn't be here!
return( TRUE );
}
else if ( tempDetailedPlacement.ubProfile == NO_PROFILE && InARoom( tempDetailedPlacement.sInsertionGridNo, &ubRoom ) && IN_BROTHEL( ubRoom ) )
else if ( tempDetailedPlacement.ubProfile == NO_PROFILE && InARoom( tempDetailedPlacement.sInsertionGridNo, &usRoom ) && IN_BROTHEL( usRoom ) )
{
// must be a hooker, shouldn't be there
return( TRUE );
+9 -7
View File
@@ -2235,12 +2235,14 @@ SOLDIERTYPE * SwapLarrysProfiles( SOLDIERTYPE * pSoldier )
BOOLEAN DoesNPCOwnBuilding( SOLDIERTYPE *pSoldier, INT32 sGridNo )
{
UINT8 ubRoomInfo;
//DBrot: More Rooms
//UINT8 ubRoomInfo;
UINT16 usRoomInfo;
// Get room info
ubRoomInfo = gubWorldRoomInfo[ sGridNo ];
usRoomInfo = gusWorldRoomInfo[ sGridNo ];
if ( ubRoomInfo == NO_ROOM )
if ( usRoomInfo == NO_ROOM )
{
return( FALSE );
}
@@ -2252,14 +2254,14 @@ BOOLEAN DoesNPCOwnBuilding( SOLDIERTYPE *pSoldier, INT32 sGridNo )
}
// OK, check both ranges
if ( ubRoomInfo >= gMercProfiles[ pSoldier->ubProfile ].ubRoomRangeStart[ 0 ] &&
ubRoomInfo <= gMercProfiles[ pSoldier->ubProfile ].ubRoomRangeEnd[ 0 ] )
if ( usRoomInfo >= gMercProfiles[ pSoldier->ubProfile ].usRoomRangeStart[ 0 ] &&
usRoomInfo <= gMercProfiles[ pSoldier->ubProfile ].usRoomRangeEnd[ 0 ] )
{
return( TRUE );
}
if ( ubRoomInfo >= gMercProfiles[ pSoldier->ubProfile ].ubRoomRangeStart[ 1 ] &&
ubRoomInfo <= gMercProfiles[ pSoldier->ubProfile ].ubRoomRangeEnd[ 1 ] )
if ( usRoomInfo >= gMercProfiles[ pSoldier->ubProfile ].usRoomRangeStart[ 1 ] &&
usRoomInfo <= gMercProfiles[ pSoldier->ubProfile ].usRoomRangeEnd[ 1 ] )
{
return( TRUE );
}
+11 -1
View File
@@ -50,6 +50,7 @@ attachmentslotStartElementHandle(void *userData, const XML_Char *name, const XML
pData->maxReadDepth++; //we are not skipping this element
}
//DBrot: MOLLE new tag
else if(pData->curElement == ELEMENT &&
(strcmp(name, "uiSlotIndex") == 0 ||
strcmp(name, "szSlotName") == 0 ||
@@ -58,6 +59,7 @@ attachmentslotStartElementHandle(void *userData, const XML_Char *name, const XML
strcmp(name, "usDescPanelPosX") == 0 ||
strcmp(name, "usDescPanelPosY") == 0 ||
strcmp(name, "fMultiShot") == 0 ||
strcmp(name, "ubPocketMapping") == 0 ||
strcmp(name, "fBigSlot") == 0 ))
{
pData->curElement = ELEMENT_PROPERTY;
@@ -139,6 +141,12 @@ attachmentslotEndElementHandle(void *userData, const XML_Char *name)
pData->curElement = ELEMENT;
pData->curAttachmentSlot.usDescPanelPosY = (UINT16) atol(pData->szCharData);
}
//DBrot: MOLLE
else if(strcmp(name, "ubPocketMapping") == 0)
{
pData->curElement = ELEMENT;
pData->curAttachmentSlot.ubPocketMapping = (UINT8) atol(pData->szCharData);
}
else if(strcmp(name, "fMultiShot") == 0)
{
pData->curElement = ELEMENT;
@@ -252,8 +260,10 @@ BOOLEAN WriteAttachmentSlotsStats()
FilePrintf(hFile,"\t\t<usDescPanelPosX>%d</usDescPanelPosX>\r\n", AttachmentSlots[cnt].usDescPanelPosX );
FilePrintf(hFile,"\t\t<usDescPanelPosY>%d</usDescPanelPosY>\r\n", AttachmentSlots[cnt].usDescPanelPosY );
FilePrintf(hFile,"\t\t<fMultiShot>%d</fMultiShot>\r\n", AttachmentSlots[cnt].fMultiShot );
//DBrot: MOLLE
FilePrintf(hFile,"\t\t<ubPocketMapping>%d</ubPocketMapping>\r\n", AttachmentSlots[cnt].ubPocketMapping );
FilePrintf(hFile,"\t\t<fBigSlot>%d</fBigSlot>\r\n", AttachmentSlots[cnt].fBigSlot );
FilePrintf(hFile,"\t</ATTACHMENTSLOT>\r\n");
}
FilePrintf(hFile,"</ATTACHMENTSLOTLIST>\r\n");
+11 -2
View File
@@ -93,13 +93,14 @@ lbepocketStartElementHandle(void *userData, const XML_Char *name, const XML_Char
pData->curLBEPocket = POCKETTYPE();
pData->maxReadDepth++; //we are not skipping this element
}
}//DBrot: MOLLE added tag
else if(pData->curElement == ELEMENT &&
(strcmp(name, "pIndex") == 0 ||
strcmp(name, "pName") == 0 ||
strcmp(name, "pSilhouette") == 0 ||
strcmp(name, "pType") == 0 ||
strcmp(name, "pRestriction") == 0 ||
strcmp(name, "pVolume") == 0 ||
lbepocketStartElementHandleLoop(name, pData)))
/* JMich - These are no longer needed
strcmp(name, "ItemCapacityPerSize.0") == 0 || strcmp(name, "ItemCapacityPerSize0") == 0 ||
@@ -219,7 +220,13 @@ lbepocketParseData * pData = (lbepocketParseData *)userData;
{
pData->curElement = ELEMENT;
pData->curLBEPocket.pRestriction = (UINT32) atol(pData->szCharData);
} //Tais fixed this.
} //DBrot: MOLLE added tag
else if(strcmp(name, "pVolume") == 0)
{
pData->curElement = ELEMENT;
pData->curLBEPocket.pVolume = (UINT8) atol(pData->szCharData);
}
//Tais fixed this.
else
{ //DBrot: Enhanced parsing routine to avoid excessive load times for larger (~1000) numbers of item sizes
//-test the prefix if we have an "ItemCapacityPerSize###" tag
@@ -543,6 +550,8 @@ BOOLEAN WriteLBEPocketEquipmentStats()
FilePrintf(hFile,"\t\t<pSilhouette>%d</pSilhouette>\r\n", LBEPocketType[cnt].pSilhouette );
FilePrintf(hFile,"\t\t<pType>%d</pType>\r\n", LBEPocketType[cnt].pType );
FilePrintf(hFile,"\t\t<pRestriction>%d</pRestriction>\r\n", LBEPocketType[cnt].pRestriction );
//DBrot: MOLLE
FilePrintf(hFile,"\t\t<pVolume>%d</pVolume>\r\n", LBEPocketType[cnt].pVolume );
for(i=0;i<=gGameExternalOptions.guiMaxItemSize;i++) //JMich
{
FilePrintf(hFile,"\t\t<ItemCapacityPerSize%d>%d</ItemCapacityPerSize%d>\r\n", i,LBEPocketType[cnt].ItemCapacityPerSize[i],i );
+23 -4
View File
@@ -40,12 +40,13 @@ lbeStartElementHandle(void *userData, const XML_Char *name, const XML_Char **att
pData->curLBE = LBETYPE();
pData->maxReadDepth++; //we are not skipping this element
}
}//DBrot: MOLLE added tag
else if(pData->curElement == ELEMENT &&
(strcmp(name, "lbeIndex") == 0 ||
strcmp(name, "lbeClass") == 0 ||
strcmp(name, "lbeCombo") == 0 ||
strcmp(name, "lbeFilledSize") == 0 ||
strcmp(name, "lbeAvailableVolume") == 0 ||
strcmp(name, "lbePocketIndex.1") == 0 || strcmp(name, "lbePocketIndex1") == 0 ||
strcmp(name, "lbePocketIndex.2") == 0 || strcmp(name, "lbePocketIndex2") == 0 ||
strcmp(name, "lbePocketIndex.3") == 0 || strcmp(name, "lbePocketIndex3") == 0 ||
@@ -57,7 +58,9 @@ lbeStartElementHandle(void *userData, const XML_Char *name, const XML_Char **att
strcmp(name, "lbePocketIndex.9") == 0 || strcmp(name, "lbePocketIndex9") == 0 ||
strcmp(name, "lbePocketIndex.10") == 0 || strcmp(name, "lbePocketIndex10") == 0 ||
strcmp(name, "lbePocketIndex.11") == 0 || strcmp(name, "lbePocketIndex11") == 0 ||
strcmp(name, "lbePocketIndex.12") == 0 || strcmp(name, "lbePocketIndex12") == 0 ))
strcmp(name, "lbePocketIndex.12") == 0 || strcmp(name, "lbePocketIndex12") == 0 ||
strcmp(name, "lbePocketsAvailable") == 0))
{
pData->curElement = ELEMENT_PROPERTY;
@@ -120,6 +123,12 @@ lbeEndElementHandle(void *userData, const XML_Char *name)
pData->curElement = ELEMENT;
pData->curLBE.lbeFilledSize = (UINT8) atol(pData->szCharData);
}
//DBrot: MOLLE
else if(strcmp(name, "lbeAvailableVolume") == 0)
{
pData->curElement = ELEMENT;
pData->curLBE.lbeAvailableVolume = (UINT8) atol(pData->szCharData);
}
else if(strcmp(name, "lbePocketIndex.1") == 0 || strcmp(name, "lbePocketIndex1") == 0)
{
pData->curElement = ELEMENT;
@@ -180,7 +189,14 @@ lbeEndElementHandle(void *userData, const XML_Char *name)
pData->curElement = ELEMENT;
pData->curLBE.lbePocketIndex[11] = (UINT8) atol(pData->szCharData);
}
else if(strcmp(name, "lbePocketsAvailable") == 0)
{
pData->curElement = ELEMENT;
pData->curLBE.lbePocketsAvailable = (UINT16) atol(pData->szCharData);
}
pData->maxReadDepth--;
}
@@ -269,13 +285,14 @@ BOOLEAN WritelbeEquipmentStats()
FilePrintf(hFile,"<LOADBEARINGEQUIPMENTLIST>\r\n");
for(cnt = 0;cnt < MAXITEMS;cnt++)
{
//DBrot: MOLLE
FilePrintf(hFile,"\t<LOADBEARINGEQUIPMENT>\r\n");
FilePrintf(hFile,"\t\t<lbeIndex>%d</lbeIndex>\r\n", cnt );
FilePrintf(hFile,"\t\t<lbeClass>%d</lbeClass>\r\n", LoadBearingEquipment[cnt].lbeClass );
FilePrintf(hFile,"\t\t<lbeCombo>%d</lbeCombo>\r\n", LoadBearingEquipment[cnt].lbeCombo );
FilePrintf(hFile,"\t\t<lbeFilledSize>%d</lbeFilledSize>\r\n", LoadBearingEquipment[cnt].lbeFilledSize );
FilePrintf(hFile,"\t\t<lbeAvailableVolume>%d</lbeAvailableVolume>\r\n", LoadBearingEquipment[cnt].lbeAvailableVolume );
FilePrintf(hFile,"\t\t<lbePocketIndex1>%d</lbePocketIndex1>\r\n", LoadBearingEquipment[cnt].lbePocketIndex[0] );
FilePrintf(hFile,"\t\t<lbePocketIndex2>%d</lbePocketIndex2>\r\n", LoadBearingEquipment[cnt].lbePocketIndex[1] );
FilePrintf(hFile,"\t\t<lbePocketIndex3>%d</lbePocketIndex3>\r\n", LoadBearingEquipment[cnt].lbePocketIndex[2] );
@@ -289,6 +306,8 @@ BOOLEAN WritelbeEquipmentStats()
FilePrintf(hFile,"\t\t<lbePocketIndex11>%d</lbePocketIndex11>\r\n", LoadBearingEquipment[cnt].lbePocketIndex[10] );
FilePrintf(hFile,"\t\t<lbePocketIndex12>%d</lbePocketIndex12>\r\n", LoadBearingEquipment[cnt].lbePocketIndex[11] );
FilePrintf(hFile,"\t\t<lbePocketsAvailable>%d</lbePocketsAvailable>\r\n", LoadBearingEquipment[cnt].lbePocketsAvailable);
FilePrintf(hFile,"\t</LOADBEARINGEQUIPMENT>\r\n");
}
FilePrintf(hFile,"</LOADBEARINGEQUIPMENTLIST>\r\n");
+7 -5
View File
@@ -301,7 +301,9 @@ void RevealRoofsAndItems(SOLDIERTYPE *pSoldier, UINT32 itemsToo, BOOLEAN fShowLo
INT8 nextDir=0;
UINT8 who; //,itemIndex; // for each square checked
UINT8 dir,range,Path2;
UINT8 ubRoomNo;
//DBrot: More Rooms
//UINT8 ubRoomNo;
UINT16 usRoomNo;
BOOLEAN fCheckForRooms = FALSE;
ITEM_POOL *pItemPool;
BOOLEAN fHiddenStructVisible;
@@ -841,7 +843,7 @@ void RevealRoofsAndItems(SOLDIERTYPE *pSoldier, UINT32 itemsToo, BOOLEAN fShowLo
// OK, if we are underground, we don't want to reveal stuff if
// 1 ) there is a roof over us and
// 2 ) we are not in a room
if ( gubWorldRoomInfo[ marker ] == NO_ROOM && TypeRangeExistsInRoofLayer( marker, FIRSTROOF, FOURTHROOF, &usIndex ) )
if ( gusWorldRoomInfo[ marker ] == NO_ROOM && TypeRangeExistsInRoofLayer( marker, FIRSTROOF, FOURTHROOF, &usIndex ) )
{
int i = 0;
}
@@ -862,10 +864,10 @@ void RevealRoofsAndItems(SOLDIERTYPE *pSoldier, UINT32 itemsToo, BOOLEAN fShowLo
// CHECK FOR ROOMS
//if ( fCheckForRooms )
{
if ( InAHiddenRoom( marker, &ubRoomNo ) )
if ( InAHiddenRoom( marker, &usRoomNo ) )
{
RemoveRoomRoof( marker, ubRoomNo, pSoldier );
if ( ubRoomNo == ROOM_SURROUNDING_BOXING_RING && gWorldSectorX == BOXING_SECTOR_X && gWorldSectorY == BOXING_SECTOR_Y && gbWorldSectorZ == BOXING_SECTOR_Z )
RemoveRoomRoof( marker, usRoomNo, pSoldier );
if ( usRoomNo == ROOM_SURROUNDING_BOXING_RING && gWorldSectorX == BOXING_SECTOR_X && gWorldSectorY == BOXING_SECTOR_Y && gbWorldSectorZ == BOXING_SECTOR_Z )
{
// reveal boxing ring at same time
RemoveRoomRoof( marker, BOXING_RING, pSoldier );
+15 -9
View File
@@ -1784,9 +1784,11 @@ void HandleManNoLongerSeen( SOLDIERTYPE * pSoldier, SOLDIERTYPE * pOpponent, INT
if ( (pSoldier->ubCivilianGroup == KINGPIN_CIV_GROUP) && (pOpponent->bTeam == gbPlayerNum ) )
{
UINT8 ubRoom;
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
if ( InARoom( pOpponent->sGridNo, &ubRoom ) && IN_BROTHEL( ubRoom ) && ( IN_BROTHEL_GUARD_ROOM( ubRoom ) ) )
if ( InARoom( pOpponent->sGridNo, &usRoom ) && IN_BROTHEL( usRoom ) && ( IN_BROTHEL_GUARD_ROOM( usRoom ) ) )
{
// unauthorized!
// make guard run to block guard room
@@ -2256,12 +2258,14 @@ void ManSeesMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, INT32 sOppGridNo,
case ELDIN:
if ( pSoldier->aiData.bNeutral )
{
UINT8 ubRoom = 0;
//DBrot: More Rooms
//UINT8 ubRoom = 0;
UINT16 usRoom = 0;
// if player is in behind the ropes of the museum display
// or if alarm has gone off (status red)
InARoom( pOpponent->sGridNo, &ubRoom );
InARoom( pOpponent->sGridNo, &usRoom );
if ( ( CheckFact( FACT_MUSEUM_OPEN, 0 ) == FALSE && ubRoom >= 22 && ubRoom <= 41 ) || CheckFact( FACT_MUSEUM_ALARM_WENT_OFF, 0 ) || ( ubRoom == 39 || ubRoom == 40 ) || ( FindObj( pOpponent, CHALICE ) != NO_SLOT ) )
if ( ( CheckFact( FACT_MUSEUM_OPEN, 0 ) == FALSE && usRoom >= 22 && usRoom <= 41 ) || CheckFact( FACT_MUSEUM_ALARM_WENT_OFF, 0 ) || ( usRoom == 39 || usRoom == 40 ) || ( FindObj( pOpponent, CHALICE ) != NO_SLOT ) )
{
SetFactTrue( FACT_MUSEUM_ALARM_WENT_OFF );
AddToShouldBecomeHostileOrSayQuoteList( pSoldier->ubID );
@@ -2375,11 +2379,13 @@ void ManSeesMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, INT32 sOppGridNo,
}
else
{
UINT8 ubRoom;
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
// JA2 Gold: only go hostile if see player IN guard room
//if ( InARoom( pOpponent->sGridNo, &ubRoom ) && IN_BROTHEL( ubRoom ) && ( gMercProfiles[ MADAME ].bNPCData == 0 || IN_BROTHEL_GUARD_ROOM( ubRoom ) ) )
if ( InARoom( pOpponent->sGridNo, &ubRoom ) && IN_BROTHEL_GUARD_ROOM( ubRoom ) )
if ( InARoom( pOpponent->sGridNo, &usRoom ) && IN_BROTHEL_GUARD_ROOM( usRoom ) )
{
// unauthorized!
MakeCivHostile( pSoldier, 2 );
@@ -4318,12 +4324,12 @@ void DebugSoldierPage2( )
ubLine++;
}
if (gubWorldRoomInfo[ usMapPos ] != NO_ROOM )
if (gusWorldRoomInfo[ usMapPos ] != NO_ROOM )
{
SetFontColors(COLOR2);
mprintf( 0, LINE_HEIGHT * ubLine, L"Room Number" );
SetFontColors(COLOR2);
mprintf( 150, LINE_HEIGHT * ubLine, L"%d", gubWorldRoomInfo[ usMapPos ] );
mprintf( 150, LINE_HEIGHT * ubLine, L"%d", gusWorldRoomInfo[ usMapPos ] );
ubLine++;
}
+5 -2
View File
@@ -724,7 +724,9 @@ public:
INT8 bMechanical;
UINT8 ubInvUndroppable;
UINT8 ubRoomRangeStart[2];
//DBrot: More Rooms
//UINT8 ubRoomRangeStart[2];
UINT16 usRoomRangeStart[2];
INT8 bMercTownReputation[ 20 ];
UINT16 usStatChangeChances[ 12 ]; // used strictly for balancing, never shown!
@@ -732,7 +734,8 @@ public:
UINT8 ubStrategicInsertionCode;
UINT8 ubRoomRangeEnd[2];
//UINT8 ubRoomRangeEnd[2];
UINT16 usRoomRangeEnd[2];
UINT8 ubLastQuoteSaid;
+6 -5
View File
@@ -746,8 +746,9 @@ INT32 RandDestWithinRange(SOLDIERTYPE *pSoldier)
INT16 sMaxLeft, sMaxRight, sMaxUp, sMaxDown, sXRange, sYRange, sXOffset, sYOffset;
INT16 sOrigX, sOrigY;
INT16 sX, sY;
UINT8 ubRoom = 0, ubTempRoom;
//DBrot: More Rooms
//UINT8 ubRoom = 0, ubTempRoom;
UINT16 usRoom = 0, usTempRoom;
sOrigX = sOrigY = -1;
sMaxLeft = sMaxRight = sMaxUp = sMaxDown = sXRange = sYRange = -1;
@@ -768,9 +769,9 @@ INT32 RandDestWithinRange(SOLDIERTYPE *pSoldier)
if ( pSoldier->aiData.bOrders <= CLOSEPATROL && (pSoldier->bTeam == CIV_TEAM || pSoldier->ubProfile != NO_PROFILE ) )
{
// any other combo uses the default of ubRoom == 0, set above
if ( !InARoom( pSoldier->aiData.sPatrolGrid[0], &ubRoom ) )
if ( !InARoom( pSoldier->aiData.sPatrolGrid[0], &usRoom ) )
{
ubRoom = 0;
usRoom = 0;
}
}
@@ -861,7 +862,7 @@ INT32 RandDestWithinRange(SOLDIERTYPE *pSoldier)
}while(!GridNoOnVisibleWorldTile(sRandDest));
}
if ( ubRoom && InARoom( sRandDest, &ubTempRoom ) && ubTempRoom != ubRoom )
if ( usRoom && InARoom( sRandDest, &usTempRoom ) && usTempRoom != usRoom )
{
// outside of room available for patrol!
sRandDest = NOWHERE;
+10 -6
View File
@@ -547,16 +547,18 @@ INT8 DecideActionSchedule( SOLDIERTYPE * pSoldier )
INT8 DecideActionBoxerEnteringRing(SOLDIERTYPE *pSoldier)
{
UINT8 ubRoom;
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
INT32 sDesiredMercLoc;
UINT8 ubDesiredMercDir;
#ifdef DEBUGDECISIONS
STR16 tempstr;
#endif
// boxer, should move into ring!
if ( InARoom( pSoldier->sGridNo, &ubRoom ))
if ( InARoom( pSoldier->sGridNo, &usRoom ))
{
if (ubRoom == BOXING_RING)
if (usRoom == BOXING_RING)
{
// look towards nearest player
sDesiredMercLoc = ClosestPC( pSoldier, NULL );
@@ -728,13 +730,15 @@ INT8 DecideActionGreen(SOLDIERTYPE *pSoldier)
}
else
{
UINT8 ubRoom;
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
UINT8 ubLoop;
// boxer... but since in status green, it's time to leave the ring!
if ( InARoom( pSoldier->sGridNo, &ubRoom ))
if ( InARoom( pSoldier->sGridNo, &usRoom ))
{
if (ubRoom == BOXING_RING)
if (usRoom == BOXING_RING)
{
for ( ubLoop = 0; ubLoop < NUM_BOXERS; ubLoop++ )
{
+5 -3
View File
@@ -2295,7 +2295,9 @@ INT32 FindClosestBoxingRingSpot( SOLDIERTYPE * pSoldier, BOOLEAN fInRing )
INT32 sGridNo, sClosestSpot = NOWHERE;
INT32 iDistance, iClosestDistance = 9999;
UINT8 ubRoom;
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
// set the distance limit of the square region
iSearchRange = 7;
@@ -2323,9 +2325,9 @@ INT32 FindClosestBoxingRingSpot( SOLDIERTYPE * pSoldier, BOOLEAN fInRing )
{
// calculate the next potential gridno
sGridNo = pSoldier->sGridNo + sXOffset + (MAXCOL * sYOffset);
if ( InARoom( sGridNo, &ubRoom ))
if ( InARoom( sGridNo, &usRoom ))
{
if ( (fInRing && ubRoom == BOXING_RING) || (!fInRing && ubRoom != BOXING_RING ) && LegalNPCDestination(pSoldier,sGridNo,IGNORE_PATH,NOWATER,0) )
if ( (fInRing && usRoom == BOXING_RING) || (!fInRing && usRoom != BOXING_RING ) && LegalNPCDestination(pSoldier,sGridNo,IGNORE_PATH,NOWATER,0) )
{
iDistance = abs( sXOffset ) + abs( sYOffset );
if ( iDistance < iClosestDistance && WhoIsThere2( sGridNo, 0 ) == NOBODY )
+5 -3
View File
@@ -281,12 +281,14 @@ INT32 MostImportantNoiseHeard( SOLDIERTYPE *pSoldier, INT32 *piRetValue, BOOLEAN
// make civs not walk to noises outside their room if on close patrol/onguard
if ( pSoldier->aiData.bOrders <= CLOSEPATROL && (pSoldier->bTeam == CIV_TEAM || pSoldier->ubProfile != NO_PROFILE ) )
{
UINT8 ubRoom, ubNewRoom;
//DBrot: More Rooms
//UINT8 ubRoom, ubNewRoom;
UINT16 usRoom, usNewRoom;
// any other combo uses the default of ubRoom == 0, set above
if ( InARoom( pSoldier->aiData.sPatrolGrid[0], &ubRoom ) )
if ( InARoom( pSoldier->aiData.sPatrolGrid[0], &usRoom ) )
{
if ( !InARoom( pSoldier->aiData.sPatrolGrid[0], &ubNewRoom ) || ubRoom != ubNewRoom )
if ( !InARoom( pSoldier->aiData.sPatrolGrid[0], &usNewRoom ) || usRoom != usNewRoom )
{
*pfReachable = FALSE;
}
+7 -5
View File
@@ -451,7 +451,9 @@ INT32 InternalGoAsFarAsPossibleTowards(SOLDIERTYPE *pSoldier, INT32 sDesGrid, IN
UINT16 usMaxDist;
UINT8 ubDirection,ubDirsLeft,ubDirChecked[8],fFound = FALSE;
INT8 bAPsLeft, fPathFlags;
UINT8 ubRoomRequired = 0, ubTempRoom;
//DBrot: More Rooms
//UINT8 ubRoomRequired = 0, ubTempRoom;
UINT16 usRoomRequired = 0, usTempRoom;
BOOLEAN fAllowDest = FALSE;
// 0verhaul: Make sure to clear the stored path since this always calculates a new one.
@@ -478,12 +480,12 @@ INT32 InternalGoAsFarAsPossibleTowards(SOLDIERTYPE *pSoldier, INT32 sDesGrid, IN
if ( pSoldier->aiData.bOrders <= CLOSEPATROL && (pSoldier->bTeam == CIV_TEAM || pSoldier->ubProfile != NO_PROFILE ) )
{
if ( InARoom( pSoldier->aiData.sPatrolGrid[0], &ubRoomRequired ) )
if ( InARoom( pSoldier->aiData.sPatrolGrid[0], &usRoomRequired ) )
{
// make sure this doesn't interfere with pathing for scripts
if (!TileIsOutOfBounds(pSoldier->sAbsoluteFinalDestination))
{
ubRoomRequired = 0;
usRoomRequired = 0;
}
}
}
@@ -662,9 +664,9 @@ INT32 InternalGoAsFarAsPossibleTowards(SOLDIERTYPE *pSoldier, INT32 sDesGrid, IN
break; // quit here, sGoToGrid is where we are going
if ( ubRoomRequired )
if ( usRoomRequired )
{
if ( !( InARoom( sTempDest, &ubTempRoom ) && ubTempRoom == ubRoomRequired ) )
if ( !( InARoom( sTempDest, &usTempRoom ) && usTempRoom == usRoomRequired ) )
{
// quit here, limited by room!
break;
+5 -3
View File
@@ -1152,12 +1152,14 @@ UINT8 NPCConsiderReceivingItemFromMerc( UINT8 ubNPC, UINT8 ubMerc, OBJECTTYPE *
{
// find Kingpin, if he's in his house, invoke the script to move him to the bar
SOLDIERTYPE * pKingpin;
UINT8 ubKingpinRoom;
//DBrot: More Rooms
//UINT8 ubKingpinRoom;
UINT16 usKingpinRoom;
pKingpin = FindSoldierByProfileID( KINGPIN, FALSE );
if ( pKingpin && InARoom( pKingpin->sGridNo, &ubKingpinRoom ) )
if ( pKingpin && InARoom( pKingpin->sGridNo, &usKingpinRoom ) )
{
if ( IN_KINGPIN_HOUSE( ubKingpinRoom ) )
if ( IN_KINGPIN_HOUSE( usKingpinRoom ) )
{
// first boxer, bring kingpin over
(*ppResultQuoteInfo) = &pNPCQuoteInfoArray[17];
+9 -4
View File
@@ -17,6 +17,7 @@
#include "NPC.h"
#include "Render Fun.h"
#include "Quests.h"
#include "GameSettings.h"
#endif
INT8 RTPlayerDecideAction( SOLDIERTYPE * pSoldier )
@@ -99,9 +100,11 @@ UINT16 RealtimeDelay( SOLDIERTYPE * pSoldier )
if ( pSoldier->ubCivilianGroup == KINGPIN_CIV_GROUP )
{
UINT8 ubRoom;
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
if ( InARoom( pSoldier->sGridNo, &ubRoom ) && IN_BROTHEL( ubRoom ) )
if ( InARoom( pSoldier->sGridNo, &usRoom ) && IN_BROTHEL( usRoom ) )
{
return( (UINT16) (REALTIME_AI_DELAY / 3) );
}
@@ -256,9 +259,11 @@ void RTHandleAI( SOLDIERTYPE * pSoldier )
pSoldier->aiData.usActionData = (UINT16) REALTIME_AI_DELAY;
if ( pSoldier->ubCivilianGroup == KINGPIN_CIV_GROUP )
{
UINT8 ubRoom;
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
if ( InARoom( pSoldier->sGridNo, &ubRoom ) && IN_BROTHEL( ubRoom ) )
if ( InARoom( pSoldier->sGridNo, &usRoom ) && IN_BROTHEL( usRoom ) )
{
pSoldier->aiData.usActionData /= 3;
}
+2 -2
View File
@@ -164,7 +164,7 @@ void GenerateBuildings( void )
// for each location in a room try to find building info
for ( uiLoop = 0; uiLoop < WORLD_MAX; uiLoop++ )
{
if ( (gubWorldRoomInfo[ uiLoop ] != NO_ROOM) && (gubBuildingInfo[ uiLoop ] == NO_BUILDING) && (FindStructure( uiLoop, STRUCTURE_NORMAL_ROOF ) != NULL) )
if ( (gusWorldRoomInfo[ uiLoop ] != NO_ROOM) && (gubBuildingInfo[ uiLoop ] == NO_BUILDING) && (FindStructure( uiLoop, STRUCTURE_NORMAL_ROOF ) != NULL) )
{
GenerateBuilding( uiLoop );
}
@@ -646,7 +646,7 @@ void GenerateBuildings( void )
// for each location in a room try to find building info
for ( uiLoop = 0; uiLoop < WORLD_MAX; uiLoop++ )
{
if ( (gubWorldRoomInfo[ uiLoop ] != NO_ROOM) && (gubBuildingInfo[ uiLoop ] == NO_BUILDING) && (FindStructure( uiLoop, STRUCTURE_NORMAL_ROOF ) != NULL) )
if ( (gusWorldRoomInfo[ uiLoop ] != NO_ROOM) && (gubBuildingInfo[ uiLoop ] == NO_BUILDING) && (FindStructure( uiLoop, STRUCTURE_NORMAL_ROOF ) != NULL) )
{
GenerateBuilding( uiLoop );
}
+25 -16
View File
@@ -93,8 +93,9 @@
//forward declarations of common classes to eliminate includes
class OBJECTTYPE;
class SOLDIERTYPE;
BOOLEAN HookerInRoom( UINT8 ubRoom );
//DBrot: More Rooms
//BOOLEAN HookerInRoom( UINT8 ubRoom );
BOOLEAN HookerInRoom( UINT16 usRoom );
// MODULE FOR EXPLOSIONS
@@ -1175,22 +1176,24 @@ BOOLEAN ExplosiveDamageStructureAtGridNo( STRUCTURE * pCurrent, STRUCTURE **ppNe
// CJC, Sept 16: if we destroy any wall of the brothel, make Kingpin's men hostile!
if ( gWorldSectorX == 5 && gWorldSectorY == MAP_ROW_C && gbWorldSectorZ == 0 )
{
UINT8 ubRoom;
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
BOOLEAN fInRoom;
fInRoom = InARoom( sGridNo, &ubRoom );
fInRoom = InARoom( sGridNo, &usRoom );
if ( !fInRoom )
{
// try to south
fInRoom = InARoom( sGridNo + DirectionInc( SOUTH ) , &ubRoom );
fInRoom = InARoom( sGridNo + DirectionInc( SOUTH ) , &usRoom );
if ( !fInRoom )
{
// try to east
fInRoom = InARoom( sGridNo + DirectionInc( EAST ) , &ubRoom );
fInRoom = InARoom( sGridNo + DirectionInc( EAST ) , &usRoom );
}
}
if ( fInRoom && IN_BROTHEL( ubRoom ) )
if ( fInRoom && IN_BROTHEL( usRoom ) )
{
CivilianGroupChangesSides( KINGPIN_CIV_GROUP );
}
@@ -3092,9 +3095,11 @@ void BillyBlocksDoorCallback( void )
TriggerNPCRecord( BILLY, 6 );
}
BOOLEAN HookerInRoom( UINT8 ubRoom )
BOOLEAN HookerInRoom( UINT16 usRoom )
{
UINT8 ubLoop, ubTempRoom;
//DBrot: More Rooms
UINT8 ubLoop;//, ubTempRoom;
UINT16 usTempRoom;
SOLDIERTYPE * pSoldier;
for ( ubLoop = gTacticalStatus.Team[ CIV_TEAM ].bFirstID; ubLoop <= gTacticalStatus.Team[ CIV_TEAM ].bLastID; ubLoop++ )
@@ -3103,7 +3108,7 @@ BOOLEAN HookerInRoom( UINT8 ubRoom )
if ( pSoldier->bActive && pSoldier->bInSector && pSoldier->stats.bLife >= OKLIFE && pSoldier->aiData.bNeutral && pSoldier->ubBodyType == MINICIV )
{
if ( InARoom( pSoldier->sGridNo, &ubTempRoom ) && ubTempRoom == ubRoom )
if ( InARoom( pSoldier->sGridNo, &usTempRoom ) && usTempRoom == usRoom )
{
return( TRUE );
}
@@ -3418,15 +3423,17 @@ void PerformItemAction( INT32 sGridNo, OBJECTTYPE * pObj )
INT16 sTeleportSpot;
INT16 sDoorSpot;
UINT8 ubDirection;
UINT8 ubRoom, ubOldRoom;
//DBrot: More Rooms
//UINT8 ubRoom, ubOldRoom;
UINT16 usRoom, usOldRoom;
ubID = WhoIsThere2( sGridNo, 0 );
if ( (ubID != NOBODY) && (MercPtrs[ ubID ]->bTeam == gbPlayerNum) )
{
if ( InARoom( sGridNo, &ubRoom ) && InARoom( MercPtrs[ ubID ]->sOldGridNo, &ubOldRoom ) && ubOldRoom != ubRoom )
if ( InARoom( sGridNo, &usRoom ) && InARoom( MercPtrs[ ubID ]->sOldGridNo, &usOldRoom ) && usOldRoom != usRoom )
{
// also require there to be a miniskirt civ in the room
if ( HookerInRoom( ubRoom ) )
if ( HookerInRoom( usRoom ) )
{
// stop the merc...
@@ -3487,10 +3494,12 @@ void PerformItemAction( INT32 sGridNo, OBJECTTYPE * pObj )
break;
case ACTION_ITEM_REVEAL_ROOM:
{
UINT8 ubRoom;
if ( InAHiddenRoom( sGridNo, &ubRoom ) )
//DBrot: More Rooms
//UINT8 ubRoom;
UINT16 usRoom;
if ( InAHiddenRoom( sGridNo, &usRoom ) )
{
RemoveRoomRoof( sGridNo, ubRoom, NULL );
RemoveRoomRoof( sGridNo, usRoom, NULL );
}
}
break;
+3 -2
View File
@@ -145,8 +145,9 @@ extern BOOLEAN gfExplosionQueueMayHaveChangedSight;
extern void TogglePressureActionItemsInGridNo( INT32 sGridNo );
extern BOOLEAN DoesSAMExistHere( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ, INT32 sGridNo );
extern BOOLEAN HookerInRoom( UINT8 ubRoom );
//DBrot: More Rooms
//extern BOOLEAN HookerInRoom( UINT8 ubRoom );
extern BOOLEAN HookerInRoom( UINT16 usRoom );
#ifdef JA2UB
extern void HavePersonAtGridnoStop( UINT32 sGridNo );
+16 -16
View File
@@ -583,10 +583,10 @@ void GenerateMapEdgepoints(BOOLEAN fValidate)
for(x, y; x<WORLD_COLS/2+i; x++, y--)
{
sGridNo = x + y * WORLD_COLS;
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gubWorldRoomInfo[sGridNo] || gfBasement))
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gusWorldRoomInfo[sGridNo] || gfBasement))
sVGridNo[gus1stNorthEdgepointArraySize++] = sGridNo;
++sGridNo;
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gubWorldRoomInfo[sGridNo] || gfBasement))
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gusWorldRoomInfo[sGridNo] || gfBasement))
sVGridNo[gus1stNorthEdgepointArraySize++] = sGridNo;
}
}
@@ -607,10 +607,10 @@ void GenerateMapEdgepoints(BOOLEAN fValidate)
for(x, y; x<WORLD_COLS-i; x++, y++)
{
sGridNo = x + y * WORLD_COLS;
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gubWorldRoomInfo[sGridNo] || gfBasement))
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gusWorldRoomInfo[sGridNo] || gfBasement))
sVGridNo[gus1stEastEdgepointArraySize++] = sGridNo;
sGridNo += WORLD_COLS;
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gubWorldRoomInfo[sGridNo] || gfBasement))
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gusWorldRoomInfo[sGridNo] || gfBasement))
sVGridNo[gus1stEastEdgepointArraySize++] = sGridNo;
}
}
@@ -631,10 +631,10 @@ void GenerateMapEdgepoints(BOOLEAN fValidate)
for(x, y; x>=WORLD_COLS/2-i; x--, y++)
{
sGridNo = x + y * WORLD_COLS;
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gubWorldRoomInfo[sGridNo] || gfBasement))
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gusWorldRoomInfo[sGridNo] || gfBasement))
sVGridNo[gus1stSouthEdgepointArraySize++] = sGridNo;
--sGridNo;
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gubWorldRoomInfo[sGridNo] || gfBasement))
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gusWorldRoomInfo[sGridNo] || gfBasement))
sVGridNo[gus1stSouthEdgepointArraySize++] = sGridNo;
}
}
@@ -655,10 +655,10 @@ void GenerateMapEdgepoints(BOOLEAN fValidate)
for(x, y; x>=0+i; x--, y--)
{
sGridNo = x + y * WORLD_COLS;
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gubWorldRoomInfo[sGridNo] || gfBasement))
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gusWorldRoomInfo[sGridNo] || gfBasement))
sVGridNo[gus1stWestEdgepointArraySize++] = sGridNo;
sGridNo -= WORLD_COLS;
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gubWorldRoomInfo[sGridNo] || gfBasement))
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gusWorldRoomInfo[sGridNo] || gfBasement))
sVGridNo[gus1stWestEdgepointArraySize++] = sGridNo;
}
}
@@ -684,10 +684,10 @@ void GenerateMapEdgepoints(BOOLEAN fValidate)
for(x, y; x<WORLD_COLS/2+i; x++, y--)
{
sGridNo = x + y * WORLD_COLS;
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gubWorldRoomInfo[sGridNo] || gfBasement))
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gusWorldRoomInfo[sGridNo] || gfBasement))
sVGridNo[gus2ndNorthEdgepointArraySize++] = sGridNo;
++sGridNo;
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gubWorldRoomInfo[sGridNo] || gfBasement))
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gusWorldRoomInfo[sGridNo] || gfBasement))
sVGridNo[gus2ndNorthEdgepointArraySize++] = sGridNo;
}
}
@@ -708,10 +708,10 @@ void GenerateMapEdgepoints(BOOLEAN fValidate)
for(x, y; x<WORLD_COLS-i; x++, y++)
{
sGridNo = x + y * WORLD_COLS;
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gubWorldRoomInfo[sGridNo] || gfBasement))
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gusWorldRoomInfo[sGridNo] || gfBasement))
sVGridNo[gus2ndEastEdgepointArraySize++] = sGridNo;
sGridNo += WORLD_COLS;
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gubWorldRoomInfo[sGridNo] || gfBasement))
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gusWorldRoomInfo[sGridNo] || gfBasement))
sVGridNo[gus2ndEastEdgepointArraySize++] = sGridNo;
}
}
@@ -732,10 +732,10 @@ void GenerateMapEdgepoints(BOOLEAN fValidate)
for(x, y; x>=WORLD_COLS/2-i; x--, y++)
{
sGridNo = x + y * WORLD_COLS;
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gubWorldRoomInfo[sGridNo] || gfBasement))
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gusWorldRoomInfo[sGridNo] || gfBasement))
sVGridNo[gus2ndSouthEdgepointArraySize++] = sGridNo;
--sGridNo;
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gubWorldRoomInfo[sGridNo] || gfBasement))
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gusWorldRoomInfo[sGridNo] || gfBasement))
sVGridNo[gus2ndSouthEdgepointArraySize++] = sGridNo;
}
}
@@ -756,10 +756,10 @@ void GenerateMapEdgepoints(BOOLEAN fValidate)
for(x, y; x>=0+i; x--, y--)
{
sGridNo = x + y * WORLD_COLS;
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gubWorldRoomInfo[sGridNo] || gfBasement))
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gusWorldRoomInfo[sGridNo] || gfBasement))
sVGridNo[gus2ndWestEdgepointArraySize++] = sGridNo;
sGridNo -= WORLD_COLS;
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gubWorldRoomInfo[sGridNo] || gfBasement))
if(gpWorldLevelData[sGridNo].uiFlags & MAPELEMENT_REACHABLE && (!gusWorldRoomInfo[sGridNo] || gfBasement))
sVGridNo[gus2ndWestEdgepointArraySize++] = sGridNo;
}
}
+24 -22
View File
@@ -26,7 +26,9 @@
// Room Information
//UINT8 gubWorldRoomInfo[ WORLD_MAX ];
UINT8* gubWorldRoomInfo = NULL;
//DBrot: More Rooms
//UINT8* gubWorldRoomInfo = NULL;
UINT16* gusWorldRoomInfo = NULL;
UINT8 gubWorldRoomHidden[ MAX_ROOMS ];
@@ -41,14 +43,14 @@ void ShutdownRoomDatabase( )
{
}
void SetTileRoomNum( INT32 sGridNo, UINT8 ubRoomNum )
//DBrot: More Rooms
void SetTileRoomNum( INT32 sGridNo, UINT16 usRoomNum )
{
// Add to global room list
gubWorldRoomInfo[ sGridNo ] = ubRoomNum;
gusWorldRoomInfo[ sGridNo ] = usRoomNum;
}
void SetTileRangeRoomNum( SGPRect *pSelectRegion, UINT8 ubRoomNum )
//DBrot: More Rooms
void SetTileRangeRoomNum( SGPRect *pSelectRegion, UINT8 usRoomNum )
{
INT32 cnt1, cnt2;
@@ -56,20 +58,20 @@ void SetTileRangeRoomNum( SGPRect *pSelectRegion, UINT8 ubRoomNum )
{
for ( cnt2 = pSelectRegion->iLeft; cnt2 <= pSelectRegion->iRight; cnt2++ )
{
gubWorldRoomInfo[ MAPROWCOLTOPOS( cnt1, cnt2 ) ] = ubRoomNum;
gusWorldRoomInfo[ MAPROWCOLTOPOS( cnt1, cnt2 ) ] = usRoomNum;
}
}
}
BOOLEAN InARoom( INT32 sGridNo, UINT8 *pubRoomNo )
//DBrot: More Rooms
BOOLEAN InARoom( INT32 sGridNo, UINT16 *pusRoomNo )
{
// WANNE: Bugzilla #360: Crash when moving via helicopter from museum sector
if ( sGridNo >= 0 && gubWorldRoomInfo[ sGridNo ] != NO_ROOM )
if ( sGridNo >= 0 && gusWorldRoomInfo[ sGridNo ] != NO_ROOM )
{
if ( pubRoomNo )
if ( pusRoomNo )
{
*pubRoomNo = gubWorldRoomInfo[ sGridNo ];
*pusRoomNo = gusWorldRoomInfo[ sGridNo ];
}
return( TRUE );
}
@@ -77,14 +79,14 @@ BOOLEAN InARoom( INT32 sGridNo, UINT8 *pubRoomNo )
return( FALSE );
}
BOOLEAN InAHiddenRoom( INT32 sGridNo, UINT8 *pubRoomNo )
//DBrot: More Rooms
BOOLEAN InAHiddenRoom( INT32 sGridNo, UINT16 *pusRoomNo )
{
if ( sGridNo >= 0 && gubWorldRoomInfo[ sGridNo ] != NO_ROOM )
if ( sGridNo >= 0 && gusWorldRoomInfo[ sGridNo ] != NO_ROOM )
{
if ( (gubWorldRoomHidden[ gubWorldRoomInfo[ sGridNo ] ] ) )
if ( (gubWorldRoomHidden[ gusWorldRoomInfo[ sGridNo ] ] ) )
{
*pubRoomNo = gubWorldRoomInfo[ sGridNo ];
*pusRoomNo = gusWorldRoomInfo[ sGridNo ];
return( TRUE );
}
}
@@ -124,7 +126,7 @@ void SetGridNoRevealedFlag( INT32 sGridNo )
SetRoofIndexFlagsFromTypeRange( sGridNo, FIRSTROOF, FOURTHROOF, LEVELNODE_HIDDEN );
// ATE: Do this only if we are in a room...
if ( gubWorldRoomInfo[ sGridNo ] != NO_ROOM )
if ( gusWorldRoomInfo[ sGridNo ] != NO_ROOM )
{
SetStructAframeFlags( sGridNo, LEVELNODE_HIDDEN );
// Find gridno one east as well...
@@ -186,7 +188,7 @@ void SetGridNoRevealedFlag( INT32 sGridNo )
pStructure = pStructure->pNext;
}
gubWorldRoomHidden[ gubWorldRoomInfo[ sGridNo ] ] = FALSE;
gubWorldRoomHidden[ gusWorldRoomInfo[ sGridNo ] ] = FALSE;
}
@@ -259,8 +261,8 @@ void ExamineGridNoForSlantRoofExtraGraphic( INT32 sCheckGridNo )
}
void RemoveRoomRoof( INT32 sGridNo, UINT8 bRoomNum, SOLDIERTYPE *pSoldier )
//DBrot: More Rooms
void RemoveRoomRoof( INT32 sGridNo, UINT16 usRoomNum, SOLDIERTYPE *pSoldier )
{
INT32 cnt;
ITEM_POOL *pItemPool;
@@ -272,7 +274,7 @@ void RemoveRoomRoof( INT32 sGridNo, UINT8 bRoomNum, SOLDIERTYPE *pSoldier )
// LOOP THORUGH WORLD AND CHECK ROOM INFO
for ( cnt = 0; cnt < WORLD_MAX; cnt++ )
{
if ( gubWorldRoomInfo[ cnt ] == bRoomNum )
if ( gusWorldRoomInfo[ cnt ] == usRoomNum )
{
SetGridNoRevealedFlag( cnt );//dnl ch56 141009
+16 -9
View File
@@ -5,22 +5,29 @@
#include "worlddef.h"
#define NO_ROOM 0
#define MAX_ROOMS 250
//DBrot: More Rooms
//#define MAX_ROOMS 250
#define MAX_ROOMS 65530
extern UINT8 gubWorldRoomHidden[ MAX_ROOMS ];
extern UINT8* gubWorldRoomInfo;
//extern UINT8* gubWorldRoomInfo;
extern UINT16* gusWorldRoomInfo;
BOOLEAN InitRoomDatabase( );
void ShutdownRoomDatabase( );
void SetTileRoomNum( INT32 sGridNo, UINT8 ubRoomNum );
void SetTileRangeRoomNum( SGPRect *pSelectRegion, UINT8 ubRoomNum );
//void SetTileRoomNum( INT32 sGridNo, UINT8 ubRoomNum );
//void SetTileRangeRoomNum( SGPRect *pSelectRegion, UINT8 ubRoomNum );
void RemoveRoomRoof( INT32 sGridNo, UINT8 bRoomNum, SOLDIERTYPE *pSoldier );
BOOLEAN InARoom( INT32 sGridNo, UINT8 *pubRoomNo );
BOOLEAN InAHiddenRoom( INT32 sGridNo, UINT8 *pubRoomNo );
//void RemoveRoomRoof( INT32 sGridNo, UINT8 bRoomNum, SOLDIERTYPE *pSoldier );
//BOOLEAN InARoom( INT32 sGridNo, UINT8 *pubRoomNo );
//BOOLEAN InAHiddenRoom( INT32 sGridNo, UINT8 *pubRoomNo );
void SetTileRoomNum( INT32 sGridNo, UINT16 usRoomNum );
void SetTileRangeRoomNum( SGPRect *pSelectRegion, UINT16 usRoomNum );
void RemoveRoomRoof( INT32 sGridNo, UINT16 usRoomNum, SOLDIERTYPE *pSoldier );
BOOLEAN InARoom( INT32 sGridNo, UINT16 *pusRoomNo );
BOOLEAN InAHiddenRoom( INT32 sGridNo, UINT16 *pusRoomNo );
void SetGridNoRevealedFlag( INT32 sGridNo );
+53 -13
View File
@@ -751,15 +751,26 @@ void RenderTacticalPlacementGUI()
usHatchColor = Get16BPPColor( FROMRGB( 63, 31, 31 ) );
}
gfValidLocationsChanged--;
//DBrot bigger map code
if(gfUseBiggerOverview){
BlitBufferToBuffer( guiSAVEBUFFER, FRAME_BUFFER, iOffsetHorizontal, iOffsetVertical, 1434, 716 );
InvalidateRegion( iOffsetHorizontal, iOffsetVertical, iOffsetHorizontal + 1434, iOffsetVertical + 716 );
gTPClipRect.iLeft = iOffsetHorizontal + 1;
gTPClipRect.iTop = iOffsetVertical + 1;
gTPClipRect.iBottom = iOffsetVertical + 716;// 318;
gTPClipRect.iRight = iOffsetHorizontal + 1434; //634;
}else{
BlitBufferToBuffer( guiSAVEBUFFER, FRAME_BUFFER, iOffsetHorizontal, iOffsetVertical, 640, 320 );
InvalidateRegion( iOffsetHorizontal, iOffsetVertical, iOffsetHorizontal + 640, iOffsetVertical + 320 );
//dnl ch45 051009
gTPClipRect.iLeft = iOffsetHorizontal + 1;
gTPClipRect.iTop = iOffsetVertical + 1;
gTPClipRect.iBottom = iOffsetVertical + 318;
gTPClipRect.iRight = iOffsetHorizontal + 634;
}
if( gbCursorMercID == -1 )
{
// WANNE - MP: Center
@@ -805,37 +816,66 @@ void RenderTacticalPlacementGUI()
GetWorldXYAbsoluteScreenXY(sX, sY, &sWorldScreenX, &sWorldScreenY);
sWorldScreenX += 20;// Correction from invisible area X
sWorldScreenY += 35;// Correction from invisible area Y
switch(gMercPlacement[gbCursorMercID].ubStrategicInsertionCode)
{
//DBrot: adjust offsets for big maps
if(gfUseBiggerOverview){
switch(gMercPlacement[gbCursorMercID].ubStrategicInsertionCode){
case INSERTION_CODE_NORTH:
if(sWorldScreenY <= PLACEMENT_OFFSET)
{
//if(sWorldScreenY <= PLACEMENT_OFFSET){
//sY = (PLACEMENT_OFFSET - sWorldScreenY) / 5;
//gTPClipRect.iTop += sY;
gTPClipRect.iTop += PLACEMENT_OFFSET/5;
//}
break;
case INSERTION_CODE_EAST:
//if((sWorldScreenX + NORMAL_MAP_SCREEN_WIDTH) >= (MAPWIDTH - PLACEMENT_OFFSET)){
//sX = ((sWorldScreenX + NORMAL_MAP_SCREEN_WIDTH) - (MAPWIDTH - PLACEMENT_OFFSET)) / 5;
//gTPClipRect.iRight -= sX;
gTPClipRect.iRight -= PLACEMENT_OFFSET/5;
//}
break;
case INSERTION_CODE_SOUTH:
//if((sWorldScreenY + NORMAL_MAP_SCREEN_HEIGHT) >= (MAPHEIGHT - PLACEMENT_OFFSET)){
//sY = ((sWorldScreenY + NORMAL_MAP_SCREEN_HEIGHT) - (MAPHEIGHT - PLACEMENT_OFFSET)) / 5;
//gTPClipRect.iBottom -= sY;
gTPClipRect.iBottom -= PLACEMENT_OFFSET/5;
//}
break;
case INSERTION_CODE_WEST:
//if(sWorldScreenX <= PLACEMENT_OFFSET){
//sX = (PLACEMENT_OFFSET - sWorldScreenX) / 5;
//gTPClipRect.iLeft += sX;
gTPClipRect.iLeft += PLACEMENT_OFFSET/5;
//}
break;
}
}else{
switch(gMercPlacement[gbCursorMercID].ubStrategicInsertionCode){
case INSERTION_CODE_NORTH:
if(sWorldScreenY <= PLACEMENT_OFFSET){
sY = (PLACEMENT_OFFSET - sWorldScreenY) / 5;
gTPClipRect.iTop += sY;
}
break;
case INSERTION_CODE_EAST:
if((sWorldScreenX + NORMAL_MAP_SCREEN_WIDTH) >= (MAPWIDTH - PLACEMENT_OFFSET))
{
if((sWorldScreenX + NORMAL_MAP_SCREEN_WIDTH) >= (MAPWIDTH - PLACEMENT_OFFSET)){
sX = ((sWorldScreenX + NORMAL_MAP_SCREEN_WIDTH) - (MAPWIDTH - PLACEMENT_OFFSET)) / 5;
gTPClipRect.iRight -= sX;
}
break;
case INSERTION_CODE_SOUTH:
if((sWorldScreenY + NORMAL_MAP_SCREEN_HEIGHT) >= (MAPHEIGHT - PLACEMENT_OFFSET))
{
if((sWorldScreenY + NORMAL_MAP_SCREEN_HEIGHT) >= (MAPHEIGHT - PLACEMENT_OFFSET)){
sY = ((sWorldScreenY + NORMAL_MAP_SCREEN_HEIGHT) - (MAPHEIGHT - PLACEMENT_OFFSET)) / 5;
gTPClipRect.iBottom -= sY;
}
break;
case INSERTION_CODE_WEST:
if(sWorldScreenX <= PLACEMENT_OFFSET)
{
if(sWorldScreenX <= PLACEMENT_OFFSET){
sX = (PLACEMENT_OFFSET - sWorldScreenX) / 5;
gTPClipRect.iLeft += sX;
}
break;
}
}
// WANNE - MP: Center
if (is_networked && gfCenter)
@@ -1063,7 +1103,7 @@ void TacticalPlacementHandle()
}
gfValidCursor = FALSE;
if(gbSelectedMercID != -1 && gusMouseYPos < (iOffsetVertical + 320) && gusMouseYPos > iOffsetVertical && gusMouseXPos > iOffsetHorizontal && gusMouseXPos < (iOffsetHorizontal + 640))
if(gbSelectedMercID != -1 && ((gusMouseYPos < (iOffsetVertical + 320) && gusMouseYPos > iOffsetVertical && gusMouseXPos > iOffsetHorizontal && gusMouseXPos < (iOffsetHorizontal + 640))||(gfUseBiggerOverview && (gusMouseYPos < (iOffsetVertical + 716) && gusMouseYPos > iOffsetVertical && gusMouseXPos > iOffsetHorizontal && gusMouseXPos < (iOffsetHorizontal + 1432) ))))
{
//dnl ch45 051009
INT16 sWorldScreenX = (gusMouseXPos - iOffsetHorizontal) * 5;
+81 -14
View File
@@ -39,6 +39,7 @@
#include "gameloop.h"
#include "sysutil.h"
#include "tile surface.h"
#include "GameSettings.h"
#include <vector>
#endif
@@ -83,7 +84,15 @@ INT32 gsOveritemPoolGridNo;
UINT16 iOffsetHorizontal; // Horizontal start postion of the overview map
UINT16 iOffsetVertical; // Vertical start position of the overview map
//DBrot: keep track if we should use a bigger version of the overview map for big maps
//for now, this is a custom solution applicable in 1920x1080
BOOLEAN gfUseBiggerOverview = FALSE;
UINT8 ubResolutionTable[6] = {2, 3, 4, 6, 8, 12};
UINT8 gubGridDivisor;
#define HORGRIDFRAME 1440
#define VERGRIDFRAME 720
#define SHARPBORDER 1
#define HATCHED 2
//dnl ch45 021009 Current position of map displayed in overhead map, (A=TopLeft, B=BottomLeft, C=TopRight)
#define MAXSCROLL 4
INT32 giXA = 0, giYA = WORLD_ROWS/2;
@@ -431,8 +440,12 @@ void HandleOverheadMap( )
RestoreBackgroundRects( );
// Render the overhead map
//DBrot: use a bigger overhead map if we have the space
if(gfUseBiggerOverview){
RenderOverheadMap(giXA, giYA, iOffsetHorizontal, iOffsetVertical, 1438+iOffsetHorizontal, 718+iOffsetVertical, FALSE);//dnl ch45 011009
}else{
RenderOverheadMap(giXA, giYA, iOffsetHorizontal, iOffsetVertical, 640+iOffsetHorizontal, 320+iOffsetVertical, FALSE);//dnl ch45 011009
}
HandleTalkingAutoFaces( );
if( !gfEditMode )
@@ -570,15 +583,27 @@ void GoIntoOverheadMap( )
HVOBJECT hVObject;
gfInOverheadMap = TRUE;
//dnl??? ch45 021009 Add here moving overhead map cords to your current position on big map
//RestoreExternBackgroundRect( INTERFACE_START_X, INTERFACE_START_Y, SCREEN_WIDTH, INTERFACE_HEIGHT );
// Overview map should be centered in the middle of the tactical screen.
//DBrot: Allow bigger overview if possible
if((iResolution >= _1680x1050) && WORLD_MAX == 129600){
iOffsetHorizontal = (SCREEN_WIDTH / 2) - (1440 / 2); // Horizontal start postion of the overview map
iOffsetVertical = 98;//(SCREEN_HEIGHT - 160) / 2 - 160; // Vertical start position of the overview map
gfUseBiggerOverview = TRUE;
}else{
iOffsetHorizontal = (SCREEN_WIDTH / 2) - (640 / 2); // Horizontal start postion of the overview map
iOffsetVertical = (SCREEN_HEIGHT - 160) / 2 - 160; // Vertical start position of the overview map
}
if(NightTime()){
gubGridDivisor = ubResolutionTable[gGameExternalOptions.ubGridResolutionNight];
}else{
gubGridDivisor = ubResolutionTable[gGameExternalOptions.ubGridResolutionDay];
}
MSYS_DefineRegion( &OverheadBackgroundRegion, 0, 0 , SCREEN_WIDTH, SCREEN_HEIGHT, MSYS_PRIORITY_HIGH,
CURSOR_NORMAL, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
@@ -606,8 +631,12 @@ void GoIntoOverheadMap( )
FilenameForBPP("INTERFACE\\MAP_BORD_800x600.sti", VObjectDesc.ImageFile);
if( !AddVideoObject( &VObjectDesc, &uiOVERMAP ) )
AssertMsg(0, "Missing INTERFACE\\MAP_BORD_800x600.sti" );
}
else
}else if(iResolution >= _1680x1050){
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
FilenameForBPP("INTERFACE\\MAP_BORD_1920x1080.sti", VObjectDesc.ImageFile);
if( !AddVideoObject( &VObjectDesc, &uiOVERMAP ) )
AssertMsg(0, "Missing INTERFACE\\MAP_BORD_1920x1080.sti" );
}else
{
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
FilenameForBPP("INTERFACE\\MAP_BORD_1024x768.sti", VObjectDesc.ImageFile);
@@ -700,7 +729,7 @@ void HandleOverheadUI(void)
void ScrollOverheadMap(void)
{
if(WORLD_MAX == OLD_WORLD_MAX)
if(WORLD_MAX == OLD_WORLD_MAX || gfUseBiggerOverview)
return;
UINT32 uiFlags = 0;
INT32 i;
@@ -1224,10 +1253,14 @@ void RenderOverheadMap( INT16 sStartPointX_M, INT16 sStartPointY_M, INT16 sStart
CalculateRestrictedMapCoords( WEST, &sX1, &sY1, &sX2, &sY2, sEndXS, sEndYS );
ColorFillVideoSurfaceArea( FRAME_BUFFER, sX1, sY1, sX2, sY2, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
}
if(!fFromMapUtility) //LJDOldSM
//DBrot: bigger overview code
if(!fFromMapUtility){//LJDOldSM
if(gfUseBiggerOverview && iResolution >= _1680x1050){
BltVideoObjectFromIndex(FRAME_BUFFER, uiOVERMAP, 0, ((SCREEN_WIDTH / 2) - (1432 / 2) - 40), 60, VO_BLT_SRCTRANSPARENCY, NULL);// Render border!
}else{
BltVideoObjectFromIndex(FRAME_BUFFER, uiOVERMAP, 0, xResOffset, yResOffset, VO_BLT_SRCTRANSPARENCY, NULL);// Render border!
}
}
// Update the save buffer
UINT32 uiDestPitchBYTES, uiSrcPitchBYTES;
UINT8 *pDestBuf, *pSrcBuf;
@@ -1261,8 +1294,6 @@ void RenderOverheadOverlays()
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
GetVideoObject( &hVObject, uiPERSONS );
//SOLDIER OVERLAY
if( gfTacticalPlacementGUIActive )
{ //loop through only the player soldiers
@@ -1274,6 +1305,10 @@ void RenderOverheadOverlays()
}
if(is_networked)end = MAX_NUM_SOLDIERS;
SGPRect HostileArea = {0,0,0,0};
for( i = 0; i < end; i++ )
{
//First, check to see if the soldier exists and is in the sector.
@@ -1284,7 +1319,29 @@ void RenderOverheadOverlays()
if(!GetOverheadScreenXYFromGridNo(pSoldier->sGridNo, &sX, &sY))//dnl ch45 041009
continue;
//DBrot: mark his general area as hostile
if(!gfEditMode && gGameSettings.fOptions[TOPTION_SHOW_LAST_ENEMY] && gfUseBiggerOverview && gGameExternalOptions.ubMarkerMode && gTacticalStatus.Team[ ENEMY_TEAM ].bMenInSector <= gGameExternalOptions.ubSoldiersLeft){
if(pSoldier->bTeam == ENEMY_TEAM){
UINT8 ubGridSquareX, ubGridSquareY;
ubGridSquareX = sX / (HORGRIDFRAME / gubGridDivisor); //( pSoldier->sGridNo / WORLD_COLS ) / ( WORLD_COLS / ubResolutionTable[gGameExternalOptions.ubGridResolution]);
ubGridSquareY = sY / (VERGRIDFRAME / gubGridDivisor); //( pSoldier->sGridNo - ( ( pSoldier->sGridNo / WORLD_COLS ) * WORLD_COLS ) ) / ( WORLD_COLS / ubResolutionTable[gGameExternalOptions.ubGridResolution]);
HostileArea.iLeft = iOffsetHorizontal + (((HORGRIDFRAME / gubGridDivisor) * ubGridSquareX));
HostileArea.iTop = iOffsetVertical + (((VERGRIDFRAME / gubGridDivisor) * ubGridSquareY));
HostileArea.iRight = iOffsetHorizontal + (((HORGRIDFRAME / gubGridDivisor) * (ubGridSquareX + 1)));
HostileArea.iBottom = iOffsetVertical + (((VERGRIDFRAME / gubGridDivisor) * (ubGridSquareY + 1)));
if(gGameExternalOptions.ubMarkerMode == SHARPBORDER)
RectangleDraw(TRUE, HostileArea.iLeft, HostileArea.iTop, HostileArea.iRight, HostileArea.iBottom, 255, pDestBuf);
if(gGameExternalOptions.ubMarkerMode == HATCHED){
RectangleDraw(TRUE, HostileArea.iLeft, HostileArea.iTop, HostileArea.iRight, HostileArea.iBottom, 0xF000, pDestBuf);
Blt16BPPBufferLooseHatchRectWithColor( (UINT16*)pDestBuf, uiDestPitchBYTES, &HostileArea, 0xF000 );
}
}
}
//Now, draw his "doll"
//adjust for position.
@@ -1292,6 +1349,9 @@ void RenderOverheadOverlays()
sY -= 5;
//sScreenY -= 7; //height of doll
if( !gfTacticalPlacementGUIActive && pSoldier->bLastRenderVisibleValue == -1 && !(gTacticalStatus.uiFlags&SHOW_ALL_MERCS) )
{
continue;// ie dont render
@@ -1439,7 +1499,6 @@ void RenderOverheadOverlays()
}
}
//ITEMS OVERLAY
if( !gfTacticalPlacementGUIActive )
{
@@ -1782,8 +1841,16 @@ BOOLEAN GetOverheadScreenXYFromGridNo(INT32 sGridNo, INT16* psScreenX, INT16* ps
sX -= ((giXA - 0) * CELL_X_SIZE);
sY -= ((giYA - WORLD_ROWS/2) * CELL_Y_SIZE);
GetWorldXYAbsoluteScreenXY((sX/CELL_X_SIZE), (sY/CELL_Y_SIZE), &sWorldScreenX, &sWorldScreenY);
//DBrot: big maps
if(gfUseBiggerOverview){
//there must be proper values to check for a 360² map, but I have no idea what they are
//for now, we just pray that it works and only catch negatives
if(sWorldScreenX < 0 || /*sWorldScreenX > NORMAL_MAP_SCREEN_WIDTH ||*/ sWorldScreenY < 0 /*|| sWorldScreenY > NORMAL_MAP_SCREEN_HEIGHT*/)
return(FALSE);
}else{
if(sWorldScreenX < 0 || sWorldScreenX > NORMAL_MAP_SCREEN_WIDTH || sWorldScreenY < 0 || sWorldScreenY > NORMAL_MAP_SCREEN_HEIGHT)
return(FALSE);
}
*psScreenX = sWorldScreenX;
*psScreenY = sWorldScreenY;
+2 -1
View File
@@ -35,4 +35,5 @@ void ResetScrollOverheadMap(void);
#define FASTMAPROWCOLTOPOS( r, c ) ( (r) * WORLD_COLS + (c) )
#endif
extern BOOLEAN gfUseBiggerOverview;
#endif
+3 -3
View File
@@ -6485,11 +6485,11 @@ void RenderRoomInfo( INT16 sStartPointX_M, INT16 sStartPointY_M, INT16 sStartPoi
sY -= gpWorldLevelData[ usTileIndex ].sHeight;
//sY += gsRenderHeight;
if ( gubWorldRoomInfo[ usTileIndex ] != NO_ROOM )
if ( gusWorldRoomInfo[ usTileIndex ] != NO_ROOM )
{
SetFont( SMALLCOMPFONT );
SetFontDestBuffer( FRAME_BUFFER , 0, 0, SCREEN_WIDTH, gsVIEWPORT_END_Y, FALSE );
switch( gubWorldRoomInfo[ usTileIndex ] % 5 )
switch( gusWorldRoomInfo[ usTileIndex ] % 5 )
{
case 0: SetFontForeground( FONT_GRAY3 ); break;
case 1: SetFontForeground( FONT_YELLOW ); break;
@@ -6497,7 +6497,7 @@ void RenderRoomInfo( INT16 sStartPointX_M, INT16 sStartPointY_M, INT16 sStartPoi
case 3: SetFontForeground( FONT_LTBLUE ); break;
case 4: SetFontForeground( FONT_LTGREEN );break;
}
mprintf_buffer( pDestBuf, uiDestPitchBYTES, TINYFONT1, sX, sY , L"%d", gubWorldRoomInfo[ usTileIndex ] );
mprintf_buffer( pDestBuf, uiDestPitchBYTES, TINYFONT1, sX, sY , L"%d", gusWorldRoomInfo[ usTileIndex ] );
SetFontDestBuffer( FRAME_BUFFER , 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
}
}
+42 -15
View File
@@ -346,8 +346,8 @@ void DeinitializeWorld()
MemFree(gsCoverValue);
if(gubBuildingInfo)
MemFree(gubBuildingInfo);
if(gubWorldRoomInfo)
MemFree(gubWorldRoomInfo);
if(gusWorldRoomInfo)
MemFree(gusWorldRoomInfo);
if(gubWorldMovementCosts)
MemFree(gubWorldMovementCosts);
if(gpWorldLevelData)
@@ -2217,7 +2217,7 @@ BOOLEAN SaveWorld(const STR8 puiFilename, FLOAT dMajorMapVersion, UINT8 ubMinorM
for ( cnt = 0; cnt < WORLD_MAX; cnt++ )
{
// Write out room information
FileWrite( hfile, &gubWorldRoomInfo[ cnt ], sizeof( INT8 ), &uiBytesWritten );
FileWrite( hfile, &gusWorldRoomInfo[ cnt ], sizeof( UINT16 ), &uiBytesWritten );
}
@@ -2494,13 +2494,24 @@ BOOLEAN EvaluateWorld(STR8 pSector, UINT8 ubLevel)
pBuffer += bCounts[cnt][1];
}
// Extract highest room number
//DBrot: More Rooms
UINT8 ubRoomNum;
UINT16 usRoomNum;
if(ubMinorMapVersion < 29){
for(cnt=0; cnt<WORLD_MAX; cnt++)
{
LOADDATA(&ubRoomNum, pBuffer, sizeof(ubRoomNum));
if(ubRoomNum > pSummary->ubNumRooms)
pSummary->ubNumRooms = ubRoomNum;
}
}else{
for(cnt=0; cnt<WORLD_MAX; cnt++)
{
LOADDATA(&usRoomNum, pBuffer, sizeof(usRoomNum));
if(usRoomNum > pSummary->ubNumRooms)
pSummary->ubNumRooms = usRoomNum;
}
}
if(uiFlags & MAP_WORLDITEMS_SAVED)
{
@@ -3078,20 +3089,35 @@ BOOLEAN LoadWorld(const STR8 puiFilename, FLOAT* pMajorMapVersion, UINT8* pMinor
SetRelativeStartAndEndPercentage(0, 58, 59, L"Loading room information...");
RenderProgressBar(0, 100);
#ifdef JA2EDITOR
gubMaxRoomNumber = 0;
gusMaxRoomNumber = 0;
//DBrot: More Rooms
for(i=0; i<iWorldSize; i++)
{
gMapTrn.GetTrnCnt(cnt=i);
// Read room information
LOADDATA(&gubWorldRoomInfo[cnt], pBuffer, sizeof(INT8));
// Read room information, 2 byte for new files
if(ubMinorMapVersion < 29){
LOADDATA(&gusWorldRoomInfo[cnt], pBuffer, sizeof(INT8));
}else{
LOADDATA(&gusWorldRoomInfo[cnt], pBuffer, sizeof(UINT16));
}
// Got to set the max room number
if(gubWorldRoomInfo[cnt] > gubMaxRoomNumber)
gubMaxRoomNumber = gubWorldRoomInfo[cnt];
if(gusWorldRoomInfo[cnt] > gusMaxRoomNumber)
gusMaxRoomNumber = gusWorldRoomInfo[cnt];
}
if(gubMaxRoomNumber < 255)
gubMaxRoomNumber++;
if(gusMaxRoomNumber < 65535)
gusMaxRoomNumber++;
#else
LOADDATA(gubWorldRoomInfo, pBuffer, sizeof(INT8)*WORLD_MAX);
for(i=0; i<iWorldSize; i++){
gMapTrn.GetTrnCnt(cnt=i);
// Read room information, 2 byte for new files
if(ubMinorMapVersion < 29){
LOADDATA(&gusWorldRoomInfo[cnt], pBuffer, sizeof(INT8));
}else{
LOADDATA(&gusWorldRoomInfo[cnt], pBuffer, sizeof(UINT16));
}
}
//LOADDATA(gubWorldRoomInfo, pBuffer, sizeof(INT8)*WORLD_MAX);
#endif
memset(gubWorldRoomHidden, TRUE, sizeof(gubWorldRoomHidden));
@@ -4247,10 +4273,11 @@ void SetWorldSize(INT32 nWorldRows, INT32 nWorldCols)
memset(gubBuildingInfo, 0, sizeof(UINT8)*WORLD_MAX);
// Init room numbers
if(gubWorldRoomInfo)
MemFree(gubWorldRoomInfo);
gubWorldRoomInfo = (UINT8*)MemAlloc(WORLD_MAX);
memset(gubWorldRoomInfo, 0, sizeof(UINT8)*WORLD_MAX);
//DBrot: More Rooms
if(gusWorldRoomInfo)
MemFree(gusWorldRoomInfo);
gusWorldRoomInfo = (UINT16*)MemAlloc(sizeof(UINT16)*WORLD_MAX);
memset(gusWorldRoomInfo, 0, sizeof(UINT16)*WORLD_MAX);
if(gubWorldMovementCosts)
MemFree(gubWorldMovementCosts);
+2 -2
View File
@@ -41,8 +41,8 @@ class SOLDIERTYPE;
// SB: new map version, with map dimensions added
#define MAJOR_MAP_VERSION 7.0
//Current minor map version updater.
#define MINOR_MAP_VERSION 28 // 27 -> 28: increased to 28 because of included weapon overheated and tripwire feature. See ObjectClass for the new Tags!
//#define MINOR_MAP_VERSION 28 // 27 -> 28: increased to 28 because of included weapon overheated and tripwire feature. See ObjectClass for the new Tags!
#define MINOR_MAP_VERSION 29 // 28 -> 29: increased range of roomnumbers to full UINT16 by DBrot
//dnl ch33 230909
#define VANILLA_MAJOR_MAP_VERSION 5.00
#define VANILLA_MINOR_MAP_VERSION 25
+4
View File
@@ -4960,6 +4960,8 @@ STR16 zSaveLoadText[] =
#else
L"试图载入老版本的存档。你要自动更新并载入存档吗?",
#endif
L"Mark Remaining Hostiles", //TODO.Translate
L"Show LBE Content", //TODO.Translate
L"你确认你要将#%d位置的存档覆盖吗?",
L"你要从#号位置载入存档吗",
@@ -5122,6 +5124,8 @@ STR16 zOptionsToggleText[] =
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
L"自动加速敌军回合", // Automatic fast forward through AI turns
#endif
L"When ON, approximate locations of the last enemies in the sector are highlighted.", //TODO.Translate
L"When ON, show the contents of an LBE item, otherwise show the regular NAS interface.", //TODO.Translate
#ifdef ENABLE_ZOMBIES
L"Allow Zombies", // TODO.Translate
+4
View File
@@ -4959,6 +4959,8 @@ STR16 zSaveLoadText[] =
#else
L"Attempting to load an older version save. Automatically update and load the save?",
#endif
L"Mark Remaining Hostiles", //TODO.Translate
L"Show LBE Content", //TODO.Translate
L"Weet je zeker dat je het spel in slot #%d wil overschrijven?",
L"Wil je het spel laden van slot #",
@@ -5121,6 +5123,8 @@ STR16 zOptionsToggleText[] =
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
L"Auto Fast Forward AI Turns", // Automatic fast forward through AI turns // TODO.Translate
#endif
L"When ON, approximate locations of the last enemies in the sector are highlighted.", //TODO.Translate
L"When ON, show the contents of an LBE item, otherwise show the regular NAS interface.", //TODO.Translate
#ifdef ENABLE_ZOMBIES
L"Allow Zombies", // TODO.Translate
+6
View File
@@ -4958,6 +4958,8 @@ STR16 zSaveLoadText[] =
#else
L"Attempting to load an older version save. Automatically update and load the save?",
#endif
L"Mark Remaining Hostiles",
L"Show LBE Content",
L"Are you sure you want to overwrite the saved game in slot #%d?",
L"Do you want to load the game from slot #",
@@ -5125,6 +5127,8 @@ STR16 zOptionsToggleText[] =
L"Allow Zombies", // Flugente Zombies 1.0
#endif
L"Enable inventory popups", // the_bob : enable popups for picking items from sector inv
L"Mark Remaining Hostiles",
L"Show LBE Content",
L"--Cheat Mode Options--", // TOPTION_CHEAT_MODE_OPTIONS_HEADER,
L"Force Bobby Ray shipments", // force all pending Bobby Ray shipments
L"-----------------", // TOPTION_CHEAT_MODE_OPTIONS_END
@@ -5241,6 +5245,8 @@ STR16 zOptionsScreenHelpText[] =
L"When ON, zombies will spawn. Be aware!", // allow zombies
#endif
L"When ON, enables popup boxes that appear when you left click on empty merc inventory slots while viewing sector inventory in mapscreen.",
L"When ON, approximate locations of the last enemies in the sector are highlighted.",
L"When ON, show the contents of an LBE item, otherwise show the regular NAS interface.",
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_HEADER",
L"Force all pending Bobby Ray shipments",
L"(text not rendered)TOPTION_CHEAT_MODE_OPTIONS_END",
+4
View File
@@ -4949,6 +4949,8 @@ STR16 zSaveLoadText[] =
#else
L"Tentative de chargement d'une sauvegarde de version précédente. Voulez-vous effectuer une mise à jour?",
#endif
L"Mark Remaining Hostiles", //TODO.Translate
L"Show LBE Content", //TODO.Translate
L"Etes-vous sûr de vouloir écraser la sauvegarde #%d ?",
L"Voulez-vous charger la sauvegarde #%d ?",
@@ -5111,6 +5113,8 @@ STR16 zOptionsToggleText[] =
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
L"Auto Fast Forward AI Turns", // Automatic fast forward through AI turns // TODO.Translate
#endif
L"When ON, approximate locations of the last enemies in the sector are highlighted.", //TODO.Translate
L"When ON, show the contents of an LBE item, otherwise show the regular NAS interface.", //TODO.Translate
#ifdef ENABLE_ZOMBIES
L"Allow Zombies", // Flugente Zombies 1.0
+4
View File
@@ -4806,6 +4806,8 @@ STR16 zSaveLoadText[] =
#else
L"Versuche, älteren Spielstand zu laden. Laden und automatisch aktualisieren?",
#endif
L"Mark Remaining Hostiles", //TODO.Translate
L"Show LBE Content", //TODO.Translate
L"Gespeichertes Spiel in Position #%d wirklich überschreiben?",
@@ -4969,6 +4971,8 @@ STR16 zOptionsToggleText[] =
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
L"Autom. schnelle Gegner-Züge", // Automatic fast forward through AI turns
#endif
L"When ON, approximate locations of the last enemies in the sector are highlighted.", //TODO.Translate
L"When ON, show the contents of an LBE item, otherwise show the regular NAS interface.", //TODO.Translate
#ifdef ENABLE_ZOMBIES
L"Zombies erlauben", // Flugente Zombies 1.0
+4
View File
@@ -4946,6 +4946,8 @@ STR16 zSaveLoadText[] =
#else
L"Tentativo di caricare una vecchia versione salvata. Aggiornate e caricate automaticamente quella salvata?",
#endif
L"Mark Remaining Hostiles", //TODO.Translate
L"Show LBE Content", //TODO.Translate
L"Siete sicuri di volere sovrascrivere la partita salvata nello slot #%d?",
L"Volete caricare la partita dallo slot #",
@@ -5106,6 +5108,8 @@ STR16 zOptionsToggleText[] =
#ifdef USE_HIGHSPEED_GAMELOOP_TIMER
L"Auto Fast Forward AI Turns", // Automatic fast forward through AI turns // TODO.Translate
#endif
L"When ON, approximate locations of the last enemies in the sector are highlighted.", //TODO.Translate
L"When ON, show the contents of an LBE item, otherwise show the regular NAS interface.", //TODO.Translate
#ifdef ENABLE_ZOMBIES
L"Allow Zombies", // Flugente Zombies 1.0