From 6cd520e4a04b7792989cadb7e2fc92ef59ef4752 Mon Sep 17 00:00:00 2001 From: Christian Ohm Date: Sat, 6 Mar 2010 23:21:08 +0000 Subject: [PATCH] Include/declaration cleanup for src/keyedit.c/h. git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10180 4a71c877-e1ca-e34f-864e-861f7616d084 --- src/keyedit.c | 46 ++++++++++------------------------------------ src/keyedit.h | 8 ++++---- src/main.h | 1 + src/multiint.h | 1 + 4 files changed, 16 insertions(+), 40 deletions(-) diff --git a/src/keyedit.c b/src/keyedit.c index 707c0a2c4..c57b7c01e 100644 --- a/src/keyedit.c +++ b/src/keyedit.c @@ -23,32 +23,21 @@ * alexl. */ -// //////////////////////////////////////////////////////////////////////////// -// includes -#include -#include -#include - #include "lib/framework/frame.h" -#include "lib/framework/strres.h" -#include "lib/framework/input.h" +#include "lib/ivis_common/bitimage.h" +#include "lib/ivis_common/pieblitfunc.h" #include "lib/sound/audio.h" +#include "lib/sound/audio_id.h" -#include "lib/widget/widget.h" -#include "frontend.h" #include "frend.h" -#include "lib/ivis_common/textdraw.h" -#include "lib/ivis_common/piepalette.h" +#include "frontend.h" #include "hci.h" #include "init.h" -#include "loadsave.h" -#include "keymap.h" -#include "intimage.h" -#include "lib/ivis_common/bitimage.h" #include "intdisplay.h" -#include "lib/sound/audio_id.h" -#include "lib/ivis_common/pieblitfunc.h" -#include "lib/netplay/netplay.h" +#include "keyedit.h" +#include "keymap.h" +#include "loadsave.h" +#include "main.h" #include "multiint.h" // //////////////////////////////////////////////////////////////////////////// @@ -67,9 +56,6 @@ #define KM_X 30 #define KM_Y 20 -#define KM_RETURNX (KM_W-90) -#define KM_RETURNY (KM_H-42) - #define BUTTONSPERKEYMAPPAGE 20 #define KM_ENTRYW 480 @@ -80,19 +66,7 @@ // variables static KEY_MAPPING *selectedKeyMap; -// //////////////////////////////////////////////////////////////////////////// -// protos - -BOOL runKeyMapEditor (void); -static BOOL keyMapToString (char *pStr, KEY_MAPPING *psMapping); -static void displayKeyMap(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, PIELIGHT *pColours); -BOOL startKeyMapEditor (BOOL first); -BOOL saveKeyMap (void); -BOOL loadKeyMap (void); -static BOOL pushedKeyMap (UDWORD key); - -char keymapVersion[8] = "KM_0002"; -extern char KeyMapPath[]; +static char keymapVersion[8] = "KM_0002"; // //////////////////////////////////////////////////////////////////////////// // funcs @@ -318,7 +292,7 @@ static BOOL keyMapToString(char *pStr, KEY_MAPPING *psMapping) // //////////////////////////////////////////////////////////////////////////// // display a keymap on the interface. -void displayKeyMap(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, WZ_DECL_UNUSED PIELIGHT *pColours) +static void displayKeyMap(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, WZ_DECL_UNUSED PIELIGHT *pColours) { UDWORD x = xOffset+psWidget->x; UDWORD y = yOffset+psWidget->y; diff --git a/src/keyedit.h b/src/keyedit.h index b8b28bd69..9a36edfa0 100644 --- a/src/keyedit.h +++ b/src/keyedit.h @@ -26,10 +26,10 @@ extern "C" { #endif //__cplusplus -extern BOOL runKeyMapEditor (void); -extern BOOL startKeyMapEditor (BOOL first); -extern BOOL saveKeyMap (void); -extern BOOL loadKeyMap (void); +BOOL runKeyMapEditor(void); +BOOL startKeyMapEditor(BOOL first); +BOOL saveKeyMap(void); +BOOL loadKeyMap(void); #ifdef __cplusplus } diff --git a/src/main.h b/src/main.h index d178ba932..02d078c15 100644 --- a/src/main.h +++ b/src/main.h @@ -42,6 +42,7 @@ extern void SetGameMode(GS_GAMEMODE status); extern char SaveGamePath[PATH_MAX]; extern char datadir[PATH_MAX]; extern char configdir[PATH_MAX]; +extern char KeyMapPath[PATH_MAX]; #define MAX_MODS 100 diff --git a/src/multiint.h b/src/multiint.h index 983e0ea4b..94b50a0c8 100644 --- a/src/multiint.h +++ b/src/multiint.h @@ -24,6 +24,7 @@ #ifndef __INCLUDED_SRC_MULTIINT_H__ #define __INCLUDED_SRC_MULTIINT_H__ +#include "lib/netplay/netplay.h" #include "lib/widget/widgbase.h" #ifdef __cplusplus