tileset scaling fixed, on very big maps the sclaing of the width was calculated with integers.. and should be float

origin
stpohle 23 years ago
parent a6419bd67d
commit 5bdad8852c

@ -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 */

@ -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

Loading…
Cancel
Save