I am trying to port this project to ICE for the CE
https://www.cemetech.net/downloads/files/2632/x3386
I need help with this project here is my existing code:
prgm BUBLSPRT:
Code:
main src:
Code:
Edit tell me what the heck is wrong with this code and how to fix it we'll deal with optimization later
https://www.cemetech.net/downloads/files/2632/x3386
I need help with this project here is my existing code:
prgm BUBLSPRT:
Code:
DefineSprite(10,10,"FFFF1E1E1E1E1E1EFFFFFF1E1E1E1E1E1F1F1EFF1E1E1E1F1F1E1E1E1F1E1E1E1E1F1F1E1E1E1F1E1E1E1E1F1F1E1E1E1E1E1E1E1E1E1F1F1F1E1E1E1E1F1E1E1E1F1F1E1E1E1E1F1F1E1E1E1E1E1E1EFF1E1F1F1F1F1F1E1EFFFFFF1E1E1E1E1E1EFFFF")→WHOLE
DefineSprite(10,10,"FFFF1D1E1F1F1E1EFFFFFF1D1D1D1E1F1E1E1DFF1E1E1D1D1F1E1D1D1E1E1F1F1E1D1E1D1D1F1F1F1E1F1D1D1D1D1D1D1F1E1E1D1D1D1D1D1D1D1D1D1D1D1D1E1D1D1D1D1F1E1D1E1F1E1E1E1D1D1E1FFF1E1F1F1F1F1E1D1DFFFFFF1E1E1E1E1E1DFFFF")→POPPED
main src:
Code:
BUBBLE
det(0
det(5,23
det(75,255
AsmComp(BUBLSPRT
"111111→Str1
"111111→Str2
"111111→Str3
"111111→Str4
"111111→Str5
//these 2 for loops are the initial rendering
For(X,0,4
For(Y,0,5
det(63,WHOLE,40*X,40*Y,4,4
End
End
Repeat K=56
Repeat K≠0
getKey→K
End
//everything below this to next comment is how i gather keypress
For(I,42,47,1
I-41→C
If K=I
If C=1
"0"+sub(Str1,2,5)→Str1
End
If C>1 and C<6
sub(Str1,C-1,1)+"0"+sub(Str1,C+1,length(Str1)-C)→Str1
End
If C=6
sub(Str1,1,5)+"0"→Str1
End
End
End
For(I,34,39,1
I-33→C
If K=I
If C=1
"0"+sub(Str2,2,5)→Str2
End
If C>1 and C<6
sub(Str2,C-1,1)+"0"+sub(Str2,C+1,length(Str2)-C)→Str2
End
If C=6
sub(Str2,1,5)+"0"→Str2
End
End
End
For(I,26,31,1
I-25→C
If K=I
If C=1
"0"+sub(Str3,2,5)→Str3
End
If C>1 and C<6
sub(Str3,C-1,1)+"0"+sub(Str3,C+1,length(Str3)-C)→Str3
End
If C=6
sub(Str3,1,5)+"0"→Str3
End
End
End
For(I,18,23,1
I-17→C
If K=I
If C=1
"0"+sub(Str4,2,5)→Str4
End
If C>1 and C<6
sub(Str4,C-1,1)+"0"+sub(Str4,C+1,length(Str4)-C)→Str4
End
If C=6
sub(Str4,1,5)+"0"→Str4
End
End
End
For(I,10,15,1
I-9→C
If K=I
If C=1
"0"+sub(Str5,2,5)→Str5
End
If C>1 and C<6
sub(Str5,C-1,1)+"0"+sub(Str5,C+1,length(Str5)-C)→Str5
End
If C=6
sub(Str5,1,5)+"0"→Str5
End
End
End
//everything below this is rendering algorithm this is what i am having the most problems with
For(Y,1,6
If sub(Str1,Y,1)="1"
det(63,WHOLE,0,40*Y,4,4
Else
det(63,POPPED,0,40*Y,4,4
End
End
For(Y,1,6
If sub(Str2,Y,1)="1"
det(63,WHOLE,40,40*Y,4,4
Else
det(63,POPPED,40,40*Y,4,4
End
End
For(Y,1,6
If sub(Str3,Y,1)="1"
det(63,WHOLE,80,40*Y,4,4
Else
det(63,POPPED,80,40*Y,4,4
End
End
For(Y,1,6
If sub(Str4,Y,1)="1"
det(63,WHOLE,120,40*Y,4,4
Else
det(63,POPPED,120,40*Y,4,4
End
End
For(Y,1,6
If sub(Str4,Y,1)="1"
det(63,WHOLE,160,40*Y,4,4
Else
det(63,POPPED,160,40*Y,4,4
End
End
End
Edit tell me what the heck is wrong with this code and how to fix it we'll deal with optimization later








