diff options
| author | Dusan Durech <dusan.d@centrum.sk> | 2008-11-15 16:08:21 +0100 |
|---|---|---|
| committer | Dusan Durech <dusan.d@centrum.sk> | 2008-11-15 16:08:21 +0100 |
| commit | 35084eaadf8b37f5c4a325f0d4b01767753ee9c3 (patch) | |
| tree | 8ca9a541783690eb6087a52faafa75e9a53d1521 /src/client/radar.c | |
| parent | 98875c5a636f50fe89b9394b8193e86094ae14e0 (diff) | |
modification coding stile
Diffstat (limited to 'src/client/radar.c')
| -rw-r--r-- | src/client/radar.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/client/radar.c b/src/client/radar.c index 990f8cb..b45d80f 100644 --- a/src/client/radar.c +++ b/src/client/radar.c @@ -81,8 +81,7 @@ void initRadar() assert(isImageInicialized() == TRUE); assert(isInterfaceInicialized() == TRUE); - g_radar = - addImageData("radar.png", IMAGE_NO_ALPHA, "radar", IMAGE_GROUP_USER); + g_radar = addImageData("radar.png", IMAGE_NO_ALPHA, "radar", IMAGE_GROUP_USER); listRadar = newList(); } @@ -90,8 +89,7 @@ void drawRadar(arena_t * arena) { int i; - drawImage(g_radar, RADAR_LOCATION_X, RADAR_LOCATION_Y, 0, 0, - RADAR_SIZE_X + 2, RADAR_SIZE_Y + 2); + drawImage(g_radar, RADAR_LOCATION_X, RADAR_LOCATION_Y, 0, 0, RADAR_SIZE_X + 2, RADAR_SIZE_Y + 2); for (i = 0; i < listRadar->count; i++) { radar_item_t *thisRadarItem; @@ -99,15 +97,13 @@ void drawRadar(arena_t * arena) thisRadarItem = (radar_item_t *) listRadar->list[i]; - x = (((float) RADAR_SIZE_X) / ((float) arena->w)) * - ((float) thisRadarItem->x); - y = (((float) RADAR_SIZE_Y) / ((float) arena->h)) * - ((float) thisRadarItem->y); + x = (((float) RADAR_SIZE_X) / ((float) arena->w)) * ((float) thisRadarItem->x); + + y = (((float) RADAR_SIZE_Y) / ((float) arena->h)) * ((float) thisRadarItem->y); if (x >= 0 && x <= RADAR_SIZE_X && y >= 0 && y <= RADAR_SIZE_Y) { - drawImage(g_radar, - RADAR_LOCATION_X + 1 + x, RADAR_LOCATION_Y + 1 + y, - 2 * thisRadarItem->type, RADAR_SIZE_Y + 2, 2, 2); + drawImage(g_radar, RADAR_LOCATION_X + 1 + x, RADAR_LOCATION_Y + 1 + y, + 2 * thisRadarItem->type, RADAR_SIZE_Y + 2, 2, 2); } } } |