Fixed "Empty Slot" and "Team Name" positioning problem (supermelee).
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@245 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+13
-6
@@ -17,8 +17,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include "starcon.h"
|
#include "starcon.h"
|
||||||
#include "melee.h"
|
#include "melee.h"
|
||||||
|
#include "options.h"
|
||||||
|
|
||||||
//Added by Chris
|
//Added by Chris
|
||||||
|
|
||||||
@@ -566,6 +568,7 @@ DrawMeleeShipStrings (PMELEE_STATE pMS, BYTE NewStarShip)
|
|||||||
OldContext = SetContext (StatusContext);
|
OldContext = SetContext (StatusContext);
|
||||||
GetContextClipRect (&OldRect);
|
GetContextClipRect (&OldRect);
|
||||||
r = OldRect;
|
r = OldRect;
|
||||||
|
r.corner.x += ((SAFE_X << 1) - 32);
|
||||||
r.corner.y += 76;
|
r.corner.y += 76;
|
||||||
r.extent.height = SHIP_INFO_HEIGHT;
|
r.extent.height = SHIP_INFO_HEIGHT;
|
||||||
SetContextClipRect (&r);
|
SetContextClipRect (&r);
|
||||||
@@ -589,17 +592,17 @@ DrawMeleeShipStrings (PMELEE_STATE pMS, BYTE NewStarShip)
|
|||||||
t.align = ALIGN_CENTER;
|
t.align = ALIGN_CENTER;
|
||||||
if (pMS->row < NUM_MELEE_ROWS)
|
if (pMS->row < NUM_MELEE_ROWS)
|
||||||
{
|
{
|
||||||
t.pStr = GAME_STRING (MELEE_STRING_BASE + 0);
|
t.pStr = GAME_STRING (MELEE_STRING_BASE + 0); // "Empty"
|
||||||
t.CharCount = (COUNT)~0;
|
t.CharCount = (COUNT)~0;
|
||||||
DrawText (&t);
|
DrawText (&t);
|
||||||
t.pStr = GAME_STRING (MELEE_STRING_BASE + 1);
|
t.pStr = GAME_STRING (MELEE_STRING_BASE + 1); // "Slot"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
t.pStr = GAME_STRING (MELEE_STRING_BASE + 2);
|
t.pStr = GAME_STRING (MELEE_STRING_BASE + 2); // "Team"
|
||||||
t.CharCount = (COUNT)~0;
|
t.CharCount = (COUNT)~0;
|
||||||
DrawText (&t);
|
DrawText (&t);
|
||||||
t.pStr = GAME_STRING (MELEE_STRING_BASE + 3);
|
t.pStr = GAME_STRING (MELEE_STRING_BASE + 3); // "Name"
|
||||||
}
|
}
|
||||||
t.baseline.y += TINY_TEXT_HEIGHT;
|
t.baseline.y += TINY_TEXT_HEIGHT;
|
||||||
t.CharCount = (COUNT)~0;
|
t.CharCount = (COUNT)~0;
|
||||||
@@ -1754,8 +1757,10 @@ Melee (void)
|
|||||||
LoadMeleeInfo (&MenuState);
|
LoadMeleeInfo (&MenuState);
|
||||||
{
|
{
|
||||||
FILE *load_fp;
|
FILE *load_fp;
|
||||||
|
char file[MAXPATHLEN];
|
||||||
|
|
||||||
load_fp = OpenResFile ("melee.cfg", "rb");
|
sprintf (file, "%smelee.cfg", configDir);
|
||||||
|
load_fp = OpenResFile (file, "rb");
|
||||||
if (load_fp)
|
if (load_fp)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
@@ -1800,10 +1805,12 @@ Melee (void)
|
|||||||
|
|
||||||
{
|
{
|
||||||
FILE *save_fp;
|
FILE *save_fp;
|
||||||
|
char file[MAXPATHLEN];
|
||||||
BOOLEAN err;
|
BOOLEAN err;
|
||||||
|
|
||||||
err = FALSE;
|
err = FALSE;
|
||||||
save_fp = OpenResFile ("melee.cfg", "wb");
|
sprintf (file, "%smelee.cfg", configDir);
|
||||||
|
save_fp = OpenResFile (file, "wb");
|
||||||
if (save_fp)
|
if (save_fp)
|
||||||
{
|
{
|
||||||
if (PutResFileChar (PlayerControl[0], save_fp) == -1)
|
if (PutResFileChar (PlayerControl[0], save_fp) == -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user