0 Members and 4 Guests are viewing this topic.
244->XSub(LX,XLbl LXIf r1=224.actions for label 224, or even:Goto 224ElseIf r1=225.similar actionsElseIf etc..and even more code, if you need it.End
HoMM: [==--------] Project 'resumed': I'm suffering overwhelming new ideas being popped up in my dreams :PtiDE: [----------] Explored and understood the main part of the code: just started writing a Tokenizer.
what is this command to do exactly? go to the label which has the name of the value stored in X? I think you should just write a handy subroutine for this, which could do the actions you would have placed in the label called [value of X]. The switch-statement would be very handy for this in the future, but isn't implemented yet...
or i would have to add a whole other sprite routine. It gets complicated due to the clipping.
I'm still trying to see if switch statements will be possible and save memory by the way, but I would need to add a break command or something which would be a lot of work.
Quote from: Quigibo on October 06, 2010, 04:51:57 pmI'm still trying to see if switch statements will be possible and save memory by the way, but I would need to add a break command or something which would be a lot of work.You could possibly make Return break out of the switch statement (which could possibly be the smallest solution -- just 4 bytes to push the return location onto the stack and 1 byte per return, as opposed to no overhead and 3 bytes per break)
SetRet(LBL)...Return...Lbl LBL
ld de,LBL push de... ret...LBL:
But note that it will only make your program larger if you want to use it, and if you dont want the size increase, you can stick with the normal routine and just use two or more 8x8