realbasic-games
[Top] [All Lists]

SuperSpriteSurface Resizing and Cloning in Code

To: realbasic-games at lists dot realsoftware dot com
Subject: SuperSpriteSurface Resizing and Cloning in Code
From: James Noe <jamninak at go dot com>
Date: Mon, 26 Sep 2005 22:10:01 -0700 (PDT)
Delivered-to: realbasic-games at lists dot realsoftware dot com
I have been experimenting with John Balestrieri?s SuperSpriteSurface 
(tinrocket.com) and have been pretty impressed. I hope that someone else who is 
using the control can answer a few questions.

I ran into some issues when changing the height and width properties of the 
SuperSpriteSurface in code. After changing these properties it seems as if the 
screen gets scaled or sometimes seems like the position of the sprites get 
offset from where I expected them. If I change them in the IDE and run the same 
code I don?t see these issues. I was planning on allowing different size 
windows, and have the SuperSpriteSurface change size with the window.

The second question is when I attempt to clone a SuperSpriteSurface in code It 
appears that the original SuperSpriteSurface?s properties get changed when I am 
trying to change properties of the new SuperSpriteSurface. For example let?s 
say that I have a SuperSpriteSurface called baseSSS in my window. I clone a new 
SuperSpriteSurface like this.

Dim MySSS as SuperSpriteSurface
mySSS = new baseSSS
mySSS.left = baseSSS.left + baseSSS.width + 10

Oddly this places mySSS directly to the right of the original baseSSS as 
expected, even though other SuperSpriteSurface properties can?t be changed. If 
I now try to change mySSS.backcolor and then run that SuperSpriteSurface, 
instead of affecting mySSS, baseSSS actually gets it?s backcolor changed and 
runs.

mySSS.backcolor = rgb(255,128,0)  //orange to be obvious
mySSS.run

The same thing happens when I try to add sprites or change anything else on 
mySSS. I am currently running RB 5.5.5 on MacOSX 10.3.5 and also on OS9.2.

Thanks, Jim


___________________________________________________
Check-out GO.com
GO get your free GO E-Mail account with expanded storage of 6 MB!
http://mail.go.com


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>