want to make sure that I am understanding what I read
Posted: Wed Oct 23, 2013 6:55 pm
I have been doing some reverse engineering in order to make sense of the parameters and general coding rhythms and movements of this whole area of coding. A rather large stack of code from Bouncy rev I am able to read up about and find in the dictionary, but the beginning of his code I was wanting just to make sure that I am understanding it correctly.
A number of points I wonder if someone could either confirm or correct for me please:
FROM bouncy rev
local tDragging -- true if dragging the window, false if not
local dx,dy -- the current x and y movement variable
local sx,sy -- the current x and y coordinates of the stack
local cx,cy -- the location at which the user clicked in the stack to start dragging
local sx0,sy0 -- when slingshotting, the start x and y
local tMessage -- the id of the message that moves the window
local tSound -- the path to the sound to play when bouncing
local leftBound,rightBound,bottomBound -- the boundaries to bounce within
-- Bouncy 1.0, copyright 2003 by Geoff Canyon
-- geoff@runrev.com
-- http://www.runrev.com
-- gcanyon@inspiredlogic.com
-- http://www.inspiredlogic.com
on openCard -- startup code
setMeUp
end openCard
on setMeUp -- set boundaries, etc.
put the width of this stack div 2 into leftBound
get the screenrect
put item 3 of it into screenright
put item 4 of it into screenbottom
put screenright - leftBound into rightBound
put the height of this stack div 2 into sh
put screenbottom - sh into bottomBound
put "invitation.aiff" into tSound
end setMeUp
The first section at the top at the beginning is where he has declared local variables by defining the names; these names he has invented for his own purpose?
-----------------------------------------------
on openCard
setMeUp
end openCard
"setMeUp" is not in the dictionary nor has he declared it as a variable
So I could say:
on OpenCard
TittywahaRules
end openCard
as long as I tell the scripting engine what "TittywahaRules" means?
Thankyou
regards
chris
A number of points I wonder if someone could either confirm or correct for me please:
FROM bouncy rev
local tDragging -- true if dragging the window, false if not
local dx,dy -- the current x and y movement variable
local sx,sy -- the current x and y coordinates of the stack
local cx,cy -- the location at which the user clicked in the stack to start dragging
local sx0,sy0 -- when slingshotting, the start x and y
local tMessage -- the id of the message that moves the window
local tSound -- the path to the sound to play when bouncing
local leftBound,rightBound,bottomBound -- the boundaries to bounce within
-- Bouncy 1.0, copyright 2003 by Geoff Canyon
-- geoff@runrev.com
-- http://www.runrev.com
-- gcanyon@inspiredlogic.com
-- http://www.inspiredlogic.com
on openCard -- startup code
setMeUp
end openCard
on setMeUp -- set boundaries, etc.
put the width of this stack div 2 into leftBound
get the screenrect
put item 3 of it into screenright
put item 4 of it into screenbottom
put screenright - leftBound into rightBound
put the height of this stack div 2 into sh
put screenbottom - sh into bottomBound
put "invitation.aiff" into tSound
end setMeUp
The first section at the top at the beginning is where he has declared local variables by defining the names; these names he has invented for his own purpose?
-----------------------------------------------
on openCard
setMeUp
end openCard
"setMeUp" is not in the dictionary nor has he declared it as a variable
So I could say:
on OpenCard
TittywahaRules
end openCard
as long as I tell the scripting engine what "TittywahaRules" means?
Thankyou
regards
chris