diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 22 | ||||
| -rw-r--r-- | src/base/arena.c | 86 | ||||
| -rw-r--r-- | src/base/arena.h | 4 | ||||
| -rw-r--r-- | src/base/gun.c | 2 | ||||
| -rw-r--r-- | src/base/item.c | 4 | ||||
| -rw-r--r-- | src/base/net_multiplayer.c | 4 | ||||
| -rw-r--r-- | src/base/proto.c | 10 | ||||
| -rw-r--r-- | src/base/proto.h | 6 | ||||
| -rw-r--r-- | src/base/server.c | 2 | ||||
| -rw-r--r-- | src/base/serverSendMsg.c | 2 | ||||
| -rw-r--r-- | src/base/shot.c | 8 | ||||
| -rw-r--r-- | src/base/tcp_server.c | 2 | ||||
| -rw-r--r-- | src/base/tux.c | 2 | ||||
| -rw-r--r-- | src/base/udp_server.c | 2 | ||||
| -rw-r--r-- | src/client/chat.c | 2 | ||||
| -rw-r--r-- | src/client/client.c | 4 | ||||
| -rw-r--r-- | src/client/game.c | 24 | ||||
| -rw-r--r-- | src/client/layer.c | 20 | ||||
| -rw-r--r-- | src/client/saveDialog.c | 2 | ||||
| -rw-r--r-- | src/client/saveLoad.c | 4 | ||||
| -rw-r--r-- | src/client/screen.c | 20 | ||||
| -rw-r--r-- | src/client/screen.h | 10 | ||||
| -rw-r--r-- | src/screen/screen_analyze.c (renamed from src/screen/analyze.c) | 6 | ||||
| -rw-r--r-- | src/screen/screen_analyze.h (renamed from src/screen/analyze.h) | 0 | ||||
| -rw-r--r-- | src/screen/screen_browser.c (renamed from src/screen/browser.c) | 6 | ||||
| -rw-r--r-- | src/screen/screen_browser.h (renamed from src/screen/browser.h) | 0 | ||||
| -rw-r--r-- | src/screen/screen_choiceArena.c (renamed from src/screen/choiceArena.c) | 6 | ||||
| -rw-r--r-- | src/screen/screen_choiceArena.h (renamed from src/screen/choiceArena.h) | 0 | ||||
| -rw-r--r-- | src/screen/screen_credits.c (renamed from src/screen/credits.c) | 4 | ||||
| -rw-r--r-- | src/screen/screen_credits.h (renamed from src/screen/credits.h) | 0 | ||||
| -rw-r--r-- | src/screen/screen_downArena.c (renamed from src/screen/downArena.c) | 8 | ||||
| -rw-r--r-- | src/screen/screen_downArena.h (renamed from src/screen/downArena.h) | 0 | ||||
| -rw-r--r-- | src/screen/screen_gameType.c (renamed from src/screen/gameType.c) | 6 | ||||
| -rw-r--r-- | src/screen/screen_gameType.h (renamed from src/screen/gameType.h) | 0 | ||||
| -rw-r--r-- | src/screen/screen_mainMenu.c (renamed from src/screen/mainMenu.c) | 6 | ||||
| -rw-r--r-- | src/screen/screen_mainMenu.h (renamed from src/screen/mainMenu.h) | 0 | ||||
| -rw-r--r-- | src/screen/screen_setting.c (renamed from src/screen/setting.c) | 12 | ||||
| -rw-r--r-- | src/screen/screen_setting.h (renamed from src/screen/setting.h) | 0 | ||||
| -rw-r--r-- | src/screen/screen_settingKeys.c (renamed from src/screen/settingKeys.c) | 8 | ||||
| -rw-r--r-- | src/screen/screen_settingKeys.h (renamed from src/screen/settingKeys.h) | 0 | ||||
| -rw-r--r-- | src/screen/screen_table.c (renamed from src/screen/table.c) | 4 | ||||
| -rw-r--r-- | src/screen/screen_table.h (renamed from src/screen/table.h) | 0 | ||||
| -rw-r--r-- | src/screen/screen_world.c (renamed from src/screen/world.c) | 14 | ||||
| -rw-r--r-- | src/screen/screen_world.h (renamed from src/screen/world.h) | 0 | ||||
| -rw-r--r-- | src/widget/widget_button.c (renamed from src/widget/button.c) | 0 | ||||
| -rw-r--r-- | src/widget/widget_button.h (renamed from src/widget/button.h) | 0 | ||||
| -rw-r--r-- | src/widget/widget_buttonimage.c (renamed from src/widget/buttonimage.c) | 0 | ||||
| -rw-r--r-- | src/widget/widget_buttonimage.h (renamed from src/widget/buttonimage.h) | 0 | ||||
| -rw-r--r-- | src/widget/widget_catchkey.c (renamed from src/widget/catchkey.c) | 0 | ||||
| -rw-r--r-- | src/widget/widget_catchkey.h (renamed from src/widget/catchkey.h) | 0 | ||||
| -rw-r--r-- | src/widget/widget_check.c (renamed from src/widget/check.c) | 0 | ||||
| -rw-r--r-- | src/widget/widget_check.h (renamed from src/widget/check.h) | 0 | ||||
| -rw-r--r-- | src/widget/widget_choicegroup.c (renamed from src/widget/choicegroup.c) | 0 | ||||
| -rw-r--r-- | src/widget/widget_choicegroup.h (renamed from src/widget/choicegroup.h) | 0 | ||||
| -rw-r--r-- | src/widget/widget_image.c (renamed from src/widget/image.c) | 0 | ||||
| -rw-r--r-- | src/widget/widget_image.h (renamed from src/widget/image.h) | 0 | ||||
| -rw-r--r-- | src/widget/widget_label.c (renamed from src/widget/label.c) | 0 | ||||
| -rw-r--r-- | src/widget/widget_label.h (renamed from src/widget/label.h) | 0 | ||||
| -rw-r--r-- | src/widget/widget_select.c (renamed from src/widget/select.c) | 0 | ||||
| -rw-r--r-- | src/widget/widget_select.h (renamed from src/widget/select.h) | 0 | ||||
| -rw-r--r-- | src/widget/widget_textfield.c (renamed from src/widget/textfield.c) | 0 | ||||
| -rw-r--r-- | src/widget/widget_textfield.h (renamed from src/widget/textfield.h) | 0 |
62 files changed, 161 insertions, 161 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b9f642e..0b9de02 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -56,18 +56,18 @@ SET ( SRC_client ${WORKDIR}/client/pauza ${WORKDIR}/client/saveDialog ${WORKDIR}/client/hotKey - ${WORKDIR}/screen/choiceArena - ${WORKDIR}/screen/settingKeys ${WORKDIR}/screen/table - ${WORKDIR}/screen/setting ${WORKDIR}/screen/credits - ${WORKDIR}/screen/world ${WORKDIR}/screen/analyze - ${WORKDIR}/screen/mainMenu ${WORKDIR}/screen/browser - ${WORKDIR}/screen/gameType ${WORKDIR}/screen/downArena + ${WORKDIR}/screen/screen_choiceArena + ${WORKDIR}/screen/screen_settingKeys ${WORKDIR}/screen/screen_table + ${WORKDIR}/screen/screen_setting ${WORKDIR}/screen/screen_credits + ${WORKDIR}/screen/screen_world ${WORKDIR}/screen/screen_analyze + ${WORKDIR}/screen/screen_mainMenu ${WORKDIR}/screen/screen_browser + ${WORKDIR}/screen/screen_gameType ${WORKDIR}/screen/screen_downArena - ${WORKDIR}/widget/check ${WORKDIR}/widget/button - ${WORKDIR}/widget/textfield ${WORKDIR}/widget/label - ${WORKDIR}/widget/buttonimage ${WORKDIR}/widget/image - ${WORKDIR}/widget/select ${WORKDIR}/widget/catchkey - ${WORKDIR}/widget/choicegroup ${WORKDIR}/widget/widget + ${WORKDIR}/widget/widget_check ${WORKDIR}/widget/widget_button + ${WORKDIR}/widget/widget_textfield ${WORKDIR}/widget/widget_label + ${WORKDIR}/widget/widget_buttonimage ${WORKDIR}/widget/widget_image + ${WORKDIR}/widget/widget_select ${WORKDIR}/widget/widget_catchkey + ${WORKDIR}/widget/widget_choicegroup ${WORKDIR}/widget/widget ) SET ( SRC_audio diff --git a/src/base/arena.c b/src/base/arena.c index 541ef0d..4658e08 100644 --- a/src/base/arena.c +++ b/src/base/arena.c @@ -14,8 +14,8 @@ #ifndef PUBLIC_SERVER # include "hotKey.h" -# include "world.h" -# include "setting.h" +# include "screen_world.h" +# include "screen_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 *x, int *y, int x, int y, int size_x, int size_y) +void getCenterScreen(int *screen_x, int *screen_y, int x, int y, int screen_size_x, int screen_size_y) { arena_t *arena; arena = getCurrentArena(); - *x = x - size_x / 2; - *y = y - size_y / 2; + *screen_x = x - screen_size_x / 2; + *screen_y = y - screen_size_y / 2; - if (*x < 0) { - *x = 0; + if (*screen_x < 0) { + *screen_x = 0; } - if (*y < 0) { - *y = 0; + if (*screen_y < 0) { + *screen_y = 0; } - if (*x + size_x >= arena->w) { - *x = arena->w - size_x; + if (*screen_x + screen_size_x >= arena->w) { + *screen_x = arena->w - screen_size_x; } - if (*y + size_y >= arena->h) { - *y = arena->h - size_y; + if (*screen_y + screen_size_y >= arena->h) { + *screen_y = arena->h - screen_size_y; } } #ifndef PUBLIC_SERVER -static void drawBackground(arena_t * arena, int x, int y) +static void drawBackground(arena_t * arena, int screen_x, int screen_y) { if (isBigArena(arena)) { int i, j; - for (i = y / arena->background->h; - i <= y / arena->background->h + WINDOW_SIZE_Y / arena->background->h + 1; i++) { + for (i = screen_y / arena->background->h; + i <= screen_y / arena->background->h + WINDOW_SIZE_Y / arena->background->h + 1; i++) { - for (j = x / arena->background->w; - j <= x / arena->background->w + WINDOW_SIZE_X / arena->background->w + 1; j++) { + for (j = screen_x / arena->background->w; + j <= screen_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 x, int y) +static void drawObjects(arena_t * arena, int screen_x, int screen_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); + 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); - drawModule(x, y, WINDOW_SIZE_X, WINDOW_SIZE_Y); + drawModule(screen_x, screen_y, WINDOW_SIZE_X, WINDOW_SIZE_Y); } static void drawSplitArenaForTux(arena_t * arena, tux_t * tux, int location_x, int location_y) { - int x, y; + int screen_x, screen_y; switch (splitType) { case SCREEN_SPLIT_HORIZONTAL: - getCenterScreen(&x, &y, tux->x, tux->y, WINDOW_SIZE_X, WINDOW_SIZE_Y / 2); + getCenterScreen(&screen_x, &screen_y, tux->x, tux->y, WINDOW_SIZE_X, WINDOW_SIZE_Y / 2); break; case SCREEN_SPLIT_VERTICAL: - getCenterScreen(&x, &y, tux->x, tux->y, WINDOW_SIZE_X / 2, WINDOW_SIZE_Y); + getCenterScreen(&screen_x, &screen_y, tux->x, tux->y, WINDOW_SIZE_X / 2, WINDOW_SIZE_Y); break; default: - x = -1; - y = -1; + screen_x = -1; + screen_y = -1; assert(!"stupd error "); break; } - drawBackground(arena, x, y); - drawObjects(arena, x, y); + drawBackground(arena, screen_x, screen_y); + drawObjects(arena, screen_x, screen_y); switch (splitType) { case SCREEN_SPLIT_HORIZONTAL: - drawLayerSplit(location_x, location_y, x, y, WINDOW_SIZE_X, WINDOW_SIZE_Y / 2); + drawLayerSplit(location_x, location_y, screen_x, screen_y, WINDOW_SIZE_X, WINDOW_SIZE_Y / 2); break; case SCREEN_SPLIT_VERTICAL: - drawLayerSplit(location_x, location_y, x, y, WINDOW_SIZE_X / 2, WINDOW_SIZE_Y); + drawLayerSplit(location_x, location_y, screen_x, screen_y, WINDOW_SIZE_X / 2, WINDOW_SIZE_Y); break; default: - x = -1; - y = -1; + screen_x = -1; + screen_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 x, y; + int screen_x, screen_y; - getCenterScreen(&x, &y, x, y, WINDOW_SIZE_X, WINDOW_SIZE_Y); - drawBackground(arena, x, y); - drawObjects(arena, 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); drawLayerCenter(x, y); } void drawSimpleArena(arena_t * arena) { - int x, y; + int screen_x, screen_y; tux_t *tux = NULL; tux = getControlTux(TUX_CONTROL_KEYBOARD_RIGHT); @@ -325,11 +325,11 @@ void drawSimpleArena(arena_t * arena) return; } - x = 0; - y = 0; + screen_x = 0; + screen_y = 0; - drawBackground(arena, x, y); - drawObjects(arena, x, y); + drawBackground(arena, screen_x, screen_y); + drawObjects(arena, screen_x, screen_y); drawLayer(tux->x, tux->y); } diff --git a/src/base/arena.h b/src/base/arena.h index db00d36..14f0f1f 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 *x, int *y, int x, int y, - int size_x, int size_y); +extern void getCenterScreen(int *screen_x, int *screen_y, int x, int y, + int screen_size_x, int screen_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 d357349..27f88bd 100644 --- a/src/base/gun.c +++ b/src/base/gun.c @@ -19,7 +19,7 @@ #endif #ifndef PUBLIC_SERVER # include "interface.h" -# include "world.h" +# include "screen_world.h" #endif #ifdef PUBLIC_SERVER # include "publicServer.h" diff --git a/src/base/item.c b/src/base/item.c index 75074bc..822d6b4 100644 --- a/src/base/item.c +++ b/src/base/item.c @@ -19,8 +19,8 @@ # include "radar.h" # include "layer.h" -# include "world.h" -# include "setting.h" +# include "screen_world.h" +# include "screen_setting.h" # ifndef NO_SOUND # include "sound.h" diff --git a/src/base/net_multiplayer.c b/src/base/net_multiplayer.c index cb9ca59..f59b3b2 100644 --- a/src/base/net_multiplayer.c +++ b/src/base/net_multiplayer.c @@ -15,8 +15,8 @@ #include "udp.h" #ifndef PUBLIC_SERVER -# include "setting.h" -# include "choiceArena.h" +# include "screen_setting.h" +# include "screen_choiceArena.h" # include "screen.h" # include "client.h" diff --git a/src/base/proto.c b/src/base/proto.c index f927dfa..606dd33 100644 --- a/src/base/proto.c +++ b/src/base/proto.c @@ -21,11 +21,11 @@ #include "serverSendMsg.h" #ifndef PUBLIC_SERVER -# include "world.h" -# include "setting.h" -# include "choiceArena.h" -# include "analyze.h" -# include "downArena.h" +# include "screen_world.h" +# include "screen_setting.h" +# include "screen_choiceArena.h" +# include "screen_analyze.h" +# include "screen_downArena.h" # include "client.h" # include "term.h" # include "radar.h" diff --git a/src/base/proto.h b/src/base/proto.h index 8cd7568..590317b 100644 --- a/src/base/proto.h +++ b/src/base/proto.h @@ -18,9 +18,9 @@ # include "net_multiplayer.h" # ifndef PUBLIC_SERVER -# include "world.h" -# include "setting.h" -# include "choiceArena.h" +# include "screen_world.h" +# include "screen_setting.h" +# include "screen_choiceArena.h" # include "client.h" # endif diff --git a/src/base/server.c b/src/base/server.c index 5f16ef7..2112927 100644 --- a/src/base/server.c +++ b/src/base/server.c @@ -33,7 +33,7 @@ #include "downServer.h" #ifndef PUBLIC_SERVER -# include "world.h" +# include "screen_world.h" #endif #ifdef PUBLIC_SERVER diff --git a/src/base/serverSendMsg.c b/src/base/serverSendMsg.c index e38975f..e7d1c09 100644 --- a/src/base/serverSendMsg.c +++ b/src/base/serverSendMsg.c @@ -11,7 +11,7 @@ #include "serverSendMsg.h" #ifndef PUBLIC_SERVER -# include "world.h" +# include "screen_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 759f00c..977ccb4 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 "world.h" +# include "screen_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 x, y; + int screen_x, screen_y; tux_t *thisTux; client_t *thisClient; list_t *listClient; @@ -324,11 +324,11 @@ void checkShotIsInTuxScreen(arena_t * arena) continue; } - getCenterScreen(&x, &y, thisTux->x, thisTux->y, + getCenterScreen(&screen_x, &screen_y, thisTux->x, thisTux->y, WINDOW_SIZE_X, WINDOW_SIZE_Y); actionSpaceFromLocation(arena->spaceShot, action_check, - thisClient, x, y, + thisClient, screen_x, screen_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 de5ac39..b781fb5 100644 --- a/src/base/tcp_server.c +++ b/src/base/tcp_server.c @@ -30,7 +30,7 @@ #include "index.h" #ifndef PUBLIC_SERVER -# include "world.h" +# include "screen_world.h" #endif #ifdef PUBLIC_SERVER diff --git a/src/base/tux.c b/src/base/tux.c index 5bb2305..746679d 100644 --- a/src/base/tux.c +++ b/src/base/tux.c @@ -28,7 +28,7 @@ # include "sound.h" # endif -# include "world.h" +# include "screen_world.h" #endif #ifdef PUBLIC_SERVER diff --git a/src/base/udp_server.c b/src/base/udp_server.c index fc65d19..a469a3a 100644 --- a/src/base/udp_server.c +++ b/src/base/udp_server.c @@ -30,7 +30,7 @@ #include "index.h" #ifndef PUBLIC_SERVER -# include "world.h" +# include "screen_world.h" #endif #ifdef PUBLIC_SERVER 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(); diff --git a/src/screen/analyze.c b/src/screen/screen_analyze.c index 9af6aee..b249f81 100644 --- a/src/screen/analyze.c +++ b/src/screen/screen_analyze.c @@ -15,8 +15,8 @@ # include "music.h" #endif -#include "mainMenu.h" -#include "analyze.h" +#include "screen_mainMenu.h" +#include "screen_analyze.h" #include "widget.h" #include "widget_label.h" @@ -156,7 +156,7 @@ void initScreenAnalyze() { image_t *image; - image = getImage(IMAGE_GROUP_BASE, "main"); + image = getImage(IMAGE_GROUP_BASE, "screen_main"); image_backgorund = newWidgetImage(0, 0, image); listWidgetLabelName = newList(); diff --git a/src/screen/analyze.h b/src/screen/screen_analyze.h index 8f975b4..8f975b4 100644 --- a/src/screen/analyze.h +++ b/src/screen/screen_analyze.h diff --git a/src/screen/browser.c b/src/screen/screen_browser.c index 44d175e..f09ca18 100644 --- a/src/screen/browser.c +++ b/src/screen/screen_browser.c @@ -39,8 +39,8 @@ extern int errno; # include "music.h" #endif -#include "gameType.h" -#include "browser.h" +#include "screen_gameType.h" +#include "screen_browser.h" #include "widget.h" #include "widget_image.h" @@ -681,7 +681,7 @@ void initScreenBrowser() { image_t *image; - image = getImage(IMAGE_GROUP_BASE, "main"); + image = getImage(IMAGE_GROUP_BASE, "screen_main"); image_backgorund = newWidgetImage(0, 0, image); button_back = diff --git a/src/screen/browser.h b/src/screen/screen_browser.h index e810e58..e810e58 100644 --- a/src/screen/browser.h +++ b/src/screen/screen_browser.h diff --git a/src/screen/choiceArena.c b/src/screen/screen_choiceArena.c index 550f63e..7bc6ce4 100644 --- a/src/screen/choiceArena.c +++ b/src/screen/screen_choiceArena.c @@ -15,8 +15,8 @@ # include "music.h" #endif -#include "mainMenu.h" -#include "choiceArena.h" +#include "screen_mainMenu.h" +#include "screen_choiceArena.h" #include "widget.h" #include "widget_label.h" @@ -143,7 +143,7 @@ void initScreenChoiceArena() image_t *image; int i; - image = getImage(IMAGE_GROUP_BASE, "main"); + image = getImage(IMAGE_GROUP_BASE, "screen_main"); image_backgorund = newWidgetImage(0, 0, image); button_back = newWidgetButton(_("back"), 100, WINDOW_SIZE_Y - 100, eventWidget); diff --git a/src/screen/choiceArena.h b/src/screen/screen_choiceArena.h index dbe12de..dbe12de 100644 --- a/src/screen/choiceArena.h +++ b/src/screen/screen_choiceArena.h diff --git a/src/screen/credits.c b/src/screen/screen_credits.c index 0f2541b..a3ed787 100644 --- a/src/screen/credits.c +++ b/src/screen/screen_credits.c @@ -15,7 +15,7 @@ # include "music.h" #endif -#include "credits.h" +#include "screen_credits.h" #include "widget.h" #include "widget_image.h" @@ -105,7 +105,7 @@ void initScreenCredits() image_t *image; int i; - image = getImage(IMAGE_GROUP_BASE, "main"); + image = getImage(IMAGE_GROUP_BASE, "screen_main"); image_backgorund = newWidgetImage(0, 0, image); button_back = newWidgetButton(_("back"), WINDOW_SIZE_X / 2 - WIDGET_BUTTON_WIDTH / 2, diff --git a/src/screen/credits.h b/src/screen/screen_credits.h index 37c25f3..37c25f3 100644 --- a/src/screen/credits.h +++ b/src/screen/screen_credits.h diff --git a/src/screen/downArena.c b/src/screen/screen_downArena.c index a313f69..94b2387 100644 --- a/src/screen/downArena.c +++ b/src/screen/screen_downArena.c @@ -24,9 +24,9 @@ #include "widget_label.h" #include "widget_button.h" -#include "setting.h" -#include "downArena.h" -#include "gameType.h" +#include "screen_setting.h" +#include "screen_downArena.h" +#include "screen_gameType.h" static sock_udp_t *sock_server_udp; static sock_tcp_t *sock_server_tcp; @@ -369,7 +369,7 @@ void initScreenDownArena() { image_t *image; - image = getImage(IMAGE_GROUP_BASE, "main"); + image = getImage(IMAGE_GROUP_BASE, "screen_main"); image_backgorund = newWidgetImage(0, 0, image); button_back = diff --git a/src/screen/downArena.h b/src/screen/screen_downArena.h index d9f25d7..d9f25d7 100644 --- a/src/screen/downArena.h +++ b/src/screen/screen_downArena.h diff --git a/src/screen/gameType.c b/src/screen/screen_gameType.c index cd8b115..1ef8461 100644 --- a/src/screen/gameType.c +++ b/src/screen/screen_gameType.c @@ -19,8 +19,8 @@ # include "music.h" #endif -#include "gameType.h" -#include "setting.h" +#include "screen_gameType.h" +#include "screen_setting.h" #include "widget.h" #include "widget_label.h" @@ -217,7 +217,7 @@ void initScreenGameType() { image_t *image; - image = getImage(IMAGE_GROUP_BASE, "main"); + image = getImage(IMAGE_GROUP_BASE, "screen_main"); image_backgorund = newWidgetImage(0, 0, image); button_back = newWidgetButton(_("back"), 100, WINDOW_SIZE_Y - 100, eventWidget); diff --git a/src/screen/gameType.h b/src/screen/screen_gameType.h index 2c836fc..2c836fc 100644 --- a/src/screen/gameType.h +++ b/src/screen/screen_gameType.h diff --git a/src/screen/mainMenu.c b/src/screen/screen_mainMenu.c index e9795f1..84d57b8 100644 --- a/src/screen/mainMenu.c +++ b/src/screen/screen_mainMenu.c @@ -14,8 +14,8 @@ # include "music.h" #endif -#include "mainMenu.h" -#include "setting.h" +#include "screen_mainMenu.h" +#include "screen_setting.h" #include "widget.h" #include "widget_label.h" @@ -103,7 +103,7 @@ void initScreenMainMenu() image_t *image; image = - addImageData("main.png", IMAGE_NO_ALPHA, "main", + addImageData("screen_main.png", IMAGE_NO_ALPHA, "screen_main", IMAGE_GROUP_BASE); image_backgorund = newWidgetImage(0, 0, image); diff --git a/src/screen/mainMenu.h b/src/screen/screen_mainMenu.h index ecb369b..ecb369b 100644 --- a/src/screen/mainMenu.h +++ b/src/screen/screen_mainMenu.h diff --git a/src/screen/setting.c b/src/screen/screen_setting.c index a39e44f..b52a9db 100644 --- a/src/screen/setting.c +++ b/src/screen/screen_setting.c @@ -22,11 +22,11 @@ # include "sound.h" #endif -#include "mainMenu.h" -#include "setting.h" -#include "settingKeys.h" -#include "settingKeys.h" -#include "choiceArena.h" +#include "screen_mainMenu.h" +#include "screen_setting.h" +#include "screen_settingKeys.h" +#include "screen_settingKeys.h" +#include "screen_choiceArena.h" #include "widget.h" #include "widget_label.h" @@ -332,7 +332,7 @@ void initScreenSetting() image_t *image; int i; - image = getImage(IMAGE_GROUP_BASE, "main"); + image = getImage(IMAGE_GROUP_BASE, "screen_main"); image_backgorund = newWidgetImage(0, 0, image); button_back = newWidgetButton(_("back"), WINDOW_SIZE_X - 200, WINDOW_SIZE_Y - 100, eventWidget); diff --git a/src/screen/setting.h b/src/screen/screen_setting.h index 9521cca..9521cca 100644 --- a/src/screen/setting.h +++ b/src/screen/screen_setting.h diff --git a/src/screen/settingKeys.c b/src/screen/screen_settingKeys.c index e182edc..35215cf 100644 --- a/src/screen/settingKeys.c +++ b/src/screen/screen_settingKeys.c @@ -21,9 +21,9 @@ # include "sound.h"
#endif /*
*/
-#include "mainMenu.h"
-#include "setting.h"
-#include "settingKeys.h"
+#include "screen_mainMenu.h"
+#include "screen_setting.h"
+#include "screen_settingKeys.h"
#include "widget.h"
#include "widget_button.h"
@@ -383,7 +383,7 @@ image_t * image; initKeyTable();
-image = getImage(IMAGE_GROUP_BASE, "main");
+image = getImage(IMAGE_GROUP_BASE, "screen_main");
image_backgorund = newWidgetImage(0, 0, image);
diff --git a/src/screen/settingKeys.h b/src/screen/screen_settingKeys.h index c90006e..c90006e 100644 --- a/src/screen/settingKeys.h +++ b/src/screen/screen_settingKeys.h diff --git a/src/screen/table.c b/src/screen/screen_table.c index 3893aaf..b49de93 100644 --- a/src/screen/table.c +++ b/src/screen/screen_table.c @@ -17,7 +17,7 @@ # include "music.h" #endif -#include "table.h" +#include "screen_table.h" #include "widget_image.h" #include "widget_label.h" @@ -198,7 +198,7 @@ void initScreenTable() { image_t *image; - image = addImageData("table.png", IMAGE_NO_ALPHA, "table", IMAGE_GROUP_BASE); + image = addImageData("screen_table.png", IMAGE_NO_ALPHA, "screen_table", IMAGE_GROUP_BASE); image_backgorund = newWidgetImage(0, 0, image); button_back = newWidgetButton(_("back"), WINDOW_SIZE_X / 2 - WIDGET_BUTTON_WIDTH / 2, diff --git a/src/screen/table.h b/src/screen/screen_table.h index a91b233..a91b233 100644 --- a/src/screen/table.h +++ b/src/screen/screen_table.h diff --git a/src/screen/world.c b/src/screen/screen_world.c index 5fa3ecd..8f2f6d2 100644 --- a/src/screen/world.c +++ b/src/screen/screen_world.c @@ -37,13 +37,13 @@ #endif #include "screen.h" -#include "world.h" -#include "analyze.h" -#include "setting.h" -#include "gameType.h" -#include "settingKeys.h" -#include "choiceArena.h" -#include "table.h" +#include "screen_world.h" +#include "screen_analyze.h" +#include "screen_setting.h" +#include "screen_gameType.h" +#include "screen_settingKeys.h" +#include "screen_choiceArena.h" +#include "screen_table.h" static arena_t *arena; diff --git a/src/screen/world.h b/src/screen/screen_world.h index 67935f7..67935f7 100644 --- a/src/screen/world.h +++ b/src/screen/screen_world.h diff --git a/src/widget/button.c b/src/widget/widget_button.c index c2afcad..c2afcad 100644 --- a/src/widget/button.c +++ b/src/widget/widget_button.c diff --git a/src/widget/button.h b/src/widget/widget_button.h index ac238be..ac238be 100644 --- a/src/widget/button.h +++ b/src/widget/widget_button.h diff --git a/src/widget/buttonimage.c b/src/widget/widget_buttonimage.c index dd20e62..dd20e62 100644 --- a/src/widget/buttonimage.c +++ b/src/widget/widget_buttonimage.c diff --git a/src/widget/buttonimage.h b/src/widget/widget_buttonimage.h index 5a0ab7c..5a0ab7c 100644 --- a/src/widget/buttonimage.h +++ b/src/widget/widget_buttonimage.h diff --git a/src/widget/catchkey.c b/src/widget/widget_catchkey.c index b213890..b213890 100644 --- a/src/widget/catchkey.c +++ b/src/widget/widget_catchkey.c diff --git a/src/widget/catchkey.h b/src/widget/widget_catchkey.h index 106bc92..106bc92 100644 --- a/src/widget/catchkey.h +++ b/src/widget/widget_catchkey.h diff --git a/src/widget/check.c b/src/widget/widget_check.c index e574211..e574211 100644 --- a/src/widget/check.c +++ b/src/widget/widget_check.c diff --git a/src/widget/check.h b/src/widget/widget_check.h index 007e82c..007e82c 100644 --- a/src/widget/check.h +++ b/src/widget/widget_check.h diff --git a/src/widget/choicegroup.c b/src/widget/widget_choicegroup.c index 1045f81..1045f81 100644 --- a/src/widget/choicegroup.c +++ b/src/widget/widget_choicegroup.c diff --git a/src/widget/choicegroup.h b/src/widget/widget_choicegroup.h index a892d74..a892d74 100644 --- a/src/widget/choicegroup.h +++ b/src/widget/widget_choicegroup.h diff --git a/src/widget/image.c b/src/widget/widget_image.c index ad49f9e..ad49f9e 100644 --- a/src/widget/image.c +++ b/src/widget/widget_image.c diff --git a/src/widget/image.h b/src/widget/widget_image.h index 081fbda..081fbda 100644 --- a/src/widget/image.h +++ b/src/widget/widget_image.h diff --git a/src/widget/label.c b/src/widget/widget_label.c index e3c907c..e3c907c 100644 --- a/src/widget/label.c +++ b/src/widget/widget_label.c diff --git a/src/widget/label.h b/src/widget/widget_label.h index 743db7e..743db7e 100644 --- a/src/widget/label.h +++ b/src/widget/widget_label.h diff --git a/src/widget/select.c b/src/widget/widget_select.c index f53e583..f53e583 100644 --- a/src/widget/select.c +++ b/src/widget/widget_select.c diff --git a/src/widget/select.h b/src/widget/widget_select.h index 9d772cc..9d772cc 100644 --- a/src/widget/select.h +++ b/src/widget/widget_select.h diff --git a/src/widget/textfield.c b/src/widget/widget_textfield.c index 6a8824a..6a8824a 100644 --- a/src/widget/textfield.c +++ b/src/widget/widget_textfield.c diff --git a/src/widget/textfield.h b/src/widget/widget_textfield.h index 7991deb..7991deb 100644 --- a/src/widget/textfield.h +++ b/src/widget/widget_textfield.h |