summaryrefslogtreecommitdiff
path: root/src/client/layer.c
diff options
context:
space:
mode:
authorDusan Durech <dusan.d@centrum.sk>2008-11-15 16:08:21 +0100
committerDusan Durech <dusan.d@centrum.sk>2008-11-15 16:08:21 +0100
commit35084eaadf8b37f5c4a325f0d4b01767753ee9c3 (patch)
tree8ca9a541783690eb6087a52faafa75e9a53d1521 /src/client/layer.c
parent98875c5a636f50fe89b9394b8193e86094ae14e0 (diff)
modification coding stile
Diffstat (limited to 'src/client/layer.c')
-rw-r--r--src/client/layer.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/client/layer.c b/src/client/layer.c
index c1ca8db..983a9c8 100644
--- a/src/client/layer.c
+++ b/src/client/layer.c
@@ -39,8 +39,7 @@ void initLayer()
* layer - on which layer to draw
* (0 - under tuxanci | 1 - same as tuxanci | 2 - over tuxancami)
*/
-void
-addLayer(image_t * img, int x, int y, int px, int py, int w, int h, int player)
+void addLayer(image_t * img, int x, int y, int px, int py, int w, int h, int player)
{
layer_t *new;
layer_t *actual;
@@ -89,6 +88,7 @@ addLayer(image_t * img, int x, int y, int px, int py, int w, int h, int player)
return;
};
};
+
if (i >= listLayer->count)
break;
@@ -134,15 +134,15 @@ void drawLayerCenter(int x, int 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 < 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 - screen_x, this->y - screen_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 - screen_x, this->y - screen_y);
@@ -164,9 +164,10 @@ void drawLayerSplit(int local_x, int local_y, int x, int y, int w, int h)
this = (layer_t *) listLayer->list[i];
if (this->x + this->w < x || this->x > x + w ||
- this->y + this->h < y || this->y > y + h) {
+ this->y + this->h < y || this->y > y + h) {
continue;
}
+
//count++;
if (local_x + (this->x - x) < local_x) {
@@ -197,9 +198,8 @@ void drawLayerSplit(int local_x, int local_y, int x, int y, int w, int h)
this->h -= (local_y + (this->y - y) + this->h) - (local_y + h);
}
- drawImage(this->image,
- local_x + (this->x - x), local_y + (this->y - y),
- this->px, this->py, this->w, this->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);
}