From: <Mee...@us...> - 2012-01-01 16:47:55
|
Revision: 3731 http://sc2.svn.sourceforge.net/sc2/?rev=3731&view=rev Author: Meep-Eep Date: 2012-01-01 16:47:49 +0000 (Sun, 01 Jan 2012) Log Message: ----------- Fix for my earlier cleanup... Modified Paths: -------------- trunk/sc2/src/uqm/shipyard.c Modified: trunk/sc2/src/uqm/shipyard.c =================================================================== --- trunk/sc2/src/uqm/shipyard.c 2012-01-01 16:41:38 UTC (rev 3730) +++ trunk/sc2/src/uqm/shipyard.c 2012-01-01 16:47:49 UTC (rev 3731) @@ -1040,8 +1040,11 @@ { // Moving horizontally through the escort ship slots, // wrapping around if necessary. - NewState = (pMS->CurState + HANGAR_SHIPS_ROW + dx) % - HANGAR_SHIPS_ROW; + BYTE row = pMS->CurState / HANGAR_SHIPS_ROW; + BYTE col = pMS->CurState % HANGAR_SHIPS_ROW; + + col = (col + HANGAR_SHIPS_ROW + dx) % HANGAR_SHIPS_ROW; + NewState = row * HANGAR_SHIPS_ROW + col; } if (select || cancel This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |