|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: BUGZILLA report all bugs here![message #325745]
|
Thu, 26 September 2013 18:34
|
|
Moa |
|
Messages:58
Registered:September 2013 |
|
|
Faalagorn
Repair assignment sub-menu goes out of rendering range (screen).
possible fix:
Toggle Spoiler
Index: D:/JA2/Source/Strategic/Assignments.cpp
===================================================================
--- D:/JA2/Source/Strategic/Assignments.cpp (revision 6441)
+++ D:/JA2/Source/Strategic/Assignments.cpp (working copy)
@@ -7269,13 +7269,13 @@
if( ( fShowRepairMenu == TRUE ) && ( fCreated == FALSE ) )
{
- CheckAndUpdateTacticalAssignmentPopUpPositions( );
+ // Moa: removed below: repositioning now the same way as for training in AssignmentMenuBtnCB as it caused missplaced box for higher resolutions then 3.
+ //CheckAndUpdateTacticalAssignmentPopUpPositions( );
+ //if( ( fShowRepairMenu ) && ( guiCurrentScreen == MAP_SCREEN ) )
+ //{
+ // //SetBoxPosition( ghRepairBox ,RepairPosition);
+ //}
- if( ( fShowRepairMenu ) && ( guiCurrentScreen == MAP_SCREEN ) )
- {
- //SetBoxPosition( ghRepairBox ,RepairPosition);
- }
-
// grab height of font
iFontHeight = GetLineSpace( ghRepairBox ) + GetFontHeight( GetBoxFont( ghRepairBox ) );
@@ -10232,6 +10232,7 @@
if( DisplayRepairMenu( pSoldier ) )
{
fShowRepairMenu = TRUE;
+ DetermineBoxPositions( );
}
}
@@ -10285,6 +10286,7 @@
if( DisplayMoveItemsMenu( pSoldier ) )
{
fShowMoveItemMenu = TRUE;
+ DetermineBoxPositions( );
}
}
}
@@ -11237,18 +11239,20 @@
if( ( fShowRepairMenu == TRUE ) && ( ghRepairBox != -1 ) )
{
- CreateDestroyMouseRegionForRepairMenu( );
+ //CreateDestroyMouseRegionForRepairMenu( );
pNewPoint.iY += ( ( GetFontHeight( MAP_SCREEN_FONT ) + 2 ) * ASSIGN_MENU_REPAIR );
SetBoxPosition( ghRepairBox, pNewPoint );
+ CreateDestroyMouseRegionForRepairMenu( );
}
if( ( fShowMoveItemMenu == TRUE ) && ( ghMoveItemBox != -1 ) )
{
- CreateDestroyMouseRegionForMoveItemMenu( );
+ //CreateDestroyMouseRegionForMoveItemMenu( );
pNewPoint.iY += ( ( GetFontHeight( MAP_SCREEN_FONT ) + 2 ) * ASSIGN_MENU_MOVE_ITEMS );
SetBoxPosition( ghMoveItemBox, pNewPoint );
+ CreateDestroyMouseRegionForMoveItemMenu( );
}
if( ( fShowTrainingMenu == TRUE ) && ( ghTrainingBox != -1 ) )
@@ -17838,13 +17842,13 @@
if( ( fShowMoveItemMenu == TRUE ) && ( fCreated == FALSE ) )
{
- CheckAndUpdateTacticalAssignmentPopUpPositions( );
+ // Moa: removed below: repositioning now the same way as for training in AssignmentMenuBtnCB as it caused missplaced box for higher resolutions then 3.
+ //CheckAndUpdateTacticalAssignmentPopUpPositions( );
+ //if( ( fShowMoveItemMenu ) && ( guiCurrentScreen == MAP_SCREEN ) )
+ //{
+ // //SetBoxPosition( ghMoveItemBox ,RepairPosition);
+ //}
- if( ( fShowMoveItemMenu ) && ( guiCurrentScreen == MAP_SCREEN ) )
- {
- //SetBoxPosition( ghMoveItemBox ,RepairPosition);
- }
-
// grab height of font
iFontHeight = GetLineSpace( ghMoveItemBox ) + GetFontHeight( GetBoxFont( ghMoveItemBox ) );
Still missplaced when in tactical near the right window border (new popup should be on the left side, not ontop of the old):
regarding Quote:crashing when loading a savegame [..]
Exception code: 0xc0000409
Fault offset: 0x003c9042
This is an unspecified error in a seldom used code - disassembly shows that this memory section is not used. Maybe its used by a external lib (direct2D, windows stuff, lua or sound driver). However I got one lucky catch in debug version and this section showed some values, could not set a breakpoint there as there was no linkage (debugger says) nor do I have an idea how this section got filled and if it has the same meaning as in release version. And now as I am trying to reproduce to show a screen shot of disassembly its gone. I am stumped.
Report message to a moderator
|
Corporal
|
|
|
|
|
|
|
|
|
|
|
|
Re: BUGZILLA report all bugs here![message #325865]
|
Sat, 28 September 2013 20:12
|
|
Kriplo |
|
Messages:256
Registered:February 2008 Location: Zagreb - Croatia |
|
|
Try to fix punch APs deduction but not understand why we use MinAPsToPunch for bare hands and brass knuckles, and for any other punching stuff MinAPsToShootOrStab ?
Why not put all punching under MinAPsToPunch ?
v1.12 source showing that all punch part was calculate in MinAPsToPunch.
This one is v1.12 MinAPsToAttack:
if ( uiItemClass == IC_BLADE || uiItemClass == IC_GUN || uiItemClass == IC_LAUNCHER || uiItemClass == IC_TENTACLES || uiItemClass == IC_THROWING_KNIFE )
{
sAPCost = MinAPsToShootOrStab( pSoldier, sGridno, ubAddTurningCost );
}
else if ( uiItemClass & ( IC_GRENADE | IC_THROWN ) )
{
sAPCost = MinAPsToThrow( pSoldier, sGridno, ubAddTurningCost );
}
else if ( uiItemClass == IC_PUNCH )
{
sAPCost = MinAPsToPunch( pSoldier, sGridno, ubAddTurningCost );
}
and this one v1.13 MinAPsToAttack:
if ( !(pSoldier->inv[HANDPOS].exists()) || Item[pSoldier->inv[HANDPOS].usItem].brassknuckles )
{
sAPCost = MinAPsToPunch( pSoldier, sGridno, ubAddTurningCost );
}
else if ( uiItemClass & ( IC_PUNCH | IC_BLADE | IC_GUN | IC_LAUNCHER | IC_TENTACLES | IC_THROWING_KNIFE ) )
{
sAPCost = MinAPsToShootOrStab( pSoldier, sGridno, bAimTime, ubAddTurningCost, ubForceRaiseGunCost );
}
// thrown items
else if ( uiItemClass & ( IC_GRENADE | IC_THROWN ) )
{
sAPCost = MinAPsToThrow( pSoldier, sGridno, ubAddTurningCost );
}
// for exceptions
else
sAPCost = MinAPsToPunch( pSoldier, sGridno, ubAddTurningCost );
why v1.13 had IC_PUNCH for MinAPsToShootOrStab? :whoknows:
Report message to a moderator
|
Master Sergeant
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|