dep = $(obj:.cof=.dep)
bin = demo.exe
+asmsrc += font.asm
+
ifeq ($(findstring COMMAND.COM, $(SHELL)), COMMAND.COM)
hostsys = dos
else
cleandep:
rm -f $(dep)
endif
+
+
+tools/csprite/csprite:
+ $(MAKE) -C tools/csprite
+
+font.asm: data/legible.fnt tools/csprite/csprite
+ tools/csprite/csprite -n cs_font -s 8x16 -conv565 -nasm $< >$@
/* prototype of generated function is (void *fb, int x, int y, int idx) */
const char *prefixfmt[] = {
/* GNU assembler template */
+ "\t.text\n"
"\t.global %s\n"
+ "\t.global _%s\n"
"%s:\n"
+ "_%s:\n"
"\tmov 12(%%esp), %%eax\n"
"\tmov $%d, %%ecx\n"
"\tmul %%ecx\n"
/* TODO hardcoding the 16bpp changes for now, generalize later
* and while we're at it, let's get rid of the mul too ...
*/
+ "\tsection .text\n"
"\tglobal %s\n"
+ "\tglobal _%s\n"
"%s:\n"
+ "_%s:\n"
"\tmov eax, [esp + 12]\n"
";\tmov ecx, %d\n"
";\tmul ecx\n"
ysz = tile_ysz;
}
- printf(prefixfmt[asyntax], name, name, fbpitch);
+ printf(prefixfmt[asyntax], name, name, name, name, fbpitch);
for(i=0; i<num_ytiles*num_xtiles; i++) {
if(asyntax == AS_GNU) {
printf("\t.long tile%d\n", i);