Graphics lib cleanup: don't include stuff from uqm/, so things moved around
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3220 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -220,7 +220,7 @@ extern FRAME SetRelFrameIndex (FRAME Frame, SIZE FrameOffs);
|
|||||||
extern FRAME SetEquFrameIndex (FRAME DstFrame, FRAME SrcFrame);
|
extern FRAME SetEquFrameIndex (FRAME DstFrame, FRAME SrcFrame);
|
||||||
extern FRAME IncFrameIndex (FRAME Frame);
|
extern FRAME IncFrameIndex (FRAME Frame);
|
||||||
extern FRAME DecFrameIndex (FRAME Frame);
|
extern FRAME DecFrameIndex (FRAME Frame);
|
||||||
extern DRAWABLE RotateFrame (FRAME Frame, COUNT angle);
|
extern DRAWABLE RotateFrame (FRAME Frame, int angle_deg);
|
||||||
extern void SetFrameTransparentColor (FRAME Frame, COLOR c32k);
|
extern void SetFrameTransparentColor (FRAME Frame, COLOR c32k);
|
||||||
|
|
||||||
extern FRAME CaptureDrawable (DRAWABLE Drawable);
|
extern FRAME CaptureDrawable (DRAWABLE Drawable);
|
||||||
|
|||||||
@@ -19,10 +19,12 @@
|
|||||||
#include "gfxintrn.h"
|
#include "gfxintrn.h"
|
||||||
#include "libs/misc.h"
|
#include "libs/misc.h"
|
||||||
#include "tfb_draw.h"
|
#include "tfb_draw.h"
|
||||||
#include "libs/mathlib.h"
|
|
||||||
#include "gfxother.h"
|
#include "gfxother.h"
|
||||||
// XXX: we should not include anything from uqm/ inside libs/
|
#include <math.h>
|
||||||
#include "uqm/units.h"
|
|
||||||
|
#ifndef M_PI
|
||||||
|
# define M_PI 3.14159265358979323846
|
||||||
|
#endif
|
||||||
|
|
||||||
FRAME _CurFramePtr;
|
FRAME _CurFramePtr;
|
||||||
|
|
||||||
@@ -197,13 +199,13 @@ GetFrameHot (FRAME FramePtr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
DRAWABLE
|
DRAWABLE
|
||||||
RotateFrame (FRAME Frame, COUNT angle)
|
RotateFrame (FRAME Frame, int angle_deg)
|
||||||
{
|
{
|
||||||
DRAWABLE Drawable;
|
DRAWABLE Drawable;
|
||||||
FRAME RotFramePtr;
|
FRAME RotFramePtr;
|
||||||
SIZE dx, dy;
|
double dx, dy;
|
||||||
SIZE d;
|
double d;
|
||||||
COUNT organg;
|
double angle = angle_deg * M_PI / 180;
|
||||||
|
|
||||||
Drawable = _request_drawable (1, RAM_DRAWABLE, WANT_PIXMAP, 0, 0);
|
Drawable = _request_drawable (1, RAM_DRAWABLE, WANT_PIXMAP, 0, 0);
|
||||||
if (!Drawable)
|
if (!Drawable)
|
||||||
@@ -216,22 +218,22 @@ RotateFrame (FRAME Frame, COUNT angle)
|
|||||||
}
|
}
|
||||||
|
|
||||||
RotFramePtr->image = TFB_DrawImage_New_Rotated (
|
RotFramePtr->image = TFB_DrawImage_New_Rotated (
|
||||||
Frame->image, -ANGLE_TO_DEGREES (angle));
|
Frame->image, angle_deg);
|
||||||
SetFrameBounds (RotFramePtr, RotFramePtr->image->extent.width,
|
SetFrameBounds (RotFramePtr, RotFramePtr->image->extent.width,
|
||||||
RotFramePtr->image->extent.height);
|
RotFramePtr->image->extent.height);
|
||||||
|
|
||||||
/* now we need to rotate the hot-spot, eww */
|
/* now we need to rotate the hot-spot, eww */
|
||||||
dx = Frame->HotSpot.x - (GetFrameWidth (Frame) / 2);
|
dx = Frame->HotSpot.x - (GetFrameWidth (Frame) / 2);
|
||||||
dy = Frame->HotSpot.y - (GetFrameHeight (Frame) / 2);
|
dy = Frame->HotSpot.y - (GetFrameHeight (Frame) / 2);
|
||||||
d = square_root ((long)dx*dx + (long)dy*dy);
|
d = sqrt ((double)dx*dx + (double)dy*dy);
|
||||||
if (d != 0)
|
if ((int)d != 0)
|
||||||
{
|
{
|
||||||
organg = ARCTAN (dx, dy);
|
double organg = atan2 (-dy, dx);
|
||||||
dx = COSINE (organg + angle, d);
|
dx = cos (organg + angle) * d;
|
||||||
dy = SINE (organg + angle, d);
|
dy = -sin (organg + angle) * d;
|
||||||
}
|
}
|
||||||
RotFramePtr->HotSpot.x = (GetFrameWidth (RotFramePtr) / 2) + dx;
|
RotFramePtr->HotSpot.x = (GetFrameWidth (RotFramePtr) / 2) + (int)dx;
|
||||||
RotFramePtr->HotSpot.y = (GetFrameHeight (RotFramePtr) / 2) + dy;
|
RotFramePtr->HotSpot.y = (GetFrameHeight (RotFramePtr) / 2) + (int)dy;
|
||||||
|
|
||||||
ReleaseDrawable (RotFramePtr);
|
ReleaseDrawable (RotFramePtr);
|
||||||
|
|
||||||
|
|||||||
@@ -24,9 +24,6 @@
|
|||||||
extern void FixContextFontEffect (void);
|
extern void FixContextFontEffect (void);
|
||||||
static inline TFB_Char *getCharFrame (FONT_DESC *fontPtr, wchar_t ch);
|
static inline TFB_Char *getCharFrame (FONT_DESC *fontPtr, wchar_t ch);
|
||||||
|
|
||||||
static BYTE char_delta_array[MAX_DELTAS];
|
|
||||||
// XXX: This does not seem to be used.
|
|
||||||
|
|
||||||
|
|
||||||
FONT
|
FONT
|
||||||
SetContextFont (FONT Font)
|
SetContextFont (FONT Font)
|
||||||
@@ -115,6 +112,7 @@ GetContextFontLeadingWidth (SIZE *pwidth)
|
|||||||
BOOLEAN
|
BOOLEAN
|
||||||
TextRect (TEXT *lpText, RECT *pRect, BYTE *pdelta)
|
TextRect (TEXT *lpText, RECT *pRect, BYTE *pdelta)
|
||||||
{
|
{
|
||||||
|
BYTE char_delta_array[MAX_DELTAS];
|
||||||
FONT FontPtr;
|
FONT FontPtr;
|
||||||
|
|
||||||
FontPtr = _CurFontPtr;
|
FontPtr = _CurFontPtr;
|
||||||
|
|||||||
@@ -16,8 +16,7 @@
|
|||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "libs/graphics/gfxintrn.h"
|
#include "gfxintrn.h"
|
||||||
#include "libs/input/inpintrn.h"
|
|
||||||
#include "libs/graphics/gfx_common.h"
|
#include "libs/graphics/gfx_common.h"
|
||||||
#include "libs/graphics/drawcmd.h"
|
#include "libs/graphics/drawcmd.h"
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,6 @@
|
|||||||
#include "primitives.h"
|
#include "primitives.h"
|
||||||
#include "libs/graphics/drawcmd.h"
|
#include "libs/graphics/drawcmd.h"
|
||||||
#include "libs/graphics/tfb_draw.h"
|
#include "libs/graphics/tfb_draw.h"
|
||||||
// XXX: we should not include anything from uqm/ inside libs/
|
|
||||||
#include "uqm/units.h"
|
|
||||||
|
|
||||||
|
|
||||||
int batch_depth = 0;
|
int batch_depth = 0;
|
||||||
@@ -109,15 +107,15 @@ ExpandRect (RECT *rect, int expansion)
|
|||||||
rect->corner.y = 0;
|
rect->corner.y = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rect->corner.x + rect->extent.width + expansion <= SCREEN_WIDTH)
|
if (rect->corner.x + rect->extent.width + expansion <= ScreenWidth)
|
||||||
rect->extent.width += expansion;
|
rect->extent.width += expansion;
|
||||||
else
|
else
|
||||||
rect->extent.width = SCREEN_WIDTH - rect->corner.x;
|
rect->extent.width = ScreenWidth - rect->corner.x;
|
||||||
|
|
||||||
if (rect->corner.y + rect->extent.height + expansion <= SCREEN_HEIGHT)
|
if (rect->corner.y + rect->extent.height + expansion <= ScreenHeight)
|
||||||
rect->extent.height += expansion;
|
rect->extent.height += expansion;
|
||||||
else
|
else
|
||||||
rect->extent.height = SCREEN_HEIGHT - rect->corner.y;
|
rect->extent.height = ScreenHeight - rect->corner.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -26,15 +26,13 @@
|
|||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "uqmversion.h"
|
#include "uqmversion.h"
|
||||||
#include "libs/graphics/drawcmd.h"
|
#include "libs/graphics/drawcmd.h"
|
||||||
#include "libs/input/sdl/vcontrol.h"
|
#include "libs/input/sdl/input.h"
|
||||||
|
// for ProcessInputEvent()
|
||||||
#include "bbox.h"
|
#include "bbox.h"
|
||||||
#include "port.h"
|
#include "port.h"
|
||||||
#include "libs/uio.h"
|
#include "libs/uio.h"
|
||||||
#include "libs/log.h"
|
#include "libs/log.h"
|
||||||
#include "libs/vidlib.h"
|
#include "libs/vidlib.h"
|
||||||
// XXX: we should not include anything from uqm/ inside libs/
|
|
||||||
#include "uqm/controls.h"
|
|
||||||
#include "uqm/uqmdebug.h"
|
|
||||||
#include SDL_INCLUDE(SDL_thread.h)
|
#include SDL_INCLUDE(SDL_thread.h)
|
||||||
|
|
||||||
SDL_Surface *SDL_Video;
|
SDL_Surface *SDL_Video;
|
||||||
@@ -216,29 +214,6 @@ TFB_ProcessEvents ()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImmediateInputState.menu[KEY_ABORT])
|
|
||||||
{
|
|
||||||
log_showBox (false, false);
|
|
||||||
exit (EXIT_SUCCESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImmediateInputState.menu[KEY_FULLSCREEN])
|
|
||||||
{
|
|
||||||
int flags = GfxFlags ^ TFB_GFXFLAGS_FULLSCREEN;
|
|
||||||
FlushInput ();
|
|
||||||
TFB_ReInitGraphics (GraphicsDriver, flags, ScreenWidthActual,
|
|
||||||
ScreenHeightActual);
|
|
||||||
TFB_SwapBuffers (TFB_REDRAW_YES);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(DEBUG) || defined(USE_DEBUG_KEY)
|
|
||||||
if (ImmediateInputState.menu[KEY_DEBUG])
|
|
||||||
{
|
|
||||||
FlushInput ();
|
|
||||||
debugKeyPressed ();
|
|
||||||
}
|
|
||||||
#endif /* DEBUG */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN system_box_active = 0;
|
static BOOLEAN system_box_active = 0;
|
||||||
@@ -900,6 +875,7 @@ TFB_FlushGraphics (void) // Only call from main thread!!
|
|||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
TFB_SwapBuffers (TFB_REDRAW_YES);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TFB_DRAWCOMMANDTYPE_CALLBACK:
|
case TFB_DRAWCOMMANDTYPE_CALLBACK:
|
||||||
|
|||||||
@@ -24,12 +24,9 @@
|
|||||||
#include SDL_INCLUDE(SDL_byteorder.h)
|
#include SDL_INCLUDE(SDL_byteorder.h)
|
||||||
#include SDL_IMAGE_INCLUDE(SDL_image.h)
|
#include SDL_IMAGE_INCLUDE(SDL_image.h)
|
||||||
|
|
||||||
#include "libs/graphics/gfxintrn.h"
|
#include "../gfxintrn.h"
|
||||||
#include "libs/graphics/tfb_draw.h"
|
#include "libs/graphics/tfb_draw.h"
|
||||||
#include "libs/input/inpintrn.h"
|
|
||||||
#include "libs/graphics/gfx_common.h"
|
#include "libs/graphics/gfx_common.h"
|
||||||
#include "libs/input/sdl/input.h"
|
|
||||||
#include "libs/threadlib.h"
|
|
||||||
|
|
||||||
// The Graphics Backend vtable
|
// The Graphics Backend vtable
|
||||||
typedef struct _tfb_graphics_backend {
|
typedef struct _tfb_graphics_backend {
|
||||||
|
|||||||
@@ -18,8 +18,6 @@
|
|||||||
#include "tfb_draw.h"
|
#include "tfb_draw.h"
|
||||||
#include "drawcmd.h"
|
#include "drawcmd.h"
|
||||||
#include "libs/log.h"
|
#include "libs/log.h"
|
||||||
// XXX: we should not include anything from uqm/ inside libs/
|
|
||||||
#include "uqm/units.h"
|
|
||||||
|
|
||||||
static const HOT_SPOT NullHs = {0, 0};
|
static const HOT_SPOT NullHs = {0, 0};
|
||||||
|
|
||||||
@@ -51,8 +49,8 @@ TFB_DrawScreen_Rect (RECT *rect, int r, int g, int b, SCREEN dest)
|
|||||||
if (!rect)
|
if (!rect)
|
||||||
{
|
{
|
||||||
locRect.corner.x = locRect.corner.y = 0;
|
locRect.corner.x = locRect.corner.y = 0;
|
||||||
locRect.extent.width = SCREEN_WIDTH;
|
locRect.extent.width = ScreenWidth;
|
||||||
locRect.extent.height = SCREEN_HEIGHT;
|
locRect.extent.height = ScreenHeight;
|
||||||
rect = &locRect;
|
rect = &locRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,8 +141,8 @@ TFB_DrawScreen_Copy (RECT *r, SCREEN src, SCREEN dest)
|
|||||||
if (!r)
|
if (!r)
|
||||||
{
|
{
|
||||||
locRect.corner.x = locRect.corner.y = 0;
|
locRect.corner.x = locRect.corner.y = 0;
|
||||||
locRect.extent.width = SCREEN_WIDTH;
|
locRect.extent.width = ScreenWidth;
|
||||||
locRect.extent.height = SCREEN_HEIGHT;
|
locRect.extent.height = ScreenHeight;
|
||||||
r = &locRect;
|
r = &locRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,6 @@
|
|||||||
#include "gfx_common.h"
|
#include "gfx_common.h"
|
||||||
#include "widgets.h"
|
#include "widgets.h"
|
||||||
#include "libs/strlib.h"
|
#include "libs/strlib.h"
|
||||||
// XXX: we should not include anything from uqm/ inside libs/
|
|
||||||
#include "uqm/colors.h"
|
|
||||||
#include "uqm/setup.h"
|
|
||||||
#include "uqm/units.h"
|
|
||||||
|
|
||||||
WIDGET *widget_focus = NULL;
|
WIDGET *widget_focus = NULL;
|
||||||
|
|
||||||
@@ -38,6 +34,12 @@ WIDGET *widget_focus = NULL;
|
|||||||
#define WIDGET_DIALOG_TEXT_COLOR \
|
#define WIDGET_DIALOG_TEXT_COLOR \
|
||||||
BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x00), 0x00)
|
BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x00), 0x00)
|
||||||
|
|
||||||
|
static COLOR win_bg_clr = BUILD_COLOR (MAKE_RGB15 (0x18, 0x18, 0x1F), 0x00);
|
||||||
|
static COLOR win_medium_clr = BUILD_COLOR (MAKE_RGB15 (0x10, 0x10, 0x18), 0x00);
|
||||||
|
static COLOR win_dark_clr = BUILD_COLOR (MAKE_RGB15 (0x08, 0x08, 0x10), 0x00);
|
||||||
|
|
||||||
|
static FONT cur_font;
|
||||||
|
|
||||||
void
|
void
|
||||||
DrawShadowedBox (RECT *r, COLOR bg, COLOR dark, COLOR medium)
|
DrawShadowedBox (RECT *r, COLOR bg, COLOR dark, COLOR medium)
|
||||||
{
|
{
|
||||||
@@ -78,15 +80,18 @@ DrawShadowedBox (RECT *r, COLOR bg, COLOR dark, COLOR medium)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DrawLabelAsWindow(WIDGET_LABEL *label)
|
DrawLabelAsWindow (WIDGET_LABEL *label)
|
||||||
{
|
{
|
||||||
COLOR oldfg = SetContextForeGroundColor (WIDGET_DIALOG_TEXT_COLOR);
|
COLOR oldfg = SetContextForeGroundColor (WIDGET_DIALOG_TEXT_COLOR);
|
||||||
FONT oldfont = SetContextFont (StarConFont);
|
FONT oldfont = 0;
|
||||||
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
||||||
RECT r;
|
RECT r;
|
||||||
TEXT t;
|
TEXT t;
|
||||||
int i, win_w, win_h;
|
int i, win_w, win_h;
|
||||||
|
|
||||||
|
if (cur_font)
|
||||||
|
oldfont = SetContextFont (cur_font);
|
||||||
|
|
||||||
/* Compute the dimensions of the label */
|
/* Compute the dimensions of the label */
|
||||||
win_h = label->height ((WIDGET *)label) + 16;
|
win_h = label->height ((WIDGET *)label) + 16;
|
||||||
win_w = 0;
|
win_w = 0;
|
||||||
@@ -101,12 +106,11 @@ DrawLabelAsWindow(WIDGET_LABEL *label)
|
|||||||
win_w = (win_w * 6) + 16;
|
win_w = (win_w * 6) + 16;
|
||||||
|
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
r.corner.x = (SCREEN_WIDTH - win_w) >> 1;
|
r.corner.x = (ScreenWidth - win_w) >> 1;
|
||||||
r.corner.y = (SCREEN_HEIGHT - win_h) >> 1;
|
r.corner.y = (ScreenHeight - win_h) >> 1;
|
||||||
r.extent.width = win_w;
|
r.extent.width = win_w;
|
||||||
r.extent.height = win_h;
|
r.extent.height = win_h;
|
||||||
DrawShadowedBox (&r, SHADOWBOX_BACKGROUND_COLOR,
|
DrawShadowedBox (&r, win_bg_clr, win_dark_clr, win_medium_clr);
|
||||||
SHADOWBOX_DARK_COLOR, SHADOWBOX_MEDIUM_COLOR);
|
|
||||||
|
|
||||||
t.baseline.x = r.corner.x + (r.extent.width >> 1);
|
t.baseline.x = r.corner.x + (r.extent.width >> 1);
|
||||||
t.baseline.y = r.corner.y + 16;
|
t.baseline.y = r.corner.y + 16;
|
||||||
@@ -122,24 +126,44 @@ DrawLabelAsWindow(WIDGET_LABEL *label)
|
|||||||
UnbatchGraphics ();
|
UnbatchGraphics ();
|
||||||
|
|
||||||
SetContextFontEffect (oldFontEffect);
|
SetContextFontEffect (oldFontEffect);
|
||||||
SetContextFont (oldfont);
|
if (oldfont)
|
||||||
|
SetContextFont (oldfont);
|
||||||
SetContextForeGroundColor (oldfg);
|
SetContextForeGroundColor (oldfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Widget_SetWindowColors (COLOR bg, COLOR dark, COLOR medium)
|
||||||
|
{
|
||||||
|
win_bg_clr = bg;
|
||||||
|
win_dark_clr = dark;
|
||||||
|
win_medium_clr = medium;
|
||||||
|
}
|
||||||
|
|
||||||
|
FONT
|
||||||
|
Widget_SetFont (FONT newFont)
|
||||||
|
{
|
||||||
|
FONT oldFont = cur_font;
|
||||||
|
cur_font = newFont;
|
||||||
|
return oldFont;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
Widget_DrawToolTips (int numlines, const char **tips)
|
Widget_DrawToolTips (int numlines, const char **tips)
|
||||||
{
|
{
|
||||||
RECT r;
|
RECT r;
|
||||||
FONT oldfont = SetContextFont (StarConFont);
|
FONT oldfont = 0;
|
||||||
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
||||||
COLOR oldtext = SetContextForeGroundColor (WIDGET_INACTIVE_SELECTED_COLOR);
|
COLOR oldtext = SetContextForeGroundColor (WIDGET_INACTIVE_SELECTED_COLOR);
|
||||||
TEXT t;
|
TEXT t;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (cur_font)
|
||||||
|
oldfont = SetContextFont (cur_font);
|
||||||
|
|
||||||
r.corner.x = 2;
|
r.corner.x = 2;
|
||||||
r.corner.y = 2;
|
r.corner.y = 2;
|
||||||
r.extent.width = SCREEN_WIDTH - 4;
|
r.extent.width = ScreenWidth - 4;
|
||||||
r.extent.height = SCREEN_HEIGHT - 4;
|
r.extent.height = ScreenHeight - 4;
|
||||||
|
|
||||||
t.align = ALIGN_CENTER;
|
t.align = ALIGN_CENTER;
|
||||||
t.CharCount = ~0;
|
t.CharCount = ~0;
|
||||||
@@ -154,7 +178,8 @@ Widget_DrawToolTips (int numlines, const char **tips)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SetContextFontEffect (oldFontEffect);
|
SetContextFontEffect (oldFontEffect);
|
||||||
SetContextFont (oldfont);
|
if (oldfont)
|
||||||
|
SetContextFont (oldfont);
|
||||||
SetContextForeGroundColor (oldtext);
|
SetContextForeGroundColor (oldtext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,17 +189,20 @@ Widget_DrawMenuScreen (WIDGET *_self, int x, int y)
|
|||||||
RECT r;
|
RECT r;
|
||||||
COLOR title, oldtext;
|
COLOR title, oldtext;
|
||||||
COLOR inactive, default_color, selected;
|
COLOR inactive, default_color, selected;
|
||||||
FONT oldfont = SetContextFont (StarConFont);
|
FONT oldfont = 0;
|
||||||
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
||||||
TEXT t;
|
TEXT t;
|
||||||
int widget_index, height, widget_y;
|
int widget_index, height, widget_y;
|
||||||
|
|
||||||
WIDGET_MENU_SCREEN *self = (WIDGET_MENU_SCREEN *)_self;
|
WIDGET_MENU_SCREEN *self = (WIDGET_MENU_SCREEN *)_self;
|
||||||
|
|
||||||
|
if (cur_font)
|
||||||
|
oldfont = SetContextFont (cur_font);
|
||||||
|
|
||||||
r.corner.x = 2;
|
r.corner.x = 2;
|
||||||
r.corner.y = 2;
|
r.corner.y = 2;
|
||||||
r.extent.width = SCREEN_WIDTH - 4;
|
r.extent.width = ScreenWidth - 4;
|
||||||
r.extent.height = SCREEN_HEIGHT - 4;
|
r.extent.height = ScreenHeight - 4;
|
||||||
|
|
||||||
title = WIDGET_INACTIVE_SELECTED_COLOR;
|
title = WIDGET_INACTIVE_SELECTED_COLOR;
|
||||||
selected = WIDGET_ACTIVE_COLOR;
|
selected = WIDGET_ACTIVE_COLOR;
|
||||||
@@ -204,7 +232,7 @@ Widget_DrawMenuScreen (WIDGET *_self, int x, int y)
|
|||||||
|
|
||||||
height -= 8;
|
height -= 8;
|
||||||
|
|
||||||
widget_y = (SCREEN_HEIGHT - height) >> 1;
|
widget_y = (ScreenHeight - height) >> 1;
|
||||||
for (widget_index = 0; widget_index < self->num_children; widget_index++)
|
for (widget_index = 0; widget_index < self->num_children; widget_index++)
|
||||||
{
|
{
|
||||||
WIDGET *c = self->child[widget_index];
|
WIDGET *c = self->child[widget_index];
|
||||||
@@ -213,7 +241,8 @@ Widget_DrawMenuScreen (WIDGET *_self, int x, int y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SetContextFontEffect (oldFontEffect);
|
SetContextFontEffect (oldFontEffect);
|
||||||
SetContextFont (oldfont);
|
if (oldfont)
|
||||||
|
SetContextFont (oldfont);
|
||||||
SetContextForeGroundColor (oldtext);
|
SetContextForeGroundColor (oldtext);
|
||||||
|
|
||||||
(void) x;
|
(void) x;
|
||||||
@@ -226,10 +255,13 @@ Widget_DrawChoice (WIDGET *_self, int x, int y)
|
|||||||
WIDGET_CHOICE *self = (WIDGET_CHOICE *)_self;
|
WIDGET_CHOICE *self = (WIDGET_CHOICE *)_self;
|
||||||
COLOR oldtext;
|
COLOR oldtext;
|
||||||
COLOR inactive, default_color, selected;
|
COLOR inactive, default_color, selected;
|
||||||
FONT oldfont = SetContextFont (StarConFont);
|
FONT oldfont = 0;
|
||||||
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
||||||
TEXT t;
|
TEXT t;
|
||||||
int i, home_x, home_y;
|
int i, home_x, home_y;
|
||||||
|
|
||||||
|
if (cur_font)
|
||||||
|
oldfont = SetContextFont (cur_font);
|
||||||
|
|
||||||
default_color = WIDGET_INACTIVE_SELECTED_COLOR;
|
default_color = WIDGET_INACTIVE_SELECTED_COLOR;
|
||||||
selected = WIDGET_ACTIVE_COLOR;
|
selected = WIDGET_ACTIVE_COLOR;
|
||||||
@@ -250,12 +282,12 @@ Widget_DrawChoice (WIDGET *_self, int x, int y)
|
|||||||
}
|
}
|
||||||
font_DrawText (&t);
|
font_DrawText (&t);
|
||||||
|
|
||||||
home_x = t.baseline.x + 3 * (SCREEN_WIDTH / ((self->maxcolumns + 1) * 2));
|
home_x = t.baseline.x + 3 * (ScreenWidth / ((self->maxcolumns + 1) * 2));
|
||||||
home_y = t.baseline.y;
|
home_y = t.baseline.y;
|
||||||
t.align = ALIGN_CENTER;
|
t.align = ALIGN_CENTER;
|
||||||
for (i = 0; i < self->numopts; i++)
|
for (i = 0; i < self->numopts; i++)
|
||||||
{
|
{
|
||||||
t.baseline.x = home_x + ((i % 3) * (SCREEN_WIDTH / (self->maxcolumns + 1)));
|
t.baseline.x = home_x + ((i % 3) * (ScreenWidth / (self->maxcolumns + 1)));
|
||||||
t.baseline.y = home_y + (8 * (i / 3));
|
t.baseline.y = home_y + (8 * (i / 3));
|
||||||
t.pStr = self->options[i].optname;
|
t.pStr = self->options[i].optname;
|
||||||
if ((widget_focus == _self) &&
|
if ((widget_focus == _self) &&
|
||||||
@@ -275,7 +307,8 @@ Widget_DrawChoice (WIDGET *_self, int x, int y)
|
|||||||
font_DrawText (&t);
|
font_DrawText (&t);
|
||||||
}
|
}
|
||||||
SetContextFontEffect (oldFontEffect);
|
SetContextFontEffect (oldFontEffect);
|
||||||
SetContextFont (oldfont);
|
if (oldfont)
|
||||||
|
SetContextFont (oldfont);
|
||||||
SetContextForeGroundColor (oldtext);
|
SetContextForeGroundColor (oldtext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,9 +318,12 @@ Widget_DrawButton (WIDGET *_self, int x, int y)
|
|||||||
WIDGET_BUTTON *self = (WIDGET_BUTTON *)_self;
|
WIDGET_BUTTON *self = (WIDGET_BUTTON *)_self;
|
||||||
COLOR oldtext;
|
COLOR oldtext;
|
||||||
COLOR inactive, selected;
|
COLOR inactive, selected;
|
||||||
FONT oldfont = SetContextFont (StarConFont);
|
FONT oldfont = 0;
|
||||||
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
||||||
TEXT t;
|
TEXT t;
|
||||||
|
|
||||||
|
if (cur_font)
|
||||||
|
oldfont = SetContextFont (cur_font);
|
||||||
|
|
||||||
selected = WIDGET_ACTIVE_COLOR;
|
selected = WIDGET_ACTIVE_COLOR;
|
||||||
inactive = WIDGET_INACTIVE_COLOR;
|
inactive = WIDGET_INACTIVE_COLOR;
|
||||||
@@ -308,7 +344,8 @@ Widget_DrawButton (WIDGET *_self, int x, int y)
|
|||||||
}
|
}
|
||||||
font_DrawText (&t);
|
font_DrawText (&t);
|
||||||
SetContextFontEffect (oldFontEffect);
|
SetContextFontEffect (oldFontEffect);
|
||||||
SetContextFont (oldfont);
|
if (oldfont)
|
||||||
|
SetContextFont (oldfont);
|
||||||
SetContextForeGroundColor (oldtext);
|
SetContextForeGroundColor (oldtext);
|
||||||
(void) x;
|
(void) x;
|
||||||
}
|
}
|
||||||
@@ -318,10 +355,13 @@ Widget_DrawLabel (WIDGET *_self, int x, int y)
|
|||||||
{
|
{
|
||||||
WIDGET_LABEL *self = (WIDGET_LABEL *)_self;
|
WIDGET_LABEL *self = (WIDGET_LABEL *)_self;
|
||||||
COLOR oldtext = SetContextForeGroundColor (WIDGET_INACTIVE_SELECTED_COLOR);
|
COLOR oldtext = SetContextForeGroundColor (WIDGET_INACTIVE_SELECTED_COLOR);
|
||||||
FONT oldfont = SetContextFont (StarConFont);
|
FONT oldfont = 0;
|
||||||
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
||||||
TEXT t;
|
TEXT t;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (cur_font)
|
||||||
|
oldfont = SetContextFont (cur_font);
|
||||||
|
|
||||||
t.baseline.x = 160;
|
t.baseline.x = 160;
|
||||||
t.baseline.y = y;
|
t.baseline.y = y;
|
||||||
@@ -335,7 +375,8 @@ Widget_DrawLabel (WIDGET *_self, int x, int y)
|
|||||||
t.baseline.y += 8;
|
t.baseline.y += 8;
|
||||||
}
|
}
|
||||||
SetContextFontEffect (oldFontEffect);
|
SetContextFontEffect (oldFontEffect);
|
||||||
SetContextFont (oldfont);
|
if (oldfont)
|
||||||
|
SetContextFont (oldfont);
|
||||||
SetContextForeGroundColor (oldtext);
|
SetContextForeGroundColor (oldtext);
|
||||||
(void) x;
|
(void) x;
|
||||||
}
|
}
|
||||||
@@ -346,11 +387,14 @@ Widget_DrawSlider(WIDGET *_self, int x, int y)
|
|||||||
WIDGET_SLIDER *self = (WIDGET_SLIDER *)_self;
|
WIDGET_SLIDER *self = (WIDGET_SLIDER *)_self;
|
||||||
COLOR oldtext;
|
COLOR oldtext;
|
||||||
COLOR inactive, default_color, selected;
|
COLOR inactive, default_color, selected;
|
||||||
FONT oldfont = SetContextFont (StarConFont);
|
FONT oldfont = 0;
|
||||||
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
||||||
TEXT t;
|
TEXT t;
|
||||||
RECT r;
|
RECT r;
|
||||||
int tick = (SCREEN_WIDTH - x) / 8;
|
int tick = (ScreenWidth - x) / 8;
|
||||||
|
|
||||||
|
if (cur_font)
|
||||||
|
oldfont = SetContextFont (cur_font);
|
||||||
|
|
||||||
default_color = WIDGET_INACTIVE_SELECTED_COLOR;
|
default_color = WIDGET_INACTIVE_SELECTED_COLOR;
|
||||||
selected = WIDGET_ACTIVE_COLOR;
|
selected = WIDGET_ACTIVE_COLOR;
|
||||||
@@ -388,7 +432,8 @@ Widget_DrawSlider(WIDGET *_self, int x, int y)
|
|||||||
(*self->draw_value)(self, t.baseline.x + 7 * tick, t.baseline.y);
|
(*self->draw_value)(self, t.baseline.x + 7 * tick, t.baseline.y);
|
||||||
|
|
||||||
SetContextFontEffect (oldFontEffect);
|
SetContextFontEffect (oldFontEffect);
|
||||||
SetContextFont (oldfont);
|
if (oldfont)
|
||||||
|
SetContextFont (oldfont);
|
||||||
SetContextForeGroundColor (oldtext);
|
SetContextForeGroundColor (oldtext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -415,9 +460,12 @@ Widget_DrawTextEntry (WIDGET *_self, int x, int y)
|
|||||||
WIDGET_TEXTENTRY *self = (WIDGET_TEXTENTRY *)_self;
|
WIDGET_TEXTENTRY *self = (WIDGET_TEXTENTRY *)_self;
|
||||||
COLOR oldtext;
|
COLOR oldtext;
|
||||||
COLOR inactive, default_color, selected;
|
COLOR inactive, default_color, selected;
|
||||||
FONT oldfont = SetContextFont (StarConFont);
|
FONT oldfont = 0;
|
||||||
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
||||||
TEXT t;
|
TEXT t;
|
||||||
|
|
||||||
|
if (cur_font)
|
||||||
|
oldfont = SetContextFont (cur_font);
|
||||||
|
|
||||||
default_color = WIDGET_INACTIVE_SELECTED_COLOR;
|
default_color = WIDGET_INACTIVE_SELECTED_COLOR;
|
||||||
selected = WIDGET_ACTIVE_COLOR;
|
selected = WIDGET_ACTIVE_COLOR;
|
||||||
@@ -538,7 +586,8 @@ Widget_DrawTextEntry (WIDGET *_self, int x, int y)
|
|||||||
|
|
||||||
UnbatchGraphics ();
|
UnbatchGraphics ();
|
||||||
SetContextFontEffect (oldFontEffect);
|
SetContextFontEffect (oldFontEffect);
|
||||||
SetContextFont (oldfont);
|
if (oldfont)
|
||||||
|
SetContextFont (oldfont);
|
||||||
SetContextForeGroundColor (oldtext);
|
SetContextForeGroundColor (oldtext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -548,10 +597,13 @@ Widget_DrawControlEntry (WIDGET *_self, int x, int y)
|
|||||||
WIDGET_CONTROLENTRY *self = (WIDGET_CONTROLENTRY *)_self;
|
WIDGET_CONTROLENTRY *self = (WIDGET_CONTROLENTRY *)_self;
|
||||||
COLOR oldtext;
|
COLOR oldtext;
|
||||||
COLOR inactive, default_color, selected;
|
COLOR inactive, default_color, selected;
|
||||||
FONT oldfont = SetContextFont (StarConFont);
|
FONT oldfont = 0;
|
||||||
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
FRAME oldFontEffect = SetContextFontEffect (NULL);
|
||||||
TEXT t;
|
TEXT t;
|
||||||
int i, home_x, home_y;
|
int i, home_x, home_y;
|
||||||
|
|
||||||
|
if (cur_font)
|
||||||
|
oldfont = SetContextFont (cur_font);
|
||||||
|
|
||||||
default_color = WIDGET_INACTIVE_SELECTED_COLOR;
|
default_color = WIDGET_INACTIVE_SELECTED_COLOR;
|
||||||
selected = WIDGET_ACTIVE_COLOR;
|
selected = WIDGET_ACTIVE_COLOR;
|
||||||
@@ -572,13 +624,13 @@ Widget_DrawControlEntry (WIDGET *_self, int x, int y)
|
|||||||
}
|
}
|
||||||
font_DrawText (&t);
|
font_DrawText (&t);
|
||||||
|
|
||||||
// 3 * SCREEN_WIDTH / ((self->maxcolumns + 1) * 2)) as per CHOICE, but only two options.
|
// 3 * ScreenWidth / ((self->maxcolumns + 1) * 2)) as per CHOICE, but only two options.
|
||||||
home_x = t.baseline.x + (SCREEN_WIDTH / 2);
|
home_x = t.baseline.x + (ScreenWidth / 2);
|
||||||
home_y = t.baseline.y;
|
home_y = t.baseline.y;
|
||||||
t.align = ALIGN_CENTER;
|
t.align = ALIGN_CENTER;
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
t.baseline.x = home_x + ((i % 3) * (SCREEN_WIDTH / 3)); // self->maxcolumns + 1 as per CHOICE.
|
t.baseline.x = home_x + ((i % 3) * (ScreenWidth / 3)); // self->maxcolumns + 1 as per CHOICE.
|
||||||
t.baseline.y = home_y + (8 * (i / 3));
|
t.baseline.y = home_y + (8 * (i / 3));
|
||||||
t.pStr = self->controlname[i];
|
t.pStr = self->controlname[i];
|
||||||
if (!t.pStr[0])
|
if (!t.pStr[0])
|
||||||
@@ -597,7 +649,8 @@ Widget_DrawControlEntry (WIDGET *_self, int x, int y)
|
|||||||
font_DrawText (&t);
|
font_DrawText (&t);
|
||||||
}
|
}
|
||||||
SetContextFontEffect (oldFontEffect);
|
SetContextFontEffect (oldFontEffect);
|
||||||
SetContextFont (oldfont);
|
if (oldfont)
|
||||||
|
SetContextFont (oldfont);
|
||||||
SetContextForeGroundColor (oldtext);
|
SetContextForeGroundColor (oldtext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -611,7 +664,7 @@ int
|
|||||||
Widget_HeightFullScreen (WIDGET *_self)
|
Widget_HeightFullScreen (WIDGET *_self)
|
||||||
{
|
{
|
||||||
(void)_self;
|
(void)_self;
|
||||||
return SCREEN_HEIGHT;
|
return ScreenHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -632,7 +685,7 @@ int
|
|||||||
Widget_WidthFullScreen (WIDGET *_self)
|
Widget_WidthFullScreen (WIDGET *_self)
|
||||||
{
|
{
|
||||||
(void)_self;
|
(void)_self;
|
||||||
return SCREEN_WIDTH;
|
return ScreenWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|||||||
@@ -176,7 +176,10 @@ typedef struct _widget_controlentry {
|
|||||||
} WIDGET_CONTROLENTRY;
|
} WIDGET_CONTROLENTRY;
|
||||||
|
|
||||||
void DrawShadowedBox (RECT *r, COLOR bg, COLOR dark, COLOR medium);
|
void DrawShadowedBox (RECT *r, COLOR bg, COLOR dark, COLOR medium);
|
||||||
void DrawLabelAsWindow(WIDGET_LABEL *label);
|
void DrawLabelAsWindow (WIDGET_LABEL *label);
|
||||||
|
void Widget_SetWindowColors (COLOR bg, COLOR dark, COLOR medium);
|
||||||
|
FONT Widget_SetFont (FONT newFont);
|
||||||
|
|
||||||
|
|
||||||
int Widget_Event (int event);
|
int Widget_Event (int event);
|
||||||
|
|
||||||
|
|||||||
@@ -495,6 +495,7 @@ main (int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
TFB_ProcessEvents ();
|
TFB_ProcessEvents ();
|
||||||
|
ProcessUtilityKeys ();
|
||||||
ProcessThreadLifecycles ();
|
ProcessThreadLifecycles ();
|
||||||
TFB_FlushGraphics ();
|
TFB_FlushGraphics ();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ DoPopup (struct popup_state *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DoPopupWindow(const char *msg)
|
DoPopupWindow (const char *msg)
|
||||||
{
|
{
|
||||||
stringbank *bank = StringBank_Create ();
|
stringbank *bank = StringBank_Create ();
|
||||||
const char *lines[30];
|
const char *lines[30];
|
||||||
@@ -253,6 +253,9 @@ DoPopupWindow(const char *msg)
|
|||||||
s.origin = r.corner;
|
s.origin = r.corner;
|
||||||
s.frame = F;
|
s.frame = F;
|
||||||
|
|
||||||
|
Widget_SetFont (StarConFont);
|
||||||
|
Widget_SetWindowColors (SHADOWBOX_BACKGROUND_COLOR, SHADOWBOX_DARK_COLOR,
|
||||||
|
SHADOWBOX_MEDIUM_COLOR);
|
||||||
DrawLabelAsWindow (&label);
|
DrawLabelAsWindow (&label);
|
||||||
|
|
||||||
GetMenuSounds (&s0, &s1);
|
GetMenuSounds (&s0, &s1);
|
||||||
|
|||||||
+1
-1
@@ -634,7 +634,7 @@ DoPresentation (void *pIS)
|
|||||||
{
|
{
|
||||||
DestroyDrawable (ReleaseDrawable (pPIS->RotatedFrame));
|
DestroyDrawable (ReleaseDrawable (pPIS->RotatedFrame));
|
||||||
pPIS->RotatedFrame = CaptureDrawable (
|
pPIS->RotatedFrame = CaptureDrawable (
|
||||||
RotateFrame (s.frame, DEGREES_TO_ANGLE (angle)));
|
RotateFrame (s.frame, -angle));
|
||||||
pPIS->LastAngle = angle;
|
pPIS->LastAngle = angle;
|
||||||
pPIS->LastDrawKind = draw_what;
|
pPIS->LastDrawKind = draw_what;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "setup.h"
|
#include "setup.h"
|
||||||
#include "sounds.h"
|
#include "sounds.h"
|
||||||
|
#include "colors.h"
|
||||||
#include "libs/gfxlib.h"
|
#include "libs/gfxlib.h"
|
||||||
#include "libs/graphics/gfx_common.h"
|
#include "libs/graphics/gfx_common.h"
|
||||||
#include "libs/graphics/widgets.h"
|
#include "libs/graphics/widgets.h"
|
||||||
@@ -434,6 +435,9 @@ DoSetupMenu (SETUP_MENU_STATE *pInputState)
|
|||||||
SetDefaultMenuRepeatDelay ();
|
SetDefaultMenuRepeatDelay ();
|
||||||
pInputState->NextTime = GetTimeCounter ();
|
pInputState->NextTime = GetTimeCounter ();
|
||||||
SetDefaults ();
|
SetDefaults ();
|
||||||
|
Widget_SetFont (StarConFont);
|
||||||
|
Widget_SetWindowColors (SHADOWBOX_BACKGROUND_COLOR,
|
||||||
|
SHADOWBOX_DARK_COLOR, SHADOWBOX_MEDIUM_COLOR);
|
||||||
|
|
||||||
current = NULL;
|
current = NULL;
|
||||||
next = (WIDGET *)(&menus[0]);
|
next = (WIDGET *)(&menus[0]);
|
||||||
|
|||||||
@@ -35,6 +35,9 @@
|
|||||||
#include "uqmdebug.h"
|
#include "uqmdebug.h"
|
||||||
#include "libs/tasklib.h"
|
#include "libs/tasklib.h"
|
||||||
#include "libs/log.h"
|
#include "libs/log.h"
|
||||||
|
#include "libs/gfxlib.h"
|
||||||
|
#include "libs/graphics/gfx_common.h"
|
||||||
|
#include "libs/inplib.h"
|
||||||
|
|
||||||
#include "uqmversion.h"
|
#include "uqmversion.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
@@ -105,6 +108,34 @@ SignalStopMainThread (void)
|
|||||||
GLOBAL (CurrentActivity) |= CHECK_ABORT;
|
GLOBAL (CurrentActivity) |= CHECK_ABORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ProcessUtilityKeys (void)
|
||||||
|
{
|
||||||
|
if (ImmediateInputState.menu[KEY_ABORT])
|
||||||
|
{
|
||||||
|
log_showBox (false, false);
|
||||||
|
exit (EXIT_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImmediateInputState.menu[KEY_FULLSCREEN])
|
||||||
|
{
|
||||||
|
int flags = GfxFlags ^ TFB_GFXFLAGS_FULLSCREEN;
|
||||||
|
// clear ImmediateInputState so we don't repeat this next frame
|
||||||
|
FlushInput ();
|
||||||
|
TFB_DrawScreen_ReinitVideo (GraphicsDriver, flags, ScreenWidthActual,
|
||||||
|
ScreenHeightActual);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(DEBUG) || defined(USE_DEBUG_KEY)
|
||||||
|
if (ImmediateInputState.menu[KEY_DEBUG])
|
||||||
|
{
|
||||||
|
// clear ImmediateInputState so we don't repeat this next frame
|
||||||
|
FlushInput ();
|
||||||
|
debugKeyPressed ();
|
||||||
|
}
|
||||||
|
#endif /* DEBUG */
|
||||||
|
}
|
||||||
|
|
||||||
/* TODO: Remove these declarations once threading is gone. */
|
/* TODO: Remove these declarations once threading is gone. */
|
||||||
extern int snddriver, soundflags;
|
extern int snddriver, soundflags;
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
extern volatile int MainExited;
|
extern volatile int MainExited;
|
||||||
extern void SignalStopMainThread (void);
|
extern void SignalStopMainThread (void);
|
||||||
|
extern void ProcessUtilityKeys (void);
|
||||||
|
|
||||||
extern int Starcon2Main (void *threadArg);
|
extern int Starcon2Main (void *threadArg);
|
||||||
extern void FreeGameData (void);
|
extern void FreeGameData (void);
|
||||||
|
|||||||
Reference in New Issue
Block a user