mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
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:
@@ -435,7 +435,7 @@ void BuildingDrawRoomNumCallback(GUI_BUTTON *btn, INT32 reason)
|
||||
{
|
||||
SetEditorBuildingTaskbarMode( BUILDING_DRAW_ROOMNUM );
|
||||
iDrawMode = DRAW_MODE_ROOMNUM;
|
||||
gubCurrRoomNumber = gubMaxRoomNumber;
|
||||
gusCurrRoomNumber = gusMaxRoomNumber;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -1103,7 +1103,7 @@ UINT32 ProcessFileIO()
|
||||
AnalyseCaveMapForStructureInfo();
|
||||
|
||||
AddLockedDoorCursors();
|
||||
gubCurrRoomNumber = gubMaxRoomNumber;
|
||||
gusCurrRoomNumber = gusMaxRoomNumber;
|
||||
UpdateRoofsView();
|
||||
UpdateWallsView();
|
||||
ShowLightPositionHandles();
|
||||
|
||||
+3
-3
@@ -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
@@ -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 );
|
||||
|
||||
|
||||
@@ -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...
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user