diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-07-31 20:03:29 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-07-31 20:03:29 +0000 |
| commit | bdd968b726362f55454853799ec7869cd14b9a4c (patch) | |
| tree | 1fed78c04d404ac03e57bab2b94cd4ea4343862e /src/client/layer.c | |
| parent | 1050c84b401b58e8ad69a2e49edae5185b136f1f (diff) | |
- priprava kodu na podporu UDP a TCP sucastne
- upravy v kode, ktory spusta funkcie proto.c na zaklade prijatych packetov. ( na strane servera aj clienta )
git-svn-id: http://opensvn.csie.org/tuxanci_ng@185 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/client/layer.c')
| -rwxr-xr-x | src/client/layer.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/client/layer.c b/src/client/layer.c index efac264..c0c9c03 100755 --- a/src/client/layer.c +++ b/src/client/layer.c @@ -108,6 +108,7 @@ void drawLayerCenter(int x, int y) layer_t *this; int screen_x, screen_y; int i; + //int count = 0; getCenterScreen(&screen_x, &screen_y, x, y); @@ -115,11 +116,20 @@ void drawLayerCenter(int x, int y) { this = (layer_t *)listLayer->list[i]; +/* if( (this->x - screen_x) + this->w < 0 || (this->x - screen_x) > WINDOW_SIZE_X || (this->y - screen_y) + this->h < 0 || (this->y - screen_y) > WINDOW_SIZE_Y ) { continue; } +*/ + 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, @@ -129,6 +139,8 @@ void drawLayerCenter(int x, int y) //printf("%d %d\n", this->x - screen_x, this->y - screen_y); } + //printf("count = %d\n", count); + destroyListItem(listLayer, free); listLayer = newList(); } |