orders: Allow shift-click to queue orders on radar, make a sound when queueing move orders.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9360 4a71c877-e1ca-e34f-864e-861f7616d084
master
Cyp 2010-01-20 18:08:46 +00:00 committed by Git SVN Gateway
parent 0b90db00bb
commit be78e9035c
4 changed files with 19 additions and 32 deletions

View File

@ -393,7 +393,7 @@ void ProcessRadarInput(void)
// MARKER // MARKER
// Send all droids to that location // Send all droids to that location
orderSelectedLoc(selectedPlayer, (PosX*TILE_UNITS)+TILE_UNITS/2, orderSelectedLoc(selectedPlayer, (PosX*TILE_UNITS)+TILE_UNITS/2,
(PosY*TILE_UNITS)+TILE_UNITS/2); (PosY*TILE_UNITS)+TILE_UNITS/2, ctrlShiftDown()); // ctrlShiftDown() = ctrl clicked a destination, add an order
} }
@ -2266,16 +2266,10 @@ void dealWithLMB( void )
if (psLocation == NULL || driveModeActive() || selNumSelected(selectedPlayer)) if (psLocation == NULL || driveModeActive() || selNumSelected(selectedPlayer))
{ {
// now changed to use the multiple order stuff // now changed to use the multiple order stuff
if (ctrlShiftDown()) // ctrl clicked a destination, add an order // clicked on a destination.
{ orderSelectedLoc(selectedPlayer, mouseTileX*TILE_UNITS+TILE_UNITS/2,
orderSelectedLocAdd(selectedPlayer, mouseTileY*TILE_UNITS+TILE_UNITS/2, ctrlShiftDown()); // ctrlShiftDown() = ctrl clicked a destination, add an order
mouseTileX*TILE_UNITS+TILE_UNITS/2,
mouseTileY*TILE_UNITS+TILE_UNITS/2, true);
}
else // clicked on a destination.
{
/* Otherwise send them all */ /* Otherwise send them all */
orderSelectedLoc(selectedPlayer, mouseTileX*TILE_UNITS+TILE_UNITS/2,mouseTileY*TILE_UNITS+TILE_UNITS/2);
if(getNumDroidsSelected()) if(getNumDroidsSelected())
{ {
assignDestTarget(); assignDestTarget();
@ -2291,7 +2285,6 @@ void dealWithLMB( void )
mouseTileX, mouseTileY, world_coord(mouseTileX), world_coord(mouseTileY), mouseTileX, mouseTileY, world_coord(mouseTileX), world_coord(mouseTileY),
(int)psTile->limitedContinent, (int)psTile->hoverContinent, psTile->level, (int)psTile->illumination)); (int)psTile->limitedContinent, (int)psTile->hoverContinent, psTile->level, (int)psTile->illumination));
} }
}
driveDisableTactical(); driveDisableTactical();

View File

@ -738,7 +738,7 @@ void driveProcessRadarInput(int x,int y)
// when drive mode is active, clicking on the radar orders all selected droids // when drive mode is active, clicking on the radar orders all selected droids
// to move to this position. // to move to this position.
CalcRadarPosition(x, y, &PosX, &PosY); CalcRadarPosition(x, y, &PosX, &PosY);
orderSelectedLoc(selectedPlayer, PosX*TILE_UNITS,PosY*TILE_UNITS); orderSelectedLoc(selectedPlayer, PosX*TILE_UNITS, PosY*TILE_UNITS, ctrlShiftDown()); // ctrlShiftDown() = ctrl clicked a destination, add an order
} }
/* /*
void driveMarkTarget(void) void driveMarkTarget(void)

View File

@ -2752,7 +2752,7 @@ DROID_ORDER chooseOrderLoc(DROID *psDroid, UDWORD x,UDWORD y)
If add is true then the order is queued in the droid If add is true then the order is queued in the droid
*/ */
void orderSelectedLocAdd(UDWORD player, UDWORD x, UDWORD y, BOOL add) void orderSelectedLoc(uint32_t player, uint32_t x, uint32_t y, bool add)
{ {
DROID *psCurr; DROID *psCurr;
DROID_ORDER order; DROID_ORDER order;
@ -2806,12 +2806,6 @@ void orderSelectedLocAdd(UDWORD player, UDWORD x, UDWORD y, BOOL add)
} }
void orderSelectedLoc(UDWORD player, UDWORD x, UDWORD y)
{
orderSelectedLocAdd(player, x,y, false);
}
/* Choose an order for a droid from an object */ /* Choose an order for a droid from an object */
DROID_ORDER chooseOrderObj(DROID *psDroid, BASE_OBJECT *psObj) DROID_ORDER chooseOrderObj(DROID *psDroid, BASE_OBJECT *psObj)
{ {

View File

@ -191,8 +191,8 @@ extern void orderDroidStatsTwoLoc(DROID *psDroid, DROID_ORDER order,
extern void orderDroidStatsTwoLocAdd(DROID *psDroid, DROID_ORDER order, BASE_STATS *psStats, UDWORD x1, UDWORD y1, UDWORD x2, UDWORD y2); extern void orderDroidStatsTwoLocAdd(DROID *psDroid, DROID_ORDER order, BASE_STATS *psStats, UDWORD x1, UDWORD y1, UDWORD x2, UDWORD y2);
/* Give selected droids an order with a location target */ /* Give selected droids an order with a location target */
extern void orderSelectedLoc(UDWORD player, UDWORD x, UDWORD y); // Only called from UI.
extern void orderSelectedLocAdd(UDWORD player, UDWORD x, UDWORD y, BOOL add); extern void orderSelectedLoc(uint32_t player, uint32_t x, uint32_t y, bool add);
/* Give selected droids an order with an object target */ /* Give selected droids an order with an object target */
extern void orderSelectedObj(UDWORD player, BASE_OBJECT *psObj); extern void orderSelectedObj(UDWORD player, BASE_OBJECT *psObj);