|
Post by johnno56 on Apr 17, 2022 17:55:28 GMT -6
1. Is there a way to simulate the functions ubound() and lbound()? 2. Not sure if I have asked this before... sdlbasic uses the "bob(image,x,y,image)" functions for placing images on the screen. It also uses "bobz(image,layer)" to place images on the screen but can place them on different layers to give the illusion of depth. I am pretty sure what the answer might be... but I need to ask... can RC simulate anything like that?
Reason for #2: I have a carousel program written in sdlbasic and would like to replicate it using RC... No big deal if it cannot be done... just curious to know if it could be done...
I can provide the listing if you need to look at it...
|
|
|
Post by tbird on Apr 17, 2022 18:40:41 GMT -6
In reference to #2: Hey johnno56 , it is indeed possible, how I do the depth is the draw order. If image A in your code is displayed before image B it will be behind it. You could have an array of images with a second dimension which is their draw order then a function that sorts then out...just a thought, I can help with an example if you run into trouble.
|
|
|
Post by johnno56 on Apr 17, 2022 21:37:07 GMT -6
I was hoping that someone would suggest that it may be possible... It could make for an interesting main menu for various games or applications... I also have my eye on a vertical carousel... particularly useful for maybe mobile devices? I have not started that one yet. If this one can be done then so can the next... I will attempt the conversion (using primitives) just to see if I can ... My initial project used simple 'primitives' prior to images... 'if it will not work with simple graphics, then chances are, it may not for images' - my reasoning... lol carousel3.zip (153.63 KB) (includes images) Something else that may enhance the program a little... resizing of the image as they move to the 'back'. This will either be fun or the start of a nightmare... Moo Ha Ha... I will keep you posted....
|
|
|
Post by n00b on Apr 17, 2022 22:18:03 GMT -6
johnno56 ArraySize() in rcbasic does the same thing as Ubound() in sdlbasic. Lbound() is not needed in rcbasic because arrays always start at 0.
|
|
|
Post by johnno56 on Apr 17, 2022 23:06:35 GMT -6
Cool... Never used ArraySize()... I will look it up... Reason: Trying my hand at a simple particle system. Starting by converting a "Terry Richey" tutorial which contains 'ubound()'. The tutorial looks simple enough... well, to 'me' any way... lol If it works then we will have another tool in the toolbox... we 'do' have a toolbox, do we not? lol
|
|