diff options
| author | Tomas Chvatal <scarabeus@gentoo.org> | 2008-12-11 19:38:00 +0100 |
|---|---|---|
| committer | Tomas Chvatal <scarabeus@gentoo.org> | 2008-12-11 19:38:00 +0100 |
| commit | 3ba6105170ecac2fb124d9eb7e81ba72dd4700b8 (patch) | |
| tree | ec30e2b1dda198c9646ea3447308368bbe334500 /src | |
| parent | b2d2cf4f53748051ace835d27564cb2922c13db9 (diff) | |
First pass for renaming screen/widget.
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/analyze.c (renamed from src/screen/screen_analyze.c) | 6 | ||||
| -rw-r--r-- | src/screen/analyze.h (renamed from src/screen/screen_analyze.h) | 0 | ||||
| -rw-r--r-- | src/screen/browser.c (renamed from src/screen/screen_browser.c) | 6 | ||||
| -rw-r--r-- | src/screen/browser.h (renamed from src/screen/screen_browser.h) | 0 | ||||
| -rw-r--r-- | src/screen/choiceArena.c (renamed from src/screen/screen_choiceArena.c) | 6 | ||||
| -rw-r--r-- | src/screen/choiceArena.h (renamed from src/screen/screen_choiceArena.h) | 0 | ||||
| -rw-r--r-- | src/screen/credits.c (renamed from src/screen/screen_credits.c) | 4 | ||||
| -rw-r--r-- | src/screen/credits.h (renamed from src/screen/screen_credits.h) | 0 | ||||
| -rw-r--r-- | src/screen/downArena.c (renamed from src/screen/screen_downArena.c) | 8 | ||||
| -rw-r--r-- | src/screen/downArena.h (renamed from src/screen/screen_downArena.h) | 0 | ||||
| -rw-r--r-- | src/screen/gameType.c (renamed from src/screen/screen_gameType.c) | 6 | ||||
| -rw-r--r-- | src/screen/gameType.h (renamed from src/screen/screen_gameType.h) | 0 | ||||
| -rw-r--r-- | src/screen/mainMenu.c (renamed from src/screen/screen_mainMenu.c) | 6 | ||||
| -rw-r--r-- | src/screen/mainMenu.h (renamed from src/screen/screen_mainMenu.h) | 0 | ||||
| -rw-r--r-- | src/screen/setting.c (renamed from src/screen/screen_setting.c) | 12 | ||||
| -rw-r--r-- | src/screen/setting.h (renamed from src/screen/screen_setting.h) | 0 | ||||
| -rw-r--r-- | src/screen/settingKeys.c (renamed from src/screen/screen_settingKeys.c) | 8 | ||||
| -rw-r--r-- | src/screen/settingKeys.h (renamed from src/screen/screen_settingKeys.h) | 0 | ||||
| -rw-r--r-- | src/screen/table.c (renamed from src/screen/screen_table.c) | 4 | ||||
| -rw-r--r-- | src/screen/table.h (renamed from src/screen/screen_table.h) | 0 | ||||
| -rw-r--r-- | src/screen/world.c (renamed from src/screen/screen_world.c) | 14 | ||||
| -rw-r--r-- | src/screen/world.h (renamed from src/screen/screen_world.h) | 0 | ||||
| -rw-r--r-- | src/widget/button.c (renamed from src/widget/widget_button.c) | 0 | ||||
| -rw-r--r-- | src/widget/button.h (renamed from src/widget/widget_button.h) | 0 | ||||
| -rw-r--r-- | src/widget/buttonimage.c (renamed from src/widget/widget_buttonimage.c) | 0 | ||||
| -rw-r--r-- | src/widget/buttonimage.h (renamed from src/widget/widget_buttonimage.h) | 0 | ||||
| -rw-r--r-- | src/widget/catchkey.c (renamed from src/widget/widget_catchkey.c) | 0 | ||||
| -rw-r--r-- | src/widget/catchkey.h (renamed from src/widget/widget_catchkey.h) | 0 | ||||
| -rw-r--r-- | src/widget/check.c (renamed from src/widget/widget_check.c) | 0 | ||||
| -rw-r--r-- | src/widget/check.h (renamed from src/widget/widget_check.h) | 0 | ||||
| -rw-r--r-- | src/widget/choicegroup.c (renamed from src/widget/widget_choicegroup.c) | 0 | ||||
| -rw-r--r-- | src/widget/choicegroup.h (renamed from src/widget/widget_choicegroup.h) | 0 | ||||
| -rw-r--r-- | src/widget/image.c (renamed from src/widget/widget_image.c) | 0 | ||||
| -rw-r--r-- | src/widget/image.h (renamed from src/widget/widget_image.h) | 0 | ||||
| -rw-r--r-- | src/widget/label.c (renamed from src/widget/widget_label.c) | 0 | ||||
| -rw-r--r-- | src/widget/label.h (renamed from src/widget/widget_label.h) | 0 | ||||
| -rw-r--r-- | src/widget/select.c (renamed from src/widget/widget_select.c) | 0 | ||||
| -rw-r--r-- | src/widget/select.h (renamed from src/widget/widget_select.h) | 0 | ||||
| -rw-r--r-- | src/widget/textfield.c (renamed from src/widget/widget_textfield.c) | 0 | ||||
| -rw-r--r-- | src/widget/textfield.h (renamed from src/widget/widget_textfield.h) | 0 |
62 files changed, 161 insertions, 161 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0b9de02..b9f642e 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/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}/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}/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 + ${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 ) SET ( SRC_audio 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 diff --git a/src/client/chat.c b/src/client/chat.c index 6ca9ec9..b446b08 100644 --- a/src/client/chat.c +++ b/src/client/chat.c @@ -11,7 +11,7 @@ #include "serverSendMsg.h" #include "net_multiplayer.h" -#include "screen_world.h" +#include "world.h" #include "proto.h" #include "interface.h" #include "chat.h" diff --git a/src/client/client.c b/src/client/client.c index e92a238..1902be6 100644 --- a/src/client/client.c +++ b/src/client/client.c @@ -23,8 +23,8 @@ #include "client.h" -#include "screen_analyze.h" -#include "screen_world.h" +#include "analyze.h" +#include "world.h" #include "buffer.h" #include "udp.h" diff --git a/src/client/game.c b/src/client/game.c index e96805b..87676d5 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 "screen_settingKeys.h" +#include "settingKeys.h" #include "panel.h" #include "radar.h" @@ -30,17 +30,17 @@ # include "music.h" #endif -#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" +#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" static void initGame() { diff --git a/src/client/layer.c b/src/client/layer.c index 983a9c8..b6055be 100644 --- a/src/client/layer.c +++ b/src/client/layer.c @@ -10,7 +10,7 @@ #include "layer.h" #include "image.h" -#include "screen_world.h" +#include "world.h" static list_t *listLayer; @@ -125,27 +125,27 @@ void drawLayer() void drawLayerCenter(int x, int y) { layer_t *this; - int screen_x, screen_y; + int x, y; int i; //int count = 0; - getCenterScreen(&screen_x, &screen_y, x, y, WINDOW_SIZE_X, WINDOW_SIZE_Y); + getCenterScreen(&x, &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 < screen_x || - this->x > screen_x + WINDOW_SIZE_X || - this->y + this->h < screen_y || - this->y > screen_y + WINDOW_SIZE_Y) { + if (this->x + this->w < x || + this->x > x + WINDOW_SIZE_X || + this->y + this->h < y || + this->y > y + WINDOW_SIZE_Y) { continue; } //count++; - drawImage(this->image, this->x - screen_x, this->y - screen_y, + drawImage(this->image, this->x - x, this->y - y, this->px, this->py, this->w, this->h); - //printf("%d %d\n", this->x - screen_x, this->y - screen_y); + //printf("%d %d\n", this->x - x, this->y - 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 - screen_x, this->y - screen_y); + //printf("%d %d\n", this->x - x, this->y - y); } //printf("count = %d\n", count); diff --git a/src/client/saveDialog.c b/src/client/saveDialog.c index 1c832e7..dbf79d7 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, "screen_main"); + g_background = getImage(IMAGE_GROUP_BASE, "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 b5dbdf2..0448a4f 100644 --- a/src/client/saveLoad.c +++ b/src/client/saveLoad.c @@ -16,8 +16,8 @@ #include "saveLoad.h" -#include "screen_choiceArena.h" -#include "screen_world.h" +#include "choiceArena.h" +#include "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 71d48d8..453aae3 100644 --- a/src/client/screen.c +++ b/src/client/screen.c @@ -12,8 +12,8 @@ //#define DEBUG_TIME_DRAW -static screen_t *currentScreen; -static screen_t *futureScreen; +static t *currentScreen; +static t *futureScreen; static list_t *listScreen; @@ -24,10 +24,10 @@ bool_t isScreenInicialized() return isScreenInit; } -screen_t *newScreen(char *name, void (*fce_start) (), void (*fce_event) (), +t *newScreen(char *name, void (*fce_start) (), void (*fce_event) (), void (*fce_draw) (), void (*fce_stop) ()) { - screen_t *new; + t *new; assert(name != NULL); assert(fce_start != NULL); @@ -35,7 +35,7 @@ screen_t *newScreen(char *name, void (*fce_start) (), void (*fce_event) (), assert(fce_draw != NULL); assert(fce_stop != NULL); - new = malloc(sizeof(screen_t)); + new = malloc(sizeof(t)); new->name = strdup(name); new->fce_start = fce_start; new->fce_event = fce_event; @@ -45,7 +45,7 @@ screen_t *newScreen(char *name, void (*fce_start) (), void (*fce_event) (), return new; } -void destroyScreen(screen_t * p) +void destroyScreen(t * p) { assert(p != NULL); @@ -53,7 +53,7 @@ void destroyScreen(screen_t * p) free(p); } -void registerScreen(screen_t * p) +void registerScreen(t * p) { assert(p != NULL); @@ -72,13 +72,13 @@ void initScreen() isScreenInit = TRUE; } -static screen_t *findScreen(char *name) +static t *findScreen(char *name) { - screen_t *this; + t *this; int i; for (i = 0; i < listScreen->count; i++) { - this = (screen_t *) (listScreen->list[i]); + this = (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 3227bfe..77a1a16 100644 --- a/src/client/screen.h +++ b/src/client/screen.h @@ -5,22 +5,22 @@ # include "main.h" -typedef struct screen_struct { +typedef struct struct { char *name; void (*fce_start) (); void (*fce_event) (); void (*fce_draw) (); void (*fce_stop) (); -} screen_t; +} t; extern bool_t isScreenInicialized(); -extern screen_t *newScreen(char *name, +extern t *newScreen(char *name, void (*fce_start) (), void (*fce_event) (), void (*fce_draw) (), void (*fce_stop) ()); -extern void destroyScreen(screen_t * p); -extern void registerScreen(screen_t * p); +extern void destroyScreen(t * p); +extern void registerScreen(t * p); extern void initScreen(); extern void setScreen(char *name); extern void switchScreen(); diff --git a/src/screen/screen_analyze.c b/src/screen/analyze.c index b249f81..9af6aee 100644 --- a/src/screen/screen_analyze.c +++ b/src/screen/analyze.c @@ -15,8 +15,8 @@ # include "music.h" #endif -#include "screen_mainMenu.h" -#include "screen_analyze.h" +#include "mainMenu.h" +#include "analyze.h" #include "widget.h" #include "widget_label.h" @@ -156,7 +156,7 @@ void initScreenAnalyze() { image_t *image; - image = getImage(IMAGE_GROUP_BASE, "screen_main"); + image = getImage(IMAGE_GROUP_BASE, "main"); image_backgorund = newWidgetImage(0, 0, image); listWidgetLabelName = newList(); diff --git a/src/screen/screen_analyze.h b/src/screen/analyze.h index 8f975b4..8f975b4 100644 --- a/src/screen/screen_analyze.h +++ b/src/screen/analyze.h diff --git a/src/screen/screen_browser.c b/src/screen/browser.c index f09ca18..44d175e 100644 --- a/src/screen/screen_browser.c +++ b/src/screen/browser.c @@ -39,8 +39,8 @@ extern int errno; # include "music.h" #endif -#include "screen_gameType.h" -#include "screen_browser.h" +#include "gameType.h" +#include "browser.h" #include "widget.h" #include "widget_image.h" @@ -681,7 +681,7 @@ void initScreenBrowser() { image_t *image; - image = getImage(IMAGE_GROUP_BASE, "screen_main"); + image = getImage(IMAGE_GROUP_BASE, "main"); image_backgorund = newWidgetImage(0, 0, image); button_back = diff --git a/src/screen/screen_browser.h b/src/screen/browser.h index e810e58..e810e58 100644 --- a/src/screen/screen_browser.h +++ b/src/screen/browser.h diff --git a/src/screen/screen_choiceArena.c b/src/screen/choiceArena.c index 7bc6ce4..550f63e 100644 --- a/src/screen/screen_choiceArena.c +++ b/src/screen/choiceArena.c @@ -15,8 +15,8 @@ # include "music.h" #endif -#include "screen_mainMenu.h" -#include "screen_choiceArena.h" +#include "mainMenu.h" +#include "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, "screen_main"); + image = getImage(IMAGE_GROUP_BASE, "main"); image_backgorund = newWidgetImage(0, 0, image); button_back = newWidgetButton(_("back"), 100, WINDOW_SIZE_Y - 100, eventWidget); diff --git a/src/screen/screen_choiceArena.h b/src/screen/choiceArena.h index dbe12de..dbe12de 100644 --- a/src/screen/screen_choiceArena.h +++ b/src/screen/choiceArena.h diff --git a/src/screen/screen_credits.c b/src/screen/credits.c index a3ed787..0f2541b 100644 --- a/src/screen/screen_credits.c +++ b/src/screen/credits.c @@ -15,7 +15,7 @@ # include "music.h" #endif -#include "screen_credits.h" +#include "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, "screen_main"); + image = getImage(IMAGE_GROUP_BASE, "main"); image_backgorund = newWidgetImage(0, 0, image); button_back = newWidgetButton(_("back"), WINDOW_SIZE_X / 2 - WIDGET_BUTTON_WIDTH / 2, diff --git a/src/screen/screen_credits.h b/src/screen/credits.h index 37c25f3..37c25f3 100644 --- a/src/screen/screen_credits.h +++ b/src/screen/credits.h diff --git a/src/screen/screen_downArena.c b/src/screen/downArena.c index 94b2387..a313f69 100644 --- a/src/screen/screen_downArena.c +++ b/src/screen/downArena.c @@ -24,9 +24,9 @@ #include "widget_label.h" #include "widget_button.h" -#include "screen_setting.h" -#include "screen_downArena.h" -#include "screen_gameType.h" +#include "setting.h" +#include "downArena.h" +#include "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, "screen_main"); + image = getImage(IMAGE_GROUP_BASE, "main"); image_backgorund = newWidgetImage(0, 0, image); button_back = diff --git a/src/screen/screen_downArena.h b/src/screen/downArena.h index d9f25d7..d9f25d7 100644 --- a/src/screen/screen_downArena.h +++ b/src/screen/downArena.h diff --git a/src/screen/screen_gameType.c b/src/screen/gameType.c index 1ef8461..cd8b115 100644 --- a/src/screen/screen_gameType.c +++ b/src/screen/gameType.c @@ -19,8 +19,8 @@ # include "music.h" #endif -#include "screen_gameType.h" -#include "screen_setting.h" +#include "gameType.h" +#include "setting.h" #include "widget.h" #include "widget_label.h" @@ -217,7 +217,7 @@ void initScreenGameType() { image_t *image; - image = getImage(IMAGE_GROUP_BASE, "screen_main"); + image = getImage(IMAGE_GROUP_BASE, "main"); image_backgorund = newWidgetImage(0, 0, image); button_back = newWidgetButton(_("back"), 100, WINDOW_SIZE_Y - 100, eventWidget); diff --git a/src/screen/screen_gameType.h b/src/screen/gameType.h index 2c836fc..2c836fc 100644 --- a/src/screen/screen_gameType.h +++ b/src/screen/gameType.h diff --git a/src/screen/screen_mainMenu.c b/src/screen/mainMenu.c index 84d57b8..e9795f1 100644 --- a/src/screen/screen_mainMenu.c +++ b/src/screen/mainMenu.c @@ -14,8 +14,8 @@ # include "music.h" #endif -#include "screen_mainMenu.h" -#include "screen_setting.h" +#include "mainMenu.h" +#include "setting.h" #include "widget.h" #include "widget_label.h" @@ -103,7 +103,7 @@ void initScreenMainMenu() image_t *image; image = - addImageData("screen_main.png", IMAGE_NO_ALPHA, "screen_main", + addImageData("main.png", IMAGE_NO_ALPHA, "main", IMAGE_GROUP_BASE); image_backgorund = newWidgetImage(0, 0, image); diff --git a/src/screen/screen_mainMenu.h b/src/screen/mainMenu.h index ecb369b..ecb369b 100644 --- a/src/screen/screen_mainMenu.h +++ b/src/screen/mainMenu.h diff --git a/src/screen/screen_setting.c b/src/screen/setting.c index b52a9db..a39e44f 100644 --- a/src/screen/screen_setting.c +++ b/src/screen/setting.c @@ -22,11 +22,11 @@ # include "sound.h" #endif -#include "screen_mainMenu.h" -#include "screen_setting.h" -#include "screen_settingKeys.h" -#include "screen_settingKeys.h" -#include "screen_choiceArena.h" +#include "mainMenu.h" +#include "setting.h" +#include "settingKeys.h" +#include "settingKeys.h" +#include "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, "screen_main"); + image = getImage(IMAGE_GROUP_BASE, "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/screen_setting.h b/src/screen/setting.h index 9521cca..9521cca 100644 --- a/src/screen/screen_setting.h +++ b/src/screen/setting.h diff --git a/src/screen/screen_settingKeys.c b/src/screen/settingKeys.c index 35215cf..e182edc 100644 --- a/src/screen/screen_settingKeys.c +++ b/src/screen/settingKeys.c @@ -21,9 +21,9 @@ # include "sound.h"
#endif /*
*/
-#include "screen_mainMenu.h"
-#include "screen_setting.h"
-#include "screen_settingKeys.h"
+#include "mainMenu.h"
+#include "setting.h"
+#include "settingKeys.h"
#include "widget.h"
#include "widget_button.h"
@@ -383,7 +383,7 @@ image_t * image; initKeyTable();
-image = getImage(IMAGE_GROUP_BASE, "screen_main");
+image = getImage(IMAGE_GROUP_BASE, "main");
image_backgorund = newWidgetImage(0, 0, image);
diff --git a/src/screen/screen_settingKeys.h b/src/screen/settingKeys.h index c90006e..c90006e 100644 --- a/src/screen/screen_settingKeys.h +++ b/src/screen/settingKeys.h diff --git a/src/screen/screen_table.c b/src/screen/table.c index b49de93..3893aaf 100644 --- a/src/screen/screen_table.c +++ b/src/screen/table.c @@ -17,7 +17,7 @@ # include "music.h" #endif -#include "screen_table.h" +#include "table.h" #include "widget_image.h" #include "widget_label.h" @@ -198,7 +198,7 @@ void initScreenTable() { image_t *image; - image = addImageData("screen_table.png", IMAGE_NO_ALPHA, "screen_table", IMAGE_GROUP_BASE); + image = addImageData("table.png", IMAGE_NO_ALPHA, "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/screen_table.h b/src/screen/table.h index a91b233..a91b233 100644 --- a/src/screen/screen_table.h +++ b/src/screen/table.h diff --git a/src/screen/screen_world.c b/src/screen/world.c index 8f2f6d2..5fa3ecd 100644 --- a/src/screen/screen_world.c +++ b/src/screen/world.c @@ -37,13 +37,13 @@ #endif #include "screen.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" +#include "world.h" +#include "analyze.h" +#include "setting.h" +#include "gameType.h" +#include "settingKeys.h" +#include "choiceArena.h" +#include "table.h" static arena_t *arena; diff --git a/src/screen/screen_world.h b/src/screen/world.h index 67935f7..67935f7 100644 --- a/src/screen/screen_world.h +++ b/src/screen/world.h diff --git a/src/widget/widget_button.c b/src/widget/button.c index c2afcad..c2afcad 100644 --- a/src/widget/widget_button.c +++ b/src/widget/button.c diff --git a/src/widget/widget_button.h b/src/widget/button.h index ac238be..ac238be 100644 --- a/src/widget/widget_button.h +++ b/src/widget/button.h diff --git a/src/widget/widget_buttonimage.c b/src/widget/buttonimage.c index dd20e62..dd20e62 100644 --- a/src/widget/widget_buttonimage.c +++ b/src/widget/buttonimage.c diff --git a/src/widget/widget_buttonimage.h b/src/widget/buttonimage.h index 5a0ab7c..5a0ab7c 100644 --- a/src/widget/widget_buttonimage.h +++ b/src/widget/buttonimage.h diff --git a/src/widget/widget_catchkey.c b/src/widget/catchkey.c index b213890..b213890 100644 --- a/src/widget/widget_catchkey.c +++ b/src/widget/catchkey.c diff --git a/src/widget/widget_catchkey.h b/src/widget/catchkey.h index 106bc92..106bc92 100644 --- a/src/widget/widget_catchkey.h +++ b/src/widget/catchkey.h diff --git a/src/widget/widget_check.c b/src/widget/check.c index e574211..e574211 100644 --- a/src/widget/widget_check.c +++ b/src/widget/check.c diff --git a/src/widget/widget_check.h b/src/widget/check.h index 007e82c..007e82c 100644 --- a/src/widget/widget_check.h +++ b/src/widget/check.h diff --git a/src/widget/widget_choicegroup.c b/src/widget/choicegroup.c index 1045f81..1045f81 100644 --- a/src/widget/widget_choicegroup.c +++ b/src/widget/choicegroup.c diff --git a/src/widget/widget_choicegroup.h b/src/widget/choicegroup.h index a892d74..a892d74 100644 --- a/src/widget/widget_choicegroup.h +++ b/src/widget/choicegroup.h diff --git a/src/widget/widget_image.c b/src/widget/image.c index ad49f9e..ad49f9e 100644 --- a/src/widget/widget_image.c +++ b/src/widget/image.c diff --git a/src/widget/widget_image.h b/src/widget/image.h index 081fbda..081fbda 100644 --- a/src/widget/widget_image.h +++ b/src/widget/image.h diff --git a/src/widget/widget_label.c b/src/widget/label.c index e3c907c..e3c907c 100644 --- a/src/widget/widget_label.c +++ b/src/widget/label.c diff --git a/src/widget/widget_label.h b/src/widget/label.h index 743db7e..743db7e 100644 --- a/src/widget/widget_label.h +++ b/src/widget/label.h diff --git a/src/widget/widget_select.c b/src/widget/select.c index f53e583..f53e583 100644 --- a/src/widget/widget_select.c +++ b/src/widget/select.c diff --git a/src/widget/widget_select.h b/src/widget/select.h index 9d772cc..9d772cc 100644 --- a/src/widget/widget_select.h +++ b/src/widget/select.h diff --git a/src/widget/widget_textfield.c b/src/widget/textfield.c index 6a8824a..6a8824a 100644 --- a/src/widget/widget_textfield.c +++ b/src/widget/textfield.c diff --git a/src/widget/widget_textfield.h b/src/widget/textfield.h index 7991deb..7991deb 100644 --- a/src/widget/widget_textfield.h +++ b/src/widget/textfield.h |