X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=tools%2Fcsprite%2Fsrc%2Fmain.c;h=d1f024bfaa3dba125fd2bf51a8ce75f21b3e9a59;hp=5bece2d7f1660c0de1bd815b52549f0feed30918;hb=73f97e0d9dc83cad4aa7b53d900ea28390afed4f;hpb=4b1cef5f03023a4977c1a0dd0e7464fd4cc1044c diff --git a/tools/csprite/src/main.c b/tools/csprite/src/main.c index 5bece2d..d1f024b 100644 --- a/tools/csprite/src/main.c +++ b/tools/csprite/src/main.c @@ -126,11 +126,19 @@ const char *prefixfmt[] = { "tiletab:\n", /* NASM template */ + /* TODO hardcoding the 16bpp changes for now, generalize later + * and while we're at it, let's get rid of the mul too ... + */ "\tglobal %s\n" "%s:\n" "\tmov eax, [esp + 12]\n" - "\tmov ecx, %d\n" - "\tmul ecx\n" + ";\tmov ecx, %d\n" + ";\tmul ecx\n" + "\tmov ecx, eax\n" + "\tshl eax, 9\n" + "\tshl ecx, 7\n" + "\tadd eax, ecx\n" + "\tadd eax, [esp + 8]\n" "\tadd eax, [esp + 8]\n" "\tadd eax, [esp + 4]\n" "\tmov edx, eax\n"