- updated some editor files for the high resolution

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@601 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2006-10-12 15:59:33 +00:00
parent 10817d380e
commit 1a1af6b52a
8 changed files with 44 additions and 43 deletions
+7 -7
View File
@@ -315,13 +315,13 @@ void InitEditorMercsToolbar()
MSYS_SetBtnUserData( iEditorButton[ FIRST_MERCS_REL_ATTRIBUTE_BUTTON + x ], 0, x);
iEditorButton[ MERCS_ARMY_CODE ] =
CreateCheckBoxButton( 2 * iScreenWidthOffset + 575, iScreenHeightOffset + 410, "EDITOR//radiobutton.sti", MSYS_PRIORITY_NORMAL, MercsSetEnemyColorCodeCallback );
CreateCheckBoxButton( iScreenWidthOffset + 575, 2 * iScreenHeightOffset + 410, "EDITOR//radiobutton.sti", MSYS_PRIORITY_NORMAL, MercsSetEnemyColorCodeCallback );
MSYS_SetBtnUserData( iEditorButton[ MERCS_ARMY_CODE ], 0, SOLDIER_CLASS_ARMY );
iEditorButton[ MERCS_ADMIN_CODE ] =
CreateCheckBoxButton( 2 * iScreenWidthOffset + 575, iScreenHeightOffset + 424, "EDITOR//radiobutton.sti", MSYS_PRIORITY_NORMAL, MercsSetEnemyColorCodeCallback );
CreateCheckBoxButton( iScreenWidthOffset + 575, 2 * iScreenHeightOffset + 424, "EDITOR//radiobutton.sti", MSYS_PRIORITY_NORMAL, MercsSetEnemyColorCodeCallback );
MSYS_SetBtnUserData( iEditorButton[ MERCS_ADMIN_CODE ], 0, SOLDIER_CLASS_ADMINISTRATOR );
iEditorButton[ MERCS_ELITE_CODE ] =
CreateCheckBoxButton( 2 * iScreenWidthOffset + 575, iScreenHeightOffset + 438, "EDITOR//radiobutton.sti", MSYS_PRIORITY_NORMAL, MercsSetEnemyColorCodeCallback );
CreateCheckBoxButton( iScreenWidthOffset + 575, 2 * iScreenHeightOffset + 438, "EDITOR//radiobutton.sti", MSYS_PRIORITY_NORMAL, MercsSetEnemyColorCodeCallback );
MSYS_SetBtnUserData( iEditorButton[ MERCS_ELITE_CODE ], 0, SOLDIER_CLASS_ELITE );
iEditorButton[ MERCS_CIVILIAN_GROUP ] =
@@ -355,10 +355,10 @@ void InitEditorMercsToolbar()
}
iEditorButton[MERCS_BODYTYPE_DOWN] =
CreateEasyNoToggleButton( iScreenWidthOffset + 460,2 * iScreenHeightOffset +364,"EDITOR//leftarrow.sti", MercsSetBodyTypeCallback );
CreateEasyNoToggleButton( iScreenWidthOffset + 460, 2 * iScreenHeightOffset +364,"EDITOR//leftarrow.sti", MercsSetBodyTypeCallback );
SetButtonFastHelpText( iEditorButton[ MERCS_BODYTYPE_DOWN ], L"Previous body type");
iEditorButton[MERCS_BODYTYPE_UP] =
CreateEasyNoToggleButton( iScreenWidthOffset + 560,2 * iScreenHeightOffset +364,"EDITOR//rightarrow.sti", MercsSetBodyTypeCallback );
CreateEasyNoToggleButton( iScreenWidthOffset + 560, 2 * iScreenHeightOffset +364,"EDITOR//rightarrow.sti", MercsSetBodyTypeCallback );
SetButtonFastHelpText( iEditorButton[ MERCS_BODYTYPE_UP ], L"Next body type");
iEditorButton[ MERCS_SCHEDULE_VARIANCE1 ] =
@@ -592,9 +592,9 @@ void InitEditorItemsToolbar()
ItemsKeysCallback );
iEditorButton[ITEMS_LEFTSCROLL] =
CreateEasyNoToggleButton( iScreenWidthOffset + 1,2 * iScreenHeightOffset + 361,"EDITOR//leftscroll.sti", ItemsLeftScrollCallback);
CreateEasyNoToggleButton( iScreenWidthOffset + 1, 2 * iScreenHeightOffset + 361,"EDITOR//leftscroll.sti", ItemsLeftScrollCallback);
iEditorButton[ITEMS_RIGHTSCROLL] =
CreateEasyNoToggleButton( iScreenWidthOffset + 50,2 * iScreenHeightOffset + 361,"EDITOR//rightscroll.sti", ItemsRightScrollCallback);
CreateEasyNoToggleButton( iScreenWidthOffset + 50, 2 * iScreenHeightOffset + 361,"EDITOR//rightscroll.sti", ItemsRightScrollCallback);
}
+15 -7
View File
@@ -609,7 +609,6 @@ void EnableEditorButtons( INT32 iFirstEditorButtonID, INT32 iLastEditorButtonID
EnableButton( iEditorButton[ i ] );
}
// WANNE: EDITOR?
void RenderMapEntryPointsAndLights()
{
INT16 sGridNo;
@@ -891,8 +890,11 @@ void RenderEditorInfo( )
gubFilename, gTilesets[ giCurrentTilesetID ].zName );
break;
case TASK_TERRAIN:
if( gusSelectionType == LINESELECTION )
swprintf( wszSelType[LINESELECTION], L"Width: %d", gusSelectionWidth );
// WANNE: EDITOR: comment this two lines, because we always get an exception here!
//if( gusSelectionType == LINESELECTION )
// swprintf( wszSelType[LINESELECTION], L"Width: %d", gusSelectionWidth );
DrawEditorInfoBox( wszSelType[gusSelectionType], FONT12POINT1, iScreenWidthOffset + 220, 2 * iScreenHeightOffset + 430, 60, 30 );
swprintf( FPSText, L"%d%%", gusSelectionDensity );
DrawEditorInfoBox( FPSText, FONT12POINT1, iScreenWidthOffset + 310, 2 * iScreenHeightOffset + 430, 40, 30 );
@@ -903,8 +905,12 @@ void RenderEditorInfo( )
break;
case TASK_BUILDINGS:
UpdateBuildingsInfo();
if( gusSelectionType == LINESELECTION )
swprintf( wszSelType[LINESELECTION], L"Width: %d", gusSelectionWidth );
// WANNE: EDITOR: comment this two lines, because we always get an exception here!
//if( gusSelectionType == LINESELECTION )
// swprintf( wszSelType[LINESELECTION], L"%d", gusSelectionWidth );
DrawEditorInfoBox( wszSelType[gusSelectionType], FONT12POINT1, iScreenWidthOffset + 530, 2 * iScreenHeightOffset + 430, 60, 30 );
break;
case TASK_MERCS:
@@ -912,8 +918,10 @@ void RenderEditorInfo( )
break;
case TASK_MAPINFO:
UpdateMapInfo();
if( gusSelectionType == LINESELECTION )
swprintf( wszSelType[LINESELECTION], L"Width: %d", gusSelectionWidth );
// WANNE: EDITOR: comment this two lines, because we always get an exception here!
//if( gusSelectionType == LINESELECTION )
// swprintf( wszSelType[LINESELECTION], L"Width: %d", gusSelectionWidth );
DrawEditorInfoBox( wszSelType[gusSelectionType], FONT12POINT1, iScreenWidthOffset + 440, 2 * iScreenHeightOffset + 430, 60, 30 );
break;
}
+13 -13
View File
@@ -513,24 +513,24 @@ void InitDoorEditing( INT32 iMapIndex )
DisableEditorTaskbar();
MSYS_DefineRegion( &DoorRegion, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, MSYS_PRIORITY_HIGH-2, 0, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
iDoorButton[ DOOR_BACKGROUND ] =
CreateTextButton( 0, 0, 0, 0, BUTTON_USE_DEFAULT, iScreenWidthOffset + 200, 2 * iScreenHeightOffset + 130, 240, 100, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH - 1,
CreateTextButton( 0, 0, 0, 0, BUTTON_USE_DEFAULT, iScreenWidthOffset + 200, iScreenHeightOffset + 130, 240, 100, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH - 1,
BUTTON_NO_CALLBACK, BUTTON_NO_CALLBACK );
DisableButton( iDoorButton[ DOOR_BACKGROUND ] );
SpecifyDisabledButtonStyle( iDoorButton[ DOOR_BACKGROUND ], DISABLED_STYLE_NONE );
iDoorButton[ DOOR_OKAY ] =
CreateTextButton(L"Okay", FONT12POINT1, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 330, 2 * iScreenHeightOffset + 195, 50, 30, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK,
iScreenWidthOffset + 330, iScreenHeightOffset + 195, 50, 30, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK,
DoorOkayCallback );
iDoorButton[ DOOR_CANCEL ] =
CreateTextButton(L"Cancel", FONT12POINT1, FONT_BLACK, FONT_BLACK, BUTTON_USE_DEFAULT,
iScreenWidthOffset + 385, 2 * iScreenHeightOffset + 195, 50, 30, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK,
iScreenWidthOffset + 385, iScreenHeightOffset + 195, 50, 30, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK,
DoorCancelCallback );
InitTextInputModeWithScheme( DEFAULT_SCHEME );
AddTextInputField( iScreenWidthOffset + 210, 2 * iScreenHeightOffset + 155, 25, 16, MSYS_PRIORITY_HIGH, L"0", 3, INPUTTYPE_NUMERICSTRICT );
AddTextInputField( iScreenWidthOffset + 210, 2 * iScreenHeightOffset + 175, 25, 16, MSYS_PRIORITY_HIGH, L"0", 2, INPUTTYPE_NUMERICSTRICT );
AddTextInputField( iScreenWidthOffset + 210, 2 * iScreenHeightOffset + 195, 25, 16, MSYS_PRIORITY_HIGH, L"0", 2, INPUTTYPE_NUMERICSTRICT );
AddTextInputField( iScreenWidthOffset + 210, iScreenHeightOffset + 155, 25, 16, MSYS_PRIORITY_HIGH, L"0", 3, INPUTTYPE_NUMERICSTRICT );
AddTextInputField( iScreenWidthOffset + 210, iScreenHeightOffset + 175, 25, 16, MSYS_PRIORITY_HIGH, L"0", 2, INPUTTYPE_NUMERICSTRICT );
AddTextInputField( iScreenWidthOffset + 210, iScreenHeightOffset + 195, 25, 16, MSYS_PRIORITY_HIGH, L"0", 2, INPUTTYPE_NUMERICSTRICT );
iDoorButton[ DOOR_LOCKED ] =
CreateCheckBoxButton( iScreenWidthOffset + 210, 2 * iScreenHeightOffset + 215, "EDITOR//SmCheckbox.sti", MSYS_PRIORITY_HIGH, DoorToggleLockedCallback );
CreateCheckBoxButton( iScreenWidthOffset + 210, iScreenHeightOffset + 215, "EDITOR//SmCheckbox.sti", MSYS_PRIORITY_HIGH, DoorToggleLockedCallback );
pDoor = FindDoorInfoAtGridNo( iDoorMapIndex );
if( pDoor )
@@ -645,18 +645,18 @@ void FindNextLockedDoor()
void RenderDoorEditingWindow()
{
InvalidateRegion( iScreenWidthOffset + 200, 2 * iScreenHeightOffset + 130, iScreenWidthOffset + 440, 2 * iScreenHeightOffset + 230 );
InvalidateRegion( iScreenWidthOffset + 200, iScreenHeightOffset + 130, iScreenWidthOffset + 440, iScreenHeightOffset + 230 );
SetFont( FONT10ARIAL );
SetFontForeground( FONT_YELLOW );
SetFontShadow( FONT_NEARBLACK );
SetFontBackground( 0 );
mprintf( iScreenWidthOffset + 210, 2 * iScreenHeightOffset + 140, L"Editing lock attributes at map index %d.", iDoorMapIndex );
mprintf( iScreenWidthOffset + 210, iScreenHeightOffset + 140, L"Editing lock attributes at map index %d.", iDoorMapIndex );
SetFontForeground( FONT_GRAY2 );
mprintf( iScreenWidthOffset + 238, 2 * iScreenHeightOffset + 160, L"Lock ID" );
mprintf( iScreenWidthOffset + 238, 2 * iScreenHeightOffset + 180, L"Trap Type" );
mprintf( iScreenWidthOffset + 238, 2 * iScreenHeightOffset + 200, L"Trap Level" );
mprintf( iScreenWidthOffset + 238, 2 * iScreenHeightOffset + 218, L"Locked" );
mprintf( iScreenWidthOffset + 238, iScreenHeightOffset + 160, L"Lock ID" );
mprintf( iScreenWidthOffset + 238, iScreenHeightOffset + 180, L"Trap Type" );
mprintf( iScreenWidthOffset + 238, iScreenHeightOffset + 200, L"Trap Level" );
mprintf( iScreenWidthOffset + 238, iScreenHeightOffset + 218, L"Locked" );
}
void KillDoorEditing()
+1 -11
View File
@@ -1,4 +1,4 @@
// WANNE: EDITOR: todo
// WANNE: EDITOR?
#ifdef PRECOMPILEDHEADERS
#include "Editor All.h"
#else
@@ -335,7 +335,6 @@ void InitEditorItemsInfo(UINT32 uiItemType)
//copy a blank chunk of the editor interface to the new buffer.
for( i=0; i<eInfo.sWidth; i+=60 )
{
// WANNE: EDITOR?
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
(UINT16 *)pSrcBuf, uiSrcPitchBYTES, 0+i, 0, iScreenWidthOffset + 100, 2 * iScreenHeightOffset + 360, 60, 80 );
}
@@ -343,7 +342,6 @@ void InitEditorItemsInfo(UINT32 uiItemType)
UnLockVideoSurface(eInfo.uiBuffer);
UnLockVideoSurface(FRAME_BUFFER);
// WANNE: EDITOR?
x = 0;
y = 0;
usCounter = 0;
@@ -588,11 +586,6 @@ void RenderEditorItemsInfo()
pDestBuf = LockVideoSurface(FRAME_BUFFER, &uiDestPitchBYTES);
pSrcBuf = LockVideoSurface(eInfo.uiBuffer, &uiSrcPitchBYTES);
// WANNE: EDITOR?
//copy the items buffer to the editor bar
//Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
// (UINT16 *)pSrcBuf, uiSrcPitchBYTES, iScreenWidthOffset + 110, 2 * iScreenHeightOffset + 360, 60*eInfo.sScrollIndex, 0, 360, 80 );
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
(UINT16 *)pSrcBuf, uiSrcPitchBYTES, iScreenWidthOffset + 110, 2 * iScreenHeightOffset + 360, 60*eInfo.sScrollIndex, 0, 360, 80 );
@@ -613,7 +606,6 @@ void RenderEditorItemsInfo()
uiVideoObjectIndex = GetInterfaceGraphicForItem( item );
GetVideoObject( &hVObject, uiVideoObjectIndex );
// WANNE: EDITOR?
x = iScreenWidthOffset + (eInfo.sHilitedItemIndex/2 - eInfo.sScrollIndex)*60 + 110;
y = 2 * iScreenHeightOffset + 360 + (eInfo.sHilitedItemIndex % 2) * 40;
sWidth = hVObject->pETRLEObject[item->ubGraphicNum].usWidth;
@@ -634,7 +626,6 @@ void RenderEditorItemsInfo()
uiVideoObjectIndex = GetInterfaceGraphicForItem( item );
GetVideoObject( &hVObject, uiVideoObjectIndex );
// WANNE: EDITOR?
x = iScreenWidthOffset + (eInfo.sSelItemIndex/2 - eInfo.sScrollIndex)*60 + 110;
y = 2 * iScreenHeightOffset + 360 + (eInfo.sSelItemIndex % 2) * 40;
sWidth = hVObject->pETRLEObject[item->ubGraphicNum].usWidth;
@@ -653,7 +644,6 @@ void RenderEditorItemsInfo()
usNumItems = CountNumberOfEditorPlacementsInWorld( i, &usQuantity );
if( usNumItems )
{
// WANNE: EDITOR?
x = iScreenWidthOffset + (i/2 - eInfo.sScrollIndex)*60 + 110;
y = 2 * iScreenHeightOffset + 360 + (i % 2) * 40;
SetFont( FONT10ARIAL );
+1 -2
View File
@@ -793,13 +793,12 @@ void DisplayEditMercWindow( void )
usFillColorLight = Get16BPPColor(FROMRGB(136, 138, 135));
usFillColorTextBk = Get16BPPColor(FROMRGB(250, 240, 188));
// WANNE: EDITOR?
// WANNE: EDITOR?????????
iWidth = 266;
iHeight = 360;
iYPos = iScreenHeightOffset + 0;
iXPos = iScreenWidthOffset + 0;
// Main window
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos, iYPos, iXPos + iWidth, iYPos + iHeight, usFillColorLight );
ColorFillVideoSurfaceArea(FRAME_BUFFER, iXPos + 1, iYPos + 1, iXPos + iWidth, iYPos + iHeight, usFillColorDark );
+3 -2
View File
@@ -2100,9 +2100,10 @@ void SummaryLoadMapCallback( GUI_BUTTON *btn, INT32 reason )
//mprintf( MAP_LEFT, MAP_BOTTOM+100, str );
//InvalidateRegion( MAP_LEFT, MAP_BOTTOM+100, MAP_LEFT+150, MAP_BOTTOM+110 );
CreateProgressBar( 0, MAP_LEFT+5, MAP_BOTTOM+110, 573, MAP_BOTTOM+120 );
CreateProgressBar( 0, MAP_LEFT+5, MAP_BOTTOM+110, iScreenWidthOffset + 573, MAP_BOTTOM+120 );
DefineProgressBarPanel( 0, 65, 79, 94, MAP_LEFT, iScreenHeightOffset + 318, iScreenWidthOffset + 578, iScreenHeightOffset + 356 );
//DefineProgressBarPanel( 0, 65, 79, 94, MAP_LEFT, iScreenHeightOffset + 318, iScreenWidthOffset + 578, iScreenHeightOffset + 356 );
DefineProgressBarPanel( 0, 65, 79, 94, MAP_LEFT, iScreenHeightOffset + 318, MAP_LEFT + 161, iScreenHeightOffset + 356 );
swprintf( str, L"Loading map: %s", gszDisplayName );
SetProgressBarTitle( 0, str, BLOCKFONT2, FONT_RED, FONT_NEARBLACK );
SetProgressBarMsgAttributes( 0, SMALLCOMPFONT, FONT_BLACK, FONT_BLACK );