mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
**********************************************************
** Big Maps Projects code (incl. Multiplayer v1.5 ** ********************************************************** - Merged Big Maps Project code from BMP+MP trunk (Revision: 3340) o Complete SVN Revision history: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP - Before THIS merge, I made a branch of the existing 1.13 source o SVN Branch: https://81.169.133.124/source/ja2/branches/JA2_rev.3336/src - Removed old VS 6.0 and VS 2003 project and solutions files, because compilation is broken long time ago - I will add VS 2010 projects and solution file in the next few days git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3341 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -67,6 +67,45 @@ INT8 gbDefaultLightType = PRIMETIME_LIGHT;
|
||||
SGPPaletteEntry gEditorLightColor;
|
||||
|
||||
BOOLEAN gfEditorForceShadeTableRebuild = FALSE;
|
||||
//dnl ch43 290909
|
||||
INT32 iNewMapWorldRows = OLD_WORLD_ROWS;
|
||||
INT32 iNewMapWorldCols = OLD_WORLD_COLS;
|
||||
|
||||
void SetupTextInputForOptions(void)//dnl ch52 091009
|
||||
{
|
||||
CHAR16 str[10];
|
||||
InitTextInputModeWithScheme(DEFAULT_SCHEME);
|
||||
AddUserInputField(NULL); // Just so we can use short cut keys while not typing.
|
||||
swprintf(str, L"%d", WORLD_ROWS);
|
||||
AddTextInputField( iScreenWidthOffset+5, 2*iScreenHeightOffset+394, 30, 18, MSYS_PRIORITY_NORMAL, str, 4, INPUTTYPE_NUMERICSTRICT);
|
||||
swprintf(str, L"%d", WORLD_COLS);
|
||||
AddTextInputField(iScreenWidthOffset+5, 2*iScreenHeightOffset+414, 30, 18, MSYS_PRIORITY_NORMAL, str, 4, INPUTTYPE_NUMERICSTRICT);
|
||||
DisableTextField(2);
|
||||
}
|
||||
|
||||
void UpdateOptions()
|
||||
{
|
||||
SetFont( FONT10ARIAL );
|
||||
SetFontShadow( FONT_NEARBLACK );
|
||||
|
||||
SetFontForeground( FONT_YELLOW );
|
||||
mprintf( iScreenWidthOffset + 38, 2 * iScreenHeightOffset + 399, L"Rows");
|
||||
SetFontForeground( FONT_YELLOW );
|
||||
mprintf( iScreenWidthOffset + 38, 2 * iScreenHeightOffset + 419, L"Cols");
|
||||
|
||||
SetFontForeground( FONT_RED );
|
||||
}
|
||||
|
||||
void ExtractAndUpdateOptions(void)//dnl ch52 091009
|
||||
{
|
||||
iNewMapWorldRows = max(min(GetNumericStrictValueFromField(1), 9600), OLD_WORLD_ROWS);
|
||||
iNewMapWorldRows /= 4;
|
||||
iNewMapWorldRows *= 4;
|
||||
iNewMapWorldCols = iNewMapWorldRows;
|
||||
//iNewMapWorldCols = max(min(GetNumericStrictValueFromField(2), 9600), OLD_WORLD_COLS);
|
||||
//iNewMapWorldCols /= 4;
|
||||
//iNewMapWorldCols *= 4;
|
||||
}
|
||||
|
||||
void SetupTextInputForMapInfo()
|
||||
{
|
||||
@@ -101,7 +140,7 @@ void SetupTextInputForMapInfo()
|
||||
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 363, 30, 18, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_EXCLUSIVE_COORDINATE );
|
||||
swprintf( str, L"%d", gExitGrid.ubGotoSectorZ );
|
||||
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 383, 30, 18, MSYS_PRIORITY_NORMAL, str, 1, INPUTTYPE_NUMERICSTRICT );
|
||||
swprintf( str, L"%d", gExitGrid.sGridNo );
|
||||
swprintf( str, L"%d", gExitGrid.usGridNo );
|
||||
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 403, 40, 18, MSYS_PRIORITY_NORMAL, str, 5, INPUTTYPE_NUMERICSTRICT );
|
||||
}
|
||||
|
||||
@@ -241,7 +280,7 @@ void ExtractAndUpdateMapInfo()
|
||||
gExitGrid.ubGotoSectorY = (UINT8)max( min( gExitGrid.ubGotoSectorY, 16 ), 1 );
|
||||
}
|
||||
gExitGrid.ubGotoSectorZ = (UINT8)max( min( GetNumericStrictValueFromField( 8 ), 3 ), 0 );
|
||||
gExitGrid.sGridNo = (INT16)max( min( GetNumericStrictValueFromField( 9 ), 25600 ), 0 );
|
||||
gExitGrid.usGridNo = max( min( GetNumericStrictValueFromField( 9 ), 25600 ), 0 );
|
||||
|
||||
UpdateMapInfoFields();
|
||||
}
|
||||
@@ -256,17 +295,17 @@ BOOLEAN ApplyNewExitGridValuesToTextFields()
|
||||
SetInputFieldStringWith16BitString( 7, str );
|
||||
swprintf( str, L"%d", gExitGrid.ubGotoSectorZ );
|
||||
SetInputFieldStringWith16BitString( 8, str );
|
||||
swprintf( str, L"%d", gExitGrid.sGridNo );
|
||||
swprintf( str, L"%d", gExitGrid.usGridNo );
|
||||
SetInputFieldStringWith16BitString( 9, str );
|
||||
SetActiveField( 0 );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
INT16 usCurrentExitGridNo = 0;
|
||||
INT32 usCurrentExitGridNo = 0;
|
||||
void LocateNextExitGrid()
|
||||
{
|
||||
EXITGRID ExitGrid;
|
||||
UINT16 i;
|
||||
INT32 i;
|
||||
for( i = usCurrentExitGridNo + 1; i < WORLD_MAX; i++ )
|
||||
{
|
||||
if( GetExitGrid( i, &ExitGrid ) )
|
||||
|
||||
Reference in New Issue
Block a user