summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2008-12-11 19:38:00 +0100
committerTomas Chvatal <scarabeus@gentoo.org>2008-12-11 19:38:00 +0100
commit3ba6105170ecac2fb124d9eb7e81ba72dd4700b8 (patch)
treeec30e2b1dda198c9646ea3447308368bbe334500 /src/base
parentb2d2cf4f53748051ace835d27564cb2922c13db9 (diff)
First pass for renaming screen/widget.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/arena.c86
-rw-r--r--src/base/arena.h4
-rw-r--r--src/base/gun.c2
-rw-r--r--src/base/item.c4
-rw-r--r--src/base/net_multiplayer.c4
-rw-r--r--src/base/proto.c10
-rw-r--r--src/base/proto.h6
-rw-r--r--src/base/server.c2
-rw-r--r--src/base/serverSendMsg.c2
-rw-r--r--src/base/shot.c8
-rw-r--r--src/base/tcp_server.c2
-rw-r--r--src/base/tux.c2
-rw-r--r--src/base/udp_server.c2
13 files changed, 67 insertions, 67 deletions
diff --git a/src/base/arena.c b/src/base/arena.c
index 4658e08..541ef0d 100644
--- a/src/base/arena.c
+++ b/src/base/arena.c
@@ -14,8 +14,8 @@
#ifndef PUBLIC_SERVER
# include "hotKey.h"
-# include "screen_world.h"
-# include "screen_setting.h"
+# include "world.h"
+# include "setting.h"
# include "layer.h"
#endif
@@ -168,45 +168,45 @@ void findFreeSpace(arena_t * arena, int *x, int *y, int w, int h)
*y = z_y;
}
-void getCenterScreen(int *screen_x, int *screen_y, int x, int y, int screen_size_x, int screen_size_y)
+void getCenterScreen(int *x, int *y, int x, int y, int size_x, int size_y)
{
arena_t *arena;
arena = getCurrentArena();
- *screen_x = x - screen_size_x / 2;
- *screen_y = y - screen_size_y / 2;
+ *x = x - size_x / 2;
+ *y = y - size_y / 2;
- if (*screen_x < 0) {
- *screen_x = 0;
+ if (*x < 0) {
+ *x = 0;
}
- if (*screen_y < 0) {
- *screen_y = 0;
+ if (*y < 0) {
+ *y = 0;
}
- if (*screen_x + screen_size_x >= arena->w) {
- *screen_x = arena->w - screen_size_x;
+ if (*x + size_x >= arena->w) {
+ *x = arena->w - size_x;
}
- if (*screen_y + screen_size_y >= arena->h) {
- *screen_y = arena->h - screen_size_y;
+ if (*y + size_y >= arena->h) {
+ *y = arena->h - size_y;
}
}
#ifndef PUBLIC_SERVER
-static void drawBackground(arena_t * arena, int screen_x, int screen_y)
+static void drawBackground(arena_t * arena, int x, int y)
{
if (isBigArena(arena)) {
int i, j;
- for (i = screen_y / arena->background->h;
- i <= screen_y / arena->background->h + WINDOW_SIZE_Y / arena->background->h + 1; i++) {
+ for (i = y / arena->background->h;
+ i <= y / arena->background->h + WINDOW_SIZE_Y / arena->background->h + 1; i++) {
- for (j = screen_x / arena->background->w;
- j <= screen_x / arena->background->w + WINDOW_SIZE_X / arena->background->w + 1; j++) {
+ for (j = x / arena->background->w;
+ j <= x / arena->background->w + WINDOW_SIZE_X / arena->background->w + 1; j++) {
addLayer(arena->background, j * arena->background->w,
i * arena->background->h, 0, 0, arena->background->w,
@@ -235,46 +235,46 @@ static void action_drawShot(space_t * space, shot_t * shot, void *p)
drawShot(shot);
}
-static void drawObjects(arena_t * arena, int screen_x, int screen_y)
+static void drawObjects(arena_t * arena, int x, int y)
{
- actionSpaceFromLocation(arena->spaceTux, action_drawTux, NULL, screen_x, screen_y, WINDOW_SIZE_X, WINDOW_SIZE_Y);
- actionSpaceFromLocation(arena->spaceItem, action_drawItem, NULL, screen_x, screen_y, WINDOW_SIZE_X, WINDOW_SIZE_Y);
- actionSpaceFromLocation(arena->spaceShot, action_drawShot, NULL, screen_x, screen_y, WINDOW_SIZE_X, WINDOW_SIZE_Y);
+ actionSpaceFromLocation(arena->spaceTux, action_drawTux, NULL, x, y, WINDOW_SIZE_X, WINDOW_SIZE_Y);
+ actionSpaceFromLocation(arena->spaceItem, action_drawItem, NULL, x, y, WINDOW_SIZE_X, WINDOW_SIZE_Y);
+ actionSpaceFromLocation(arena->spaceShot, action_drawShot, NULL, x, y, WINDOW_SIZE_X, WINDOW_SIZE_Y);
- drawModule(screen_x, screen_y, WINDOW_SIZE_X, WINDOW_SIZE_Y);
+ drawModule(x, y, WINDOW_SIZE_X, WINDOW_SIZE_Y);
}
static void drawSplitArenaForTux(arena_t * arena, tux_t * tux, int location_x, int location_y)
{
- int screen_x, screen_y;
+ int x, y;
switch (splitType) {
case SCREEN_SPLIT_HORIZONTAL:
- getCenterScreen(&screen_x, &screen_y, tux->x, tux->y, WINDOW_SIZE_X, WINDOW_SIZE_Y / 2);
+ getCenterScreen(&x, &y, tux->x, tux->y, WINDOW_SIZE_X, WINDOW_SIZE_Y / 2);
break;
case SCREEN_SPLIT_VERTICAL:
- getCenterScreen(&screen_x, &screen_y, tux->x, tux->y, WINDOW_SIZE_X / 2, WINDOW_SIZE_Y);
+ getCenterScreen(&x, &y, tux->x, tux->y, WINDOW_SIZE_X / 2, WINDOW_SIZE_Y);
break;
default:
- screen_x = -1;
- screen_y = -1;
+ x = -1;
+ y = -1;
assert(!"stupd error ");
break;
}
- drawBackground(arena, screen_x, screen_y);
- drawObjects(arena, screen_x, screen_y);
+ drawBackground(arena, x, y);
+ drawObjects(arena, x, y);
switch (splitType) {
case SCREEN_SPLIT_HORIZONTAL:
- drawLayerSplit(location_x, location_y, screen_x, screen_y, WINDOW_SIZE_X, WINDOW_SIZE_Y / 2);
+ drawLayerSplit(location_x, location_y, x, y, WINDOW_SIZE_X, WINDOW_SIZE_Y / 2);
break;
case SCREEN_SPLIT_VERTICAL:
- drawLayerSplit(location_x, location_y, screen_x, screen_y, WINDOW_SIZE_X / 2, WINDOW_SIZE_Y);
+ drawLayerSplit(location_x, location_y, x, y, WINDOW_SIZE_X / 2, WINDOW_SIZE_Y);
break;
default:
- screen_x = -1;
- screen_y = -1;
+ x = -1;
+ y = -1;
assert(!"stupd error ");
break;
}
@@ -306,17 +306,17 @@ void drawSplitArena(arena_t * arena)
void drawCenterArena(arena_t * arena, int x, int y)
{
- int screen_x, screen_y;
+ int x, y;
- getCenterScreen(&screen_x, &screen_y, x, y, WINDOW_SIZE_X, WINDOW_SIZE_Y);
- drawBackground(arena, screen_x, screen_y);
- drawObjects(arena, screen_x, screen_y);
+ getCenterScreen(&x, &y, x, y, WINDOW_SIZE_X, WINDOW_SIZE_Y);
+ drawBackground(arena, x, y);
+ drawObjects(arena, x, y);
drawLayerCenter(x, y);
}
void drawSimpleArena(arena_t * arena)
{
- int screen_x, screen_y;
+ int x, y;
tux_t *tux = NULL;
tux = getControlTux(TUX_CONTROL_KEYBOARD_RIGHT);
@@ -325,11 +325,11 @@ void drawSimpleArena(arena_t * arena)
return;
}
- screen_x = 0;
- screen_y = 0;
+ x = 0;
+ y = 0;
- drawBackground(arena, screen_x, screen_y);
- drawObjects(arena, screen_x, screen_y);
+ drawBackground(arena, x, y);
+ drawObjects(arena, x, y);
drawLayer(tux->x, tux->y);
}
diff --git a/src/base/arena.h b/src/base/arena.h
index 14f0f1f..db00d36 100644
--- a/src/base/arena.h
+++ b/src/base/arena.h
@@ -47,8 +47,8 @@ extern int conflictSpace(int x1, int y1, int w1, int h1, int x2, int y2,
int w2, int h2);
extern int isFreeSpace(arena_t * arena, int x, int y, int w, int h);
extern void findFreeSpace(arena_t * arena, int *x, int *y, int w, int h);
-extern void getCenterScreen(int *screen_x, int *screen_y, int x, int y,
- int screen_size_x, int screen_size_y);
+extern void getCenterScreen(int *x, int *y, int x, int y,
+ int size_x, int size_y);
# ifndef PUBLIC_SERVER
extern void drawArena(arena_t * arena);
# endif
diff --git a/src/base/gun.c b/src/base/gun.c
index 27f88bd..d357349 100644
--- a/src/base/gun.c
+++ b/src/base/gun.c
@@ -19,7 +19,7 @@
#endif
#ifndef PUBLIC_SERVER
# include "interface.h"
-# include "screen_world.h"
+# include "world.h"
#endif
#ifdef PUBLIC_SERVER
# include "publicServer.h"
diff --git a/src/base/item.c b/src/base/item.c
index 822d6b4..75074bc 100644
--- a/src/base/item.c
+++ b/src/base/item.c
@@ -19,8 +19,8 @@
# include "radar.h"
# include "layer.h"
-# include "screen_world.h"
-# include "screen_setting.h"
+# include "world.h"
+# include "setting.h"
# ifndef NO_SOUND
# include "sound.h"
diff --git a/src/base/net_multiplayer.c b/src/base/net_multiplayer.c
index f59b3b2..cb9ca59 100644
--- a/src/base/net_multiplayer.c
+++ b/src/base/net_multiplayer.c
@@ -15,8 +15,8 @@
#include "udp.h"
#ifndef PUBLIC_SERVER
-# include "screen_setting.h"
-# include "screen_choiceArena.h"
+# include "setting.h"
+# include "choiceArena.h"
# include "screen.h"
# include "client.h"
diff --git a/src/base/proto.c b/src/base/proto.c
index 606dd33..f927dfa 100644
--- a/src/base/proto.c
+++ b/src/base/proto.c
@@ -21,11 +21,11 @@
#include "serverSendMsg.h"
#ifndef PUBLIC_SERVER
-# include "screen_world.h"
-# include "screen_setting.h"
-# include "screen_choiceArena.h"
-# include "screen_analyze.h"
-# include "screen_downArena.h"
+# include "world.h"
+# include "setting.h"
+# include "choiceArena.h"
+# include "analyze.h"
+# include "downArena.h"
# include "client.h"
# include "term.h"
# include "radar.h"
diff --git a/src/base/proto.h b/src/base/proto.h
index 590317b..8cd7568 100644
--- a/src/base/proto.h
+++ b/src/base/proto.h
@@ -18,9 +18,9 @@
# include "net_multiplayer.h"
# ifndef PUBLIC_SERVER
-# include "screen_world.h"
-# include "screen_setting.h"
-# include "screen_choiceArena.h"
+# include "world.h"
+# include "setting.h"
+# include "choiceArena.h"
# include "client.h"
# endif
diff --git a/src/base/server.c b/src/base/server.c
index 2112927..5f16ef7 100644
--- a/src/base/server.c
+++ b/src/base/server.c
@@ -33,7 +33,7 @@
#include "downServer.h"
#ifndef PUBLIC_SERVER
-# include "screen_world.h"
+# include "world.h"
#endif
#ifdef PUBLIC_SERVER
diff --git a/src/base/serverSendMsg.c b/src/base/serverSendMsg.c
index e7d1c09..e38975f 100644
--- a/src/base/serverSendMsg.c
+++ b/src/base/serverSendMsg.c
@@ -11,7 +11,7 @@
#include "serverSendMsg.h"
#ifndef PUBLIC_SERVER
-# include "screen_world.h"
+# include "world.h"
#endif
static void addMsgClient(client_t * p, char *msg, int type, int id)
diff --git a/src/base/shot.c b/src/base/shot.c
index 977ccb4..759f00c 100644
--- a/src/base/shot.c
+++ b/src/base/shot.c
@@ -14,7 +14,7 @@
#ifndef PUBLIC_SERVER
# include "image.h"
# include "layer.h"
-# include "screen_world.h"
+# include "world.h"
#endif
#ifdef PUBLIC_SERVER
@@ -303,7 +303,7 @@ static void action_check(space_t * space, shot_t * shot, client_t * client)
void checkShotIsInTuxScreen(arena_t * arena)
{
- int screen_x, screen_y;
+ int x, y;
tux_t *thisTux;
client_t *thisClient;
list_t *listClient;
@@ -324,11 +324,11 @@ void checkShotIsInTuxScreen(arena_t * arena)
continue;
}
- getCenterScreen(&screen_x, &screen_y, thisTux->x, thisTux->y,
+ getCenterScreen(&x, &y, thisTux->x, thisTux->y,
WINDOW_SIZE_X, WINDOW_SIZE_Y);
actionSpaceFromLocation(arena->spaceShot, action_check,
- thisClient, screen_x, screen_y,
+ thisClient, x, y,
WINDOW_SIZE_X, WINDOW_SIZE_Y);
while (thisClient->listSeesShot->count > 100) {
diff --git a/src/base/tcp_server.c b/src/base/tcp_server.c
index b781fb5..de5ac39 100644
--- a/src/base/tcp_server.c
+++ b/src/base/tcp_server.c
@@ -30,7 +30,7 @@
#include "index.h"
#ifndef PUBLIC_SERVER
-# include "screen_world.h"
+# include "world.h"
#endif
#ifdef PUBLIC_SERVER
diff --git a/src/base/tux.c b/src/base/tux.c
index 746679d..5bb2305 100644
--- a/src/base/tux.c
+++ b/src/base/tux.c
@@ -28,7 +28,7 @@
# include "sound.h"
# endif
-# include "screen_world.h"
+# include "world.h"
#endif
#ifdef PUBLIC_SERVER
diff --git a/src/base/udp_server.c b/src/base/udp_server.c
index a469a3a..fc65d19 100644
--- a/src/base/udp_server.c
+++ b/src/base/udp_server.c
@@ -30,7 +30,7 @@
#include "index.h"
#ifndef PUBLIC_SERVER
-# include "screen_world.h"
+# include "world.h"
#endif
#ifdef PUBLIC_SERVER