Added sprite shape functions

This commit is contained in:
n00b
2025-03-20 17:29:11 -04:00
parent b6b1ecf86f
commit 14f87ecbf1
197 changed files with 5576 additions and 1203 deletions

View File

@@ -0,0 +1,4 @@
#title CreateConeMesh [RCBasic Doc]
#header Function CreateConeMesh( radius, cone_length, tesselation, top_color, bottom_color )

View File

@@ -0,0 +1,4 @@
#title CreateCylinderMesh [RCBasic Doc]
#header Function CreateCylinderMesh( radius, cylinder_length, tesselation, color, close_top )

View File

@@ -0,0 +1,4 @@
#title CreateVolumeLightMesh [RCBasic Doc]
#header Function CreateVolumeLightMesh( u, v, foot_color, tail_color, lp_distance, dim_x, dim_y, dim_z )

4
doc/files/deletean8.txt Normal file
View File

@@ -0,0 +1,4 @@
#title DeleteAN8 [RCBasic Doc]
#header Sub DeleteAN8( an8_project )

View File

@@ -5,14 +5,14 @@ Returns the actor's collision shape
Possible values:
#list ul
#li SHAPE_TYPE_NONE
#li SHAPE_TYPE_BOX
#li SHAPE_TYPE_SPHERE
#li SHAPE_TYPE_CYLINDER
#li SHAPE_TYPE_CAPSULE
#li SHAPE_TYPE_CONE
#li SHAPE_TYPE_CONVEXHULL
#li SHAPE_TYPE_TRIMESH
#li ACTOR_SHAPE_NONE
#li ACTOR_SHAPE_BOX
#li ACTOR_SHAPE_SPHERE
#li ACTOR_SHAPE_CYLINDER
#li ACTOR_SHAPE_CAPSULE
#li ACTOR_SHAPE_CONE
#li ACTOR_SHAPE_CONVEXHULL
#li ACTOR_SHAPE_TRIMESH
#/list
#ref SetActorCollisionShape

View File

@@ -0,0 +1,8 @@
#title GetSpriteBoxSize [RCBasic Doc]
#header Sub GetSpriteBoxSize(spr_id, ByRef w, ByRef h)
Returns the size of the collision box on a sprite.
NOTE: Returns (-1, -1) if the collision shape is not a box
#ref SetSpriteBox

View File

@@ -0,0 +1,13 @@
#title GetSpriteCollisionShape [RCBasic Doc]
#header Function GetSpriteCollisionShape(spr_id)
Returns the collision shape of a sprite
Shape Types:
#list ul
#li SPRITE_SHAPE_NONE
#li SPRITE_SHAPE_BOX
#li SPRITE_SHAPE_POLYGON
#li SPRITE_SHAPE_CIRCLE
#li SPRITE_SHAPE_CHAIN
#/list

View File

@@ -0,0 +1,8 @@
#title GetSpriteRadius [RCBasic Doc]
#header Function GetSpriteRadius(spr_id)
Returns the radius of a sprites collision shape
NOTE: Returns 0 if collision shape is not SPRITE_SHAPE_CIRCLE
#ref SetSpriteRadius

View File

@@ -5,14 +5,14 @@ Sets the actor's collision shape
Shape Types:
#list ul
#li SHAPE_TYPE_NONE
#li SHAPE_TYPE_BOX
#li SHAPE_TYPE_SPHERE
#li SHAPE_TYPE_CYLINDER
#li SHAPE_TYPE_CAPSULE
#li SHAPE_TYPE_CONE
#li SHAPE_TYPE_CONVEXHULL
#li SHAPE_TYPE_TRIMESH
#li ACTOR_SHAPE_NONE
#li ACTOR_SHAPE_BOX
#li ACTOR_SHAPE_SPHERE
#li ACTOR_SHAPE_CYLINDER
#li ACTOR_SHAPE_CAPSULE
#li ACTOR_SHAPE_CONE
#li ACTOR_SHAPE_CONVEXHULL
#li ACTOR_SHAPE_TRIMESH
#/list
#ref GetActorCollisionShape

View File

@@ -0,0 +1,6 @@
#title SetSpriteBox [RCBasic Doc]
#header Sub SetSpriteBox(spr_id, w, h)
Sets the width and Height of a sprite collision box
NOTE: Sprite collision shape must be SPRITE_SHAPE_BOX

View File

@@ -0,0 +1,7 @@
#title SetSpriteChain [RCBasic Doc]
#header Sub SetSpriteChain(spr_id, ByRef vx, ByRef vy, v_count, prev_x, prev_y, next_x, next_y)
Sets the points in a collision chain
NOTE: Sprite collision shape must be SPRITE_SHAPE_CHAIN

View File

@@ -0,0 +1,10 @@
#title SetSpriteChainLoop [RCBasic Doc]
#header Sub SetSpriteChainLoop(spr_id, ByRef vx, ByRef vy, v_count)
Sets the points in a collision chain loop
NOTE: Since it is a loop, the shape will be a closed
NOTE: Sprite collision shape must be SPRITE_SHAPE_CHAIN

View File

@@ -0,0 +1,15 @@
#title SetSpriteCollisionShape [RCBasic Doc]
#header Sub SetSpriteCollisionShape(spr_id, shape)
Sets the collision shape of a sprite
Shape Types:
#list ul
#li SPRITE_SHAPE_NONE
#li SPRITE_SHAPE_BOX
#li SPRITE_SHAPE_POLYGON
#li SPRITE_SHAPE_CIRCLE
#li SPRITE_SHAPE_CHAIN
#/list
#ref SetSpriteBox SetSpriteRadius SetSpriteChain SetSpriteChainLoop SetSpritePolygon

View File

@@ -0,0 +1,4 @@
#title SetSpritePolygon [RCBasic Doc]
#header Sub SetSpritePolygon(spr_id, ByRef vx, ByRef vy, v_count)
Sets the points in a polygon sprite shape

View File

@@ -0,0 +1,8 @@
#title SetSpriteRadius [RCBasic Doc]
#header Sub SetSpriteRadius(spr_id, radius)
Sets the radius of a sprites collision shape
NOTE: Does nothing if collision shape is not SPRITE_SHAPE_CIRCLE
#ref GetSpriteRadius