mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Brief: //dnl ch77
- Couple mapeditor and game fixes and radar map creation for any screen resolution. Details: - Radarmap is now possible to create from any mapeditor screen resolution. - Better fix to prevent memory corruption during gWorldItems resize. - Fix problems with losing attached item because attachment slots was not exist when using NAS, also empty slots are removed which was prevent attaching in OAS. - Fix tooltip popup for checkbox when button is disabled and prevent sticky tooltips from taskbar when SummaryWindow is active. - Check if item is valid for 1.12 will be active only for mapeditor, but game will load all items regardless of map version. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6652 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -919,7 +919,7 @@ void RenderEditorInfo( )
|
|||||||
{
|
{
|
||||||
INT16 sGridX, sGridY;
|
INT16 sGridX, sGridY;
|
||||||
GetMouseXY(&sGridX, &sGridY);
|
GetMouseXY(&sGridX, &sGridY);
|
||||||
swprintf(FPSText, L"%4d %4d %6d", sGridX, sGridY, iMapIndexD);
|
swprintf(FPSText, L"%4d %4d %6d ", sGridX, sGridY, iMapIndexD);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
swprintf(FPSText, L" ");
|
swprintf(FPSText, L" ");
|
||||||
@@ -1045,8 +1045,6 @@ void ProcessEditorRendering()
|
|||||||
RenderDoorLockInfo();
|
RenderDoorLockInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if( fSaveBuffer )
|
if( fSaveBuffer )
|
||||||
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 2 * iScreenHeightOffset + 360, SCREEN_WIDTH, 120 );
|
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 2 * iScreenHeightOffset + 360, SCREEN_WIDTH, 120 );
|
||||||
|
|
||||||
@@ -1054,9 +1052,8 @@ void ProcessEditorRendering()
|
|||||||
//It is set to false when before we save the buffer, so the buttons don't get
|
//It is set to false when before we save the buffer, so the buttons don't get
|
||||||
//rendered with hilites, in case the mouse is over one.
|
//rendered with hilites, in case the mouse is over one.
|
||||||
gfRenderHilights = TRUE;
|
gfRenderHilights = TRUE;
|
||||||
|
if(!gfSummaryWindowActive)//dnl ch77 131113
|
||||||
RenderButtonsFastHelp();
|
RenderButtonsFastHelp();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1430,7 +1430,7 @@ void ToggleAttachment( GUI_BUTTON *btn, INT32 reason )
|
|||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
UINT16 usAttachment = 0;
|
UINT16 usAttachment = 0;
|
||||||
ResizeWorldItems();//dnl ch75 021113 to prevent memory corruption during resize if somehow in created item we manage to put invalid attachment (DRAGUNOV with SNIPERCOPE problem in older mapeditors)
|
//ResizeWorldItems();//dnl ch75 021113 to prevent memory corruption during resize if somehow in created item we manage to put invalid attachment (DRAGUNOV with SNIPERCOPE problem in older mapeditors)
|
||||||
for( i = 0; i < NUM_ATTACHMENT_BUTTONS; i++ )
|
for( i = 0; i < NUM_ATTACHMENT_BUTTONS; i++ )
|
||||||
{ //Loop through and find the button that was just modified
|
{ //Loop through and find the button that was just modified
|
||||||
switch( i )
|
switch( i )
|
||||||
@@ -1470,7 +1470,7 @@ void ToggleCeramicPlates( GUI_BUTTON *btn, INT32 reason )
|
|||||||
{
|
{
|
||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
ResizeWorldItems();//dnl ch75 021113 just precaution to prevent eventual memory corruption during resize if somehow AttachObject find invalid attachment
|
//ResizeWorldItems();//dnl ch75 021113 just precaution to prevent eventual memory corruption during resize if somehow AttachObject find invalid attachment
|
||||||
gfCeramicPlates ^= TRUE;
|
gfCeramicPlates ^= TRUE;
|
||||||
if( gfCeramicPlates )
|
if( gfCeramicPlates )
|
||||||
{
|
{
|
||||||
@@ -1492,7 +1492,7 @@ void ToggleDetonator( GUI_BUTTON *btn, INT32 reason )
|
|||||||
{
|
{
|
||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
ResizeWorldItems();//dnl ch75 021113 just precaution to prevent eventual memory corruption during resize if somehow AttachObject find invalid attachment
|
//ResizeWorldItems();//dnl ch75 021113 just precaution to prevent eventual memory corruption during resize if somehow AttachObject find invalid attachment
|
||||||
if( !gfDetonator )
|
if( !gfDetonator )
|
||||||
{
|
{
|
||||||
gfDetonator = TRUE;
|
gfDetonator = TRUE;
|
||||||
|
|||||||
+1
-14
@@ -2976,20 +2976,7 @@ BOOLEAN OBJECTTYPE::Load( INT8** hBuffer, float dMajorMapVersion, UINT8 ubMinorM
|
|||||||
this->AttachObject(NULL,&defaultAttachment, FALSE);
|
this->AttachObject(NULL,&defaultAttachment, FALSE);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if(this->usItem && (gGameOptions.ubAttachmentSystem || gfEditMode))
|
AttachDefaultAttachments(this);//dnl ch75 261013
|
||||||
{
|
|
||||||
RemoveProhibitedAttachments(NULL, this, this->usItem);
|
|
||||||
//Madd: ok, so this drives me nuts -- why bother with default attachments if the map isn't going to load them for you?
|
|
||||||
//this should fix that...
|
|
||||||
for(UINT8 cnt=0; cnt<MAX_DEFAULT_ATTACHMENTS; cnt++)
|
|
||||||
{
|
|
||||||
if(Item[this->usItem].defaultattachments[cnt] == NONE || !(gGameOptions.ubAttachmentSystem && Item[Item[this->usItem].defaultattachments[cnt]].inseparable || gfEditMode))
|
|
||||||
break;
|
|
||||||
OBJECTTYPE defaultAttachment;
|
|
||||||
CreateItem(Item[this->usItem].defaultattachments[cnt], (*this)[0]->data.gun.bGunStatus, &defaultAttachment);
|
|
||||||
this->AttachObject(NULL, &defaultAttachment, FALSE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2778,7 +2778,7 @@ void QuickButtonCallbackMButn( MOUSE_REGION *reg, INT32 reason )
|
|||||||
b->uiFlags &= (~BUTTON_CLICKED_ON);
|
b->uiFlags &= (~BUTTON_CLICKED_ON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( b->uiFlags & BUTTON_CHECKBOX )
|
else if( b->uiFlags & BUTTON_CHECKBOX && b->uiFlags & BUTTON_ENABLED )//dnl ch77 131113
|
||||||
{
|
{
|
||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
{ //the check box button gets anchored, though it doesn't actually use the anchoring move callback.
|
{ //the check box button gets anchored, though it doesn't actually use the anchoring move callback.
|
||||||
|
|||||||
@@ -5015,6 +5015,23 @@ BOOLEAN InternalInitItemDescriptionBox( OBJECTTYPE *pObject, INT16 sX, INT16 sY,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//dnl ch77 251113 create attachment slots if not exist for NAS or remove empty slots for OAS
|
||||||
|
if(UsingNewAttachmentSystem())
|
||||||
|
{
|
||||||
|
if((*pObject)[ubStatusIndex]->attachments.empty())
|
||||||
|
InitItemAttachments(pObject);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
attachmentList::iterator iter = (*pObject)[ubStatusIndex]->attachments.begin();
|
||||||
|
while(iter != (*pObject)[ubStatusIndex]->attachments.end())
|
||||||
|
{
|
||||||
|
if((*iter).exists())
|
||||||
|
++iter;
|
||||||
|
else
|
||||||
|
iter = (*pObject)[ubStatusIndex]->attachments.erase(iter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Set the current screen
|
//Set the current screen
|
||||||
guiCurrentItemDescriptionScreen = guiCurrentScreen;
|
guiCurrentItemDescriptionScreen = guiCurrentScreen;
|
||||||
|
|||||||
@@ -1251,7 +1251,11 @@ typedef enum ePOCKET_TYPE
|
|||||||
#define FIRST_ARMOUR 161
|
#define FIRST_ARMOUR 161
|
||||||
#define FIRST_MISC 201
|
#define FIRST_MISC 201
|
||||||
#define FIRST_KEY 271
|
#define FIRST_KEY 271
|
||||||
|
#ifdef JA2EDITOR
|
||||||
#define OLD_MAXITEMS 351//dnl ch74 191013
|
#define OLD_MAXITEMS 351//dnl ch74 191013
|
||||||
|
#else
|
||||||
|
#define OLD_MAXITEMS MAXITEMS
|
||||||
|
#endif
|
||||||
#define NOTHING NONE
|
#define NOTHING NONE
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -428,7 +428,7 @@ void ResizeWorldItems(void)//dnl ch75 271013
|
|||||||
gWorldItems.resize(guiNumWorldItems);
|
gWorldItems.resize(guiNumWorldItems);
|
||||||
#else
|
#else
|
||||||
guiNumWorldItems = gWorldItems.size();
|
guiNumWorldItems = gWorldItems.size();
|
||||||
if(guiNumWorldItems - GetNumUsedWorldItems() < 100)
|
if(guiNumWorldItems - GetNumUsedWorldItems() < 50)
|
||||||
{
|
{
|
||||||
gWorldItems.resize(guiNumWorldItems + 100);
|
gWorldItems.resize(guiNumWorldItems + 100);
|
||||||
guiNumWorldItems = gWorldItems.size();
|
guiNumWorldItems = gWorldItems.size();
|
||||||
|
|||||||
@@ -959,4 +959,4 @@ void TacticalSquadListBtnCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+23
-22
@@ -99,6 +99,11 @@ INT32 giXB = (0 + OLD_WORLD_COLS/2), giYB = (WORLD_ROWS/2 + OLD_WORLD_ROWS/2);
|
|||||||
INT32 giXC = (0 + OLD_WORLD_COLS/2), giYC = (WORLD_ROWS/2 - OLD_WORLD_ROWS/2);
|
INT32 giXC = (0 + OLD_WORLD_COLS/2), giYC = (WORLD_ROWS/2 - OLD_WORLD_ROWS/2);
|
||||||
|
|
||||||
extern BOOLEAN gfValidLocationsChanged;//dnl ch45 051009
|
extern BOOLEAN gfValidLocationsChanged;//dnl ch45 051009
|
||||||
|
#ifdef JA2EDITOR
|
||||||
|
extern UINT32 guiBigMap;//dnl ch77 121113
|
||||||
|
#else
|
||||||
|
#define guiBigMap FRAME_BUFFER
|
||||||
|
#endif
|
||||||
|
|
||||||
void HandleOverheadUI( );
|
void HandleOverheadUI( );
|
||||||
void ClickOverheadRegionCallback(MOUSE_REGION *reg,INT32 reason);
|
void ClickOverheadRegionCallback(MOUSE_REGION *reg,INT32 reason);
|
||||||
@@ -860,7 +865,6 @@ INT16 GetModifiedOffsetLandHeight( INT32 sGridNo )
|
|||||||
return( sModifiedTileHeight );
|
return( sModifiedTileHeight );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RenderOverheadMap( INT16 sStartPointX_M, INT16 sStartPointY_M, INT16 sStartPointX_S, INT16 sStartPointY_S, INT16 sEndXS, INT16 sEndYS, BOOLEAN fFromMapUtility )
|
void RenderOverheadMap( INT16 sStartPointX_M, INT16 sStartPointY_M, INT16 sStartPointX_S, INT16 sStartPointY_S, INT16 sEndXS, INT16 sEndYS, BOOLEAN fFromMapUtility )
|
||||||
{
|
{
|
||||||
INT8 bXOddFlag = 0;
|
INT8 bXOddFlag = 0;
|
||||||
@@ -872,8 +876,10 @@ void RenderOverheadMap( INT16 sStartPointX_M, INT16 sStartPointY_M, INT16 sStart
|
|||||||
BOOLEAN fEndRenderRow = FALSE, fEndRenderCol = FALSE;
|
BOOLEAN fEndRenderRow = FALSE, fEndRenderCol = FALSE;
|
||||||
INT32 usTileIndex;
|
INT32 usTileIndex;
|
||||||
INT16 sX, sY;
|
INT16 sX, sY;
|
||||||
UINT32 uiDestPitchBYTES;
|
//dnl ch77 111113 moved declarations from below
|
||||||
UINT8 *pDestBuf;
|
UINT32 uiDestPitchBYTES, uiSrcPitchBYTES, uiBigMap=(fFromMapUtility?guiBigMap:FRAME_BUFFER);
|
||||||
|
UINT8 *pDestBuf, *pSrcBuf, ubBitDepth;
|
||||||
|
UINT16 usWidth, usHeight;
|
||||||
LEVELNODE *pNode;
|
LEVELNODE *pNode;
|
||||||
SMALL_TILE_DB *pTile;
|
SMALL_TILE_DB *pTile;
|
||||||
INT16 sHeight;
|
INT16 sHeight;
|
||||||
@@ -894,10 +900,10 @@ void RenderOverheadMap( INT16 sStartPointX_M, INT16 sStartPointY_M, INT16 sStart
|
|||||||
// Black color for the background!
|
// Black color for the background!
|
||||||
//ColorFillVideoSurfaceArea( FRAME_BUFFER, sStartPointX_S, sStartPointY_S, sEndXS, sEndYS, 0 );
|
//ColorFillVideoSurfaceArea( FRAME_BUFFER, sStartPointX_S, sStartPointY_S, sEndXS, sEndYS, 0 );
|
||||||
|
|
||||||
if(gfTacticalPlacementGUIActive)//dnl ch45 021009 Skip overwrite buttons area which is not refresh during scroll
|
if(gfTacticalPlacementGUIActive)//dnl ch45 021009 Skip overwrite buttons area which is not refresh during scroll //dnl ch77 211113
|
||||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-160, 0);
|
ColorFillVideoSurfaceArea(uiBigMap, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-160, 0);
|
||||||
else
|
else
|
||||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-120, 0);
|
ColorFillVideoSurfaceArea(uiBigMap, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-120, 0);
|
||||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||||
|
|
||||||
InvalidateScreen();
|
InvalidateScreen();
|
||||||
@@ -913,8 +919,7 @@ void RenderOverheadMap( INT16 sStartPointX_M, INT16 sStartPointY_M, INT16 sStart
|
|||||||
|
|
||||||
// Zero out area!
|
// Zero out area!
|
||||||
//ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, 0, (INT16)(640), (INT16)(gsVIEWPORT_WINDOW_END_Y), Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
//ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, 0, (INT16)(640), (INT16)(gsVIEWPORT_WINDOW_END_Y), Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||||
|
pDestBuf = LockVideoSurface(uiBigMap, &uiDestPitchBYTES);//dnl ch77 211113
|
||||||
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
|
|
||||||
|
|
||||||
// Nur Karte und position der gebäude
|
// Nur Karte und position der gebäude
|
||||||
do
|
do
|
||||||
@@ -1239,37 +1244,33 @@ void RenderOverheadMap( INT16 sStartPointX_M, INT16 sStartPointY_M, INT16 sStart
|
|||||||
}
|
}
|
||||||
while( !fEndRenderCol );
|
while( !fEndRenderCol );
|
||||||
}
|
}
|
||||||
|
//dnl ch77 211113
|
||||||
UnLockVideoSurface( FRAME_BUFFER );
|
UnLockVideoSurface(uiBigMap);
|
||||||
|
|
||||||
// OK, blacken out edges of smaller maps...
|
// OK, blacken out edges of smaller maps...
|
||||||
if ( gMapInformation.ubRestrictedScrollID != 0 )
|
if ( gMapInformation.ubRestrictedScrollID != 0 )
|
||||||
{
|
{
|
||||||
CalculateRestrictedMapCoords( NORTH, &sX1, &sY1, &sX2, &sY2, sEndXS, sEndYS );
|
CalculateRestrictedMapCoords( NORTH, &sX1, &sY1, &sX2, &sY2, sEndXS, sEndYS );
|
||||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, sX1, sY1, sX2, sY2, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
ColorFillVideoSurfaceArea( uiBigMap, sX1, sY1, sX2, sY2, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||||
|
|
||||||
CalculateRestrictedMapCoords( EAST, &sX1, &sY1, &sX2, &sY2, sEndXS, sEndYS );
|
CalculateRestrictedMapCoords( EAST, &sX1, &sY1, &sX2, &sY2, sEndXS, sEndYS );
|
||||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, sX1, sY1, sX2, sY2, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
ColorFillVideoSurfaceArea( uiBigMap, sX1, sY1, sX2, sY2, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||||
|
|
||||||
CalculateRestrictedMapCoords( SOUTH, &sX1, &sY1, &sX2, &sY2, sEndXS, sEndYS );
|
CalculateRestrictedMapCoords( SOUTH, &sX1, &sY1, &sX2, &sY2, sEndXS, sEndYS );
|
||||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, sX1, sY1, sX2, sY2, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
ColorFillVideoSurfaceArea( uiBigMap, sX1, sY1, sX2, sY2, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||||
|
|
||||||
CalculateRestrictedMapCoords( WEST, &sX1, &sY1, &sX2, &sY2, sEndXS, sEndYS );
|
CalculateRestrictedMapCoords( WEST, &sX1, &sY1, &sX2, &sY2, sEndXS, sEndYS );
|
||||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, sX1, sY1, sX2, sY2, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
ColorFillVideoSurfaceArea( uiBigMap, sX1, sY1, sX2, sY2, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||||
}
|
}
|
||||||
//DBrot: bigger overview code
|
//DBrot: bigger overview code
|
||||||
if(!fFromMapUtility){//LJDOldSM
|
if(!fFromMapUtility){//LJDOldSM
|
||||||
if(gfUseBiggerOverview && iResolution >= _1680x1050){
|
if(gfUseBiggerOverview && iResolution >= _1680x1050){
|
||||||
BltVideoObjectFromIndex(FRAME_BUFFER, uiOVERMAP, 0, ((SCREEN_WIDTH / 2) - (1432 / 2) - 40), 60, VO_BLT_SRCTRANSPARENCY, NULL);// Render border!
|
BltVideoObjectFromIndex(uiBigMap, uiOVERMAP, 0, ((SCREEN_WIDTH / 2) - (1432 / 2) - 40), 60, VO_BLT_SRCTRANSPARENCY, NULL);// Render border!
|
||||||
}else{
|
}else{
|
||||||
BltVideoObjectFromIndex(FRAME_BUFFER, uiOVERMAP, 0, xResOffset, yResOffset, VO_BLT_SRCTRANSPARENCY, NULL);// Render border!
|
BltVideoObjectFromIndex(uiBigMap, uiOVERMAP, 0, xResOffset, yResOffset, VO_BLT_SRCTRANSPARENCY, NULL);// Render border!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Update the save buffer
|
else
|
||||||
UINT32 uiDestPitchBYTES, uiSrcPitchBYTES;
|
return;
|
||||||
UINT8 *pDestBuf, *pSrcBuf;
|
|
||||||
UINT16 usWidth, usHeight;
|
|
||||||
UINT8 ubBitDepth;
|
|
||||||
// Update saved buffer - do for the viewport size ony!
|
// Update saved buffer - do for the viewport size ony!
|
||||||
GetCurrentVideoSettings( &usWidth, &usHeight, &ubBitDepth );
|
GetCurrentVideoSettings( &usWidth, &usHeight, &ubBitDepth );
|
||||||
pSrcBuf = LockVideoSurface(guiRENDERBUFFER, &uiSrcPitchBYTES);
|
pSrcBuf = LockVideoSurface(guiRENDERBUFFER, &uiSrcPitchBYTES);
|
||||||
|
|||||||
+92
-74
@@ -21,6 +21,9 @@
|
|||||||
#include "map information.h"
|
#include "map information.h"
|
||||||
#include "line.h"
|
#include "line.h"
|
||||||
#include "quantize wrap.h"
|
#include "quantize wrap.h"
|
||||||
|
//dnl ch77 131113
|
||||||
|
#include "Editor Taskbar Utils.h"
|
||||||
|
#include "Text Input.h"
|
||||||
|
|
||||||
#define MINIMAP_X_SIZE 88//RADAR_WINDOW_WIDTH
|
#define MINIMAP_X_SIZE 88//RADAR_WINDOW_WIDTH
|
||||||
#define MINIMAP_Y_SIZE 44//RADAR_WINDOW_HEIGHT
|
#define MINIMAP_Y_SIZE 44//RADAR_WINDOW_HEIGHT
|
||||||
@@ -40,11 +43,11 @@ typedef struct
|
|||||||
}RGBValues;
|
}RGBValues;
|
||||||
|
|
||||||
FLOAT gdXStep, gdYStep;
|
FLOAT gdXStep, gdYStep;
|
||||||
INT32 giMiniMap, gi8BitMiniMap;
|
UINT32 guiMiniMap=0, gui8BitMiniMap=0, guiBigMap=0;//dnl ch77 121113
|
||||||
HVSURFACE ghVSurface = NULL;
|
HVSURFACE ghVSurface = NULL;
|
||||||
RGBValues* p24BitValues = NULL;
|
RGBValues* p24BitValues = NULL;
|
||||||
FDLG_LIST* FListNode = NULL;
|
FDLG_LIST* FListNode = NULL;
|
||||||
|
BOOLEAN gfMapUtilityWindowActive = FALSE;
|
||||||
|
|
||||||
void GenerateAllMapsInit(void)
|
void GenerateAllMapsInit(void)
|
||||||
{
|
{
|
||||||
@@ -63,32 +66,56 @@ void GenerateAllMapsInit(void)
|
|||||||
// Utililty file for sub-sampling/creating our radar screen maps.
|
// Utililty file for sub-sampling/creating our radar screen maps.
|
||||||
// Loops through our maps directory and reads all *.map files, subsamples an area, color quantizes into an 8-bit image and writes to sti file in radarmaps.
|
// Loops through our maps directory and reads all *.map files, subsamples an area, color quantizes into an 8-bit image and writes to sti file in radarmaps.
|
||||||
// From editor will create radar map for you current map.
|
// From editor will create radar map for you current map.
|
||||||
|
//dnl ch77 121113
|
||||||
UINT32 MapUtilScreenInit(void)
|
UINT32 MapUtilScreenInit(void)
|
||||||
{
|
{
|
||||||
UINT8 ubBitDepth;
|
UINT8 ubBitDepth;
|
||||||
UINT16 usWidth, usHeight;
|
UINT16 usWidth, usHeight;
|
||||||
VSURFACE_DESC vs_desc;
|
VSURFACE_DESC vs_desc;
|
||||||
|
|
||||||
|
vs_desc.fCreateFlags = VSURFACE_CREATE_DEFAULT | VSURFACE_SYSTEM_MEM_USAGE;
|
||||||
// Create render buffer
|
// Create render buffer
|
||||||
GetCurrentVideoSettings(&usWidth, &usHeight, &ubBitDepth);
|
GetCurrentVideoSettings(&usWidth, &usHeight, &ubBitDepth);
|
||||||
vs_desc.fCreateFlags = VSURFACE_CREATE_DEFAULT | VSURFACE_SYSTEM_MEM_USAGE;
|
if(!GetVideoSurface(&ghVSurface, guiMiniMap))
|
||||||
vs_desc.usWidth = MINIMAP_X_SIZE;
|
{
|
||||||
vs_desc.usHeight = MINIMAP_Y_SIZE;
|
vs_desc.usWidth = MINIMAP_X_SIZE;
|
||||||
vs_desc.ubBitDepth = ubBitDepth;
|
vs_desc.usHeight = MINIMAP_Y_SIZE;
|
||||||
if(AddVideoSurface(&vs_desc, (UINT32*)&giMiniMap) == FALSE)
|
vs_desc.ubBitDepth = ubBitDepth;
|
||||||
return(ERROR_SCREEN);
|
if(AddVideoSurface(&vs_desc, (UINT32*)&guiMiniMap) == FALSE)
|
||||||
|
return(ERROR_SCREEN);
|
||||||
|
}
|
||||||
// Allocate 24 bit Surface
|
// Allocate 24 bit Surface
|
||||||
p24BitValues = (RGBValues*)MemAlloc(MINIMAP_X_SIZE * MINIMAP_Y_SIZE * sizeof(RGBValues));
|
if(!p24BitValues)
|
||||||
|
p24BitValues = (RGBValues*)MemAlloc(MINIMAP_X_SIZE * MINIMAP_Y_SIZE * sizeof(RGBValues));
|
||||||
//Allocate 8-bit surface
|
//Allocate 8-bit surface
|
||||||
vs_desc.fCreateFlags = VSURFACE_CREATE_DEFAULT | VSURFACE_SYSTEM_MEM_USAGE;
|
if(!GetVideoSurface(&ghVSurface, gui8BitMiniMap))
|
||||||
vs_desc.usWidth = MINIMAP_X_SIZE;
|
{
|
||||||
vs_desc.usHeight = MINIMAP_Y_SIZE;
|
vs_desc.usWidth = MINIMAP_X_SIZE;
|
||||||
vs_desc.ubBitDepth = 8;
|
vs_desc.usHeight = MINIMAP_Y_SIZE;
|
||||||
if(AddVideoSurface(&vs_desc, (UINT32*)&gi8BitMiniMap) == FALSE)
|
vs_desc.ubBitDepth = 8;
|
||||||
return(ERROR_SCREEN);
|
if(AddVideoSurface(&vs_desc, (UINT32*)&gui8BitMiniMap) == FALSE)
|
||||||
GetVideoSurface(&ghVSurface, gi8BitMiniMap);
|
return(ERROR_SCREEN);
|
||||||
|
}
|
||||||
|
// Create big map buffer which contains whole map for radar map generation
|
||||||
|
vs_desc.usWidth = (640 * WORLD_COLS / OLD_WORLD_COLS);
|
||||||
|
vs_desc.usHeight = (320 * WORLD_ROWS / OLD_WORLD_ROWS) + 10;// +10, without this additional lines editor will crash as renderer go beyond them
|
||||||
|
vs_desc.ubBitDepth = ubBitDepth;
|
||||||
|
if(!GetVideoSurface(&ghVSurface, guiBigMap))
|
||||||
|
{
|
||||||
|
if(AddVideoSurface(&vs_desc, (UINT32*)&guiBigMap) == FALSE)
|
||||||
|
return(ERROR_SCREEN);
|
||||||
|
}
|
||||||
|
else if(!(ghVSurface->usWidth == vs_desc.usWidth && ghVSurface->usHeight == vs_desc.usHeight))
|
||||||
|
{
|
||||||
|
DeleteVideoSurfaceFromIndex( guiBigMap );
|
||||||
|
if(AddVideoSurface(&vs_desc, (UINT32*)&guiBigMap) == FALSE)
|
||||||
|
return(ERROR_SCREEN);
|
||||||
|
}
|
||||||
|
GetVideoSurface(&ghVSurface, gui8BitMiniMap);
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//dnl ch77 131113
|
||||||
UINT32 MapUtilScreenHandle(void)
|
UINT32 MapUtilScreenHandle(void)
|
||||||
{
|
{
|
||||||
InputAtom InputEvent;
|
InputAtom InputEvent;
|
||||||
@@ -101,7 +128,7 @@ UINT32 MapUtilScreenHandle(void)
|
|||||||
INT32 cnt, iX, iY, iSubX1, iSubY1, iSubX2, iSubY2, iWindowX, iWindowY, iCount;
|
INT32 cnt, iX, iY, iSubX1, iSubY1, iSubX2, iSubY2, iWindowX, iWindowY, iCount;
|
||||||
FLOAT dX, dY, dStartX, dStartY;
|
FLOAT dX, dY, dStartX, dStartY;
|
||||||
|
|
||||||
while(DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP) == TRUE)
|
while(DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT) == TRUE)
|
||||||
{
|
{
|
||||||
if(InputEvent.usParam == ESC)
|
if(InputEvent.usParam == ESC)
|
||||||
{
|
{
|
||||||
@@ -110,6 +137,9 @@ UINT32 MapUtilScreenHandle(void)
|
|||||||
{
|
{
|
||||||
TrashFDlgList(FileList);
|
TrashFDlgList(FileList);
|
||||||
FileList = FListNode = NULL;
|
FileList = FListNode = NULL;
|
||||||
|
EnableEditorTaskbar();
|
||||||
|
EnableAllTextFields();
|
||||||
|
gfMapUtilityWindowActive = FALSE;
|
||||||
return(EDIT_SCREEN);
|
return(EDIT_SCREEN);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -119,6 +149,17 @@ UINT32 MapUtilScreenHandle(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(gfMapUtilityWindowActive)
|
||||||
|
{
|
||||||
|
GetVideoSurface(&ghVSurface, gui8BitMiniMap);
|
||||||
|
return(MAPUTILITY_SCREEN);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DisableEditorTaskbar();
|
||||||
|
DisableAllTextFields();
|
||||||
|
MapUtilScreenInit();
|
||||||
|
}
|
||||||
sDest16BPPColor = -1;
|
sDest16BPPColor = -1;
|
||||||
bAvR = bAvG = bAvB = 0;
|
bAvR = bAvG = bAvB = 0;
|
||||||
// Zero out area!
|
// Zero out area!
|
||||||
@@ -139,31 +180,19 @@ UINT32 MapUtilScreenHandle(void)
|
|||||||
return(ERROR_SCREEN);
|
return(ERROR_SCREEN);
|
||||||
}
|
}
|
||||||
// Render small map
|
// Render small map
|
||||||
iOffsetHorizontal = (SCREEN_WIDTH / 2) - (640 / 2);// Horizontal start postion of the overview map
|
//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
|
//iOffsetVertical = (SCREEN_HEIGHT - 160) / 2 - 160;// Vertical start position of the overview map
|
||||||
|
iOffsetHorizontal = iOffsetVertical = 0;
|
||||||
|
ColorFillVideoSurfaceArea(guiBigMap, 0, 0, (INT16)(SCREEN_WIDTH), (INT16)(SCREEN_HEIGHT), Get16BPPColor(FROMRGB(0, 0, 0)));
|
||||||
InitNewOverheadDB((UINT8)giCurrentTilesetID);
|
InitNewOverheadDB((UINT8)giCurrentTilesetID);
|
||||||
gfOverheadMapDirty = TRUE;
|
gfOverheadMapDirty = TRUE;
|
||||||
|
|
||||||
//Buggler: interim code for radar map sti creation <= 360x360 based on DBrot bigger overview code
|
//Buggler: interim code for radar map sti creation <= 360x360 based on DBrot bigger overview code
|
||||||
if(iResolution >= _1680x1050 && WORLD_COLS <= 360)
|
RenderOverheadMap(0, (WORLD_COLS/2), iOffsetHorizontal, iOffsetVertical, iOffsetHorizontal + (640 * WORLD_COLS / OLD_WORLD_COLS), iOffsetVertical + (320 * WORLD_ROWS / OLD_WORLD_ROWS), TRUE);
|
||||||
RenderOverheadMap(0, (WORLD_COLS/2), iOffsetHorizontal, iOffsetVertical, iOffsetHorizontal + (640 * WORLD_COLS / OLD_WORLD_COLS), iOffsetVertical + (320 * WORLD_ROWS / OLD_WORLD_ROWS), TRUE);
|
|
||||||
else
|
|
||||||
RenderOverheadMap(0, (WORLD_COLS/2), iOffsetHorizontal, iOffsetVertical, iOffsetHorizontal+640, iOffsetVertical+320, TRUE);
|
|
||||||
|
|
||||||
TrashOverheadMap();
|
TrashOverheadMap();
|
||||||
// OK, NOW PROCESS OVERHEAD MAP ( SHOULD BE ON THE FRAMEBUFFER )
|
// OK, NOW PROCESS OVERHEAD MAP ( SHOULD BE ON THE FRAMEBUFFER )
|
||||||
//Buggler: interim code for radar map sti creation <= 360x360 based on DBrot bigger overview code
|
//Buggler: interim code for radar map sti creation <= 360x360 based on DBrot bigger overview code
|
||||||
if(iResolution >= _1680x1050 && WORLD_COLS <= 360)
|
gdXStep = (FLOAT)(640 * WORLD_COLS / OLD_WORLD_COLS) / (FLOAT)MINIMAP_X_SIZE;
|
||||||
{
|
gdYStep = (FLOAT)(320 * WORLD_ROWS / OLD_WORLD_ROWS) / (FLOAT)MINIMAP_Y_SIZE;
|
||||||
gdXStep = (FLOAT)(640 * WORLD_COLS / OLD_WORLD_COLS) / (FLOAT)MINIMAP_X_SIZE;
|
|
||||||
gdYStep = (FLOAT)(320 * WORLD_ROWS / OLD_WORLD_ROWS) / (FLOAT)MINIMAP_Y_SIZE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
gdXStep = (FLOAT)640 / (FLOAT)MINIMAP_X_SIZE;
|
|
||||||
gdYStep = (FLOAT)320 / (FLOAT)MINIMAP_Y_SIZE;
|
|
||||||
}
|
|
||||||
|
|
||||||
dStartX = iOffsetHorizontal;
|
dStartX = iOffsetHorizontal;
|
||||||
dStartY = iOffsetVertical;
|
dStartY = iOffsetVertical;
|
||||||
// Adjust if we are using a restricted map...
|
// Adjust if we are using a restricted map...
|
||||||
@@ -181,9 +210,8 @@ UINT32 MapUtilScreenHandle(void)
|
|||||||
//LOCK BUFFERS
|
//LOCK BUFFERS
|
||||||
dX = dStartX;
|
dX = dStartX;
|
||||||
dY = dStartY;
|
dY = dStartY;
|
||||||
pDestBuf = (UINT16*)LockVideoSurface(giMiniMap, &uiDestPitchBYTES);
|
pDestBuf = (UINT16*)LockVideoSurface(guiMiniMap, &uiDestPitchBYTES);
|
||||||
pSrcBuf = (UINT16*)LockVideoSurface(FRAME_BUFFER, &uiSrcPitchBYTES);
|
pSrcBuf = (UINT16*)LockVideoSurface(guiBigMap, &uiSrcPitchBYTES);
|
||||||
|
|
||||||
for ( iX = 0; iX < MINIMAP_X_SIZE; iX++ )
|
for ( iX = 0; iX < MINIMAP_X_SIZE; iX++ )
|
||||||
{
|
{
|
||||||
dY = dStartY;
|
dY = dStartY;
|
||||||
@@ -207,37 +235,18 @@ UINT32 MapUtilScreenHandle(void)
|
|||||||
for ( iWindowY = iSubY1; iWindowY < iSubY2; iWindowY++ )
|
for ( iWindowY = iSubY1; iWindowY < iSubY2; iWindowY++ )
|
||||||
{
|
{
|
||||||
//Buggler: interim code for radar map sti creation <= 360x360 based on DBrot bigger overview code
|
//Buggler: interim code for radar map sti creation <= 360x360 based on DBrot bigger overview code
|
||||||
if(iResolution >= _1680x1050 && WORLD_COLS <= 360)
|
if ( iWindowX >= iOffsetHorizontal && iWindowX < (iOffsetHorizontal + (640 * WORLD_COLS / OLD_WORLD_COLS)) && iWindowY >= iOffsetVertical && iWindowY < (iOffsetVertical + (320 * WORLD_ROWS / OLD_WORLD_ROWS)) )
|
||||||
{
|
{
|
||||||
if ( iWindowX >= iOffsetHorizontal && iWindowX < (iOffsetHorizontal + (640 * WORLD_COLS / OLD_WORLD_COLS)) && iWindowY >= iOffsetVertical && iWindowY < (iOffsetVertical + (320 * WORLD_ROWS / OLD_WORLD_ROWS)) )
|
s16BPPSrc = pSrcBuf[ ( iWindowY * (uiSrcPitchBYTES/2) ) + iWindowX ];
|
||||||
{
|
|
||||||
s16BPPSrc = pSrcBuf[ ( iWindowY * (uiSrcPitchBYTES/2) ) + iWindowX ];
|
|
||||||
|
|
||||||
uiRGBColor = GetRGBColor( s16BPPSrc );
|
uiRGBColor = GetRGBColor( s16BPPSrc );
|
||||||
|
|
||||||
bR += SGPGetRValue( uiRGBColor );
|
bR += SGPGetRValue( uiRGBColor );
|
||||||
bG += SGPGetGValue( uiRGBColor );
|
bG += SGPGetGValue( uiRGBColor );
|
||||||
bB += SGPGetBValue( uiRGBColor );
|
bB += SGPGetBValue( uiRGBColor );
|
||||||
|
|
||||||
// Average!
|
// Average!
|
||||||
iCount++;
|
iCount++;
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( iWindowX >= iOffsetHorizontal && iWindowX < (iOffsetHorizontal + 640) && iWindowY >= iOffsetVertical && iWindowY < (iOffsetVertical + 320) )
|
|
||||||
{
|
|
||||||
s16BPPSrc = pSrcBuf[ ( iWindowY * (uiSrcPitchBYTES/2) ) + iWindowX ];
|
|
||||||
|
|
||||||
uiRGBColor = GetRGBColor( s16BPPSrc );
|
|
||||||
|
|
||||||
bR += SGPGetRValue( uiRGBColor );
|
|
||||||
bG += SGPGetGValue( uiRGBColor );
|
|
||||||
bB += SGPGetBValue( uiRGBColor );
|
|
||||||
|
|
||||||
// Average!
|
|
||||||
iCount++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -265,14 +274,15 @@ UINT32 MapUtilScreenHandle(void)
|
|||||||
//Increment
|
//Increment
|
||||||
dX += gdXStep;
|
dX += gdXStep;
|
||||||
}
|
}
|
||||||
|
|
||||||
UnLockVideoSurface(giMiniMap);
|
|
||||||
UnLockVideoSurface(FRAME_BUFFER);
|
|
||||||
// RENDER!
|
// RENDER!
|
||||||
BltVideoSurface(FRAME_BUFFER, giMiniMap, 0, iOffsetHorizontal+10, iOffsetVertical+360, VS_BLT_FAST|VS_BLT_USECOLORKEY, NULL);
|
UnLockVideoSurface(guiMiniMap);
|
||||||
//QUantize!
|
iOffsetVertical = SCREEN_HEIGHT - 480;
|
||||||
pDataPtr = (UINT8*)LockVideoSurface(gi8BitMiniMap, &uiSrcPitchBYTES);
|
BltVideoSurface(FRAME_BUFFER, guiMiniMap, 0, iOffsetHorizontal+10, iOffsetVertical+360, VS_BLT_FAST|VS_BLT_USECOLORKEY, NULL);
|
||||||
pDestBuf = (UINT16*)LockVideoSurface(FRAME_BUFFER, &uiDestPitchBYTES);
|
pDestBuf = (UINT16*)LockVideoSurface(FRAME_BUFFER, &uiDestPitchBYTES);
|
||||||
|
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES, (UINT16 *)pSrcBuf, uiSrcPitchBYTES, 0, 0, 0, 0, min((640 * WORLD_COLS / OLD_WORLD_COLS), SCREEN_WIDTH), min((320 * WORLD_ROWS / OLD_WORLD_ROWS), SCREEN_HEIGHT - 160));
|
||||||
|
UnLockVideoSurface(guiBigMap);
|
||||||
|
//QUantize!
|
||||||
|
pDataPtr = (UINT8*)LockVideoSurface(gui8BitMiniMap, &uiSrcPitchBYTES);
|
||||||
QuantizeImage(pDataPtr, (UINT8*)p24BitValues, MINIMAP_X_SIZE, MINIMAP_Y_SIZE, pPalette);
|
QuantizeImage(pDataPtr, (UINT8*)p24BitValues, MINIMAP_X_SIZE, MINIMAP_Y_SIZE, pPalette);
|
||||||
SetVideoSurfacePalette(ghVSurface, pPalette);
|
SetVideoSurfacePalette(ghVSurface, pPalette);
|
||||||
// Blit!
|
// Blit!
|
||||||
@@ -296,7 +306,7 @@ UINT32 MapUtilScreenHandle(void)
|
|||||||
zFilename[cnt] = '\0';
|
zFilename[cnt] = '\0';
|
||||||
sprintf(zFilename2, "RADARMAPS\\%s.STI", zFilename);
|
sprintf(zFilename2, "RADARMAPS\\%s.STI", zFilename);
|
||||||
WriteSTIFile((INT8*)pDataPtr, pPalette, MINIMAP_X_SIZE, MINIMAP_Y_SIZE, (STR)zFilename2, CONVERT_ETRLE_COMPRESS, 0);
|
WriteSTIFile((INT8*)pDataPtr, pPalette, MINIMAP_X_SIZE, MINIMAP_Y_SIZE, (STR)zFilename2, CONVERT_ETRLE_COMPRESS, 0);
|
||||||
UnLockVideoSurface(gi8BitMiniMap);
|
UnLockVideoSurface(gui8BitMiniMap);
|
||||||
SetFont(TINYFONT1);
|
SetFont(TINYFONT1);
|
||||||
SetFontBackground(FONT_MCOLOR_BLACK);
|
SetFontBackground(FONT_MCOLOR_BLACK);
|
||||||
SetFontForeground(FONT_MCOLOR_DKGRAY);
|
SetFontForeground(FONT_MCOLOR_DKGRAY);
|
||||||
@@ -307,7 +317,15 @@ UINT32 MapUtilScreenHandle(void)
|
|||||||
if(FListNode)
|
if(FListNode)
|
||||||
FListNode = FListNode->pNext;
|
FListNode = FListNode->pNext;
|
||||||
if(fEditModeFirstTime == FALSE && FListNode == NULL)
|
if(fEditModeFirstTime == FALSE && FListNode == NULL)
|
||||||
return(EDIT_SCREEN);
|
{
|
||||||
|
if(gfWorldLoaded)
|
||||||
|
{
|
||||||
|
gfMapUtilityWindowActive = TRUE;
|
||||||
|
return(MAPUTILITY_SCREEN);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return(EDIT_SCREEN);
|
||||||
|
}
|
||||||
return(MAPUTILITY_SCREEN);
|
return(MAPUTILITY_SCREEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -159,7 +159,8 @@ void WriteSTIFile( INT8 *pData, SGPPaletteEntry *pPalette, INT16 sWidth, INT16 s
|
|||||||
}
|
}
|
||||||
|
|
||||||
//dnl ch49 061009
|
//dnl ch49 061009
|
||||||
FileDelete(cOutputName);// If file exist FileOpen will not truncate, so delete.
|
if(FileExists(cOutputName))//dnl ch77 111113
|
||||||
|
FileDelete(cOutputName);// If file exist FileOpen will not truncate, so delete.
|
||||||
HWFILE hFile = FileOpen(cOutputName, FILE_ACCESS_WRITE|FILE_CREATE_ALWAYS, FALSE);
|
HWFILE hFile = FileOpen(cOutputName, FILE_ACCESS_WRITE|FILE_CREATE_ALWAYS, FALSE);
|
||||||
if(!hFile)
|
if(!hFile)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1976,4 +1976,4 @@ void CopyToClipboard( void )
|
|||||||
// finish up
|
// finish up
|
||||||
CloseClipboard();
|
CloseClipboard();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#include "PreBattle Interface.h"
|
#include "PreBattle Interface.h"
|
||||||
#include "Tactical Placement GUI.h"//dnl ch45 071009
|
#include "Tactical Placement GUI.h"//dnl ch45 071009
|
||||||
#include "Map Screen Interface Map Inventory.h"//dnl ch51 081009
|
#include "Map Screen Interface Map Inventory.h"//dnl ch51 081009
|
||||||
|
#include "World Items.h"//dnl ch77 191113
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "SaveLoadScreen.h"
|
#include "SaveLoadScreen.h"
|
||||||
@@ -234,6 +235,9 @@ void GameLoop(void)
|
|||||||
UINT32 uiOldScreen=guiCurrentScreen;
|
UINT32 uiOldScreen=guiCurrentScreen;
|
||||||
clock_t startTime = clock(); // decrease CPU load patch from defrog
|
clock_t startTime = clock(); // decrease CPU load patch from defrog
|
||||||
|
|
||||||
|
if(_LeftButtonDown | _RightButtonDown)//dnl ch77 191113 to prevent memory corruption during resize
|
||||||
|
ResizeWorldItems();
|
||||||
|
|
||||||
//DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"GameLoop: get mouse position");
|
//DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"GameLoop: get mouse position");
|
||||||
GetCursorPos(&MousePos);
|
GetCursorPos(&MousePos);
|
||||||
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
||||||
|
|||||||
Reference in New Issue
Block a user