0 Members and 1 Guest are viewing this topic.
Ah I see, will there eventually be some more differences like enemies moving at 4 pixels intervals and stuff?
Yeah, it's so random and hard to read the source [of TWHG] that I think I'm just going to re-write it.Which leaves open how I'm going to write the level select GUI. Suggestions will be appreciated.
*much later*Quote from: Darl181 on February 01, 2011, 02:25:17 amYeah, it's so random and hard to read the source [of TWHG] that I think I'm just going to re-write it.Which leaves open how I'm going to write the level select GUI. Suggestions will be appreciated.^
Which leaves open how I'm going to write the GUI. Suggestions will be appreciated
I've been trying to implement this for an hour or so now, but to no avail. I think I've finally figured out why it didn't work.Quote from: calcdude84se on November 15, 2010, 07:29:40 pmSo, rather than have one string for each level (using lots of memory), you just have one string that you can change to your needs.Code: [Select]"appvWHGLVL1"[00]"prgmWHGLVL1"[00]->Str0X.L is the level, P is whether or not it's a program. We put its pointer in X.L+48->{P*9+Str0X+7}GetCalc(P*9+Str0X)->XThe line "L+48->{P*9+Str0X+7}" stores the correct digit in the right place. So, if L=6 and P=1, then the data at Str0X now looks like this:Code: [Select]"appvWHGLVL1"[00]"prgmWHGLVL6"[00]The 48 is necessary because the character '0' equals 48, '1' equals 49, etc. 7 is the offset to the first '1', and 9 is the difference between the offsets to the first and second '1's.Quote from: Builderboy on November 15, 2010, 09:38:03 pmIts easy Just go to options, and select Application under 'shell'. The only difference between apps and programs is you can't modify any data that you create in your program. ie: you cant do this:Code: [Select][000102030405]->Str19->{Str1+5} //cant do that!you have to do this insteadCode: [Select][000102030405]->Str1Copy(Str1,L1,6) //copy it to some free ram, but you cant copy back9->{L1+5}The level editor is an app...* Darl181 blinks
So, rather than have one string for each level (using lots of memory), you just have one string that you can change to your needs.Code: [Select]"appvWHGLVL1"[00]"prgmWHGLVL1"[00]->Str0X.L is the level, P is whether or not it's a program. We put its pointer in X.L+48->{P*9+Str0X+7}GetCalc(P*9+Str0X)->XThe line "L+48->{P*9+Str0X+7}" stores the correct digit in the right place. So, if L=6 and P=1, then the data at Str0X now looks like this:Code: [Select]"appvWHGLVL1"[00]"prgmWHGLVL6"[00]The 48 is necessary because the character '0' equals 48, '1' equals 49, etc. 7 is the offset to the first '1', and 9 is the difference between the offsets to the first and second '1's.
"appvWHGLVL1"[00]"prgmWHGLVL1"[00]->Str0X.L is the level, P is whether or not it's a program. We put its pointer in X.L+48->{P*9+Str0X+7}GetCalc(P*9+Str0X)->X
"appvWHGLVL1"[00]"prgmWHGLVL6"[00]
Its easy Just go to options, and select Application under 'shell'. The only difference between apps and programs is you can't modify any data that you create in your program. ie: you cant do this:Code: [Select][000102030405]->Str19->{Str1+5} //cant do that!you have to do this insteadCode: [Select][000102030405]->Str1Copy(Str1,L1,6) //copy it to some free ram, but you cant copy back9->{L1+5}
[000102030405]->Str19->{Str1+5} //cant do that!
[000102030405]->Str1Copy(Str1,L1,6) //copy it to some free ram, but you cant copy back9->{L1+5}
Btw at one point you oughta finish this because you are starting to get some competition now http://www.cemetech.net/forum/viewtopic.php?p=156023#156023 (it actually looks pretty cool too)
Disp "U LOST
More difficult and more optimized:Code: [Select]Disp "U LOST
Disp "LOSE
Quote from: DJ_O on July 07, 2011, 01:42:59 pmBtw at one point you oughta finish this because you are starting to get some competition now http://www.cemetech.net/forum/viewtopic.php?p=156023#156023 (it actually looks pretty cool too)It does, and just like the original Hurry up and finish yours lol