Doomulation
?????????????????????????
Try it, I know. No game draws outside the screen but field. If they do, then something's wrong.
ChaosBlade said:Hmm, ignoring overflowing pixels. Dunno, ill try that, im a bit confused as to why games attempt to draw out of the screen on purpose.
Refraction: then how does blitz works for you guys ? it draws the last line of the towers in y32, if you did that y = 0 then it would appear at the top of the screen.
X = some_coord;
Y = some_coord;
for(...)
{
...
Y++;
}
void SaveRegisters()
{
for (int nIndex = 0; nIndex <= REG_X; nIndex++)
{
arrcMemory[sI++] = arrcRegisters[nIndex]; // I does NOT increment!
}
sI += 1;
}
void LoadRegisters()
{
for (int nIndex = 0; nIndex <= REG_X; nIndex++)
{
arrcRegisters[nIndex] = arrcMemory[sI++]; // I does NOT increment!
}
sI += 1;
}
ChaosBlade said:Heh, thanks. Standard Code Writing is checked on every piece of code we write at the army (im an army programmer), so i got used to that efficient and readable standard
Yes, it optimizes them. But you can erase additional overhead with jump tables.About the jump tables, afaik VS.NET's copiler turns switchs into jump tables instead of if-else lines, so it should not matter much.
Believe me, it's wrong. I should definetly NOT be incremented. Those docs are lying. I fell for that once, too, and I know it should not.As for the I Incarments, Winter's Document doesnt say anything about this,
but the other document someone attached here that includes only the opcode listing specificly says that I needs to point to the next free space after saving the registers.
Hmmmm... if you fix some of the errors, I bet you don't need modulating. I never needed it.Ill look into fixing those little mistakes and optimize a bit. I think ill leave the drawing modulation issue as it is right now, it seems to as good a solution as the other 'quickfix' as bcrew calls it.
Doomulation said:Believe me, it's wrong. I should definetly NOT be incremented. Those docs are lying. I fell for that once, too, and I know it should not.
void (*JumpTable)()[] = { some_func, some_func2 };
void ExecuteOpcode()
{
JumpTable[ opcode >> 12 ]();
}