From 87f89cbaa0296548be2bd51160c0d8d136736395 Mon Sep 17 00:00:00 2001 From: meep-eep Date: Wed, 27 Nov 2002 14:42:09 +0000 Subject: [PATCH] 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 --- sc2/src/sc2code/melee.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/sc2/src/sc2code/melee.c b/sc2/src/sc2code/melee.c index 74db7da62..d6a84dac0 100644 --- a/sc2/src/sc2code/melee.c +++ b/sc2/src/sc2code/melee.c @@ -17,8 +17,10 @@ */ #include +#include #include "starcon.h" #include "melee.h" +#include "options.h" //Added by Chris @@ -566,6 +568,7 @@ DrawMeleeShipStrings (PMELEE_STATE pMS, BYTE NewStarShip) OldContext = SetContext (StatusContext); GetContextClipRect (&OldRect); r = OldRect; + r.corner.x += ((SAFE_X << 1) - 32); r.corner.y += 76; r.extent.height = SHIP_INFO_HEIGHT; SetContextClipRect (&r); @@ -589,17 +592,17 @@ DrawMeleeShipStrings (PMELEE_STATE pMS, BYTE NewStarShip) t.align = ALIGN_CENTER; 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; DrawText (&t); - t.pStr = GAME_STRING (MELEE_STRING_BASE + 1); + t.pStr = GAME_STRING (MELEE_STRING_BASE + 1); // "Slot" } else { - t.pStr = GAME_STRING (MELEE_STRING_BASE + 2); + t.pStr = GAME_STRING (MELEE_STRING_BASE + 2); // "Team" t.CharCount = (COUNT)~0; 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.CharCount = (COUNT)~0; @@ -1754,8 +1757,10 @@ Melee (void) LoadMeleeInfo (&MenuState); { FILE *load_fp; - - load_fp = OpenResFile ("melee.cfg", "rb"); + char file[MAXPATHLEN]; + + sprintf (file, "%smelee.cfg", configDir); + load_fp = OpenResFile (file, "rb"); if (load_fp) { int status; @@ -1800,10 +1805,12 @@ Melee (void) { FILE *save_fp; + char file[MAXPATHLEN]; BOOLEAN err; err = FALSE; - save_fp = OpenResFile ("melee.cfg", "wb"); + sprintf (file, "%smelee.cfg", configDir); + save_fp = OpenResFile (file, "wb"); if (save_fp) { if (PutResFileChar (PlayerControl[0], save_fp) == -1)