View Single Post
Old 19 February 2015, 22:21   #11
Cylon
Registered User
 
Join Date: Oct 2014
Location: Europe
Posts: 472
Quote:
Originally Posted by saimon69 View Post
First of all: are the read-data instructions used in the same way?
second the instruction
Code:
SeedRnd MilliSecs()
is correct or have to use other stuff?

then for instructions like cls, setOrigin etc. are already on blitz 2 or need to use other ones?
Yes, the read-Data is basic BASIC. Please note: Blockcolor is in 24bits (255 values for red/green/blue). So you need AGA display or RTG.

Forget SeedRnd, you don't need it. This is for internal use of the random number generator. Just replace the
Code:
NextPiece = Rand(1, 7)
with
Code:
NextPiece = RND(6)+1
and you are good.

Quote:
Originally Posted by saimon69 View Post
..now i started to convert some of those functions in statements however some of the functions actually have parameter, like RotatePiece; how transfer parameters on a statement?
Code:
Function RotatePiece(rotateLeft = False)
could be just
Code:
Statement RotatePiece{rotateLeft}
Note the brackets. You cannot declare anything of the arguments inside the function arguments. And: Any variable listed as GLOBAL variable on top of the source present in your Function or Statement must be declared inside the Function with SHARED before using it. Otherwise it is 0.
Note: there is a
Code:
  If .... Then Return
inside this Function.
You can (for now) just replace the Return with
Code:
Statement Return
(Normally, you have to "Pop" too. Doesn't matter now.
Quote:
Plus, am planning to use shapes and not drawn blocks: how much the logic might differ?
You can draw the blocks to create your own shapes once and save/load them later. Or you use a paint program. Or you start to use the block drawing and change that later. But this is headache, donot start with this. Try to make it run first, let it compile and see what happens.
Reason: You have to change the logic quite a bit. I would start to replace the little "DrawBlk" Function with a simple "Box", with adaptions for color, of course. this would speed up things a little bit if you after this.

Last edited by Cylon; 28 February 2015 at 02:33. Reason: typos, misspellings and so on..
Cylon is offline  
 
Page generated in 0.04668 seconds with 10 queries