summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2008-12-11 19:39:49 +0100
committerTomas Chvatal <scarabeus@gentoo.org>2008-12-11 19:39:49 +0100
commita83321436c8d40210bbbd0a44fe1290ed71638af (patch)
tree02004c36772311bdc1ba6b9a2508b20691cca5c6 /src/client
parent3ba6105170ecac2fb124d9eb7e81ba72dd4700b8 (diff)
Revert "First pass for renaming screen/widget."
This reverts commit 3ba6105170ecac2fb124d9eb7e81ba72dd4700b8.
Diffstat (limited to 'src/client')
-rw-r--r--src/client/chat.c2
-rw-r--r--src/client/client.c4
-rw-r--r--src/client/game.c24
-rw-r--r--src/client/layer.c20
-rw-r--r--src/client/saveDialog.c2
-rw-r--r--src/client/saveLoad.c4
-rw-r--r--src/client/screen.c20
-rw-r--r--src/client/screen.h10
8 files changed, 43 insertions, 43 deletions
diff --git a/src/client/chat.c b/src/client/chat.c
index b446b08..6ca9ec9 100644
--- a/src/client/chat.c
+++ b/src/client/chat.c
@@ -11,7 +11,7 @@
#include "serverSendMsg.h"
#include "net_multiplayer.h"
-#include "world.h"
+#include "screen_world.h"
#include "proto.h"
#include "interface.h"
#include "chat.h"
diff --git a/src/client/client.c b/src/client/client.c
index 1902be6..e92a238 100644
--- a/src/client/client.c
+++ b/src/client/client.c
@@ -23,8 +23,8 @@
#include "client.h"
-#include "analyze.h"
-#include "world.h"
+#include "screen_analyze.h"
+#include "screen_world.h"
#include "buffer.h"
#include "udp.h"
diff --git a/src/client/game.c b/src/client/game.c
index 87676d5..e96805b 100644
--- a/src/client/game.c
+++ b/src/client/game.c
@@ -20,7 +20,7 @@
#include "interface.h"
#include "screen.h"
#include "font.h"
-#include "settingKeys.h"
+#include "screen_settingKeys.h"
#include "panel.h"
#include "radar.h"
@@ -30,17 +30,17 @@
# include "music.h"
#endif
-#include "world.h"
-#include "mainMenu.h"
-#include "analyze.h"
-#include "setting.h"
-#include "settingKeys.h"
-#include "gameType.h"
-#include "downArena.h"
-#include "choiceArena.h"
-#include "table.h"
-#include "credits.h"
-#include "browser.h"
+#include "screen_world.h"
+#include "screen_mainMenu.h"
+#include "screen_analyze.h"
+#include "screen_setting.h"
+#include "screen_settingKeys.h"
+#include "screen_gameType.h"
+#include "screen_downArena.h"
+#include "screen_choiceArena.h"
+#include "screen_table.h"
+#include "screen_credits.h"
+#include "screen_browser.h"
static void initGame()
{
diff --git a/src/client/layer.c b/src/client/layer.c
index b6055be..983a9c8 100644
--- a/src/client/layer.c
+++ b/src/client/layer.c
@@ -10,7 +10,7 @@
#include "layer.h"
#include "image.h"
-#include "world.h"
+#include "screen_world.h"
static list_t *listLayer;
@@ -125,27 +125,27 @@ void drawLayer()
void drawLayerCenter(int x, int y)
{
layer_t *this;
- int x, y;
+ int screen_x, screen_y;
int i;
//int count = 0;
- getCenterScreen(&x, &y, x, y, WINDOW_SIZE_X, WINDOW_SIZE_Y);
+ getCenterScreen(&screen_x, &screen_y, x, y, WINDOW_SIZE_X, WINDOW_SIZE_Y);
for (i = 0; i < listLayer->count; i++) {
this = (layer_t *) listLayer->list[i];
- if (this->x + this->w < x ||
- this->x > x + WINDOW_SIZE_X ||
- this->y + this->h < y ||
- this->y > y + WINDOW_SIZE_Y) {
+ if (this->x + this->w < screen_x ||
+ this->x > screen_x + WINDOW_SIZE_X ||
+ this->y + this->h < screen_y ||
+ this->y > screen_y + WINDOW_SIZE_Y) {
continue;
}
//count++;
- drawImage(this->image, this->x - x, this->y - y,
+ drawImage(this->image, this->x - screen_x, this->y - screen_y,
this->px, this->py, this->w, this->h);
- //printf("%d %d\n", this->x - x, this->y - y);
+ //printf("%d %d\n", this->x - screen_x, this->y - screen_y);
}
//printf("count = %d\n", count);
@@ -201,7 +201,7 @@ void drawLayerSplit(int local_x, int local_y, int x, int y, int w, int h)
drawImage(this->image, local_x + (this->x - x), local_y + (this->y - y),
this->px, this->py, this->w, this->h);
- //printf("%d %d\n", this->x - x, this->y - y);
+ //printf("%d %d\n", this->x - screen_x, this->y - screen_y);
}
//printf("count = %d\n", count);
diff --git a/src/client/saveDialog.c b/src/client/saveDialog.c
index dbf79d7..1c832e7 100644
--- a/src/client/saveDialog.c
+++ b/src/client/saveDialog.c
@@ -64,7 +64,7 @@ void initSaveDialog()
{
activeSaveDialog = FALSE;
- g_background = getImage(IMAGE_GROUP_BASE, "main");
+ g_background = getImage(IMAGE_GROUP_BASE, "screen_main");
widgetLabelMsg = newWidgetLabel("name", SAVE_DIALOG_LOCATIN_X + 20,
SAVE_DIALOG_LOCATIN_Y + 20,
diff --git a/src/client/saveLoad.c b/src/client/saveLoad.c
index 0448a4f..b5dbdf2 100644
--- a/src/client/saveLoad.c
+++ b/src/client/saveLoad.c
@@ -16,8 +16,8 @@
#include "saveLoad.h"
-#include "choiceArena.h"
-#include "world.h"
+#include "screen_choiceArena.h"
+#include "screen_world.h"
static void action_saveTux(space_t * space, tux_t * tux, textFile_t * textFile)
{
diff --git a/src/client/screen.c b/src/client/screen.c
index 453aae3..71d48d8 100644
--- a/src/client/screen.c
+++ b/src/client/screen.c
@@ -12,8 +12,8 @@
//#define DEBUG_TIME_DRAW
-static t *currentScreen;
-static t *futureScreen;
+static screen_t *currentScreen;
+static screen_t *futureScreen;
static list_t *listScreen;
@@ -24,10 +24,10 @@ bool_t isScreenInicialized()
return isScreenInit;
}
-t *newScreen(char *name, void (*fce_start) (), void (*fce_event) (),
+screen_t *newScreen(char *name, void (*fce_start) (), void (*fce_event) (),
void (*fce_draw) (), void (*fce_stop) ())
{
- t *new;
+ screen_t *new;
assert(name != NULL);
assert(fce_start != NULL);
@@ -35,7 +35,7 @@ t *newScreen(char *name, void (*fce_start) (), void (*fce_event) (),
assert(fce_draw != NULL);
assert(fce_stop != NULL);
- new = malloc(sizeof(t));
+ new = malloc(sizeof(screen_t));
new->name = strdup(name);
new->fce_start = fce_start;
new->fce_event = fce_event;
@@ -45,7 +45,7 @@ t *newScreen(char *name, void (*fce_start) (), void (*fce_event) (),
return new;
}
-void destroyScreen(t * p)
+void destroyScreen(screen_t * p)
{
assert(p != NULL);
@@ -53,7 +53,7 @@ void destroyScreen(t * p)
free(p);
}
-void registerScreen(t * p)
+void registerScreen(screen_t * p)
{
assert(p != NULL);
@@ -72,13 +72,13 @@ void initScreen()
isScreenInit = TRUE;
}
-static t *findScreen(char *name)
+static screen_t *findScreen(char *name)
{
- t *this;
+ screen_t *this;
int i;
for (i = 0; i < listScreen->count; i++) {
- this = (t *) (listScreen->list[i]);
+ this = (screen_t *) (listScreen->list[i]);
assert(this != NULL);
if (strcmp(name, this->name) == 0) {
diff --git a/src/client/screen.h b/src/client/screen.h
index 77a1a16..3227bfe 100644
--- a/src/client/screen.h
+++ b/src/client/screen.h
@@ -5,22 +5,22 @@
# include "main.h"
-typedef struct struct {
+typedef struct screen_struct {
char *name;
void (*fce_start) ();
void (*fce_event) ();
void (*fce_draw) ();
void (*fce_stop) ();
-} t;
+} screen_t;
extern bool_t isScreenInicialized();
-extern t *newScreen(char *name,
+extern screen_t *newScreen(char *name,
void (*fce_start) (), void (*fce_event) (),
void (*fce_draw) (), void (*fce_stop) ());
-extern void destroyScreen(t * p);
-extern void registerScreen(t * p);
+extern void destroyScreen(screen_t * p);
+extern void registerScreen(screen_t * p);
extern void initScreen();
extern void setScreen(char *name);
extern void switchScreen();