So I was working on a little project to learn ICE by re-creating the phone game MazeDash. I was going through and making sprites for all of the tiles when I hit a wall. When I use this code:

Code:
DefineSprite(8,8)->ARROWR
DefineSprite(8,8)->ARROWU
DefineSprite(8,8)->ADDOWD

det(0)

RotateSpriteC(ARROWL,ARROWU)
RotateSpriteCC(ARROWL,ARROWD)
RotateSpriteHalf(ARROWL,ARROWR)

ScaledSprite_NoClip(ARROWL,0,0,4,4)
ScaledSprite_NoClip(ARROWR,0,0,4,4)
ScaledSprite_NoClip(ARROWU,0,0,4,4)
ScaledSprite_NoClip(ARROWD,0,0,4,4)
ScaledSprite_NoClip(BRICKS,32,0,4,4)
ScaledSprite_NoClip(TELEP,32,32,4,4)
Pause

det(1)


Right now I am trying to just have the sprites be displayed on the screen. However, whenever I include the RotateSprites commands, my calculator just has a RAM reset. I'm just wondering if this is the correct way to be using the Rotate commands. All of the sprites are 8x8 but I just skipped over including them for compactness.
It seems the syntax is right, so I will take a look what's going on behind the scenes. Wink
I had the same problem, I was using Cesium to test my program, and I had it back up the ram, but when it tried to rotate the sprite, it said it had a memory error, and when I pressed enter to exit the error screen, it went back to the same error screen, and continued in a loop, so I turned off my calculator, but when I tried to turn it back on, nothing happened. so I pressed the reset button on the back. Everything is back to normal, except I now have less programs due too the ram reset.

The worst part: I am at school, (supposed to be doing schoolwork) and I can't re-download any of my programs. Surprised Mad
I think the mem error is a Cesium thing, bc I had that same error you described when ASM games APD. Idk about BASIC prgms though...
I cannot replicate this. Do you mind sending me the full program to test it? Thanks. Smile

Code:

DefineSprite(20,20,"18181818181818181818000000000000000000000000000000000000000018000018181818000018000018181818181818180000180000000018001800180000000000000000000000181800001800180000181818181818181800000000001800180018000000000000000000001800001818000018001800001818181818180000180018000000001800180018000000000000180018000018180000180018000018181818000018001800000000180018001800000000000018001800180000181800001800180000181818180000180018001800000000180018001800000000000018001800001818000018001800001818181800001800180000000018001800180000000000001800001800001800001800180018000018181818000000000018001800180018001800180000000000001800001800180018001800180018000018000018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180018001800180000180000001800000018000000180000001800"->S
det(0
det(66,S,J
det(57,J,10,10
Pause
det(1


this was the code (and sprite) I used, hope it helps!

Edit: tested the code again and it still clears my ram

Code:
[i]CEMAZE
DefineSprite(8,8,"FFFFFFFF181818FFFFFFFF18181818FFFFFF181818FFFFFFFF181818FFFFFFFFFF181818FFFFFFFFFFFF181818FFFFFFFFFFFF18181818FFFFFFFFFF181818FF"->ARROWL
DefineSprite(8,8,"FFFF90FFFF90FFFFFF90FF7171FF90FF90FF71FFFF71FF90FF71FF3131FF71FFFF71FF3131FF71FF90FF71FFFF71FF90FF90FF7171FF90FFFFFF90FFFF90FFFF"->TELEP
DefineSprite(8,8,"FF00FFFF00FFFF000000000000000000FFFF00FFFF00FFFF000000000000000000FFFF00FFFF00FF0000000000000000FF00FFFF00FFFF000000000000000000"->BRICKS

DefineSprite(8,8)->ARROWR
DefineSprite(8,8)->ARROWU
DefineSprite(8,8)->ADDOWD

det(0

RotateSpriteC(ARROWL,ARROWU)
RotateSpriteCC(ARROWL,ARROWD)
RotateSpriteHalf(ARROWL,ARROWR)

ScaledSprite_NoClip(ARROWL,0,0,4,4)
ScaledSprite_NoClip(ARROWR,0,32,4,4)
ScaledSprite_NoClip(ARROWU,0,64,4,4)
ScaledSprite_NoClip(ARROWD,0,96,4,4)
ScaledSprite_NoClip(BRICKS,32,0,4,4)
ScaledSprite_NoClip(TELEP,32,32,4,4)
Pause
det(1)

Here's mine. I just pulled it from SourceCoder so the word commands are what are shown. I even tried replacing all the commands with the det( form just in case it was a SC problem but it still didn't work.
Look at these variables:

Code:
DefineSprite(8,8)->ADDOWD
...
RotateSpriteCC(ARROWL,ARROWD)
Wink
Okay so that is cleared up. Now, I'm having a problem when displaying the rotated sprites. The code is still

Code:
[i]CEMAZE
DefineSprite(8,8,"FFFFFFFF181818FFFFFFFF18181818FFFFFF181818FFFFFFFF181818FFFFFFFFFF181818FFFFFFFFFFFF181818FFFFFFFFFFFF18181818FFFFFFFFFF181818FF"->ARROWL
DefineSprite(8,8,"FFFF90FFFF90FFFFFF90FF7171FF90FF90FF71FFFF71FF90FF71FF3131FF71FFFF71FF3131FF71FF90FF71FFFF71FF90FF90FF7171FF90FFFFFF90FFFF90FFFF"->TELEP
DefineSprite(8,8,"FF00FFFF00FFFF000000000000000000FFFF00FFFF00FFFF000000000000000000FFFF00FFFF00FF0000000000000000FF00FFFF00FFFF000000000000000000"->BRICKS

DefineSprite(8,8)->ARROWR
DefineSprite(8,8)->ARROWU
DefineSprite(8,8)->ARROWD

det(0

RotateSpriteC(ARROWL,ARROWU)
RotateSpriteCC(ARROWL,ARROWD)
RotateSpriteHalf(ARROWL,ARROWR)

ScaledSprite_NoClip(ARROWL,0,0,4,4)
ScaledSprite_NoClip(ARROWR,0,32,4,4)
ScaledSprite_NoClip(ARROWU,0,64,4,4)
ScaledSprite_NoClip(ARROWD,0,96,4,4)
ScaledSprite_NoClip(BRICKS,32,0,4,4)
ScaledSprite_NoClip(TELEP,32,32,4,4)
Pause
det(1)

But when I try to display all of the sprites, this is all I get:
Fixed and updated. Thanks for the report! Smile
https://www.cemetech.net/programs/index.php?mode=file&path=/84pce/asm/programs/ICECompiler.zip
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement