projects
/
dosdemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed 16bpp offsets in csprite generator (hardcoded for now)
[dosdemo]
/
tools
/
csprite
/
src
/
main.c
diff --git
a/tools/csprite/src/main.c
b/tools/csprite/src/main.c
index
5bece2d
..
d1f024b
100644
(file)
--- a/
tools/csprite/src/main.c
+++ b/
tools/csprite/src/main.c
@@
-126,11
+126,19
@@
const char *prefixfmt[] = {
"tiletab:\n",
/* NASM template */
"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"
"\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"
"\tadd eax, [esp + 8]\n"
"\tadd eax, [esp + 4]\n"
"\tmov edx, eax\n"