Added support for 16x16 tiles
This commit is contained in:
parent
1ee9772667
commit
feb458cd8a
6 changed files with 2229 additions and 108 deletions
|
@ -1115,7 +1115,6 @@
|
|||
Jimmy Salmon).
|
||||
<LI>Fixed crash when doing "fow off" followed by "on screen" (from
|
||||
Russell Smith).
|
||||
<A NAME="current"> </A>
|
||||
<LI><B>Final</B>
|
||||
<LI>Fixed bug when a player quits in a multiplayer game (from
|
||||
Jimmy Salmon).
|
||||
|
@ -1123,7 +1122,13 @@
|
|||
<LI>Fixed WC2 UI on 1600x1200 (from Jimmy Salmon).
|
||||
<LI>Removed +1 range upgrade for catapults and ballistas (from
|
||||
Jimmy Salmon).
|
||||
</UL>
|
||||
<P><LI>Version 1.19
|
||||
<UL>
|
||||
<A NAME="current"> </A>
|
||||
<LI><B>1.19pre1</B>
|
||||
<LI>Fixed setup script for BSD and 'sh' (from ppl).
|
||||
<LI>Added support for 16x16 tiles (from Jimmy Salmon).
|
||||
<LI>+++
|
||||
</UL>
|
||||
</UL>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
//
|
||||
/**@name tileset.h - The tileset headerfile. */
|
||||
//
|
||||
// (c) Copyright 1998-2002 by Lutz Sammer
|
||||
// (c) Copyright 1998-2003 by Lutz Sammer and Jimmy Salmon
|
||||
//
|
||||
// FreeCraft is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published
|
||||
|
@ -233,8 +233,10 @@
|
|||
-- Declarations
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#define TileSizeX 32 /// Size of a tile in X
|
||||
#define TileSizeY 32 /// Size of a tile in Y
|
||||
/// Size of a tile in X
|
||||
extern int TileSizeX;
|
||||
/// Size of a tile in Y
|
||||
extern int TileSizeY;
|
||||
|
||||
// This is only used for tile cache size
|
||||
#define MaxTilesInTileset 5056 /// Current limit of tiles in tileset
|
||||
|
@ -266,6 +268,8 @@ typedef struct _tileset_ {
|
|||
char* PaletteFile; /// File containing the global palette
|
||||
|
||||
int NumTiles; /// Number of tiles in the tables
|
||||
int TileSizeX; /// Size of a tile in X
|
||||
int TileSizeY; /// Size of a tile in Y
|
||||
unsigned short* Table; /// Pud to internal conversion table
|
||||
unsigned short* FlagsTable; /// Flag table for editor
|
||||
|
||||
|
|
1204
src/map/map_draw.cpp
1204
src/map/map_draw.cpp
File diff suppressed because it is too large
Load diff
1093
src/map/map_fog.cpp
1093
src/map/map_fog.cpp
File diff suppressed because it is too large
Load diff
|
@ -10,7 +10,7 @@
|
|||
//
|
||||
/**@name ccl_tileset.c - The tileset ccl functions. */
|
||||
//
|
||||
// (c) Copyright 2000-2002 by Lutz Sammer
|
||||
// (c) Copyright 2000-2003 by Lutz Sammer and Jimmy Salmon
|
||||
//
|
||||
// FreeCraft is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published
|
||||
|
@ -571,6 +571,8 @@ local SCM CclDefineTileset(SCM list)
|
|||
ExitFatal(-1);
|
||||
}
|
||||
Tilesets[type]->Ident=ident;
|
||||
Tilesets[type]->TileSizeX=32;
|
||||
Tilesets[type]->TileSizeY=32;
|
||||
|
||||
//
|
||||
// Parse the list: (still everything could be changed!)
|
||||
|
@ -592,6 +594,10 @@ local SCM CclDefineTileset(SCM list)
|
|||
tileset->ImageFile=gh_scm2newstr(data,NULL);
|
||||
} else if( gh_eq_p(value,gh_symbol2scm("palette")) ) {
|
||||
tileset->PaletteFile=gh_scm2newstr(data,NULL);
|
||||
} else if( gh_eq_p(value,gh_symbol2scm("size")) ) {
|
||||
tileset->TileSizeX=gh_scm2int(gh_car(data));
|
||||
data=gh_cdr(data);
|
||||
tileset->TileSizeY=gh_scm2int(gh_car(data));
|
||||
} else if( gh_eq_p(value,gh_symbol2scm("slots")) ) {
|
||||
DefineTilesetParseSlot(tileset,data);
|
||||
} else if( gh_eq_p(value,gh_symbol2scm("animations")) ) {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
//
|
||||
/**@name tileset.c - The tileset. */
|
||||
//
|
||||
// (c) Copyright 1998-2002 by Lutz Sammer
|
||||
// (c) Copyright 1998-2003 by Lutz Sammer and Jimmy Salmon
|
||||
//
|
||||
// FreeCraft is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published
|
||||
|
@ -62,6 +62,16 @@ global int NumTilesets;
|
|||
*/
|
||||
global Tileset** Tilesets;
|
||||
|
||||
/**
|
||||
** Size of a tile in X
|
||||
*/
|
||||
global int TileSizeX = 32;
|
||||
|
||||
/**
|
||||
** Size of a tile in Y
|
||||
*/
|
||||
global int TileSizeY = 32;
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
-- Functions
|
||||
----------------------------------------------------------------------------*/
|
||||
|
@ -116,6 +126,9 @@ global void LoadTileset(void)
|
|||
MakeTexture(TheMap.TileData,TheMap.TileData->Width,TheMap.TileData->Height);
|
||||
#endif
|
||||
|
||||
TileSizeX = Tilesets[i]->TileSizeX;
|
||||
TileSizeY = Tilesets[i]->TileSizeY;
|
||||
|
||||
//
|
||||
// Calculate number of tiles in graphic tile
|
||||
//
|
||||
|
|
Loading…
Add table
Reference in a new issue