fixed tilemap rendering abit, editor.cfg added

This commit is contained in:
Magnus Auvinen 2007-07-22 11:25:15 +00:00
parent f5e9c741f2
commit 38b8de5438

View file

@ -5,6 +5,7 @@
#include <engine/interface.h> #include <engine/interface.h>
#include <engine/datafile.h> #include <engine/datafile.h>
#include <engine/config.h>
#include <engine/client/ui.h> #include <engine/client/ui.h>
#include <game/client/mapres_image.h> #include <game/client/mapres_image.h>
@ -34,6 +35,7 @@ static ent_type ent_types[] = {
{"hammer", MAPRES_ITEM, ITEM_WEAPON_HAMMER}, {"hammer", MAPRES_ITEM, ITEM_WEAPON_HAMMER},
{"health", MAPRES_ITEM, ITEM_HEALTH}, {"health", MAPRES_ITEM, ITEM_HEALTH},
{"armor", MAPRES_ITEM, ITEM_ARMOR}, {"armor", MAPRES_ITEM, ITEM_ARMOR},
{"ninja", MAPRES_ITEM, ITEM_NINJA},
{0, 0} {0, 0}
}; };
@ -312,7 +314,7 @@ static tileset *tilesets_get(int index)
*********************************************************/ *********************************************************/
static void render_tilemap(tilemap *tm, float sx, float sy, float scale) static void render_tilemap(tilemap *tm, float sx, float sy, float scale)
{ {
float frac = (1.0f/512.0f); //2.0f; float frac = (1.0f/1024.0f); //2.0f;
gfx_quads_begin(); gfx_quads_begin();
for(int y = 0; y < tm->height; y++) for(int y = 0; y < tm->height; y++)
for(int x = 0; x < tm->width; x++) for(int x = 0; x < tm->width; x++)
@ -1208,6 +1210,8 @@ int editor_main(int argc, char **argv)
{ {
dbg_msg("editor", "starting..."); dbg_msg("editor", "starting...");
config_load("editor.cfg");
// parse arguments // parse arguments
for(int i = 1; i < argc; i++) for(int i = 1; i < argc; i++)
{ {