The View class is an essential part of SCI
games. It is the base for the sprite, animation, and character handlers
in your game.
Properties
- y
- x
- z
- heading
- yStep
- view
- loop
- cel
- priority
- underBits
- signal
- nsTop
- nsLeft
- nsBottom
- nsRight
- lsTop
- lsLeft
- lsBottom
- lsRight
- brTop
- brLeft
- brBottom
- brRight
Methods
-
void init() |
This clears bit 15 of the signal
property. Then, if the view is not a member of the cast, initializes
lsTop, lsLeft, lsBottom and lsRight to zero, and clears bits
3 and 7 of signal. Finally, it sets up the bounding rectangle
and adds it to the cast.
|
-
void dispose() |
Calls the startUpd() method, then
hide() method. Lastly, it sets bit 15 of signal.
|
-
void showSelf() |
Prints the object name and shows
the view on the screen in a dialog box.
|
-
void posn([number
newX, number newY, number newZ]) |
If the parameters are specified,
it sets the x, y and z properties accordingly. It then sets
up the bounding rectangle and calls the forceUpd() method.
|
-
void stopUpd() |
Stops updating of the view. Sets
bit 0 of signal, and clears bit 1.
|
-
void ForceUpd() |
Forces an update to the view.
Sets bit 6 of signal.
|
-
void startUpd() |
Starts an update of the view.
Sets bit 1 of signal, and clears bit 0.
|
-
void setPri([number
newPriority]) |
Sets the view's priority. If no
parameter is given, it sets bit 4 of signal. Otherwise, if the
priority is -1, it clears bit 4. In the thrid case, it sets
priority to newPriority, and sets bit 4 of signal Finally, it
calls the forceUpd() method.
|
-
void setLoop([number
newLoop]) |
Sets the view's loop. If no parameter
is given, it sets bit 11 of signal. Otherwise, if the loop is
-1, it clears bit 11. In the thrid case, it sets loop to newLoop,
and sets bit 11 of signal Finally, it calls the forceUpd() method.
|
-
void setCel([number
newCel]) |
Sets the view's cel. If no parameter
is given, it sets bit 12 of signal. Otherwise, if the cel is
-1, it clears bit 12. In the thrid case, it sets cel to newCel,
and sets bit 12 of signal. If the newCel is greater than the
last cel, it is set to the last cel. Finally, it calls the forceUpd()
method.
|
-
void ignoreActors([bool
fIGNORE]) |
Sets the view to ignore actors.
If fIGNORE is TRUE, or no param is given, bit 14 of signal is
set. Otherwise, but 14 is cleared.
|
-
void hide() |
Hides the view (makes it invisible).
It sets bit 3 of signal.
|
-
void show() |
Shows the view (makes it visible).
It clears bit 3 of signal.
|
-
void delete() |
Discards the view and unloads
anything else allocated with it if bit 15 of signal is set.
|
-
void addToPic() |
Makes the view a static part of
the background picture. This sets bit 15, 5 and 1 of signal.
|
-
number lastCel() |
Returns the number of the last
cel in the view.
|
-
bool isExtra([bool
fMAKE_EXTRA]) |
Returns TRUE if the view is an
extra, FALSE if otherwise. To figure out if it is an extra or
not, bit 9 of signal is checked. If fMAKE_EXTRA is specified,
it will either set or clear the extra bit in signal, depending
on fMAKE_EXTRA's value.
|
-
void motionCue() |
In the View class, this is simply
a place holder. It does not do anything.
|
|