From 5bdad8852ca30e79c59a255ab176286d01c6884b Mon Sep 17 00:00:00 2001 From: stpohle Date: Thu, 24 Jul 2003 04:18:43 +0000 Subject: [PATCH] tileset scaling fixed, on very big maps the sclaing of the width was calculated with integers.. and should be float --- src/basic.h | 4 ++-- src/tileset.c | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/basic.h b/src/basic.h index 8e06a53..22a063d 100644 --- a/src/basic.h +++ b/src/basic.h @@ -1,4 +1,4 @@ -/* $Id: basic.h,v 1.41 2003/07/24 03:52:11 stpohle Exp $ */ +/* $Id: basic.h,v 1.42 2003/07/24 04:18:43 stpohle Exp $ */ /* basic types which we need everywhere */ #ifndef _BC_BASIC_H_ @@ -37,7 +37,7 @@ #define MAX_BOMBS 12 #define MAX_RANGE 10 #define MAX_SPEED 40 -#define MAX_BLITRECTS 2048 +#define MAX_BLITRECTS 4096 #define MAX_STONESTODRAW 2048 #define MAX_SERVERENTRYS 8 /* number of entrys in the server tab */ #define MAX_GAMESRVENTRYS 255 /* number of entry which can be get */ diff --git a/src/tileset.c b/src/tileset.c index 74efa82..d2b8f56 100644 --- a/src/tileset.c +++ b/src/tileset.c @@ -1,4 +1,4 @@ -/* $Id: tileset.c,v 1.4 2003/07/22 23:15:31 stpohle Exp $ */ +/* $Id: tileset.c,v 1.5 2003/07/24 04:18:43 stpohle Exp $ */ /* load and select tilesets */ #include "bomberclone.h" @@ -205,10 +205,9 @@ tileset_load (char *tilesetname) } } gfx.field[i].frames = tmpimage->h / gfx.field[i].h; - gfx.field[i].h = ((float) ((float)gfx.field[i].h / (float)GFX_IMGSIZE) * (float)gfx.block.y); - gfx.field[i].w = (gfx.field[i].w / GFX_IMGSIZE) * gfx.block.x; - tmpimage1 = scale_image (tmpimage, (tmpimage->w / gfx.field[i].w) * gfx.block.x, - gfx.field[i].frames * gfx.field[i].h); + gfx.field[i].h = (float)((float)gfx.field[i].h / (float)GFX_IMGSIZE) * (float)gfx.block.y; + gfx.field[i].w = (float)((float)gfx.field[i].w / (float)GFX_IMGSIZE) * (float)gfx.block.x; + tmpimage1 = scale_image (tmpimage, gfx.field[i].w * (tmpimage->w / GFX_IMGSIZE), gfx.field[i].frames * gfx.field[i].h); if (i == FT_nothing || i == FT_block || i == FT_stone) r = g = b = 255; else