summaryrefslogtreecommitdiff
path: root/src/modules/modTeleport.c
diff options
context:
space:
mode:
authorTomas 'ZeXx86' Jedrzejek <zexx86@gmail.com>2009-12-10 17:38:09 +0100
committerTomas 'ZeXx86' Jedrzejek <zexx86@gmail.com>2009-12-10 17:38:09 +0100
commitf1ebdbfdbe4d3ce7fc6eaa6a164134b06cfb9603 (patch)
treeab298dc2b7730d6009cec40b69a31044de86c501 /src/modules/modTeleport.c
parentcee6589f0dc39ffdbfe2c8faa1e8a0c40f848257 (diff)
Total conversion of the shared modules to static, fix warning in arenaFile.c, improvements in some areas of a
code
Diffstat (limited to 'src/modules/modTeleport.c')
-rw-r--r--src/modules/modTeleport.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/modules/modTeleport.c b/src/modules/modTeleport.c
index 289f553..0285ca0 100644
--- a/src/modules/modTeleport.c
+++ b/src/modules/modTeleport.c
@@ -49,9 +49,9 @@ static void (*fce_move_shot) (shot_t *shot, int position, int src_x,
int dist_h);
#ifndef PUBLIC_SERVER
-teleport_t *newTeleport(int x, int y, int w, int h, int layer, image_t *img)
+static teleport_t *newTeleport(int x, int y, int w, int h, int layer, image_t *img)
#else
-teleport_t *newTeleport(int x, int y, int w, int h, int layer)
+static teleport_t *newTeleport(int x, int y, int w, int h, int layer)
#endif
{
static int last_id = 0;
@@ -218,7 +218,7 @@ static void moveShotFromTeleport(shot_t *shot, teleport_t *teleport, space_t *sp
distTeleport->h);
}
-int init(export_fce_t *p)
+static int init(export_fce_t *p)
{
export_fce = p;
@@ -248,7 +248,7 @@ static void action_drawteleport(space_t *space, teleport_t *teleport, void *p)
drawTeleport(teleport);
}
-int draw(int x, int y, int w, int h)
+static int draw(int x, int y, int w, int h)
{
if (spaceTeleport == NULL) {
return 0;
@@ -304,7 +304,7 @@ static void action_eventtux(space_t *space, tux_t *tux, space_t *p_spaceTeleport
space_action_from_location(p_spaceTeleport, action_eventteleporttux, tux, x, y, w, h);
}
-int event()
+static int event()
{
if (spaceTeleport == NULL) {
return 0;
@@ -320,7 +320,7 @@ int event()
return 0;
}
-int isConflict(int x, int y, int w, int h)
+static int isConflict(int x, int y, int w, int h)
{
UNUSED(x);
UNUSED(y);
@@ -334,20 +334,28 @@ int isConflict(int x, int y, int w, int h)
return 0;
}
-void cmdArena(char *line)
+static void cmdArena(char *line)
{
if (strncmp(line, "teleport", 8) == 0)
cmd_teleport(line);
}
-void recvMsg(char *msg)
+static void recvMsg(char *msg)
{
UNUSED(msg);
}
-int destroy()
+static int destroy()
{
space_destroy_with_item(spaceTeleport, destroyTeleport);
list_destroy(listTeleport);
return 0;
}
+
+mod_sym_t modteleport_sym = { &init,
+ &draw,
+ &event,
+ &isConflict,
+ &cmdArena,
+ &recvMsg,
+ &destroy }; \ No newline at end of file