compile fixes for windows

This commit is contained in:
Magnus Auvinen 2008-09-01 17:30:20 +00:00
parent 9c704c6a05
commit 67aa042dcb
3 changed files with 9 additions and 7 deletions

View file

@ -94,11 +94,15 @@ class Array(BaseType):
lines += item.EmitPreDefinition("%s[%d]"%(self.Identifyer(), i))
i += 1
lines += ["static %s %s[] = {"%(self.TypeName(), self.Identifyer())]
for item in self.items:
itemlines = item.EmitDefinition("")
lines += ["\t" + " ".join(itemlines).replace("\t", " ") + ","]
lines += ["};"]
if len(self.items):
lines += ["static %s %s[] = {"%(self.TypeName(), self.Identifyer())]
for item in self.items:
itemlines = item.EmitDefinition("")
lines += ["\t" + " ".join(itemlines).replace("\t", " ") + ","]
lines += ["};"]
else:
lines += ["static %s *%s = 0;"%(self.TypeName(), self.Identifyer())]
return lines
def EmitDefinition(self, name):
return [str(len(self.items))+","+self.Identifyer()]

View file

@ -10,7 +10,6 @@
#include <game/layers.hpp>
#include "animstate.hpp"
#include "gc_render.hpp"
#include "gc_map_image.hpp"
static float sprite_w_scale;
static float sprite_h_scale;

View file

@ -12,7 +12,6 @@ extern "C" {
#include <engine/e_config.h>
}
#include <game/client/gc_map_image.hpp>
#include <game/client/ui.hpp>
#include <game/gamecore.hpp>
#include <game/client/gc_render.hpp>