summaryrefslogtreecommitdiff
path: root/src/base/modules.h
diff options
context:
space:
mode:
authorxHire <xhire@tuxportal.cz>2008-10-25 14:11:06 +0200
committerxHire <xhire@tuxportal.cz>2008-10-25 14:11:06 +0200
commitc8a9209d77a896bf49227e5aeccd54e91ccf29cc (patch)
tree6b7367406ebbc6ce3ea5e0c8668c75f6fb3f6ae9 /src/base/modules.h
parentcb9deba915dd7b114eeb76601eb1c8b07c1ba90f (diff)
Changed style of the code to the K&R standard
Diffstat (limited to 'src/base/modules.h')
-rw-r--r--src/base/modules.h143
1 files changed, 70 insertions, 73 deletions
diff --git a/src/base/modules.h b/src/base/modules.h
index f0cbfb1..a22c972 100644
--- a/src/base/modules.h
+++ b/src/base/modules.h
@@ -1,88 +1,85 @@
#ifndef MODULE_H
-#define MODULE_H
-
-#include "tux.h"
-#include "shot.h"
-#include "arena.h"
-#include "proto.h"
-#include "myTimer.h"
-
-#ifndef PUBLIC_SERVER
-#include "image.h"
-#endif
-
-#define MODULE_TYPE_UNIX ".so"
-#define MODULE_TYPE_APPLE ".dylib"
-#define MODULE_TYPE_WIN ".dll"
-
-typedef struct export_fce_s
-{
- int (*fce_getValue) (char *line, char *env, char *val, int len);
-
-#ifndef PUBLIC_SERVER
- image_t *(*fce_getImage) (char *group, char *name);
-
- void (*fce_addLayer) (image_t * img,
- int x, int y, int px, int py,
- int w, int h, int player);
-#endif
-
- int (*fce_getNetTypeGame) ();
- int (*fce_loadDepModule) (char *name);
- void (*fce_addToShareFce) (char *name, void *function);
- void *(*fce_getShareFce) (char *name);
-
- void (*fce_getTuxProportion) (tux_t * tux, int *x, int *y, int *w,
- int *h);
- void (*fce_setTuxProportion) (tux_t * tux, int x, int y);
- tux_t *(*fce_getTuxID) (list_t * listTux, int id);
- void (*fce_actionTux) (tux_t * tux, int action);
-
- arena_t *(*fce_getCurrentArena) ();
- int (*fce_conflictSpace) (int x1, int y1, int w1, int h1, int x2, int y2,
- int w2, int h2);
- int (*fce_isFreeSpace) (arena_t * arena, int x, int y, int w, int h);
- void (*fce_findFreeSpace) (arena_t * arena, int *x, int *y, int w, int h);
- void (*fce_proto_send_module_server) (int type, client_t * client,
- char *msg);
- void (*fce_proto_send_module_client) (char *msg);
-
- my_time_t(*fce_getMyTime) ();
-
- void (*fce_destroyShot) (shot_t * p);
- void (*fce_boundBombBall) (shot_t * shot);
- void (*fce_transformOnlyLasser) (shot_t * shot);
+# define MODULE_H
+
+# include "tux.h"
+# include "shot.h"
+# include "arena.h"
+# include "proto.h"
+# include "myTimer.h"
+
+# ifndef PUBLIC_SERVER
+# include "image.h"
+# endif
+
+# define MODULE_TYPE_UNIX ".so"
+# define MODULE_TYPE_APPLE ".dylib"
+# define MODULE_TYPE_WIN ".dll"
+
+typedef struct export_fce_s {
+ int (*fce_getValue) (char *line, char *env, char *val, int len);
+
+# ifndef PUBLIC_SERVER
+ image_t *(*fce_getImage) (char *group, char *name);
+
+ void (*fce_addLayer) (image_t * img,
+ int x, int y, int px, int py,
+ int w, int h, int player);
+# endif
+
+ int (*fce_getNetTypeGame) ();
+ int (*fce_loadDepModule) (char *name);
+ void (*fce_addToShareFce) (char *name, void *function);
+ void *(*fce_getShareFce) (char *name);
+
+ void (*fce_getTuxProportion) (tux_t * tux, int *x, int *y, int *w, int *h);
+ void (*fce_setTuxProportion) (tux_t * tux, int x, int y);
+ tux_t *(*fce_getTuxID) (list_t * listTux, int id);
+ void (*fce_actionTux) (tux_t * tux, int action);
+
+ arena_t *(*fce_getCurrentArena) ();
+ int (*fce_conflictSpace) (int x1, int y1, int w1, int h1, int x2, int y2,
+ int w2, int h2);
+ int (*fce_isFreeSpace) (arena_t * arena, int x, int y, int w, int h);
+ void (*fce_findFreeSpace) (arena_t * arena, int *x, int *y, int w, int h);
+ void (*fce_proto_send_module_server) (int type, client_t * client,
+ char *msg);
+ void (*fce_proto_send_module_client) (char *msg);
+
+ my_time_t(*fce_getMyTime) ();
+
+ void (*fce_destroyShot) (shot_t * p);
+ void (*fce_boundBombBall) (shot_t * shot);
+ void (*fce_transformOnlyLasser) (shot_t * shot);
} export_fce_t;
-typedef struct module_s
-{
- char *name;
-#ifndef __WIN32__
- void *image;
-#else
- HINSTANCE *image;
-#endif
-
- int (*fce_init) (export_fce_t * p);
-#ifndef PUBLIC_SERVER
- int (*fce_draw) (int x, int y, int w, int h);
-#endif
- int (*fce_event) ();
- int (*fce_isConflict) (int x, int y, int w, int h);
- void (*fce_cmd) (char *line);
- void (*fce_recvMsg) (char *msg);
- int (*fce_destroy) ();
+typedef struct module_s {
+ char *name;
+# ifndef __WIN32__
+ void *image;
+# else
+ HINSTANCE *image;
+# endif
+
+ int (*fce_init) (export_fce_t * p);
+# ifndef PUBLIC_SERVER
+ int (*fce_draw) (int x, int y, int w, int h);
+# endif
+ int (*fce_event) ();
+ int (*fce_isConflict) (int x, int y, int w, int h);
+ void (*fce_cmd) (char *line);
+ void (*fce_recvMsg) (char *msg);
+ int (*fce_destroy) ();
} module_t;
extern void initModule();
extern int loadModule(char *name);
extern int loadDepModule(char *name);
-#ifndef PUBLIC_SERVER
+# ifndef PUBLIC_SERVER
extern void drawModule(int x, int y, int w, int h);
-#endif
+# endif
extern void eventModule();
extern void cmdModule(char *s);
extern int isConflictModule(int x, int y, int w, int h);