From 17b420578c52b7babc512a166fa88cdfd010eb77 Mon Sep 17 00:00:00 2001
From: n00b
- 1 = OpenCanvas(640, 480, 0, 0, 640, 480, 0)
- 2 = OpenCanvas(640, 480, 0, 0, 640, 480, 0)
+ c1 = OpenCanvas(640, 480, 0, 0, 640, 480, 0)
+ c2 = OpenCanvas(640, 480, 0, 0, 640, 480, 0)
- Canvas(1)
+ Canvas(c1)
- If ActiveCanvas() = 1 Then
- Print "Active canvas is c1"
+ If ActiveCanvas() = c1 Then
+ Print "Active canvas is c1"
End If
- Canvas(2)
+ Canvas(c2)
- If ActiveCanvas() = 2 Then
- Print "Active canvas is now c2"
+ If ActiveCanvas() = c2 Then
+ Print "Active canvas is now c2"
End If
diff --git a/doc/doc_files/actoranimationislooped.html b/doc/doc_files/actoranimationislooped.html index 6a2ee22..6c82705 100644 --- a/doc/doc_files/actoranimationislooped.html +++ b/doc/doc_files/actoranimationislooped.html @@ -3,19 +3,19 @@
-Returns true if an actors animation is set to looped.
- Note: Actor animation is set to looped with the loopActorAnimation() function. + Note: Actor animation is set to looped with the LoopActorAnimation() function.
Related: - loopActorAnimation + LoopActorAnimation
diff --git a/doc/doc_files/actorexists.html b/doc/doc_files/actorexists.html index 642ccd7..63778ab 100644 --- a/doc/doc_files/actorexists.html +++ b/doc/doc_files/actorexists.html @@ -9,6 +9,9 @@
+ Returns true if the id passed is a valid actor +
+\ No newline at end of file diff --git a/doc/doc_files/addactorshadow.html b/doc/doc_files/addactorshadow.html index 60af641..d6b37af 100644 --- a/doc/doc_files/addactorshadow.html +++ b/doc/doc_files/addactorshadow.html @@ -12,7 +12,7 @@ Cast a shadow on an actor during lighting calculations
- Note: Also check the section on lights for more info + Note: Also check the section on lights for more info
Related: RemoveActorShadow diff --git a/doc/doc_files/adjointmatrix.html b/doc/doc_files/adjointmatrix.html index 72dd4db..708eda7 100644 --- a/doc/doc_files/adjointmatrix.html +++ b/doc/doc_files/adjointmatrix.html @@ -9,7 +9,7 @@
- Stores the adjoint matrix of mA in mB + Stores the adjoint matrix of mA in mB
diff --git a/doc/doc_files/android_getexternalstoragestate.html b/doc/doc_files/android_getexternalstoragestate.html index 9c20903..7f60b6a 100644 --- a/doc/doc_files/android_getexternalstoragestate.html +++ b/doc/doc_files/android_getexternalstoragestate.html @@ -21,7 +21,7 @@
If AndBit( Android_GetExternalStorageState(), ANDROID_EXTERNAL_STORAGE_READ ) Then
- Print "Can read from external storage"
+ Print "Can read from external storage"
End If
Related:
diff --git a/doc/doc_files/applyactordamping.html b/doc/doc_files/applyactordamping.html
index 03c9cd4..eea318b 100644
--- a/doc/doc_files/applyactordamping.html
+++ b/doc/doc_files/applyactordamping.html
@@ -20,11 +20,11 @@
ApplyActorCentralImpulse(actor, 300, 0, 0)
While True
- If Not init_damping Then
- ApplyActorDamping(actor, 5.0) 'Will apply the damping effect for 5 seconds
- init_damping = True
- End If
- Update()
+ If Not init_damping Then
+ ApplyActorDamping(actor, 5.0) 'Will apply the damping effect for 5 seconds
+ init_damping = True
+ End If
+ Update()
Wend
Related: diff --git a/doc/doc_files/applyactorimpulseworld.html b/doc/doc_files/applyactorimpulseworld.html index 8d8b6c4..b2a8d08 100644 --- a/doc/doc_files/applyactorimpulseworld.html +++ b/doc/doc_files/applyactorimpulseworld.html @@ -3,11 +3,11 @@
-Applies an impulse to an actor at a specific point. Unlike ApplyActorCentralImpulse(local/world), which applies impulse only at the center of mass (affecting linear velocity), this can generate both linear motion and rotation (torque), depending on where the force is applied relative to the center of mass.
diff --git a/doc/doc_files/applyactortorqueimpulselocal.html b/doc/doc_files/applyactortorqueimpulselocal.html index c738226..9c4ef56 100644 --- a/doc/doc_files/applyactortorqueimpulselocal.html +++ b/doc/doc_files/applyactortorqueimpulselocal.html @@ -3,11 +3,11 @@ -Applies an impulse that directly affects the angular velocity of an actor, causing it to rotate. This is similar to applying an impulse, but instead of changing the linear velocity (which applyActorCentralImpulse does), it alters the body's rotational motion (angular velocity) instantaneously.
diff --git a/doc/doc_files/applyactortorqueimpulseworld.html b/doc/doc_files/applyactortorqueimpulseworld.html index ffc8248..ff2c529 100644 --- a/doc/doc_files/applyactortorqueimpulseworld.html +++ b/doc/doc_files/applyactortorqueimpulseworld.html @@ -3,11 +3,11 @@ -Applies an impulse that directly affects the angular velocity of an actor, causing it to rotate. This is similar to applying an impulse, but instead of changing the linear velocity (which applyActorCentralImpulse does), it alters the body's rotational motion (angular velocity) instantaneously.
diff --git a/doc/doc_files/applyactortorquelocal.html b/doc/doc_files/applyactortorquelocal.html index 02b61a4..04a2a1d 100644 --- a/doc/doc_files/applyactortorquelocal.html +++ b/doc/doc_files/applyactortorquelocal.html @@ -3,11 +3,11 @@ -Applies a continuous torque to an actor, causing it to accelerate its rotational motion over time. Unlike applyActorTorqueImpulse, which causes an immediate change in angular velocity, this applies a torque force gradually, leading to a continuous rotational effect, similar to applying a force to linear motion.
diff --git a/doc/doc_files/applyactortorqueworld.html b/doc/doc_files/applyactortorqueworld.html index d2265c8..70fc39e 100644 --- a/doc/doc_files/applyactortorqueworld.html +++ b/doc/doc_files/applyactortorqueworld.html @@ -3,11 +3,11 @@ -Applies a continuous torque to an actor, causing it to accelerate its rotational motion over time. Unlike applyActorTorqueImpulse, which causes an immediate change in angular velocity, this applies a torque force gradually, leading to a continuous rotational effect, similar to applying a force to linear motion.
diff --git a/doc/doc_files/arrayfill.html b/doc/doc_files/arrayfill.html index c6c12c0..3a86c70 100644 --- a/doc/doc_files/arrayfill.html +++ b/doc/doc_files/arrayfill.html @@ -7,7 +7,7 @@ -Fills all the elements in an array with the value in fdata
diff --git a/doc/doc_files/arraysize.html b/doc/doc_files/arraysize.html index 20f1cce..704c5a3 100644 --- a/doc/doc_files/arraysize.html +++ b/doc/doc_files/arraysize.html @@ -7,7 +7,7 @@ -Returns the number of elements in the given dimension of an array
diff --git a/doc/doc_files/asc.html b/doc/doc_files/asc.html index 07241b9..14aa178 100644 --- a/doc/doc_files/asc.html +++ b/doc/doc_files/asc.html @@ -7,7 +7,7 @@ -Returns the ASCII value of a character.
diff --git a/doc/doc_files/asin.html b/doc/doc_files/asin.html index ad191a6..53ff2c3 100644 --- a/doc/doc_files/asin.html +++ b/doc/doc_files/asin.html @@ -7,7 +7,7 @@ -Returns the ArcSine of a number.
diff --git a/doc/doc_files/atan.html b/doc/doc_files/atan.html index b8cf337..06fe174 100644 --- a/doc/doc_files/atan.html +++ b/doc/doc_files/atan.html @@ -7,7 +7,7 @@ -Returns the ArcTangent of a number.
diff --git a/doc/doc_files/augmentmatrix.html b/doc/doc_files/augmentmatrix.html index f482c74..a7005d5 100644 --- a/doc/doc_files/augmentmatrix.html +++ b/doc/doc_files/augmentmatrix.html @@ -12,7 +12,7 @@ Appends the columns of matrix mB onto matrix mA and stores the result in mC.- NOTE: Must mA and mB must be the same number of rows. + NOTE: Must mA and mB must be the same number of rows.
diff --git a/doc/doc_files/bufferfrommatrix.html b/doc/doc_files/bufferfrommatrix.html index b6b92f2..4e99e2d 100644 --- a/doc/doc_files/bufferfrommatrix.html +++ b/doc/doc_files/bufferfrommatrix.html @@ -12,7 +12,7 @@ Saves the matrix mA in an array
- NOTE: buffer must have the same number of dimensions as the desired matrix for the structure to remain intact. + NOTE: buffer must have the same number of dimensions as the desired matrix for the structure to remain intact.
Related: MatrixFromBuffer diff --git a/doc/doc_files/bufferfromstring.html b/doc/doc_files/bufferfromstring.html index 0b9455e..cf85941 100644 --- a/doc/doc_files/bufferfromstring.html +++ b/doc/doc_files/bufferfromstring.html @@ -9,7 +9,7 @@
- Stores the byte value of a string into a number buffer + Stores the byte value of a string into a number buffer
Related: StringFromBuffer$ diff --git a/doc/doc_files/checksockets.html b/doc/doc_files/checksockets.html index b57031a..46db155 100644 --- a/doc/doc_files/checksockets.html +++ b/doc/doc_files/checksockets.html @@ -9,10 +9,10 @@
- Checks all connected sockets for activity. If timeout_ms is greater than 0 than it will wait that many milliseconds. If less than 0 it will wait for over 49 days (hint: there is no reason what so ever to set this less than 0). + Checks all connected sockets for activity. If timeout_ms is greater than 0 than it will wait that many milliseconds. If less than 0 it will wait for over 49 days (hint: there is no reason what so ever to set this less than 0).
- Returns the number of sockets that have activity (ie. a connection was made or data was sent) + Returns the number of sockets that have activity (ie. a connection was made or data was sent)
diff --git a/doc/doc_files/clearcanvas.html b/doc/doc_files/clearcanvas.html index e8e98ca..338383d 100644 --- a/doc/doc_files/clearcanvas.html +++ b/doc/doc_files/clearcanvas.html @@ -12,6 +12,9 @@ Clears the active drawing canvas
+ NOTE: This is only for drawing canvases (ie. Those opened with OpenCanvas()) +
+\ No newline at end of file diff --git a/doc/doc_files/computeactorangularimpulsedenominator.html b/doc/doc_files/computeactorangularimpulsedenominator.html index 06962d3..c65a4ff 100644 --- a/doc/doc_files/computeactorangularimpulsedenominator.html +++ b/doc/doc_files/computeactorangularimpulsedenominator.html @@ -7,7 +7,7 @@
-Computes a scalar value that represents how an actor will respond to an angular impulse at a given point, taking into account the actor's inertia tensor (which governs how the object resists rotation). This function is particularly useful in calculating the actor's rotational response to an impulse, typically during collision resolution or constraints involving rotation.
diff --git a/doc/doc_files/computeactorgyroimpulselocal.html b/doc/doc_files/computeactorgyroimpulselocal.html index f18826e..265ce83 100644 --- a/doc/doc_files/computeactorgyroimpulselocal.html +++ b/doc/doc_files/computeactorgyroimpulselocal.html @@ -7,7 +7,7 @@ -Computes the gyroscopic impulse for an actor in an implicit manner, based on the actor's current angular velocity and inertia. This function is used to simulate the gyroscopic effect—also known as gyroscopic precession—which occurs when a rotating object experiences a torque that causes its axis of rotation to change.
diff --git a/doc/doc_files/computeactorgyroimpulseworld.html b/doc/doc_files/computeactorgyroimpulseworld.html index bad5d65..431aebd 100644 --- a/doc/doc_files/computeactorgyroimpulseworld.html +++ b/doc/doc_files/computeactorgyroimpulseworld.html @@ -7,7 +7,7 @@ -Computes the gyroscopic impulse for an actor in an implicit manner, but in this case, it performs the calculation relative to the world frame of reference, rather than the actor’s local frame. This function is used to handle the gyroscopic effects (i.e., gyroscopic precession) of a rotating object when a torque is applied, affecting its axis of rotation.
diff --git a/doc/doc_files/computeactorimpulsedenominator.html b/doc/doc_files/computeactorimpulsedenominator.html index a3ce3de..7082ceb 100644 --- a/doc/doc_files/computeactorimpulsedenominator.html +++ b/doc/doc_files/computeactorimpulsedenominator.html @@ -7,7 +7,7 @@ -Computes a scalar value related to how a rigid body will respond to an applied impulse at a given point. It’s primarily used internally in the physics engine to calculate how an object’s mass, inertia, and shape will affect the outcome of impulses, particularly in collisions or constraints like contact points between objects.
diff --git a/doc/doc_files/conditions.html b/doc/doc_files/conditions.html index f4fcdd7..13f3c18 100644 --- a/doc/doc_files/conditions.html +++ b/doc/doc_files/conditions.html @@ -13,11 +13,11 @@
If 5 > 6 Then
- Print "THIS WILL NOT PRINT"
+ Print "THIS WILL NOT PRINT"
ElseIf 5 < 6 Then
- Print "THIS WILL PRINT"
+ Print "THIS WILL PRINT"
Else
- Print "THIS ALSO WILL NOT PRINT"
+ Print "THIS ALSO WILL NOT PRINT"
End If
@@ -29,13 +29,13 @@
Select Case 5
Case 6
- Print THIS WILL NOT "PRINT
+ Print THIS WILL NOT "PRINT
Case 5
- Print "THIS WILL PRINT"
+ Print "THIS WILL PRINT"
Default
- 'Note: Default will be true if every other case is false.
- ' Default is optional and can be excluded if you don't need it
- Print "THIS WILL NOT PRINT"
+ 'Note: Default will be true if every other case is false.
+ ' Default is optional and can be excluded if you don't need it
+ Print "THIS WILL NOT PRINT"
End Select
@@ -44,15 +44,15 @@
Select Case 5
Case 6
- Print THIS WILL NOT "PRINT
+ Print "THIS WILL NOT PRINT"
Case 4, 5
- Print "THIS WILL PRINT"
+ Print "THIS WILL PRINT"
Default
- Print "THIS WILL NOT PRINT"
+ Print "THIS WILL NOT PRINT"
End Select
- The above example is mostly the same as the previous example. The difference is that in our second CASE we are comparing both 4 and 5. If either of them are equal to our SELECT argument then the code inside the CASE block will execute. + The above example is mostly the same as the previous example. The difference is that in our second CASE we are comparing both 4 and 5. If either of them are equal to our SELECT argument then the code inside the CASE block will execute.
diff --git a/doc/doc_files/constraintexists.html b/doc/doc_files/constraintexists.html index 9ac8234..42300e5 100644 --- a/doc/doc_files/constraintexists.html +++ b/doc/doc_files/constraintexists.html @@ -9,6 +9,9 @@
+ Returns true if the id passed is a valid constraint +
+\ No newline at end of file diff --git a/doc/doc_files/copyactormaterial.html b/doc/doc_files/copyactormaterial.html index acbb09c..1e3aac6 100644 --- a/doc/doc_files/copyactormaterial.html +++ b/doc/doc_files/copyactormaterial.html @@ -3,11 +3,11 @@
-Returns a material id for a copy of an actor's material
diff --git a/doc/doc_files/copymaterial.html b/doc/doc_files/copymaterial.html index 075a306..7140ec2 100644 --- a/doc/doc_files/copymaterial.html +++ b/doc/doc_files/copymaterial.html @@ -3,11 +3,11 @@ -Returns a copy of a material
diff --git a/doc/doc_files/createhingeconstraint.html b/doc/doc_files/createhingeconstraint.html index 3b5cc44..32b22cc 100644 --- a/doc/doc_files/createhingeconstraint.html +++ b/doc/doc_files/createhingeconstraint.html @@ -3,11 +3,11 @@ -Simulates a hinge joint, which allows two actors (or an actor and the world) to rotate around a single axis while restricting movement along the other axes. This is similar to the way a door swings on its hinges or how an elbow joint functions in the human body.
diff --git a/doc/doc_files/createhingeconstraintex.html b/doc/doc_files/createhingeconstraintex.html index 5f2467b..9e1e9bd 100644 --- a/doc/doc_files/createhingeconstraintex.html +++ b/doc/doc_files/createhingeconstraintex.html @@ -3,11 +3,11 @@ -Simulates a hinge joint, which allows two actors (or an actor and the world) to rotate around a single axis while restricting movement along the other axes. This is similar to the way a door swings on its hinges or how an elbow joint functions in the human body.
diff --git a/doc/doc_files/createpointconstraint.html b/doc/doc_files/createpointconstraint.html index f9ecea7..a199c13 100644 --- a/doc/doc_files/createpointconstraint.html +++ b/doc/doc_files/createpointconstraint.html @@ -3,11 +3,11 @@ -A type of constraint that allows two actors (or an actor and the world) to move freely relative to each other while ensuring that one point on each body remains coincident. Essentially, it ensures that the two actors stay connected at a single point, but without restricting their relative rotations. This kind of constraint is useful when you need a connection that allows full rotation in all directions, such as a pendulum, ball joint, or even some suspension systems.
diff --git a/doc/doc_files/createpointconstraintex.html b/doc/doc_files/createpointconstraintex.html index b603e5d..1741ed2 100644 --- a/doc/doc_files/createpointconstraintex.html +++ b/doc/doc_files/createpointconstraintex.html @@ -3,11 +3,11 @@ -A type of constraint that allows two actors (or an actor and the world) to move freely relative to each other while ensuring that one point on each body remains coincident. Essentially, it ensures that the two actors stay connected at a single point, but without restricting their relative rotations. This kind of constraint is useful when you need a connection that allows full rotation in all directions, such as a pendulum, ball joint, or even some suspension systems.
diff --git a/doc/doc_files/createslideconstraint.html b/doc/doc_files/createslideconstraint.html index d1f8c1e..2db0edc 100644 --- a/doc/doc_files/createslideconstraint.html +++ b/doc/doc_files/createslideconstraint.html @@ -3,11 +3,11 @@ -A type of constraint that restricts the motion between two actors (or between an actor and the world) in such a way that they can slide along a specific axis and rotate around the same axis, while limiting or allowing movement along other axes. This constraint is similar to a prismatic joint with added rotational freedom, making it useful for simulating objects like pistons, sliding doors, or rail systems.
diff --git a/doc/doc_files/createslideconstraintex.html b/doc/doc_files/createslideconstraintex.html index 00371f4..b139388 100644 --- a/doc/doc_files/createslideconstraintex.html +++ b/doc/doc_files/createslideconstraintex.html @@ -3,11 +3,11 @@ -A type of constraint that restricts the motion between two actors (or between an actor and the world) in such a way that they can slide along a specific axis and rotate around the same axis, while limiting or allowing movement along other axes. This constraint is similar to a prismatic joint with added rotational freedom, making it useful for simulating objects like pistons, sliding doors, or rail systems.
diff --git a/doc/doc_files/deleteactor.html b/doc/doc_files/deleteactor.html index 0695d93..7efb430 100644 --- a/doc/doc_files/deleteactor.html +++ b/doc/doc_files/deleteactor.html @@ -12,6 +12,9 @@ Removes an actor from the scene and frees its memory+ NOTE: Actors are all removed on clearScene so make sure you don't continue using the id after that. +
+\ No newline at end of file diff --git a/doc/doc_files/deleteconstraint.html b/doc/doc_files/deleteconstraint.html index d4ec770..2dca7ba 100644 --- a/doc/doc_files/deleteconstraint.html +++ b/doc/doc_files/deleteconstraint.html @@ -3,11 +3,11 @@
-Removes a constraint
diff --git a/doc/doc_files/deletefont.html b/doc/doc_files/deletefont.html index a4e5d82..65a1bca 100644 --- a/doc/doc_files/deletefont.html +++ b/doc/doc_files/deletefont.html @@ -7,7 +7,7 @@ -Frees a font from memory
diff --git a/doc/doc_files/deleteimage.html b/doc/doc_files/deleteimage.html index 43ba22b..507d13f 100644 --- a/doc/doc_files/deleteimage.html +++ b/doc/doc_files/deleteimage.html @@ -7,7 +7,7 @@ -Removes an image from memory
diff --git a/doc/doc_files/deletematerial.html b/doc/doc_files/deletematerial.html index 7424dda..9a41461 100644 --- a/doc/doc_files/deletematerial.html +++ b/doc/doc_files/deletematerial.html @@ -3,15 +3,18 @@ -Removes a material from memory
+ NOTE: In the case of actor materials, this will simple drop the reference to it but it will not remove the material from the actor. +
+\ No newline at end of file diff --git a/doc/doc_files/deletesprite.html b/doc/doc_files/deletesprite.html index 33b4ffd..f80ae44 100644 --- a/doc/doc_files/deletesprite.html +++ b/doc/doc_files/deletesprite.html @@ -12,6 +12,52 @@ Removes a sprite from memory
+ Here is an example: +
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("CreateSprite", winWidth, winHeight, isFullScreen, vSync)
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, 100, 100)
+
+ eyeSprite2 = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite2, 150, 100)
+
+ timePassed = Timer()
+ timePassedDiff = 2000
+
+ While Not Key(K_ESCAPE)
+
+ If Timer() - timePassed > timePassedDiff Then 'After 2 seconds eyeSprite2 will be deleted
+ DeleteSprite(eyeSprite2)
+ End If
+
+ Update()
+ Wend
+

Related: + OpenCanvasSpriteLayer + SetSpritePosition + CreateSprite +
+\ No newline at end of file diff --git a/doc/doc_files/determinant.html b/doc/doc_files/determinant.html index 3ea3bbc..8f746eb 100644 --- a/doc/doc_files/determinant.html +++ b/doc/doc_files/determinant.html @@ -9,7 +9,7 @@
- Returns the determinant of matrix mA + Returns the determinant of matrix mA
diff --git a/doc/doc_files/drawimage_rotateex.html b/doc/doc_files/drawimage_rotateex.html index 305bcc7..ea696db 100644 --- a/doc/doc_files/drawimage_rotateex.html +++ b/doc/doc_files/drawimage_rotateex.html @@ -9,7 +9,7 @@
- Draws a portion of an image to the current canvas rotated by a given angle. + Draws a portion of an image to the current canvas rotated by a given angle.
diff --git a/doc/doc_files/drawimage_rotozoom.html b/doc/doc_files/drawimage_rotozoom.html index a9069ae..aa375ab 100644 --- a/doc/doc_files/drawimage_rotozoom.html +++ b/doc/doc_files/drawimage_rotozoom.html @@ -9,7 +9,7 @@
- Draws an image to the current canvas rotated and scaled + Draws an image to the current canvas rotated and scaled
diff --git a/doc/doc_files/drawimage_rotozoomex.html b/doc/doc_files/drawimage_rotozoomex.html index 880cf70..9f3a9f7 100644 --- a/doc/doc_files/drawimage_rotozoomex.html +++ b/doc/doc_files/drawimage_rotozoomex.html @@ -9,7 +9,7 @@
- Draws a portion of an image to the current canvas rotated and scaled + Draws a portion of an image to the current canvas rotated and scaled
diff --git a/doc/doc_files/drawimage_zoom.html b/doc/doc_files/drawimage_zoom.html index 71dbd06..12bde10 100644 --- a/doc/doc_files/drawimage_zoom.html +++ b/doc/doc_files/drawimage_zoom.html @@ -9,7 +9,7 @@
- Draws an image to the current canvas scaled by a given factor + Draws an image to the current canvas scaled by a given factor
Related: DrawImage_ZoomEx diff --git a/doc/doc_files/drawtext.html b/doc/doc_files/drawtext.html index f48e389..a9deca0 100644 --- a/doc/doc_files/drawtext.html +++ b/doc/doc_files/drawtext.html @@ -9,7 +9,7 @@
- Draws text to the current canvas + Draws text to the current canvas
diff --git a/doc/doc_files/filelength.html b/doc/doc_files/filelength.html index d7bcb5a..ac5bff7 100644 --- a/doc/doc_files/filelength.html +++ b/doc/doc_files/filelength.html @@ -9,7 +9,7 @@
- Returns the size of a file in bytes. + Returns the size of a file in bytes.
diff --git a/doc/doc_files/fillmatrix.html b/doc/doc_files/fillmatrix.html index d2bf669..7cc1386 100644 --- a/doc/doc_files/fillmatrix.html +++ b/doc/doc_files/fillmatrix.html @@ -9,7 +9,7 @@
- Fills matrix with the given value + Fills matrix with the given value
diff --git a/doc/doc_files/fillmatrixcolumns.html b/doc/doc_files/fillmatrixcolumns.html index 7af2be5..2bc96d0 100644 --- a/doc/doc_files/fillmatrixcolumns.html +++ b/doc/doc_files/fillmatrixcolumns.html @@ -9,7 +9,7 @@
- Fills matrix columns with the given value starting at the given column + Fills matrix columns with the given value starting at the given column
diff --git a/doc/doc_files/fillmatrixrows.html b/doc/doc_files/fillmatrixrows.html index 1f2d4cb..861894f 100644 --- a/doc/doc_files/fillmatrixrows.html +++ b/doc/doc_files/fillmatrixrows.html @@ -9,7 +9,7 @@
- Fills matrix rows with the given value starting at the given row + Fills matrix rows with the given value starting at the given row
diff --git a/doc/doc_files/floodfill.html b/doc/doc_files/floodfill.html index ac60db3..afd743c 100644 --- a/doc/doc_files/floodfill.html +++ b/doc/doc_files/floodfill.html @@ -12,6 +12,9 @@ Fills a closed shape in with the current draw color
+ NOTE: It is not recommended to floodfill the full screen since its prone to stack overload +
+\ No newline at end of file diff --git a/doc/doc_files/fprint.html b/doc/doc_files/fprint.html index 28a21af..ef37dea 100644 --- a/doc/doc_files/fprint.html +++ b/doc/doc_files/fprint.html @@ -12,6 +12,9 @@ Outputs text to the console
+ NOTE: It does the exact same thing as Print. This is here for legacy reasons (ie. I am too lazy to remove it.) +
+\ No newline at end of file diff --git a/doc/doc_files/func_sub.html b/doc/doc_files/func_sub.html index 721896f..8037d17 100644 --- a/doc/doc_files/func_sub.html +++ b/doc/doc_files/func_sub.html @@ -54,8 +54,8 @@
Function MyFunc(a, b)
- c = a + b
- Return c
+ c = a + b
+ Return c
End Function
@@ -72,7 +72,7 @@
Function MyString$ ( G$ )
- Return "YOU ENTERED " + G$
+ Return "YOU ENTERED " + G$
End Function
Print MyString("SOMETHING")
@@ -88,15 +88,15 @@
Type test_type
- Dim a$
- Dim b
+ Dim a$
+ Dim b
End Type
Function test(a$, b) As test_type
- Dim ret_val As test_type
- ret_val.a = a
- ret_val.b = b
- Return ret_val
+ Dim ret_val As test_type
+ ret_val.a = a
+ ret_val.b = b
+ Return ret_val
End Function
Dim myVar as test_type
@@ -107,8 +107,8 @@
You can also have a UDT as a parameter in a function:
- Function 2(n as test_type, j)
- Return 0
+ Function test2(n as test_type, j)
+ Return 0
End Function
@@ -116,9 +116,9 @@
Sub MySub ( )
- For i = 1 To 5
- Print i
- Next
+ For i = 1 To 5
+ Print i
+ Next
End Sub
MySub ( )
@@ -131,7 +131,7 @@
Sub MySub ( a )
- a = 5
+ a = 5
End Sub
n = 0
@@ -144,7 +144,7 @@
Sub MySub ( ByRef a )
- a = 5
+ a = 5
End Sub
n = 0
@@ -153,7 +153,7 @@
Print n
- The above code is the same as the previous example except that now we use the BYREF keyword to change a to a reference rather than a value. This means the when we pass the variable N to MYSUB, instead of the value stored in N being used as A, whatever we do to A will be done to N directly. This example will output 5 to the console. + The above code is the same as the previous example except that now we use the BYREF keyword to change a to a reference rather than a value. This means the when we pass the variable N to MYSUB, instead of the value stored in N being used as A, whatever we do to A will be done to N directly. This example will output 5 to the console.
diff --git a/doc/doc_files/getactorrotationq.html b/doc/doc_files/getactorrotationq.html index f79bb42..4775951 100644 --- a/doc/doc_files/getactorrotationq.html +++ b/doc/doc_files/getactorrotationq.html @@ -12,7 +12,7 @@ Gets the actors rotation as a quaternion.
- Note: This is useful for calculations that require quaternion but most developers should just use GetActorRotation() + Note: This is useful for calculations that require quaternion but most developers should just use GetActorTransform()
Related: GetActorRotation diff --git a/doc/doc_files/getcirclelineintersection.html b/doc/doc_files/getcirclelineintersection.html index 74a0ab2..e9b0979 100644 --- a/doc/doc_files/getcirclelineintersection.html +++ b/doc/doc_files/getcirclelineintersection.html @@ -12,7 +12,7 @@ Calculates the points where a circle and line intersect and stores the intersection points in (ix1, iy1) and (ix2, iy2)
- NOTE: This function returns 0 if there is no intersection and 1 or 2 if there is 1 or 2 intersection points. If it only returns 1 then only (ix1, iy1) will be set. + NOTE: This function returns 0 if there is no intersection and 1 or 2 if there is 1 or 2 intersection points. If it only returns 1 then only (ix1, iy1) will be set.
diff --git a/doc/doc_files/getconeanglepoint.html b/doc/doc_files/getconeanglepoint.html index 6a5b905..2a43082 100644 --- a/doc/doc_files/getconeanglepoint.html +++ b/doc/doc_files/getconeanglepoint.html @@ -9,7 +9,7 @@
- Computes or retrieves a point based on a given angle relative to the constraint’s twist axis. + Computes or retrieves a point based on a given angle relative to the constraint’s twist axis.
diff --git a/doc/doc_files/getdesktopdisplaymode.html b/doc/doc_files/getdesktopdisplaymode.html index 99d7a60..51cce9a 100644 --- a/doc/doc_files/getdesktopdisplaymode.html +++ b/doc/doc_files/getdesktopdisplaymode.html @@ -19,7 +19,7 @@ w, h - The width and height of the display will be stored in these variables
diff --git a/doc/doc_files/getlighttype.html b/doc/doc_files/getlighttype.html index bc32006..ba71148 100644 --- a/doc/doc_files/getlighttype.html +++ b/doc/doc_files/getlighttype.html @@ -22,10 +22,10 @@ LIGHT_TYPE_POINT
Related: SetLightType
diff --git a/doc/doc_files/getlineplaneintersection.html b/doc/doc_files/getlineplaneintersection.html index 4ad04a5..b8e52c2 100644 --- a/doc/doc_files/getlineplaneintersection.html +++ b/doc/doc_files/getlineplaneintersection.html @@ -28,7 +28,7 @@ plane_point_2 - An array with an (x,y,z) point representing a point on a plane in 3D spacediff --git a/doc/doc_files/getmaterialblendmode.html b/doc/doc_files/getmaterialblendmode.html index 1c6ba17..edc46e0 100644 --- a/doc/doc_files/getmaterialblendmode.html +++ b/doc/doc_files/getmaterialblendmode.html @@ -19,31 +19,31 @@ BLEND_MODE_NONE
Related: diff --git a/doc/doc_files/getspriteposition.html b/doc/doc_files/getspriteposition.html index b74dfbb..8c53d50 100644 --- a/doc/doc_files/getspriteposition.html +++ b/doc/doc_files/getspriteposition.html @@ -11,6 +11,67 @@
Gets the position of a sprite on the canvas
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("GetSpritePosition", winWidth, winHeight, isFullScreen, vSync)
+ pCanvas = OpenCanvas(200, 80, 0, 0, 200, 80, 1) 'Need to open a canvas for drawing the text
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM font1
+
+ Font1 = LoadFont("DripOctober.ttf", 16)
+ SetFont(Font1)
+ SetColor(RGB(100, 200, 200))
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ DIM eyeX 'Variables to pass into the function for holding the x and y values
+ DIM eyeY
+ eyeSpriteX = 100
+ eyeSpriteY = 100
+ destX = 0
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, eyeSpriteX, eyeSpriteY)
+
+ While Not Key(K_ESCAPE)
+ clearcanvas()
+ Canvas(sCanvas) 'change to the sprite canvas for drawing sprites
+ If SpriteX(eyeSprite) < 450 And destX = 0 Then
+ SetSpritePosition(eyeSprite, eyeSpriteX, eyeSpriteY)
+ eyeSpriteX = eyeSpriteX + 0.5
+ ElseIf SpriteX(eyeSprite) >= 440 And destX = 0 Then
+ destX = 1
+ End If
+
+ If destX = 1 Then
+ SetSpritePosition(eyeSprite, eyeSpriteX, eyeSpriteY)
+ eyeSpriteX = eyeSpriteX - 0.5
+ End If
+
+ GetSpritePosition(eyeSprite, eyeX, eyeY)
+ Canvas(pCanvas) 'change to the standard drawing canvas for drawing text
+ DrawText("Sprite X: " + STR$(eyeX), 10, 30)
+ DrawText("Sprite Y: " + STR$(eyeY), 10, 50)
+
+ Update()
+ Wend
+

+
Link to Font (It's locally on your computer, your not downloading anything from the internet)
+
Related: TranslateSprite SetSpritePosition diff --git a/doc/doc_files/getspriterotation.html b/doc/doc_files/getspriterotation.html index f1cc8af..a1b8099 100644 --- a/doc/doc_files/getspriterotation.html +++ b/doc/doc_files/getspriterotation.html @@ -11,6 +11,63 @@
Returns the angle the sprite is rotated by
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("GetSpriteRotation", winWidth, winHeight, isFullScreen, vSync)
+ pCanvas = OpenCanvas(200, 80, 0, 0, 200, 80, 1) 'Need to open a canvas for drawing the text
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM font1
+
+ Font1 = LoadFont("DripOctober.ttf", 16)
+ SetFont(Font1)
+ SetColor(RGB(100, 200, 200))
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ DIM eyeAngle 'Variable to hold the sprites angle value
+ DIM displayAngle
+ ReleaseKey = 0
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, 100, 100)
+
+ 'RotateSprite(eyeSprite, eyeAngle)
+
+ While Not Key(K_ESCAPE)
+ ClearCanvas()
+ Canvas(sCanvas)
+
+ If Key(K_SPACE) And ReleaseKey = 0 Then
+ eyeAngle = 30
+ RotateSprite(eyeSprite, eyeAngle)
+ ReleaseKey = 1
+ ElseIf Not Key(K_SPACE) And ReleaseKey = 1 then
+ ReleaseKey = 0
+ End If
+
+ displayAngle = GetSpriteRotation(eyeSprite)
+ Canvas(pCanvas) 'change to the standard drawing canvas for drawing text
+ DrawText("Sprite Angle: " + STR$(displayAngle), 10, 30)
+
+ Update()
+ Wend
+

+
Link to Font (It's locally on your computer, your not downloading anything from the internet)
+
Related: SetSpriteRotation RotateSprite diff --git a/doc/doc_files/getspritescale.html b/doc/doc_files/getspritescale.html index 95b8e4f..faffad4 100644 --- a/doc/doc_files/getspritescale.html +++ b/doc/doc_files/getspritescale.html @@ -11,6 +11,73 @@
Gets the scale of a sprite
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("GetSpriteScale", winWidth, winHeight, isFullScreen, vSync)
+ pCanvas = OpenCanvas(200, 80, 0, 0, 200, 80, 1) 'Need to open a canvas for drawing the text
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM font1
+
+ Font1 = LoadFont("DripOctober.ttf", 16)
+ SetFont(Font1)
+ SetColor(RGB(100, 200, 200))
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ DIM eyeScale 'Variable to hold the sprites scale
+ ReleaseKey = 0
+ eyeScale = 2
+
+ DIM eyeScaleX
+ DIM eyeScaleY
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, 100, 100)
+
+ eyeSprite2 = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite2, 200, 100)
+
+ SetSpriteScale(eyeSprite2, eyeScale, eyeScale)
+
+ While Not Key(K_ESCAPE)
+ ClearCanvas()
+ Canvas(sCanvas)
+
+ If Key(K_UP) And ReleaseKey = 0 Then
+ eyeScale = 1.1
+ ScaleSprite(eyeSprite2, eyeScale, eyeScale)
+ ReleaseKey = 1
+ ElseIf Key(K_DOWN) And ReleaseKey = 0 Then
+ eyeScale = 0.9
+ ScaleSprite(eyeSprite2, eyeScale, eyeScale)
+ ReleaseKey = 1
+ ElseIf Not Key(K_UP) And Not Key(K_DOWN) And ReleaseKey = 1 then
+ ReleaseKey = 0
+ End If
+
+ GetSpriteScale(eyeSprite2, eyeScaleX, eyeScaleY)
+ Canvas(pCanvas) 'change to the standard drawing canvas for drawing text
+ DrawText("Sprite Scale X: " + STR$(eyeScaleX), 10, 30)
+
+ Update()
+ Wend
+

+
Link to Font (It's locally on your computer, your not downloading anything from the internet)
+
Related: ScaleSprite SetSpriteScale diff --git a/doc/doc_files/getspritesize.html b/doc/doc_files/getspritesize.html index 197ebb1..b2baa67 100644 --- a/doc/doc_files/getspritesize.html +++ b/doc/doc_files/getspritesize.html @@ -11,6 +11,51 @@
Gets the size of a sprite's frames
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("ScaleSprite", winWidth, winHeight, isFullScreen, vSync)
+ pCanvas = OpenCanvas(200, 80, 0, 0, 200, 80, 1) 'Need to open a canvas for drawing the text
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ DIM eSpriteWidth
+ DIM eSpriteHeight
+
+ DIM font1
+
+ Font1 = LoadFont("DripOctober.ttf", 16)
+ SetFont(Font1)
+ SetColor(RGB(100, 200, 200))
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, 100, 100)
+
+ GetSpriteSize(eyeSprite, eSpriteWidth, eSpriteHeight)
+
+ While Not Key(K_ESCAPE)
+ Canvas(pCanvas) 'change to the standard drawing canvas for drawing text
+ DrawText("EyeSprite Width " + STR$(eSpriteWidth), 10, 30)
+ DrawText("EyeSprite Height " + STR$(eSpriteHeight), 10, 50)
+
+ Update()
+ Wend
+

+
Link to Font (It's locally on your computer, your not downloading anything from the internet)
+
Related: CreateSprite
diff --git a/doc/doc_files/getspritesource.html b/doc/doc_files/getspritesource.html index 4134ba3..4c649e0 100644 --- a/doc/doc_files/getspritesource.html +++ b/doc/doc_files/getspritesource.html @@ -11,6 +11,41 @@Returns the source image the sprite renders its frames from
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("GetSpriteSource", winWidth, winHeight, isFullScreen, vSync)
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM frown
+ DIM frownW
+ DIM frownH
+ DIM spSource$
+
+ frowny1 = LoadImage("frowny1.png")
+ frowny2 = LoadImage("frowny2.png")
+ GetImageSize(frown, frownW, frownH)
+
+ frownSprite = CreateSprite(frown, frownW, frownH)
+ SetSpritePosition(frownSprite, 100, 100)
+
+ While Not Key(K_ESCAPE)
+ If KEY(K_SPACE) Then
+ SetSpriteSource(frownSprite, frowny2)
+ End If
+ Update()
+ spSource$ = STR$(GetSpriteSource(frown))
+ Print spSource$
+ Wend
+


Related: SetSpriteSource CreateSprite diff --git a/doc/doc_files/getspritetype.html b/doc/doc_files/getspritetype.html index e64cb7c..f64e9e7 100644 --- a/doc/doc_files/getspritetype.html +++ b/doc/doc_files/getspritetype.html @@ -19,15 +19,74 @@
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("GetSpriteType", winWidth, winHeight, isFullScreen, vSync)
+ pCanvas = OpenCanvas(200, 80, 0, 0, 200, 80, 1) 'Need to open a canvas for drawing the text
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ eyeSpriteX = 100
+ eyeSpriteY = 100
+ eyeSprite2X = 400
+ eyeSprite2Y = 125
+
+ DIM font1
+
+ Font1 = LoadFont("DripOctober.ttf", 16)
+ SetFont(Font1)
+ SetColor(RGB(100, 200, 200))
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, eyeSpriteX, eyeSpriteY)
+ SetSpriteSolid(eyeSprite, 1)
+ SetSpriteType(eyeSprite, SPRITE_TYPE_KINEMATIC)
+
+ 'The flags for each type are SPRITE_TYPE_STATIC = 0
+ ' SPRITE_TYPE_KINEMATIC = 1
+ ' SPRITE_TYPE_DYNAMIC = 2
+
+ eyeSprite2 = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite2, eyeSprite2X, eyeSprite2Y)
+ SetSpriteSolid(eyeSprite2, 1)
+ SetSpriteType(eyeSprite2, SPRITE_TYPE_DYNAMIC)
+
+ While Not Key(K_ESCAPE)
+ ClearCanvas()
+ Canvas(sCanvas)
+
+ Canvas(pCanvas) 'change to the standard drawing canvas for drawing text
+
+ DrawText("Sprite on left type: " + STR$(GetSpriteType(eyeSprite)), 10, 30)
+
+ Update()
+ Wend
+

+
Link to Font (It's locally on your computer, your not downloading anything from the internet)
+
Related: SetSpriteType
diff --git a/doc/doc_files/grabinput.html b/doc/doc_files/grabinput.html index bdb1337..18ec065 100644 --- a/doc/doc_files/grabinput.html +++ b/doc/doc_files/grabinput.html @@ -9,7 +9,7 @@- Sets whether the currently active window will grab user input + Sets whether the currently active window will grab user input
diff --git a/doc/doc_files/hello_world.html b/doc/doc_files/hello_world.html index b8ca1a0..10c7706 100644 --- a/doc/doc_files/hello_world.html +++ b/doc/doc_files/hello_world.html @@ -335,22 +335,22 @@ Given we have two number stored in variables a and b.
- •.a = b : Test if a is equal to b + •.a = b : Test if a is equal to b
- •.a < b : Test if a is less than b + •.a < b : Test if a is less than b
- •.a > b : Test if a is greater than b + •.a > b : Test if a is greater than b
- •.a <= b : Test if a is less than or equal to b + •.a <= b : Test if a is less than or equal to b
- •.a >= b : Test if a is greater than or equal to b + •.a >= b : Test if a is greater than or equal to b
- •.a <> b : Test if a is not equal to b + •.a <> b : Test if a is not equal to b
Here is a few examples of doing some of these comparisons with a IF statement. @@ -424,7 +424,7 @@ This code will write "This is true" to the console because 1 is equal to 1 and 4 is greater than 2. Yes it is that simple.
- If 11 AND 4>2 Then
+ If 1=1 AND 4>2 Then
Print "This is true"
End If
- If 12 AND 5<6 Then
+ If 1=2 AND 5<6 Then
Print "This is true"
End If
- If 11 XOR 2 <> 2 Then
+ If 1=1 XOR 2 <> 2 Then
Print "This is true"
End If
- If NOT (13) Then
+ If NOT (1=3) Then
Print "This is true"
End If
- Increments all the values in a specified number of columns in matrix mA, starting from column c. The result is stored in matrix mB + Increments all the values in a specified number of columns in matrix mA, starting from column c. The result is stored in matrix mB
diff --git a/doc/doc_files/incrementmatrixrows.html b/doc/doc_files/incrementmatrixrows.html index 697655f..7342dee 100644 --- a/doc/doc_files/incrementmatrixrows.html +++ b/doc/doc_files/incrementmatrixrows.html @@ -9,7 +9,7 @@
- Increments all the values in a specified number of rows in matrix mA, starting from row r. The result is stored in matrix mB + Increments all the values in a specified number of rows in matrix mA, starting from row r. The result is stored in matrix mB
diff --git a/doc/doc_files/insertmatrixrows.html b/doc/doc_files/insertmatrixrows.html index 2d37e21..3769471 100644 --- a/doc/doc_files/insertmatrixrows.html +++ b/doc/doc_files/insertmatrixrows.html @@ -9,7 +9,7 @@
- Insert a number of empty rows into matrix mA starting at the specified row. + Insert a number of empty rows into matrix mA starting at the specified row.
diff --git a/doc/doc_files/interpolate.html b/doc/doc_files/interpolate.html index 0b3fbc2..ce13906 100644 --- a/doc/doc_files/interpolate.html +++ b/doc/doc_files/interpolate.html @@ -9,7 +9,7 @@
- This function returns a value interpolated based on the comparison between a mid value in a range of given min and max values + This function returns a value interpolated based on the comparison between a mid value in a range of given min and max values
diff --git a/doc/doc_files/intro.html b/doc/doc_files/intro.html index a4dcf10..57af014 100644 --- a/doc/doc_files/intro.html +++ b/doc/doc_files/intro.html @@ -9,10 +9,10 @@
- First I would like to say thank you for taking an interest in RCBASIC ( I use all caps because I think it looks more retro that way). RCBASIC is a variant of the BASIC programming language. It consist of a compiler, interpreter, and a code editor. This version of BASIC was mostly influenced by sdlBasic and QBasic. My main reason for writing this software was just to have fun and challenge myself. This language is not as full featured as C++ or Java but you can still create some awesome stuff with it. I hope you have as much fun using this software as I had making it. + First I would like to say thank you for taking an interest in RCBASIC ( I use all caps because I think it looks more retro that way). RCBASIC is a variant of the BASIC programming language. It consist of a compiler, interpreter, and a code editor. This version of BASIC was mostly influenced by sdlBasic and QBasic. My main reason for writing this software was just to have fun and challenge myself. This language is not as full featured as C++ or Java but you can still create some awesome stuff with it. I hope you have as much fun using this software as I had making it.
- Rodney Cunningham (aka. n00b) + Rodney Cunningham (aka. n00b)
diff --git a/doc/doc_files/invertmatrix.html b/doc/doc_files/invertmatrix.html index 4d080b5..f53a454 100644 --- a/doc/doc_files/invertmatrix.html +++ b/doc/doc_files/invertmatrix.html @@ -9,7 +9,7 @@
- Stores the inverse matrix of mA in mB + Stores the inverse matrix of mA in mB
diff --git a/doc/doc_files/io.html b/doc/doc_files/io.html
index 6c90c03..247ada9 100644
--- a/doc/doc_files/io.html
+++ b/doc/doc_files/io.html
@@ -33,7 +33,7 @@
USER_NAME$ = INPUT$("WHAT IS YOUR NAME? ")
- The above example will ask the user WHAT IS YOUR NAME? and then store whatever the user types in into the variable USER_NAME$. + The above example will ask the user WHAT IS YOUR NAME? and then store whatever the user types in into the variable USER_NAME$.
diff --git a/doc/doc_files/isequalmatrix.html b/doc/doc_files/isequalmatrix.html index cbaf025..56eda92 100644 --- a/doc/doc_files/isequalmatrix.html +++ b/doc/doc_files/isequalmatrix.html @@ -9,7 +9,7 @@
- Returns true if matrix mA is within tolerance of matrix mB + Returns true if matrix mA is within tolerance of matrix mB
diff --git a/doc/doc_files/joinmatrixcolumns.html b/doc/doc_files/joinmatrixcolumns.html index 28fe335..5a58658 100644 --- a/doc/doc_files/joinmatrixcolumns.html +++ b/doc/doc_files/joinmatrixcolumns.html @@ -9,7 +9,7 @@
- Appends the columns in matrix mB below matrix mA. + Appends the columns in matrix mB below matrix mA.
diff --git a/doc/doc_files/joinmatrixrows.html b/doc/doc_files/joinmatrixrows.html index acfa66d..d7f605d 100644 --- a/doc/doc_files/joinmatrixrows.html +++ b/doc/doc_files/joinmatrixrows.html @@ -9,7 +9,7 @@
- Appends the rows in matrix mB onto the right of matrix mA. + Appends the rows in matrix mB onto the right of matrix mA.
diff --git a/doc/doc_files/lcase.html b/doc/doc_files/lcase.html index cee7ca8..e0fdcff 100644 --- a/doc/doc_files/lcase.html +++ b/doc/doc_files/lcase.html @@ -3,11 +3,11 @@
-Returns src$ converted to a completely lower-case string
diff --git a/doc/doc_files/license.html b/doc/doc_files/license.html index c59c270..6481455 100644 --- a/doc/doc_files/license.html +++ b/doc/doc_files/license.html @@ -9,7 +9,7 @@- RCBasic is available under the zlib license : + RCBasic is available under the zlib license :
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. diff --git a/doc/doc_files/loopactoranimation.html b/doc/doc_files/loopactoranimation.html index 834ce51..4f2c970 100644 --- a/doc/doc_files/loopactoranimation.html +++ b/doc/doc_files/loopactoranimation.html @@ -3,11 +3,11 @@
-Enables or disables actor animation loop
diff --git a/doc/doc_files/loops.html b/doc/doc_files/loops.html index f6f3be7..8faa18e 100644 --- a/doc/doc_files/loops.html +++ b/doc/doc_files/loops.html @@ -16,7 +16,7 @@
For I = 1 To 5
- Print I
+ Print I
Next
@@ -24,7 +24,7 @@
For I = 1 To 5 Step 2
- Print I
+ Print I
Next
@@ -36,8 +36,8 @@
I = 0
While I < 5
- Print I
- I = I + 1
+ Print I
+ I = I + 1
Wend
@@ -51,7 +51,7 @@
Do
- Print "HELLO WORLD"
+ Print "HELLO WORLD"
Loop
@@ -60,8 +60,8 @@
I = 0
Do
- Print I
- I = I + 1
+ Print I
+ I = I + 1
Loop While I < 5
@@ -70,12 +70,12 @@
I = 0
Do
- Print I
- I = I + 1
+ Print I
+ I = I + 1
Loop Until I = 5
- The above code will output the numbers 0 to 4 to the console. This form of the DO loop will continue to loop until the loop condition is true. + The above code will output the numbers 0 to 4 to the console. This form of the DO loop will continue to loop until the loop condition is true.
diff --git a/doc/doc_files/ltrim.html b/doc/doc_files/ltrim.html index eaeefe6..ef3f472 100644 --- a/doc/doc_files/ltrim.html +++ b/doc/doc_files/ltrim.html @@ -3,14 +3,18 @@
-Returns src$ with all the spaces before the first non-space character removed.
+diff --git a/doc/doc_files/materialexists.html b/doc/doc_files/materialexists.html index 28d8e90..19dd058 100644 --- a/doc/doc_files/materialexists.html +++ b/doc/doc_files/materialexists.html @@ -9,6 +9,9 @@
+ Returns true if the material id is an existing material +
+\ No newline at end of file diff --git a/doc/doc_files/materialisaplhablend.html b/doc/doc_files/materialisaplhablend.html index 30353a3..638739e 100644 --- a/doc/doc_files/materialisaplhablend.html +++ b/doc/doc_files/materialisaplhablend.html @@ -3,11 +3,11 @@
-Returns true if alpha blending is enabled for a material
diff --git a/doc/doc_files/materialisgouraudshaded.html b/doc/doc_files/materialisgouraudshaded.html index e889bb9..5e9c3d8 100644 --- a/doc/doc_files/materialisgouraudshaded.html +++ b/doc/doc_files/materialisgouraudshaded.html @@ -3,11 +3,11 @@ -Returns true if material is set to goraud shading
diff --git a/doc/doc_files/materialislit.html b/doc/doc_files/materialislit.html index 30c2f01..8d8cccb 100644 --- a/doc/doc_files/materialislit.html +++ b/doc/doc_files/materialislit.html @@ -3,11 +3,11 @@ -Returns true if a material is affected by lights in the scene
diff --git a/doc/doc_files/materialisnormalized.html b/doc/doc_files/materialisnormalized.html index 34cf5a2..97072ff 100644 --- a/doc/doc_files/materialisnormalized.html +++ b/doc/doc_files/materialisnormalized.html @@ -3,11 +3,11 @@ -Returns true if material has normalized normals
diff --git a/doc/doc_files/materialispointcloud.html b/doc/doc_files/materialispointcloud.html index d71a5e0..e978c96 100644 --- a/doc/doc_files/materialispointcloud.html +++ b/doc/doc_files/materialispointcloud.html @@ -3,11 +3,11 @@ -Returns true if material is set to render with point cloud
diff --git a/doc/doc_files/materialistransparent.html b/doc/doc_files/materialistransparent.html index e16d041..5dc3329 100644 --- a/doc/doc_files/materialistransparent.html +++ b/doc/doc_files/materialistransparent.html @@ -3,11 +3,11 @@ -Returns true if material is transparent
diff --git a/doc/doc_files/materialiswireframe.html b/doc/doc_files/materialiswireframe.html index 0a706d7..4aa8ba5 100644 --- a/doc/doc_files/materialiswireframe.html +++ b/doc/doc_files/materialiswireframe.html @@ -3,11 +3,11 @@ -Returns true if the material is rendered with non-filled triangles
diff --git a/doc/doc_files/matrixfrombuffer.html b/doc/doc_files/matrixfrombuffer.html index c710863..09bf0eb 100644 --- a/doc/doc_files/matrixfrombuffer.html +++ b/doc/doc_files/matrixfrombuffer.html @@ -12,7 +12,7 @@ Creates a matrix from an array.- NOTE: buffer must have the same number of dimensions as the desired matrix for the structure to remain intact. + NOTE: buffer must have the same number of dimensions as the desired matrix for the structure to remain intact.
diff --git a/doc/doc_files/matrixvalue.html b/doc/doc_files/matrixvalue.html index 6e1c269..af8f0a5 100644 --- a/doc/doc_files/matrixvalue.html +++ b/doc/doc_files/matrixvalue.html @@ -9,7 +9,7 @@
- Returns the value stored at the given row and column in the matrix + Returns the value stored at the given row and column in the matrix
diff --git a/doc/doc_files/multiplymatrix.html b/doc/doc_files/multiplymatrix.html index 6e6c36a..1e90784 100644 --- a/doc/doc_files/multiplymatrix.html +++ b/doc/doc_files/multiplymatrix.html @@ -9,7 +9,7 @@
- Multiply matrix mA and mB and store the result in mC + Multiply matrix mA and mB and store the result in mC
diff --git a/doc/doc_files/openfile.html b/doc/doc_files/openfile.html index ff67eff..09cb0dd 100644 --- a/doc/doc_files/openfile.html +++ b/doc/doc_files/openfile.html @@ -57,7 +57,7 @@ BINARY_OUTPUT_PLUS - Opens a file for both reading and writing. If the file already exist it will be overwritten.
diff --git a/doc/doc_files/openurl.html b/doc/doc_files/openurl.html index 09639c0..b4847a2 100644 --- a/doc/doc_files/openurl.html +++ b/doc/doc_files/openurl.html @@ -9,7 +9,7 @@
- Opens a URL in the internet browser + Opens a URL in the internet browser
diff --git a/doc/doc_files/openwindowex.html b/doc/doc_files/openwindowex.html index 37bb333..b6b2d15 100644 --- a/doc/doc_files/openwindowex.html +++ b/doc/doc_files/openwindowex.html @@ -15,6 +15,11 @@ Returns true if window was opened and false if a window could not be opened
- Returns true if emitter emits min<->max particles for every vertex or to pick min<->max vertices. + Returns true if emitter emits min<->max particles for every vertex or to pick min<->max vertices.
Related: useParticleEveryMeshVertex diff --git a/doc/doc_files/particleisusingnormaldirection.html b/doc/doc_files/particleisusingnormaldirection.html index 366f7c2..1ca0214 100644 --- a/doc/doc_files/particleisusingnormaldirection.html +++ b/doc/doc_files/particleisusingnormaldirection.html @@ -9,7 +9,7 @@
- Returns true if particle emitter is using vertex normal for direction, or direction specified. + Returns true if particle emitter is using vertex normal for direction, or direction specified.
Related: useParticleNormalDirection diff --git a/doc/doc_files/randomizematrix.html b/doc/doc_files/randomizematrix.html index ab0a269..2e3d9ba 100644 --- a/doc/doc_files/randomizematrix.html +++ b/doc/doc_files/randomizematrix.html @@ -9,7 +9,7 @@
- Stores random values between vmin and vmax in the matrix mA + Stores random values between vmin and vmax in the matrix mA
diff --git a/doc/doc_files/rotatesprite.html b/doc/doc_files/rotatesprite.html index 9d03bdb..9e36a04 100644 --- a/doc/doc_files/rotatesprite.html +++ b/doc/doc_files/rotatesprite.html @@ -11,6 +11,48 @@
Sets the angle the sprite is rotated by relative to its current rotation
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("RotateSprite", winWidth, winHeight, isFullScreen, vSync)
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ DIM eyeAngle 'Variable to hold the sprites angle value
+ eyeAngle = 250
+ ReleaseKey = 0
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, 100, 100)
+
+ 'RotateSprite(eyeSprite, eyeAngle)
+
+ While Not Key(K_ESCAPE)
+ 'ClearCanvas() For a sprite layer canvas, you don't need to call ClearCanvas. It's automatically called.
+
+ If Key(K_SPACE) And ReleaseKey = 0 Then
+ eyeAngle = 30
+ RotateSprite(eyeSprite, eyeAngle)
+ ReleaseKey = 1
+ ElseIf Not Key(K_SPACE) And ReleaseKey = 1 then
+ ReleaseKey = 0
+ End If
+
+ Update() 'Update automatically deals with drawing the sprites on the sprite canvas.
+ Wend
+

Related: SetSpriteRotation GetSpriteRotation diff --git a/doc/doc_files/runtime.html b/doc/doc_files/runtime.html index 0b2322c..7d6a8d3 100644 --- a/doc/doc_files/runtime.html +++ b/doc/doc_files/runtime.html @@ -9,7 +9,7 @@
- Returns the path to the RCBasic runtime that launched the current program + Returns the path to the RCBasic runtime that launched the current program
diff --git a/doc/doc_files/runtime_utility_message.html b/doc/doc_files/runtime_utility_message.html index 4974d86..aad9ddb 100644 --- a/doc/doc_files/runtime_utility_message.html +++ b/doc/doc_files/runtime_utility_message.html @@ -12,7 +12,7 @@ Passes arg$ to the rc_intern_runtime_utility() function in the rc_media.h file. The function returns a string.
- Note: On IOS there a file in the project called rcbasic_ios_native.h which is already setup for you to add your C++ code. + Note: On IOS there a file in the project called rcbasic_ios_native.h which is already setup for you to add your C++ code.
diff --git a/doc/doc_files/scalarmatrix.html b/doc/doc_files/scalarmatrix.html index 003f199..e268c19 100644 --- a/doc/doc_files/scalarmatrix.html +++ b/doc/doc_files/scalarmatrix.html @@ -9,7 +9,7 @@
- Multiplies values in matrix mA by scalar value and stores the results in mB + Multiplies values in matrix mA by scalar value and stores the results in mB
diff --git a/doc/doc_files/scaleterraintexture.html b/doc/doc_files/scaleterraintexture.html index e4f766a..5d85779 100644 --- a/doc/doc_files/scaleterraintexture.html +++ b/doc/doc_files/scaleterraintexture.html @@ -9,14 +9,14 @@
- Scales the base texture, similar to makePlanarTextureMapping. + Scales the base texture, similar to makePlanarTextureMapping.
diff --git a/doc/doc_files/scope.html b/doc/doc_files/scope.html
index 56fc2a5..4ea7241 100644
--- a/doc/doc_files/scope.html
+++ b/doc/doc_files/scope.html
@@ -15,14 +15,14 @@
A = 5
While A < 10
- B = 1 '----- B is created inside this loop and cannot be accessed outside of this loop
- A = A + 1 '----- A was created before this loop started so it will be able to be used after this loop ends
+ B = 1 '----- B is created inside this loop and cannot be accessed outside of this loop
+ A = A + 1 '----- A was created before this loop started so it will be able to be used after this loop ends
Wend
Print B
- The above program WILL NOT COMPILE. That is because the variable B was created inside the scope of the WHILE loop and nothing outside the WHILE loop will be able to access it. The variable A was created outside the WHILE loop so the variable A could be used anywhere in this example. So a variable can go into a deeper scope than where it was created but it cannot go to a lesser scope than where it was created. A scope deepens every time a new block is started. Blocks refer to the code within a loop, within a Function, or within a Sub Routine. + The above program WILL NOT COMPILE. That is because the variable B was created inside the scope of the WHILE loop and nothing outside the WHILE loop will be able to access it. The variable A was created outside the WHILE loop so the variable A could be used anywhere in this example. So a variable can go into a deeper scope than where it was created but it cannot go to a lesser scope than where it was created. A scope deepens every time a new block is started. Blocks refer to the code within a loop, within a Function, or within a Sub Routine.
diff --git a/doc/doc_files/setactormaterialflag.html b/doc/doc_files/setactormaterialflag.html index 96167af..f7bb01b 100644 --- a/doc/doc_files/setactormaterialflag.html +++ b/doc/doc_files/setactormaterialflag.html @@ -9,7 +9,7 @@
- Sets the value of an actor's material flag. + Sets the value of an actor's material flag.
Note: The material on this would be material 0. To set other material flag's you need to get a reference to the actor's material with GetActorMaterial(). diff --git a/doc/doc_files/setchanneldistance.html b/doc/doc_files/setchanneldistance.html index 38ad3a8..492e331 100644 --- a/doc/doc_files/setchanneldistance.html +++ b/doc/doc_files/setchanneldistance.html @@ -12,7 +12,7 @@ Set a volume adjustment effect due to distance. distance must be a value between 0 and 255. Returns 0 on error.
- NOTE: Setting distance to 0 will cancel the effect + NOTE: Setting distance to 0 will cancel the effect
diff --git a/doc/doc_files/setlighttype.html b/doc/doc_files/setlighttype.html index 0dd4c80..6894a19 100644 --- a/doc/doc_files/setlighttype.html +++ b/doc/doc_files/setlighttype.html @@ -19,10 +19,10 @@ LIGHT_TYPE_POINT
Related: SetLightType
diff --git a/doc/doc_files/setmaterialblendmode.html b/doc/doc_files/setmaterialblendmode.html index 1e9f7b7..0c46af5 100644 --- a/doc/doc_files/setmaterialblendmode.html +++ b/doc/doc_files/setmaterialblendmode.html @@ -19,31 +19,31 @@ BLEND_MODE_NONERelated: diff --git a/doc/doc_files/setspriteanimation.html b/doc/doc_files/setspriteanimation.html index 026c7da..1add696 100644 --- a/doc/doc_files/setspriteanimation.html +++ b/doc/doc_files/setspriteanimation.html @@ -7,7 +7,7 @@
-Sets the current animation for a sprite
diff --git a/doc/doc_files/setspriteposition.html b/doc/doc_files/setspriteposition.html index 89e90c8..24a9aae 100644 --- a/doc/doc_files/setspriteposition.html +++ b/doc/doc_files/setspriteposition.html @@ -14,6 +14,45 @@Note: This is canvas position and not screen position
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("SetSpritePosition", winWidth, winHeight, isFullScreen, vSync)
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ eyeSpriteX = 100
+ eyeSpriteY = 100
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, eyeSpriteX, eyeSpriteY) 'Position on the canvas the sprite will initially be drawn.
+
+ speed = 0.4
+
+ While Not Key(K_ESCAPE)
+
+ SetSpritePosition(eyeSprite, eyeSpriteX, eyeSpriteY)
+ eyeSpriteX = eyeSpriteX + speed 'Speed will be added to sprites X position, sprite will move to the right gradually
+
+ Update()
+ Wend
+

Related: + OpenCanvasSpriteLayer + CreateSprite +
diff --git a/doc/doc_files/setspriterotation.html b/doc/doc_files/setspriterotation.html index 7ca8963..1063e8d 100644 --- a/doc/doc_files/setspriterotation.html +++ b/doc/doc_files/setspriterotation.html @@ -11,6 +11,40 @@
Sets the angle the sprite is rotated by
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("SetSpriteRotation", winWidth, winHeight, isFullScreen, vSync)
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ DIM eyeAngle 'Variable to hold the sprites angle value
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, 100, 100)
+
+ While Not Key(K_ESCAPE)
+ 'ClearCanvas() For a sprite layer canvas, you don't need to call ClearCanvas. It's automatically called.
+
+ SetSpriteRotation(eyeSprite, eyeAngle)
+
+ eyeAngle = eyeAngle + 0.3
+
+ Update() 'Update automatically deals with drawing the sprites on the sprite canvas.
+ Wend
+

Related: GetSpriteRotation RotateSprite diff --git a/doc/doc_files/setspritescale.html b/doc/doc_files/setspritescale.html index f79dad7..297da88 100644 --- a/doc/doc_files/setspritescale.html +++ b/doc/doc_files/setspritescale.html @@ -11,6 +11,41 @@
Sets the scale of a sprite
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("SetSpriteScale", winWidth, winHeight, isFullScreen, vSync)
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ DIM eyeScale 'Variable to hold the sprites scale
+ eyeScale = 2
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, 100, 100)
+
+ eyeSprite2 = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite2, 200, 100)
+
+ SetSpriteScale(eyeSprite2, eyeScale, eyeScale)
+
+ While Not Key(K_ESCAPE)
+
+ Update()
+ Wend
+

Related: ScaleSprite GetSpriteScale diff --git a/doc/doc_files/setspritesolid.html b/doc/doc_files/setspritesolid.html index 89402e7..fb94111 100644 --- a/doc/doc_files/setspritesolid.html +++ b/doc/doc_files/setspritesolid.html @@ -11,6 +11,46 @@
Sets whether a sprite has physics and collision response enabled
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("SetSpriteSolid", winWidth, winHeight, isFullScreen, vSync)
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ eyeSpriteX = 100
+ eyeSpriteY = 100
+ eyeSprite2X = 400
+ eyeSprite2Y = 125
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, eyeSpriteX, eyeSpriteY)
+ SetSpriteSolid(eyeSprite, 1) 'Setting the sprites as solid means they can collide with one another.
+
+ eyeSprite2 = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite2, eyeSprite2X, eyeSprite2Y)
+ SetSpriteSolid(eyeSprite2, 1)
+
+ While Not Key(K_ESCAPE)
+
+ SetSpriteLinearVelocity(eyeSprite, 30, 0)
+ eyeSpriteX = eyeSpriteX + 0.5
+
+ Update()
+ Wend
+

Related: SpriteIsSolid
diff --git a/doc/doc_files/setspritesource.html b/doc/doc_files/setspritesource.html index 88c6940..3c673f7 100644 --- a/doc/doc_files/setspritesource.html +++ b/doc/doc_files/setspritesource.html @@ -14,6 +14,38 @@Note: This needs to be the same size as the current image source or you will have rendering issues
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("SetSpriteSource", winWidth, winHeight, isFullScreen, vSync)
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM frown
+ DIM frownW
+ DIM frownH
+
+ frowny1 = LoadImage("frowny1.png")
+ frowny2 = LoadImage("frowny2.png")
+ GetImageSize(frown, frownW, frownH)
+
+ frownSprite = CreateSprite(frown, frownW, frownH)
+ SetSpritePosition(frownSprite, 100, 100)
+
+ While Not Key(K_ESCAPE)
+ If KEY(K_SPACE) Then
+ SetSpriteSource(frownSprite, frowny2)
+ End If
+ Update()
+ Wend
+


Related: GetSpriteSource
diff --git a/doc/doc_files/setspritetype.html b/doc/doc_files/setspritetype.html index 27f5b01..f2cf80b 100644 --- a/doc/doc_files/setspritetype.html +++ b/doc/doc_files/setspritetype.html @@ -22,6 +22,144 @@ SPRITE_TYPE_DYNAMIC ++ Here is an example of SPRITE_TYPE_DYNAMIC: +
+
+ 'This is showing SPRITE_TYPE_DYNAMIC
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("SetSpriteType_Dynamic", winWidth, winHeight, isFullScreen, vSync)
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ eyeSpriteX = 100
+ eyeSpriteY = 100
+ eyeSprite2X = 400
+ eyeSprite2Y = 125
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, eyeSpriteX, eyeSpriteY)
+ SetSpriteSolid(eyeSprite, 1)
+
+ 'When Sprites are created and physics activated there "type" is Dyanmic by default
+ 'The sprites have collision and physics activated, so they can move and react to other bodies.
+
+ eyeSprite2 = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite2, eyeSprite2X, eyeSprite2Y)
+ SetSpriteSolid(eyeSprite2, 1)
+
+ While Not Key(K_ESCAPE)
+
+ SetSpriteLinearVelocity(eyeSprite, 80, 0)
+
+ Update()
+ Wend
+
+ Here is an example of SPRITE_TYPE_STATIC: +
+
+ 'This is showing SPRITE_TYPE_STATIC
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("SetSpriteType_Static", winWidth, winHeight, isFullScreen, vSync)
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ eyeSpriteX = 100
+ eyeSpriteY = 100
+ eyeSprite2X = 400
+ eyeSprite2Y = 125
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, eyeSpriteX, eyeSpriteY)
+ SetSpriteSolid(eyeSprite, 1)
+
+ 'When Sprites are created and physics activated there "type" is Dyanmic by default
+ 'The sprites have collision and physics activated, so they can move and react to other bodies.
+
+ eyeSprite2 = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite2, eyeSprite2X, eyeSprite2Y)
+ SetSpriteSolid(eyeSprite2, 1)
+ SetSpriteType(eyeSprite2, SPRITE_TYPE_STATIC) 'When a sprite is made solid nothing can move it
+
+ While Not Key(K_ESCAPE)
+
+ SetSpriteLinearVelocity(eyeSprite, 80, 0)
+
+ Update()
+ Wend
+
+ Finally here is an example of SPRITE_TYPE_KINEMATIC: +
+
+ 'This is showing SPRITE_TYPE_KINEMATIC
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("SetSpriteType_Kinematic", winWidth, winHeight, isFullScreen, vSync)
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ eyeSpriteX = 100
+ eyeSpriteY = 100
+ eyeSprite2X = 400
+ eyeSprite2Y = 125
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, eyeSpriteX, eyeSpriteY)
+ SetSpriteSolid(eyeSprite, 1)
+ SetSpriteType(eyeSprite, SPRITE_TYPE_KINEMATIC) 'KINEMATIC type makes the sprite able to be moved, but it does not react to dynamic bodies.
+
+ eyeSprite2 = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite2, eyeSprite2X, eyeSprite2Y)
+ SetSpriteSolid(eyeSprite2, 1)
+
+ While Not Key(K_ESCAPE)
+
+ SetSpriteLinearVelocity(eyeSprite, 80, 0)
+
+ Update()
+ Wend
+

Related: GetSpriteType
diff --git a/doc/doc_files/setspritevisible.html b/doc/doc_files/setspritevisible.html index 91162f8..73a26ce 100644 --- a/doc/doc_files/setspritevisible.html +++ b/doc/doc_files/setspritevisible.html @@ -7,12 +7,45 @@ -- Sets whether the sprite is visible + Set the sprite visible with the flAG
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("SetSpriteVisible", winWidth, winHeight, isFullScreen, vSync)
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ DIM spriteTimer : spriteTimer = Timer()
+ DIM spriteTimerDiff : spriteTimerDiff = 2000
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, 100, 100)
+
+ While Not Key(K_ESCAPE)
+ If Timer() - spriteTimer > spriteTimerDiff Then
+ SetSpriteVisible(eyeSprite, 0) 'Set sprite visible flag to 0 or false and it will become not visible
+ Print ("Function Called")
+ End If
+ Update()
+ Wend
+

Related: - SpriteIsVisible + SetSpriteVisible
diff --git a/doc/doc_files/setspritez.html b/doc/doc_files/setspritez.html index 93754eb..f2b726d 100644 --- a/doc/doc_files/setspritez.html +++ b/doc/doc_files/setspritez.html @@ -14,6 +14,54 @@
Note: Sprites with a higher Z order are drawn first and those with lower values will be drawn on top
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("ScaleSprite", winWidth, winHeight, isFullScreen, vSync)
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ DIM sword
+ DIM swordW
+ DIM swordH
+ ReleaseKey = 0
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ sword = LoadImage("sword.png")
+ GetImageSize(sword, swordW, swordH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, 100, 100)
+ SetSpriteZ(eyeSprite, 1)
+
+ swordSprite = CreateSprite(sword, swordW, swordH)
+ SetSpritePosition(swordSprite, 89, 75)
+ SetSpriteZ(swordSprite, 5)
+
+ While Not Key(K_ESCAPE)
+
+ If Key(K_SPACE) And ReleaseKey = 0 Then
+ SetSpriteZ(eyeSprite, 10) 'This will cause the eye to be drawn behind the sword
+ ReleaseKey = 1
+ ElseIf Not Key(K_UP) And Not Key(K_DOWN) And ReleaseKey = 1 then
+ ReleaseKey = 0
+ End If
+
+ Update()
+ Wend
+


Related: SpriteZ
diff --git a/doc/doc_files/setterrainloddistance.html b/doc/doc_files/setterrainloddistance.html index 78ee84b..17c8168 100644 --- a/doc/doc_files/setterrainloddistance.html +++ b/doc/doc_files/setterrainloddistance.html @@ -9,7 +9,7 @@- Override the default generation of distance thresholds. + Override the default generation of distance thresholds.
diff --git a/doc/doc_files/setterrainpatchlod.html b/doc/doc_files/setterrainpatchlod.html index 7fe03f8..8d7bdb2 100644 --- a/doc/doc_files/setterrainpatchlod.html +++ b/doc/doc_files/setterrainpatchlod.html @@ -9,7 +9,7 @@
- Manually sets the LOD of a patch. + Manually sets the LOD of a patch.
diff --git a/doc/doc_files/spriteheight.html b/doc/doc_files/spriteheight.html index 5573c94..8127675 100644 --- a/doc/doc_files/spriteheight.html +++ b/doc/doc_files/spriteheight.html @@ -11,6 +11,49 @@
Returns the frame height of a sprite
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("SpriteHeight", winWidth, winHeight, isFullScreen, vSync)
+ pCanvas = OpenCanvas(200, 80, 0, 0, 200, 80, 1) 'Need to open a canvas for drawing the text
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ DIM eSpriteHeight
+
+ DIM font1
+
+ Font1 = LoadFont("DripOctober.ttf", 16)
+ SetFont(Font1)
+ SetColor(RGB(100, 200, 200))
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, 100, 100)
+
+ eSpriteHeight = SpriteHeight(eyeSprite)
+
+ While Not Key(K_ESCAPE)
+ Canvas(pCanvas) 'change to the standard drawing canvas for drawing text
+ DrawText("EyeSprite Height " + STR$(eSpriteHeight), 10, 50)
+
+ Update()
+ Wend
+

+
Link to Font (It's locally on your computer, your not downloading anything from the internet)
+
Related: SpriteWidth GetSpriteSize diff --git a/doc/doc_files/spriteissolid.html b/doc/doc_files/spriteissolid.html index 73e1d13..cfc65d9 100644 --- a/doc/doc_files/spriteissolid.html +++ b/doc/doc_files/spriteissolid.html @@ -11,6 +11,51 @@
Returns true if a sprite is has physics and collision response enabled
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("SpriteIsSolid", winWidth, winHeight, isFullScreen, vSync)
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ DIM trigger : trigger = 0
+ eyeSpriteX = 100
+ eyeSpriteY = 100
+ eyeSprite2X = 400
+ eyeSprite2Y = 125
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, eyeSpriteX, eyeSpriteY)
+ SetSpriteSolid(eyeSprite, 1) 'Setting the sprites as solid means they can collide with one another.
+
+ eyeSprite2 = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite2, eyeSprite2X, eyeSprite2Y)
+ SetSpriteSolid(eyeSprite2, 1)
+
+ While Not Key(K_ESCAPE)
+
+ SetSpriteLinearVelocity(eyeSprite, 30, 0)
+ eyeSpriteX = eyeSpriteX + 0.5
+
+ If SpriteIsSolid(eyeSprite2) And trigger = 0 Then
+ Print "Yup I'm solid!"
+ trigger = 1
+ End If
+ Update()
+ Wend
+

Related: SetSpriteSolid
diff --git a/doc/doc_files/spriteisvisible.html b/doc/doc_files/spriteisvisible.html index cef8c71..c10a10b 100644 --- a/doc/doc_files/spriteisvisible.html +++ b/doc/doc_files/spriteisvisible.html @@ -11,6 +11,47 @@Returns whether the sprite is visible
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("SetSpriteVisible", winWidth, winHeight, isFullScreen, vSync)
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ DIM spriteTimer : spriteTimer = Timer()
+ DIM spriteTimerDiff : spriteTimerDiff = 2000
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, 100, 100)
+ SetSpriteVisible(eyeSprite, 0) 'Set the flag to 0 for not visible
+
+
+ While Not Key(K_ESCAPE)
+ If Timer() - spriteTimer > spriteTimerDiff Then
+ SetSpriteVisible(eyeSprite, 1)
+ Print ("Function Called")
+ End If
+
+ If SpriteIsVisible(eyeSprite) Then
+ Print ("Sprite is Visible")
+ else
+ Print ("Sprite is not visible")
+ End If
+ Update()
+ Wend
+

Related: SetSpriteVisible
diff --git a/doc/doc_files/spritewidth.html b/doc/doc_files/spritewidth.html index 5350a5f..cc0361c 100644 --- a/doc/doc_files/spritewidth.html +++ b/doc/doc_files/spritewidth.html @@ -11,6 +11,49 @@Returns the frame width of a sprite
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("SpriteWidth", winWidth, winHeight, isFullScreen, vSync)
+ pCanvas = OpenCanvas(200, 80, 0, 0, 200, 80, 1) 'Need to open a canvas for drawing the text
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ DIM eSpriteWidth
+
+ DIM font1
+
+ Font1 = LoadFont("DripOctober.ttf", 16)
+ SetFont(Font1)
+ SetColor(RGB(100, 200, 200))
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, 100, 100)
+
+ eSpriteWidth = SpriteWidth(eyeSprite)
+
+ While Not Key(K_ESCAPE)
+ Canvas(pCanvas) 'change to the standard drawing canvas for drawing text
+ DrawText("EyeSprite Width " + STR$(eSpriteWidth), 10, 30)
+
+ Update()
+ Wend
+

+
Link to Font (It's locally on your computer, your not downloading anything from the internet)
+
Related: SpriteHeight GetSpriteSize diff --git a/doc/doc_files/spritex.html b/doc/doc_files/spritex.html index 54fed33..a95094a 100644 --- a/doc/doc_files/spritex.html +++ b/doc/doc_files/spritex.html @@ -11,6 +11,66 @@
Returns the X position of a sprite on a canvas
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("SpriteX", winWidth, winHeight, isFullScreen, vSync)
+ pCanvas = OpenCanvas(200, 80, 0, 0, 200, 80, 1) 'Need to open a canvas for drawing the text
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM font1
+
+ Font1 = LoadFont("DripOctober.ttf", 16)
+ SetFont(Font1)
+ SetColor(RGB(100, 200, 200))
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ DIM eyeX 'Variables to pass into the function for holding the x value
+ eyeSpriteX = 100
+ eyeSpriteY = 100
+ destX = 0
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, eyeSpriteX, eyeSpriteY)
+
+ While Not Key(K_ESCAPE)
+ clearcanvas()
+ Canvas(sCanvas) 'change to the sprite canvas for drawing sprites
+ If SpriteX(eyeSprite) < 450 And destX = 0 Then
+ SetSpritePosition(eyeSprite, eyeSpriteX, eyeSpriteY)
+ eyeSpriteX = eyeSpriteX + 0.5
+ ElseIf SpriteX(eyeSprite) >= 440 And destX = 0 Then
+ destX = 1
+ 'eyeSpriteX = SpriteX(eyeSprite)
+ End If
+
+ If destX = 1 Then
+ SetSpritePosition(eyeSprite, eyeSpriteX, eyeSpriteY)
+ eyeSpriteX = eyeSpriteX - 0.5
+ End If
+
+ Canvas(pCanvas)
+ eyeX = SpriteX(eyeSprite) 'change to the standard drawing canvas for drawing text
+ DrawText("Sprite X: " + STR$(eyeX), 10, 30)
+
+ Update()
+ Wend
+

+
Link to Font (It's locally on your computer, your not downloading anything from the internet)
+
Related: SpriteY SetSpritePosition diff --git a/doc/doc_files/spritey.html b/doc/doc_files/spritey.html index 3f01bb0..40512fa 100644 --- a/doc/doc_files/spritey.html +++ b/doc/doc_files/spritey.html @@ -11,10 +11,70 @@
Returns the Y position of a sprite on a canvas
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("SpriteY", winWidth, winHeight, isFullScreen, vSync)
+ pCanvas = OpenCanvas(200, 80, 0, 0, 200, 80, 1) 'Need to open a canvas for drawing the text
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM font1
+
+ Font1 = LoadFont("DripOctober.ttf", 16)
+ SetFont(Font1)
+ SetColor(RGB(100, 200, 200))
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ DIM eyeY 'Variables to pass into the function for holding the y value
+ eyeSpriteX = 100
+ eyeSpriteY = 100
+ destY = 0
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, eyeSpriteX, eyeSpriteY)
+
+ While Not Key(K_ESCAPE)
+ clearcanvas()
+ Canvas(sCanvas) 'change to the sprite canvas for drawing sprites
+ If SpriteY(eyeSprite) < 450 And destY = 0 Then
+ SetSpritePosition(eyeSprite, eyeSpriteX, eyeSpriteY)
+ eyeSpriteY = eyeSpriteY + 0.5
+ ElseIf SpriteY(eyeSprite) >= 440 And destY = 0 Then
+ destY = 1
+ End If
+
+ If destY = 1 Then
+ SetSpritePosition(eyeSprite, eyeSpriteX, eyeSpriteY)
+ eyeSpriteY = eyeSpriteY - 0.5
+ End If
+
+ Canvas(pCanvas)
+ eyeY = SpriteY(eyeSprite) 'change to the standard drawing canvas for drawing text
+ DrawText("Sprite Y: " + STR$(eyeY), 10, 30)
+
+ Update()
+ Wend
+

+
Link to Font (It's locally on your computer, your not downloading anything from the internet)
+
Related: SpriteX SetSpritePosition GetSpritePosition + SpriteX
diff --git a/doc/doc_files/spritez.html b/doc/doc_files/spritez.html index 2c71ab8..09bac66 100644 --- a/doc/doc_files/spritez.html +++ b/doc/doc_files/spritez.html @@ -14,6 +14,66 @@
Note: Sprites with a higher Z order are drawn first and those with lower values will be drawn on top
+
+ isFullScreen = false
+ vSync = true
+ winWidth = 640
+ winHeight = 480
+ canViewPortX = 0
+ canViewPortY = 0
+
+ OpenWindow("ScaleSprite", winWidth, winHeight, isFullScreen, vSync)
+ pCanvas = OpenCanvas(200, 80, 0, 0, 200, 80, 1) 'Need to open a canvas for drawing the text
+ sCanvas = OpenCanvasSpriteLayer(canViewPortX, canViewPortY, winWidth, winHeight)
+ Canvas(sCanvas)
+
+ DIM eye
+ DIM eyeW
+ DIM eyeH
+ DIM eyeZ
+ DIM sword
+ DIM swordW
+ DIM swordH
+ DIM swordZ
+ ReleaseKey = 0
+
+ DIM font1
+
+ Font1 = LoadFont("DripOctober.ttf", 16)
+ SetFont(Font1)
+ SetColor(RGB(100, 200, 200))
+
+ eye = LoadImage("theEye.png")
+ GetImageSize(eye, eyeW, eyeH)
+
+ sword = LoadImage("sword.png")
+ GetImageSize(sword, swordW, swordH)
+
+ eyeSprite = CreateSprite(eye, eyeW, eyeH)
+ SetSpritePosition(eyeSprite, 100, 100)
+ SetSpriteZ(eyeSprite, 1)
+
+ swordSprite = CreateSprite(sword, swordW, swordH)
+ SetSpritePosition(swordSprite, 89, 75)
+ SetSpriteZ(swordSprite, 5)
+
+ While Not Key(K_ESCAPE)
+
+ swordZ = SpriteZ(swordSprite)
+ eyeZ = SpriteZ(eyeSprite)
+
+ Canvas(pCanvas) 'change to the standard drawing canvas for drawing text
+ DrawText("Eye Sprite Z: " + STR$(eyeZ), 10, 30)
+ DrawText("Sword Sprite Z: " + STR$(swordZ), 10, 50)
+
+ Update()
+ Wend
+


+
Link to Font (It's locally on your computer, your not downloading anything from the internet)
+
Related: SetSpriteZ
diff --git a/doc/doc_files/startactortransition.html b/doc/doc_files/startactortransition.html index b1e0eb8..e71ec89 100644 --- a/doc/doc_files/startactortransition.html +++ b/doc/doc_files/startactortransition.html @@ -17,6 +17,14 @@Related: diff --git a/doc/doc_files/str_f.html b/doc/doc_files/str_f.html index 0012aee..8404c2f 100644 --- a/doc/doc_files/str_f.html +++ b/doc/doc_files/str_f.html @@ -9,7 +9,7 @@
- Returns a number converted to a string in fixed notation + Returns a number converted to a string in fixed notation
The number will be returned with 6 decimal places of precision. diff --git a/doc/doc_files/str_s.html b/doc/doc_files/str_s.html index 8ddbed5..fc93794 100644 --- a/doc/doc_files/str_s.html +++ b/doc/doc_files/str_s.html @@ -9,7 +9,7 @@
- Returns a number converted to a string in scientific notation + Returns a number converted to a string in scientific notation
Related: Str$ diff --git a/doc/doc_files/tcp_acceptsocket.html b/doc/doc_files/tcp_acceptsocket.html index 7708fc2..57af5b0 100644 --- a/doc/doc_files/tcp_acceptsocket.html +++ b/doc/doc_files/tcp_acceptsocket.html @@ -7,9 +7,9 @@
-- Attempts to accept a connection from a server socket. If successful it will open a client socket to communicate with the server and return true. If it fails it will return false. + Attempts to accept a connection from a server socket. If successful it will return a client socket id. If it fails it will return -1.
diff --git a/doc/doc_files/udt.html b/doc/doc_files/udt.html index 169e885..5f26144 100644 --- a/doc/doc_files/udt.html +++ b/doc/doc_files/udt.html @@ -13,7 +13,7 @@
Type player
- Dim x, y
+ Dim x, y
End Type
@@ -46,13 +46,13 @@
Type Player_Stats
- Dim health
- Dim power
+ Dim health
+ Dim power
End Type
Type Player
- Dim x, y
- Dim stats As Player_Stats
+ Dim x, y
+ Dim stats As Player_Stats
End Type
Dim hero As Player
diff --git a/doc/doc_files/unaugmentmatrix.html b/doc/doc_files/unaugmentmatrix.html
index 4b355d6..42c82cc 100644
--- a/doc/doc_files/unaugmentmatrix.html
+++ b/doc/doc_files/unaugmentmatrix.html
@@ -9,7 +9,7 @@
function UnAugmentMatrix(mA, mB, mC)
- Splits matrix mA into coefficient mB and augment mC + Splits matrix mA into coefficient mB and augment mC
diff --git a/doc/doc_files/update.html b/doc/doc_files/update.html index 7ef63ef..724af65 100644 --- a/doc/doc_files/update.html +++ b/doc/doc_files/update.html @@ -20,6 +20,17 @@
- Sets whether to emit min<->max particles for every vertex or to pick min<->max vertices. + Sets whether to emit min<->max particles for every vertex or to pick min<->max vertices.
Related: particleIsUsingEveryMeshVertex diff --git a/doc/doc_files/useparticlenormaldirection.html b/doc/doc_files/useparticlenormaldirection.html index d72f018..9f30d4b 100644 --- a/doc/doc_files/useparticlenormaldirection.html +++ b/doc/doc_files/useparticlenormaldirection.html @@ -9,7 +9,7 @@
- Sets whether particle emitter is using vertex normal for direction, or direction specified. + Sets whether particle emitter is using vertex normal for direction, or direction specified.
Related: particleIsUsingNormalDirection diff --git a/doc/doc_files/warpmouse.html b/doc/doc_files/warpmouse.html index d029003..ce8f44a 100644 --- a/doc/doc_files/warpmouse.html +++ b/doc/doc_files/warpmouse.html @@ -9,7 +9,7 @@
- Move the mouse cursor to xy position in the window + Move the mouse cursor to xy position in the window
diff --git a/doc/doc_files/warpmouseglobal.html b/doc/doc_files/warpmouseglobal.html index 820b931..184a6d9 100644 --- a/doc/doc_files/warpmouseglobal.html +++ b/doc/doc_files/warpmouseglobal.html @@ -9,7 +9,7 @@
- Move the mouse cursor to xy position in the display + Move the mouse cursor to xy position in the display
diff --git a/doc/doc_files/windowisgrabbed.html b/doc/doc_files/windowisgrabbed.html index 6d7cd80..0ad0977 100644 --- a/doc/doc_files/windowisgrabbed.html +++ b/doc/doc_files/windowisgrabbed.html @@ -9,7 +9,7 @@
- Returns the window that is currently grabbing input. It returns -1 on failure. + Returns the window that is currently grabbing input. It returns -1 on failure.
diff --git a/rcbasic_build/intern_inc/switch_cases.h b/rcbasic_build/intern_inc/switch_cases.h
index 0a6719b..4decef6 100644
--- a/rcbasic_build/intern_inc/switch_cases.h
+++ b/rcbasic_build/intern_inc/switch_cases.h
@@ -644,11 +644,14 @@ rc_deleteMesh( DELETEMESH_MESH )
rc_createMesh( )
rc_addMeshBuffer( ADDMESHBUFFER_MESH, ADDMESHBUFFER_VERTEX_COUNT, &ADDMESHBUFFER_VERTEX_DATA, &ADDMESHBUFFER_NORMAL_DATA, &ADDMESHBUFFER_UV_DATA, ADDMESHBUFFER_INDEX_COUNT, &ADDMESHBUFFER_INDEX_DATA )
rc_loadMeshFromArchive( LOADMESHFROMARCHIVE_ARCHIVE$, LOADMESHFROMARCHIVE_MESH_FILE$ )
-rc_createPlaneMesh( CREATEPLANEMESH_W, CREATEPLANEMESH_H, CREATEPLANEMESH_TILECOUNT_W, CREATEPLANEMESH_TILECOUNT_H )
+rc_createPlaneMesh( CREATEPLANEMESH_W, CREATEPLANEMESH_H, CREATEPLANEMESH_TILECOUNT_W, CREATEPLANEMESH_TILECOUNT_H, CREATEPLANEMESH_TXREPEAT_X, CREATEPLANEMESH_TXREPEAT_Y )
rc_loadAN8( LOADAN8_AN8_FILE$ )
rc_loadMeshFromAN8( LOADMESHFROMAN8_AN8_PROJECT, LOADMESHFROMAN8_AN8_SCENE$ )
rc_getNumAN8Scenes( GETNUMAN8SCENES_AN8_PROJECT )
rc_getAN8SceneName( GETAN8SCENENAME$_AN8_PROJECT, GETAN8SCENENAME$_SCENE_NUM )
+rc_createConeMesh( CREATECONEMESH_RADIUS, CREATECONEMESH_CONE_LENGTH, CREATECONEMESH_TESSELATION, CREATECONEMESH_TOP_COLOR, CREATECONEMESH_BOTTOM_COLOR )
+rc_createCylinderMesh( CREATECYLINDERMESH_RADIUS, CREATECYLINDERMESH_CYLINDER_LENGTH, CREATECYLINDERMESH_TESSELATION, CREATECYLINDERMESH_COLOR, CREATECYLINDERMESH_CLOSE_TOP )
+rc_createVolumeLightMesh( CREATEVOLUMELIGHTMESH_U, CREATEVOLUMELIGHTMESH_V, CREATEVOLUMELIGHTMESH_FOOT_COLOR, CREATEVOLUMELIGHTMESH_TAIL_COLOR, CREATEVOLUMELIGHTMESH_LP_DISTANCE, CREATEVOLUMELIGHTMESH_DIM_X, CREATEVOLUMELIGHTMESH_DIM_Y, CREATEVOLUMELIGHTMESH_DIM_Z )
rc_createAnimatedActor( CREATEANIMATEDACTOR_MESH )
rc_createOctreeActor( CREATEOCTREEACTOR_MESH )
rc_createCubeActor( CREATECUBEACTOR_CUBE_SIZE )
diff --git a/rcbasic_build/intern_lib/mesh.bas b/rcbasic_build/intern_lib/mesh.bas
index 2b650ab..bfc925a 100644
--- a/rcbasic_build/intern_lib/mesh.bas
+++ b/rcbasic_build/intern_lib/mesh.bas
@@ -3,8 +3,11 @@ sub DeleteMesh( mesh )
function CreateMesh( )
sub AddMeshBuffer( mesh, vertex_count, ByRef vertex_data, ByRef normal_data, ByRef uv_data, index_count, ByRef index_data )
function LoadMeshFromArchive( archive$, mesh_file$ )
-Function CreatePlaneMesh( w, h, tileCount_w, tileCount_h )
+Function CreatePlaneMesh( w, h, tileCount_w, tileCount_h, txRepeat_x, txRepeat_y )
Function LoadAN8( an8_file$ )
Function LoadMeshFromAN8(an8_project, an8_scene$)
Function GetNumAN8Scenes(an8_project)
Function GetAN8SceneName$(an8_project, scene_num)
+Function CreateConeMesh( radius, cone_length, tesselation, top_color, bottom_color )
+Function CreateCylinderMesh( radius, cylinder_length, tesselation, color, close_top )
+Function CreateVolumeLightMesh( u, v, foot_color, tail_color, lp_distance, dim_x, dim_y, dim_z )
diff --git a/rcbasic_build/main.cpp b/rcbasic_build/main.cpp
index 202ee3a..b57f7a3 100755
--- a/rcbasic_build/main.cpp
+++ b/rcbasic_build/main.cpp
@@ -145,7 +145,7 @@ bool rc_preprocessor()
}
}
- cout << "\nDEBUG INCLUDE ABS_PATH:" << inc_file.filename << endl << endl;
+ //cout << "\nDEBUG INCLUDE ABS_PATH:" << inc_file.filename << endl << endl;
inc_file.line_number = 0;
inc_file.line_position = 0;
inc_file.dbg_inc_index = inc_files.size();
diff --git a/rcbasic_build/rc_builtin.h b/rcbasic_build/rc_builtin.h
index 637e020..4de696c 100755
--- a/rcbasic_build/rc_builtin.h
+++ b/rcbasic_build/rc_builtin.h
@@ -1940,6 +1940,8 @@ void init_embedded_functions()
add_embedded_arg("h", ID_TYPE_NUM);
add_embedded_arg("tileCount_w", ID_TYPE_NUM);
add_embedded_arg("tileCount_h", ID_TYPE_NUM);
+ add_embedded_arg("txRepeat_x", ID_TYPE_NUM);
+ add_embedded_arg("txRepeat_y", ID_TYPE_NUM);
embed_function("LoadAN8", ID_TYPE_FN_NUM);
add_embedded_arg("an8_file$", ID_TYPE_STR);
embed_function("LoadMeshFromAN8", ID_TYPE_FN_NUM);
@@ -1950,6 +1952,27 @@ void init_embedded_functions()
embed_function("GetAN8SceneName$", ID_TYPE_FN_STR);
add_embedded_arg("an8_project", ID_TYPE_NUM);
add_embedded_arg("scene_num", ID_TYPE_NUM);
+ embed_function("CreateConeMesh", ID_TYPE_FN_NUM);
+ add_embedded_arg("radius", ID_TYPE_NUM);
+ add_embedded_arg("cone_length", ID_TYPE_NUM);
+ add_embedded_arg("tesselation", ID_TYPE_NUM);
+ add_embedded_arg("top_color", ID_TYPE_NUM);
+ add_embedded_arg("bottom_color", ID_TYPE_NUM);
+ embed_function("CreateCylinderMesh", ID_TYPE_FN_NUM);
+ add_embedded_arg("radius", ID_TYPE_NUM);
+ add_embedded_arg("cylinder_length", ID_TYPE_NUM);
+ add_embedded_arg("tesselation", ID_TYPE_NUM);
+ add_embedded_arg("color", ID_TYPE_NUM);
+ add_embedded_arg("close_top", ID_TYPE_NUM);
+ embed_function("CreateVolumeLightMesh", ID_TYPE_FN_NUM);
+ add_embedded_arg("u", ID_TYPE_NUM);
+ add_embedded_arg("v", ID_TYPE_NUM);
+ add_embedded_arg("foot_color", ID_TYPE_NUM);
+ add_embedded_arg("tail_color", ID_TYPE_NUM);
+ add_embedded_arg("lp_distance", ID_TYPE_NUM);
+ add_embedded_arg("dim_x", ID_TYPE_NUM);
+ add_embedded_arg("dim_y", ID_TYPE_NUM);
+ add_embedded_arg("dim_z", ID_TYPE_NUM);
embed_function("CreateAnimatedActor", ID_TYPE_FN_NUM);
add_embedded_arg("mesh", ID_TYPE_NUM);
embed_function("CreateOctreeActor", ID_TYPE_FN_NUM);
diff --git a/rcbasic_build/rcbasic4_changes.ods b/rcbasic_build/rcbasic4_changes.ods
index d6e35d7389b0482cfa527422d1928b897f9d84ef..8b02955839e697067bac6b92a9cd913d16c4d68e 100644
GIT binary patch
delta 3811254
zcmce+1yCJb(=Z4j!QI{6-JRf0xJYn!cO8PeI|Kp*ySO_9x8Uv&EVz3Jd!Oh1zN-Cd
z|N6JKwsvpTnR8Bi_vyJkJvA@iBH-r-Bj8ch6k* `f9d|%m*`(6nJ@Z!kWS(h6fg45A9GFAL
zsEc#rUMslFln*A6A59|NEr!%HGAJg0P)4Qnv$@zV6SJ2Iw_bjbsG}lHh>9#inKnb}
z{*>0|A5nPsG*os1gh62AD=M*rn6m&Cen5fC;06p&eup23Pf=;D5M~gY~u5yaEBCq3
_2&vPF;
z@EW#6W9#tm;8V`PHv@j$232=L#Q#D0`X5%W`2U^a8!0{hKj0nwXXsY^|6chmi2r|1
zev<@?={00}jSt22Zx_K`0x<>fJ?MS^)cE3gH1}s@`q5mPdt4EnVLac(s5~JtU7OWm
zq`cF*zdlW2ZiF!68$jioWtn>VK6xl!<2*P^8(zYVZDF-JS=YO3D~U7ZTO-Q8EQWIa
z`Eu5Lx&7?rvhB^0nTGrgkK80(@|Znqb0L|sL9j2|S|0
H(dVt(|1$4x7w>*clU~PRhY*e?SPfBku~??^F9(qMPY9Pa0e&~
zx(i812MXsj@9S2V6=@zDZG9^l_g$&tSKRlvUukvtEiLVN$F1Bj4!ey=r=RB=m)24n
zbvni_O8JkDJ(5dee6Kv%*qAt$NWV}Tt=(~cM{k$eQ~J0io?A-i<*&w20a=RBNgcx5
zFe$OoF|$SEh1K?{U@?>3HG}iF6bp7Z9^YN#E&ZG*{`@Yz!iKlP&m$zSNs!lvk*;YzcOy2=+1|HQQ1q69CX=G3
zaV%HM73s*>xDQvF%KM*OE$hBo*68TF;plt4wEu#C8Sn6wm$rhUfQg=PK&-64R6+BV
zy>F$x?}DJ{uAr#6f+jSm@A3UVl7abZ0zXDUQz4eiOHkBLP_(Z39