diff options
| author | Tomas Chvatal <scarabeus@gentoo.org> | 2008-12-11 19:39:49 +0100 |
|---|---|---|
| committer | Tomas Chvatal <scarabeus@gentoo.org> | 2008-12-11 19:39:49 +0100 |
| commit | a83321436c8d40210bbbd0a44fe1290ed71638af (patch) | |
| tree | 02004c36772311bdc1ba6b9a2508b20691cca5c6 /src/client/layer.c | |
| parent | 3ba6105170ecac2fb124d9eb7e81ba72dd4700b8 (diff) | |
Revert "First pass for renaming screen/widget."
This reverts commit 3ba6105170ecac2fb124d9eb7e81ba72dd4700b8.
Diffstat (limited to 'src/client/layer.c')
| -rw-r--r-- | src/client/layer.c | 20 |
1 files changed, 10 insertions, 10 deletions
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); |