Compare commits
54 Commits
RCBasic4-A
...
RCBasic4-A
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
adec3d0039 | ||
|
|
917a2a10eb | ||
|
|
26f89808ba | ||
|
|
a2363aa63a | ||
|
|
d79a8f9602 | ||
|
|
b56f0185cf | ||
|
|
f3c49b8a8b | ||
|
|
33ece2b755 | ||
|
|
5048597745 | ||
|
|
b9275b7d80 | ||
|
|
f35b940637 | ||
|
|
cf47eb2039 | ||
|
|
c085150def | ||
|
|
378c25ffde | ||
|
|
40ca65cb3f | ||
|
|
3f4a1ce1cc | ||
|
|
ac30b0f7bb | ||
|
|
370c2bed33 | ||
|
|
73fb1bded8 | ||
|
|
fc082973d2 | ||
|
|
a8c3f059cc | ||
|
|
89258b691d | ||
|
|
3972f8b927 | ||
|
|
5719ad1dbd | ||
|
|
a08ab8760c | ||
|
|
0b132399fc | ||
|
|
79ec4b5ae0 | ||
|
|
c506ea110c | ||
|
|
bac4a2734f | ||
|
|
5ff184aff6 | ||
|
|
ca2c818b25 | ||
|
|
229aebfec3 | ||
|
|
9e61ea1c5e | ||
|
|
78e3281bf3 | ||
|
|
cf6feab5c1 | ||
|
|
5221ac5e8f | ||
|
|
3e2b01d794 | ||
|
|
b4b18b4860 | ||
|
|
8fd6acbde3 | ||
|
|
a0b3025848 | ||
|
|
fe5b5bc389 | ||
|
|
ceee3fc5d0 | ||
|
|
34c023a976 | ||
|
|
74f9fc8969 | ||
|
|
a13d3de54f | ||
|
|
b66e458590 | ||
|
|
19f67fa883 | ||
|
|
f8296f44cf | ||
|
|
f30aaffc4c | ||
|
|
1e47d69e23 | ||
|
|
5c53e7067b | ||
|
|
de0101253d | ||
|
|
cbb578981a | ||
|
|
bffa478064 |
48
build_vm_scripts/build_rcbasic_all.sh
Normal file
48
build_vm_scripts/build_rcbasic_all.sh
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
BASEDIR=$(dirname 0)
|
||||
cd $BASEDIR
|
||||
|
||||
RCBASIC_BUILD_ERROR=2
|
||||
RCBASIC_RUNTIME_ERROR=2
|
||||
|
||||
export RCBASIC_BUILD_MAIN_DIR=/home/n00bc0de/Projects
|
||||
|
||||
export RCBASIC_BUILD_JOURNAL=build_journal.sh
|
||||
|
||||
#RCBASIC_BUILD
|
||||
if [ -e $RCBASIC_BUILD_JOURNAL ]
|
||||
then
|
||||
rm $RCBASIC_BUILD_JOURNAL
|
||||
fi
|
||||
|
||||
touch build_journal.sh
|
||||
chmod +x build_journal.sh
|
||||
|
||||
pushd $BASEDIR/RCBASIC4/rcbasic_build
|
||||
./build.sh
|
||||
popd
|
||||
|
||||
source $RCBASIC_BUILD_JOURNAL
|
||||
|
||||
echo "RCBASIC_BUILD STATUS = $RCBASIC_BUILD_ERROR"
|
||||
|
||||
|
||||
#RCBASIC_RUNTIME
|
||||
if [ $RCBASIC_BUILD_ERROR == 0 ]
|
||||
then
|
||||
|
||||
pushd $BASEDIR/RCBASIC4/rcbasic_runtime
|
||||
./build.sh
|
||||
popd
|
||||
|
||||
source $RCBASIC_BUILD_JOURNAL
|
||||
|
||||
echo "RCBASIC_RUNTIME STATUS = $RCBASIC_RUNTIME_ERROR"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
echo "rcbasic_build status=$RCBASIC_BUILD_ERROR"
|
||||
echo "rcbasic_RUNTIME status=$RCBASIC_RUNTIME_ERROR"
|
||||
25
build_vm_scripts/rcbasic_build_auto.sh
Normal file
25
build_vm_scripts/rcbasic_build_auto.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
BASEDIR=$(dirname 0)
|
||||
|
||||
echo "build journal path: $RCBASIC_BUILD_JOURNAL"
|
||||
|
||||
codeblocks --clean rcbasic_build.cbp
|
||||
codeblocks --target=Release --build rcbasic_build.cbp
|
||||
|
||||
|
||||
if [ ! -e $BASEDIR/bin/Release/rcbasic_build ]
|
||||
then
|
||||
|
||||
pushd $RCBASIC_BUILD_MAIN_DIR
|
||||
echo "export RCBASIC_BUILD_ERROR=1" >> $RCBASIC_BUILD_JOURNAL
|
||||
popd
|
||||
|
||||
else
|
||||
|
||||
pushd $RCBASIC_BUILD_MAIN_DIR
|
||||
echo "export RCBASIC_BUILD_ERROR=0" >> $RCBASIC_BUILD_JOURNAL
|
||||
popd
|
||||
|
||||
fi
|
||||
|
||||
25
build_vm_scripts/rcbasic_runtime_auto.sh
Normal file
25
build_vm_scripts/rcbasic_runtime_auto.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
BASEDIR=$(dirname 0)
|
||||
|
||||
|
||||
echo "build journal path: $RCBASIC_BUILD_JOURNAL"
|
||||
|
||||
codeblocks --clean rcbasic_runtime.cbp
|
||||
codeblocks --target=Release --build rcbasic_runtime.cbp
|
||||
|
||||
if [ ! -e $BASEDIR/bin/Release/rcbasic_runtime ]
|
||||
then
|
||||
|
||||
pushd $RCBASIC_BUILD_MAIN_DIR
|
||||
echo "export RCBASIC_RUNTIME_ERROR=1" >> "$RCBASIC_BUILD_JOURNAL"
|
||||
popd
|
||||
|
||||
else
|
||||
|
||||
pushd $RCBASIC_BUILD_MAIN_DIR
|
||||
echo "export RCBASIC_RUNTIME_ERROR=0" >> "$RCBASIC_BUILD_JOURNAL"
|
||||
popd
|
||||
|
||||
fi
|
||||
|
||||
@@ -9,7 +9,42 @@
|
||||
<body>
|
||||
<p><h2>function CreateSprite( img ) </h2></p>
|
||||
<p>
|
||||
Returns new sprite
|
||||
This function returns a new sprite which you can place in a variable for use in your program.
|
||||
</p>
|
||||
<p>
|
||||
Here is an example of opening a sprite canvas layer, creating a sprite, setting it's position and finally displaying it.
|
||||
</p>
|
||||
<p id="rc_code"><code>
|
||||
isFullScreen = <span class="rc_keyword">false</span> <br>
|
||||
vSync = <span class="rc_keyword">true</span> <br>
|
||||
winWidth = <span class="rc_number">640</span> <br>
|
||||
winHeight = <span class="rc_number">480</span> <br>
|
||||
canViewPortX = <span class="rc_number">0</span> <br>
|
||||
canViewPortY = <span class="rc_number">0</span> <br>
|
||||
<br>
|
||||
OpenWindow<b>(</b><span class="rc_string">"CreateSprite"</span>, winWidth, winHeight, isFullScreen, vSync<b>)</b> <br>
|
||||
sCanvas = OpenCanvasSpriteLayer<b>(</b>canViewPortX, canViewPortY, winWidth, winHeight<b>)</b> <br>
|
||||
Canvas<b>(</b>sCanvas<b>)</b> <br>
|
||||
<br>
|
||||
<span class="rc_keyword">DIM</span> eye <br>
|
||||
<span class="rc_keyword">DIM</span> eyeW <br>
|
||||
<span class="rc_keyword">DIM</span> eyeH <br>
|
||||
<br>
|
||||
eye = LoadImage<b>(</b><span class="rc_string">"theEye.png"</span><b>)</b> <br>
|
||||
GetImageSize<b>(</b>eye, eyeW, eyeH<b>)</b> <br>
|
||||
<br>
|
||||
eyeSprite = CreateSprite<b>(</b>eye, eyeW, eyeH<b>)</b> <br>
|
||||
SetSpritePosition<b>(</b>eyeSprite, <span class="rc_number">100</span>, <span class="rc_number">100</span><b>)</b> <br>
|
||||
<br>
|
||||
<span class="rc_keyword">While</span> <span class="rc_keyword">Not</span> Key<b>(</b>K_ESCAPE<b>)</b> <br>
|
||||
<span class="rc_comment">'ClearCanvas() For a sprite layer canvas, you don't need to call ClearCanvas. It's automatically called. </span><br>
|
||||
Update<b>(</b><b>)</b> <span class="rc_comment">'Update automatically deals with drawing the sprites on the sprite canvas. </span><br>
|
||||
<span class="rc_keyword">Wend</span> <br>
|
||||
</code></p>
|
||||
<p><img src="images/theEye.png" ></p>
|
||||
<br><p>Related:
|
||||
<a href="opencanvasspritelayer.html">OpenCanvasSpriteLayer</a>
|
||||
<a href="setspriteposition.html">SetSpritePosition</a>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
|
||||
@@ -25,8 +25,67 @@
|
||||
tile_h - The height of each tile
|
||||
</li>
|
||||
</ul>
|
||||
<p id="rc_code"><code>
|
||||
isFullScreen = <span class="rc_keyword">false</span> <br>
|
||||
vSync = <span class="rc_keyword">true</span> <br>
|
||||
winWidth = <span class="rc_number">640</span> <br>
|
||||
winHeight = <span class="rc_number">480</span> <br>
|
||||
canViewPortX = <span class="rc_number">0</span> <br>
|
||||
canViewPortY = <span class="rc_number">0</span> <br>
|
||||
<br>
|
||||
OpenWindow<b>(</b><span class="rc_string">"TestTileset"</span>, winWidth, winHeight, isFullScreen, vSync<b>)</b> <br>
|
||||
mCanvas = OpenCanvas<b>(</b>winWidth, winHeight, canViewPortX, canViewPortY, winWidth, winHeight, <span class="rc_number">1</span><b>)</b> <br>
|
||||
Canvas<b>(</b>mCanvas<b>)</b> <br>
|
||||
<br>
|
||||
mAtlas = LoadImage<b>(</b><span class="rc_string">"testTileSet.png"</span><b>)</b> <span class="rc_comment">'Load in our atlas or tile set image </span><br>
|
||||
<br>
|
||||
mTileSet = CreateTileSet<b>(</b>mAtlas, <span class="rc_number">24</span>, <span class="rc_number">24</span><b>)</b> <span class="rc_comment">'Create a tile set and assign it a holder to access </span><br>
|
||||
<br>
|
||||
mTileMap = CreateTileMap<b>(</b>mTileSet, <span class="rc_number">20</span>, <span class="rc_number">20</span><b>)</b> <span class="rc_comment">'Create a tile map with our tile set holder "mTileSet" </span><br>
|
||||
<br>
|
||||
<span class="rc_comment">'Now we have a blacnk tilemap to fill with tiles, we now use the mAtlas image to fill in the map </span><br>
|
||||
<span class="rc_comment">'First we will assign a grass tile across our entire tile map. lets grab a grass tile to fill in. </span><br>
|
||||
<br>
|
||||
FillTile<b>(</b>mTileMap, <span class="rc_number">166</span>, <span class="rc_number">0</span>, <span class="rc_number">0</span>, <span class="rc_number">20</span>, <span class="rc_number">20</span><b>)</b> <span class="rc_comment">'The tile number goes by starting at the top left corner to the right edge of the image, </span><br>
|
||||
<span class="rc_comment">'then wraps around and comntinues the count, the image is 13 wide (0-12) so 166 would be </span><br>
|
||||
<span class="rc_comment">'2 in from the end of the last row of images on the tileset. </span><br>
|
||||
<br>
|
||||
SetTile<b>(</b>mTileMap, <span class="rc_number">15</span>, <span class="rc_number">0</span>, <span class="rc_number">0</span><b>)</b> <span class="rc_comment">'With the map filled with grass tiles we can change a single tile, to a little guy in the </span><br>
|
||||
<span class="rc_comment">'top left corner. </span><br>
|
||||
<br>
|
||||
<span class="rc_comment">'Before we begin our main loop, we need to make some variables for holding some important info </span><br>
|
||||
mOffsetX = <span class="rc_number">0</span> <br>
|
||||
mOffsetY = <span class="rc_number">0</span> <span class="rc_comment">'Offset values for where the tile is to be drawn from, used for scrolling. </span><br>
|
||||
mViewportX = <span class="rc_number">640</span> <br>
|
||||
mViewportY = <span class="rc_number">480</span> <span class="rc_comment">'How much of the tile map is to be drawn on the canvas </span><br>
|
||||
<br>
|
||||
<span class="rc_keyword">While</span> <span class="rc_keyword">Not</span> Key<b>(</b>K_ESCAPE<b>)</b> <br>
|
||||
ClearCanvas<b>(</b><b>)</b> <br>
|
||||
<br>
|
||||
DrawTileMap<b>(</b>mTileMap, <span class="rc_number">0</span>, <span class="rc_number">0</span>, mViewportX, mViewportY, mOffsetX, mOffsetY<b>)</b> <br>
|
||||
<br>
|
||||
<span class="rc_keyword">If</span> Key<b>(</b>K_UP<b>)</b> <span class="rc_keyword">Then</span> <br>
|
||||
mOffsetY = mOffsetY - <span class="rc_number">0.5</span> <br>
|
||||
<span class="rc_keyword">ElseIf</span> Key<b>(</b>K_DOWN<b>)</b> <span class="rc_keyword">Then</span> <br>
|
||||
mOffsetY = mOffsetY + <span class="rc_number">0.5</span> <br>
|
||||
<span class="rc_keyword">ElseIf</span> Key<b>(</b>K_LEFT<b>)</b> <span class="rc_keyword">Then</span> <br>
|
||||
mOffsetX = mOffsetX - <span class="rc_number">0.5</span> <br>
|
||||
<span class="rc_keyword">ElseIf</span> Key<b>(</b>K_RIGHT<b>)</b> <span class="rc_keyword">Then</span> <br>
|
||||
mOffsetX = mOffsetX + <span class="rc_number">0.5</span> <br>
|
||||
<span class="rc_keyword">End</span> <span class="rc_keyword">If</span> <br>
|
||||
<br>
|
||||
Update<b>(</b><b>)</b> <br>
|
||||
<span class="rc_keyword">Wend</span> <br>
|
||||
<br>
|
||||
<span class="rc_comment">'As you can see this replaces the grass tile with a character tile, if we wanted to place the character or any other object or image ontop of the tile </span><br>
|
||||
<span class="rc_comment">'we would DrawImage() an image not using the tilemap. </span><br>
|
||||
</code></p>
|
||||
<p><img src="images/testTileSet.png" ></p>
|
||||
<br><p>Related:
|
||||
<a href="createtilemap.html">CreateTileMap</a>
|
||||
<a href="settile.html">SetTile</a>
|
||||
<a href="filltile.html">FillTile</a>
|
||||
<a href="drawtilemap.html">DrawTileMap</a>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
|
||||
20
doc/doc_files/getgravity2d.html
Normal file
20
doc/doc_files/getgravity2d.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
|
||||
<title>GetGravity2D [RCBasic Doc] </title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p><h2>sub GetGravity2D(ByRef x, ByRef y) </h2></p>
|
||||
<p>
|
||||
Use this function for retrieving the global gravity vector. A sprite canvas layer must be open.
|
||||
</p>
|
||||
<br><p>Related:
|
||||
<a href="setgravity2d.html">SetGravity2D</a>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
BIN
doc/doc_files/images/testTileSet.png
Normal file
BIN
doc/doc_files/images/testTileSet.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 212 KiB |
BIN
doc/doc_files/images/theEye.png
Normal file
BIN
doc/doc_files/images/theEye.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 888 B |
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p><h2>function OpenCanvasSpriteLayer(w, h, viewport_x, viewport_y, viewport_w, viewport_h) </h2></p>
|
||||
<p><h2>function OpenCanvasSpriteLayer(viewport_x, viewport_y, viewport_w, viewport_h) </h2></p>
|
||||
<p>
|
||||
Returns a sprite layer. These canvases are used for rendering sprites with the integrated physics engine.
|
||||
</p>
|
||||
|
||||
20
doc/doc_files/setgravity2d.html
Normal file
20
doc/doc_files/setgravity2d.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
|
||||
<title>SetGravity2D [RCBasic Doc] </title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p><h2>sub SetGravity2D(x, y) </h2></p>
|
||||
<p>
|
||||
Use this function for setting the global gravity vector. A sprite canvas layer must be active.
|
||||
</p>
|
||||
<br><p>Related:
|
||||
<a href="getgravity2d.html">GetGravity2D</a>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,4 +1,38 @@
|
||||
#title CreateSprite [RCBasic Doc]
|
||||
#header function CreateSprite( img )
|
||||
|
||||
Returns new sprite
|
||||
This function returns a new sprite which you can place in a variable for use in your program.
|
||||
|
||||
Here is an example of opening a sprite canvas layer, creating a sprite, setting it's position and finally displaying it.
|
||||
|
||||
#code
|
||||
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)
|
||||
|
||||
While Not Key(K_ESCAPE)
|
||||
'ClearCanvas() For a sprite layer canvas, you don't need to call ClearCanvas. It's automatically called.
|
||||
Update() 'Update automatically deals with drawing the sprites on the sprite canvas.
|
||||
Wend
|
||||
#/code
|
||||
|
||||
#image "images/theEye.png"
|
||||
|
||||
#ref OpenCanvasSpriteLayer SetSpritePosition
|
||||
|
||||
@@ -10,4 +10,62 @@ Parameters:
|
||||
#li tile_h - The height of each tile
|
||||
#/list
|
||||
|
||||
#ref CreateTileMap
|
||||
#code
|
||||
isFullScreen = false
|
||||
vSync = true
|
||||
winWidth = 640
|
||||
winHeight = 480
|
||||
canViewPortX = 0
|
||||
canViewPortY = 0
|
||||
|
||||
OpenWindow("TestTileset", winWidth, winHeight, isFullScreen, vSync)
|
||||
mCanvas = OpenCanvas(winWidth, winHeight, canViewPortX, canViewPortY, winWidth, winHeight, 1)
|
||||
Canvas(mCanvas)
|
||||
|
||||
mAtlas = LoadImage("testTileSet.png") 'Load in our atlas or tile set image
|
||||
|
||||
mTileSet = CreateTileSet(mAtlas, 24, 24) 'Create a tile set and assign it a holder to access
|
||||
|
||||
mTileMap = CreateTileMap(mTileSet, 20, 20) 'Create a tile map with our tile set holder "mTileSet"
|
||||
|
||||
'Now we have a blacnk tilemap to fill with tiles, we now use the mAtlas image to fill in the map
|
||||
'First we will assign a grass tile across our entire tile map. lets grab a grass tile to fill in.
|
||||
|
||||
FillTile(mTileMap, 166, 0, 0, 20, 20) 'The tile number goes by starting at the top left corner to the right edge of the image,
|
||||
'then wraps around and comntinues the count, the image is 13 wide (0-12) so 166 would be
|
||||
'2 in from the end of the last row of images on the tileset.
|
||||
|
||||
SetTile(mTileMap, 15, 0, 0) 'With the map filled with grass tiles we can change a single tile, to a little guy in the
|
||||
'top left corner.
|
||||
|
||||
'Before we begin our main loop, we need to make some variables for holding some important info
|
||||
mOffsetX = 0
|
||||
mOffsetY = 0 'Offset values for where the tile is to be drawn from, used for scrolling.
|
||||
mViewportX = 640
|
||||
mViewportY = 480 'How much of the tile map is to be drawn on the canvas
|
||||
|
||||
While Not Key(K_ESCAPE)
|
||||
ClearCanvas()
|
||||
|
||||
DrawTileMap(mTileMap, 0, 0, mViewportX, mViewportY, mOffsetX, mOffsetY)
|
||||
|
||||
If Key(K_UP) Then
|
||||
mOffsetY = mOffsetY - 0.5
|
||||
ElseIf Key(K_DOWN) Then
|
||||
mOffsetY = mOffsetY + 0.5
|
||||
ElseIf Key(K_LEFT) Then
|
||||
mOffsetX = mOffsetX - 0.5
|
||||
ElseIf Key(K_RIGHT) Then
|
||||
mOffsetX = mOffsetX + 0.5
|
||||
End If
|
||||
|
||||
Update()
|
||||
Wend
|
||||
|
||||
'As you can see this replaces the grass tile with a character tile, if we wanted to place the character or any other object or image ontop of the tile
|
||||
'we would DrawImage() an image not using the tilemap.
|
||||
#/code
|
||||
|
||||
#image "images/testTileSet.png"
|
||||
|
||||
#ref CreateTileMap SetTile FillTile DrawTileMap
|
||||
|
||||
6
doc/files/deletejoint.txt
Normal file
6
doc/files/deletejoint.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
#title DeleteJoint [RCBasic Doc]
|
||||
#header Sub DeleteJoint( joint_id )
|
||||
|
||||
Clears a joint from memory
|
||||
|
||||
#ref CreateDistanceJoint CreateFrictionJoint CreateGearJoint CreateMotorJoint CreatePrismaticJoint CreatePulleyJoint CreateRevoluteJoint CreateWeldJoint CreateWheelJoint
|
||||
6
doc/files/getgravity2d.txt
Normal file
6
doc/files/getgravity2d.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
#title GetGravity2D [RCBasic Doc]
|
||||
#header sub GetGravity2D(ByRef x, ByRef y)
|
||||
|
||||
Use this function for retrieving the global gravity vector. A sprite canvas layer must be open.
|
||||
|
||||
#ref SetGravity2D
|
||||
4
doc/files/getspriteaabb.txt
Normal file
4
doc/files/getspriteaabb.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
#title GetSpriteAABB [RCBasic Doc]
|
||||
#header sub GetSpriteAABB( spr_id, ByRef x1, ByRef y1, ByRef x2, ByRef y2 )
|
||||
|
||||
Returns the axis aligned bounding box for a sprite
|
||||
6
doc/files/getspritedensity.txt
Normal file
6
doc/files/getspritedensity.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
#title GetSpriteDensity [RCBasic Doc]
|
||||
#header function GetSpriteDensity( spr_id )
|
||||
|
||||
Returns the density of a sprite. Higher density means a heavier sprite.
|
||||
|
||||
#ref SetSpriteDensity
|
||||
7
doc/files/getspritefriction.txt
Normal file
7
doc/files/getspritefriction.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
#title GetSpriteFriction [RCBasic Doc]
|
||||
#header function GetSpriteFriction( spr_id )
|
||||
|
||||
Returns a sprite's friction
|
||||
|
||||
#ref GetSpriteFriction
|
||||
|
||||
6
doc/files/getspriterestitution.txt
Normal file
6
doc/files/getspriterestitution.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
#title GetSpriteRestitution [RCBasic Doc]
|
||||
#header function GetSpriteRestitution( spr_id )
|
||||
|
||||
Returns the restitution coefficient for a sprite
|
||||
|
||||
#ref SetSpriteRestitution
|
||||
6
doc/files/getspriterestitutionthreshold.txt
Normal file
6
doc/files/getspriterestitutionthreshold.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
#title GetSpriteRestitutionThreshold [RCBasic Doc]
|
||||
#header function GetSpriteRestitutionThreshold( spr_id )
|
||||
|
||||
Returns the restitution velocity threshold for a sprite
|
||||
|
||||
#ref SetSpriteRestitutionThreshold
|
||||
6
doc/files/getworld2dautoclearforces.txt
Normal file
6
doc/files/getworld2dautoclearforces.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
#title GetWorld2DAutoClearForces [RCBasic Doc]
|
||||
#header function GetWorld2DAutoClearForces()
|
||||
|
||||
Returns the auto clear forces flag for the active canvas
|
||||
|
||||
#ref SetWorld2DAutoClearForces
|
||||
7
doc/files/getworld2dpositioniterations.txt
Normal file
7
doc/files/getworld2dpositioniterations.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
#title GetWorld2DPositionIterations [RCBasic Doc]
|
||||
#header function GetWorld2DPositionIterations()
|
||||
|
||||
Returns the number of position iterations for the position constraint solver
|
||||
|
||||
#ref SetWorld2DPositionIterations
|
||||
|
||||
6
doc/files/getworld2dtimestep.txt
Normal file
6
doc/files/getworld2dtimestep.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
#title GetWorld2DTimeStep [RCBasic Doc]
|
||||
#header function GetWorld2DTimeStep()
|
||||
|
||||
Returns the timestep for the active canvas
|
||||
|
||||
#ref SetWorld2DTimeStep
|
||||
6
doc/files/getworld2dvelocityiterations.txt
Normal file
6
doc/files/getworld2dvelocityiterations.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
#title GetWorld2DVelocityIterations [RCBasic Doc]
|
||||
#header function GetWorld2DVelocityIterations()
|
||||
|
||||
Returns the number of velocity iterations for the velocity constraint solver
|
||||
|
||||
#ref SetWorld2DVelocityIterations
|
||||
5
doc/files/getworld3dmaxsubsteps.txt
Normal file
5
doc/files/getworld3dmaxsubsteps.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
#title GetWorld3DMaxSubSteps [RCBasic Doc]
|
||||
#header function GetWorld3DMaxSubSteps()
|
||||
|
||||
Returns the maximum substeps in the 3d physics time step
|
||||
|
||||
4
doc/files/getworld3dtimestep.txt
Normal file
4
doc/files/getworld3dtimestep.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
#title GetWorld3DTimeStep [RCBasic Doc]
|
||||
#header function GetWorld3DTimeStep()
|
||||
|
||||
Returns the timestep of the 3d physics simulation
|
||||
@@ -1,5 +1,5 @@
|
||||
#title OpenCanvasSpriteLayer [RCBasic Doc]
|
||||
#header function OpenCanvasSpriteLayer(w, h, viewport_x, viewport_y, viewport_w, viewport_h)
|
||||
#header function OpenCanvasSpriteLayer(viewport_x, viewport_y, viewport_w, viewport_h)
|
||||
|
||||
Returns a sprite layer. These canvases are used for rendering sprites with the integrated physics engine.
|
||||
|
||||
|
||||
4
doc/files/readinput_gettext.txt
Normal file
4
doc/files/readinput_gettext.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
#title ReadInput_GetText$ [RCBasic Doc]
|
||||
#header function ReadInput_GetText$()
|
||||
|
||||
|
||||
6
doc/files/setgravity2d.txt
Normal file
6
doc/files/setgravity2d.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
#title SetGravity2D [RCBasic Doc]
|
||||
#header sub SetGravity2D(x, y)
|
||||
|
||||
Use this function for setting the global gravity vector. A sprite canvas layer must be active.
|
||||
|
||||
#ref GetGravity2D
|
||||
9
doc/files/setspritedensity.txt
Normal file
9
doc/files/setspritedensity.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
#title SetSpriteDensity [RCBasic Doc]
|
||||
#header sub SetSpriteDensity( spr_id, density )
|
||||
|
||||
Sets the density of a sprite. Higher density means a heavier sprite.
|
||||
|
||||
Density is used to calculate mass for a sprite.
|
||||
|
||||
#ref GetSpriteDensity
|
||||
|
||||
6
doc/files/setspritefriction.txt
Normal file
6
doc/files/setspritefriction.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
#title SetSpriteFriction [RCBasic Doc]
|
||||
#header sub SetSpriteFriction( spr_id, friction )
|
||||
|
||||
Sets a sprite's friction
|
||||
|
||||
#ref GetSpriteFriction
|
||||
7
doc/files/setspriterestitution.txt
Normal file
7
doc/files/setspriterestitution.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
#title SetSpriteRestitution [RCBasic Doc]
|
||||
#header sub SetSpriteRestitution( spr_id, restitution )
|
||||
|
||||
Sets the restitution coefficient for a sprite
|
||||
|
||||
#ref GetSpriteRestitution
|
||||
|
||||
6
doc/files/setspriterestitutionthreshold.txt
Normal file
6
doc/files/setspriterestitutionthreshold.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
#title SetSpriteRestitutionThreshold [RCBasic Doc]
|
||||
#header sub SetSpriteRestitutionThreshold( spr_id, threshold )
|
||||
|
||||
Sets the restitution threshold for a sprite.
|
||||
|
||||
#ref GetSpriteRestitutionThreshold
|
||||
6
doc/files/setworld2dautoclearforces.txt
Normal file
6
doc/files/setworld2dautoclearforces.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
#title SetWorld2DAutoClearForces [RCBasic Doc]
|
||||
#header sub SetWorld2DAutoClearForces( flag )
|
||||
|
||||
Sets the auto clear forces flag for the active canvas
|
||||
|
||||
#ref GetWorld2DAutoClearForces
|
||||
6
doc/files/setworld2dpositioniterations.txt
Normal file
6
doc/files/setworld2dpositioniterations.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
#title SetWorld2DPositionIterations [RCBasic Doc]
|
||||
#header sub SetWorld2DPositionIterations( p )
|
||||
|
||||
Sets the number of position iterations for the position constraint solver
|
||||
|
||||
#ref GetWorld2DPositionIterations
|
||||
6
doc/files/setworld2dtimestep.txt
Normal file
6
doc/files/setworld2dtimestep.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
#title SetWorld2DTimeStep [RCBasic Doc]
|
||||
#header sub SetWorld2DTimeStep( ts )
|
||||
|
||||
Sets the timestep for the active canvas
|
||||
|
||||
#ref GetWorld2DTimeStep
|
||||
6
doc/files/setworld2dvelocityiterations.txt
Normal file
6
doc/files/setworld2dvelocityiterations.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
#title SetWorld2DVelocityIterations [RCBasic Doc]
|
||||
#header sub SetWorld2DVelocityIterations( v )
|
||||
|
||||
Sets the number of velocity iterations for the velocity constraint solver
|
||||
|
||||
#ref GetWorld2DVelocityIterations
|
||||
@@ -1 +1 @@
|
||||
,n00b,fedora,23.10.2024 22:46,file:///home/n00b/.config/libreoffice/4;
|
||||
,n00b,fedora,23.11.2024 11:50,file:///home/n00b/.config/libreoffice/4;
|
||||
@@ -1,6 +1,5 @@
|
||||
rc_fprint( FPRINT_TXT$ )
|
||||
rc_input( INPUT$_PROMPT$ )
|
||||
rc_tst( )
|
||||
#/home/n00b/Projects/RCBASIC4/rcbasic_build/intern_inc/exceptions/rc_arrayDim.h
|
||||
#/home/n00b/Projects/RCBASIC4/rcbasic_build/intern_inc/exceptions/rc_stringArrayDim.h
|
||||
#/home/n00b/Projects/RCBASIC4/rcbasic_build/intern_inc/exceptions/rc_numberArrayDim.h
|
||||
@@ -444,7 +443,7 @@ rc_setClipboardText( SETCLIPBOARDTEXT_TXT$ )
|
||||
rc_hasClipboardText( )
|
||||
rc_readInput_Start( )
|
||||
rc_readInput_Stop( )
|
||||
rc_readInput_Text( )
|
||||
rc_readInput_GetText( )
|
||||
rc_readInput_SetText( READINPUT_SETTEXT_TXT$ )
|
||||
rc_readInput_ToggleBackspace( READINPUT_TOGGLEBACKSPACE_FLAG )
|
||||
rc_createSprite( CREATESPRITE_IMG, CREATESPRITE_FRAME_W, CREATESPRITE_FRAME_H )
|
||||
@@ -520,6 +519,25 @@ rc_setSpriteAwake( SETSPRITEAWAKE_SPR_ID, SETSPRITEAWAKE_FLAG )
|
||||
rc_spriteIsAwake( SPRITEISAWAKE_SPR_ID )
|
||||
rc_setSpriteFixedRotation( SETSPRITEFIXEDROTATION_SPR_ID, SETSPRITEFIXEDROTATION_FLAG )
|
||||
rc_spriteIsFixedRotation( SPRITEISFIXEDROTATION_SPR_ID )
|
||||
rc_setSpriteDensity( SETSPRITEDENSITY_SPR_ID, SETSPRITEDENSITY_DENSITY )
|
||||
rc_getSpriteDensity( GETSPRITEDENSITY_SPR_ID )
|
||||
rc_setSpriteFriction( SETSPRITEFRICTION_SPR_ID, SETSPRITEFRICTION_FRICTION )
|
||||
rc_getSpriteFriction( GETSPRITEFRICTION_SPR_ID )
|
||||
rc_setSpriteRestitution( SETSPRITERESTITUTION_SPR_ID, SETSPRITERESTITUTION_RESTITUTION )
|
||||
rc_getSpriteRestitution( GETSPRITERESTITUTION_SPR_ID )
|
||||
rc_setSpriteRestitutionThreshold( SETSPRITERESTITUTIONTHRESHOLD_SPR_ID, SETSPRITERESTITUTIONTHRESHOLD_THRESHOLD )
|
||||
rc_getSpriteRestitutionThreshold( GETSPRITERESTITUTIONTHRESHOLD_SPR_ID )
|
||||
rc_getSpriteAABB( GETSPRITEAABB_SPR_ID, &GETSPRITEAABB_X1, &GETSPRITEAABB_Y1, &GETSPRITEAABB_X2, &GETSPRITEAABB_Y2 )
|
||||
rc_setGravity2D( SETGRAVITY2D_X, SETGRAVITY2D_Y )
|
||||
rc_getGravity2D( &GETGRAVITY2D_X, &GETGRAVITY2D_Y )
|
||||
rc_setWorld2DTimeStep( SETWORLD2DTIMESTEP_TS )
|
||||
rc_setWorld2DVelocityIterations( SETWORLD2DVELOCITYITERATIONS_V )
|
||||
rc_setWorld2DPositionIterations( SETWORLD2DPOSITIONITERATIONS_P )
|
||||
rc_getWorld2DTimeStep( )
|
||||
rc_getWorld2DVelocityIterations( )
|
||||
rc_getWorld2DPositionIterations( )
|
||||
rc_setWorld2DAutoClearForces( SETWORLD2DAUTOCLEARFORCES_FLAG )
|
||||
rc_getWorld2DAutoClearForces( )
|
||||
rc_createDistanceJoint( CREATEDISTANCEJOINT_SPRITEA, CREATEDISTANCEJOINT_SPRITEB, CREATEDISTANCEJOINT_AX, CREATEDISTANCEJOINT_AY, CREATEDISTANCEJOINT_BX, CREATEDISTANCEJOINT_BY, CREATEDISTANCEJOINT_COLLIDE_CONNECT )
|
||||
rc_createFrictionJoint( CREATEFRICTIONJOINT_SPRITEA, CREATEFRICTIONJOINT_SPRITEB, CREATEFRICTIONJOINT_X, CREATEFRICTIONJOINT_Y, CREATEFRICTIONJOINT_COLLIDE_CONNECT )
|
||||
rc_createGearJoint( CREATEGEARJOINT_JOINTA, CREATEGEARJOINT_JOINTB, CREATEGEARJOINT_G_RATIO, CREATEGEARJOINT_COLLIDE_CONNECT )
|
||||
@@ -845,6 +863,8 @@ rc_addSceneSkyDomeEx( ADDSCENESKYDOMEEX_IMG, ADDSCENESKYDOMEEX_HORIRES, ADDSCE
|
||||
rc_removeSceneSky( )
|
||||
rc_setWorld3DMaxSubSteps( SETWORLD3DMAXSUBSTEPS_STEPS )
|
||||
rc_setWorld3DTimeStep( SETWORLD3DTIMESTEP_TS )
|
||||
rc_getWorld3DMaxSubSteps( )
|
||||
rc_getWorld3DTimeStep( )
|
||||
rc_startParticleEmitter( STARTPARTICLEEMITTER_ACTOR )
|
||||
rc_stopParticleEmitter( STOPPARTICLEEMITTER_ACTOR )
|
||||
rc_setParticleDirection( SETPARTICLEDIRECTION_ACTOR, SETPARTICLEDIRECTION_X, SETPARTICLEDIRECTION_Y, SETPARTICLEDIRECTION_Z )
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
sub Fprint(txt$)
|
||||
function Input$(prompt$)
|
||||
sub tst()
|
||||
|
||||
@@ -4,3 +4,5 @@ sub AddSceneSkyDomeEx( img, horiRes, vertRes, txPercentage, spherePercentage, ra
|
||||
sub RemoveSceneSky( )
|
||||
sub SetWorld3DMaxSubSteps( steps )
|
||||
sub SetWorld3DTimeStep( ts )
|
||||
function GetWorld3DMaxSubSteps()
|
||||
function GetWorld3DTimeStep()
|
||||
|
||||
@@ -30,3 +30,22 @@ sub setSpriteAwake( spr_id, flag)
|
||||
function spriteIsAwake( spr_id)
|
||||
sub setSpriteFixedRotation( spr_id, flag)
|
||||
function spriteIsFixedRotation( spr_id)
|
||||
sub SetSpriteDensity( spr_id, density )
|
||||
function GetSpriteDensity( spr_id )
|
||||
sub SetSpriteFriction( spr_id, friction )
|
||||
function GetSpriteFriction( spr_id )
|
||||
sub SetSpriteRestitution( spr_id, restitution )
|
||||
function GetSpriteRestitution( spr_id )
|
||||
sub SetSpriteRestitutionThreshold( spr_id, threshold )
|
||||
function GetSpriteRestitutionThreshold( spr_id )
|
||||
sub GetSpriteAABB( spr_id, ByRef x1, ByRef y1, ByRef x2, ByRef y2 )
|
||||
sub SetGravity2D( x, y )
|
||||
sub GetGravity2D( ByRef x, ByRef y )
|
||||
sub SetWorld2DTimeStep( ts )
|
||||
sub SetWorld2DVelocityIterations( v )
|
||||
sub SetWorld2DPositionIterations( p )
|
||||
function GetWorld2DTimeStep()
|
||||
function GetWorld2DVelocityIterations()
|
||||
function GetWorld2DPositionIterations()
|
||||
sub SetWorld2DAutoClearForces( flag )
|
||||
function GetWorld2DAutoClearForces()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
sub ReadInput_Start()
|
||||
sub ReadInput_Stop()
|
||||
function ReadInput_Text$()
|
||||
function ReadInput_GetText$()
|
||||
sub ReadInput_SetText(txt$)
|
||||
sub ReadInput_ToggleBackspace(flag)
|
||||
|
||||
@@ -912,16 +912,18 @@ int main(int argc, char * argv[])
|
||||
{
|
||||
string line = "";
|
||||
|
||||
rcbasic_dev("embedded_functions.bas"); rcbasic_output_debug_info(); return 0;
|
||||
//rcbasic_dev("embedded_functions.bas"); rcbasic_output_debug_info(); return 0;
|
||||
|
||||
string rc_filename = "";// = "tst.bas";
|
||||
|
||||
bool clean_after_build = false;
|
||||
|
||||
//DEBUG START
|
||||
rc_filename = "/home/n00b/Projects/RCBASIC4/rcbasic_runtime/bin/Release/unittest.bas";
|
||||
//rc_filename = "/home/n00b/Projects/RCBASIC4/rcbasic_runtime/bin/Release/unittest.bas";
|
||||
//DEBUG END
|
||||
|
||||
//enable_presets = true;
|
||||
|
||||
if(argc > 1)
|
||||
rc_filename = argv[1];
|
||||
|
||||
@@ -935,12 +937,12 @@ int main(int argc, char * argv[])
|
||||
|
||||
if(cmd_arg.compare("--debug")==0)
|
||||
{
|
||||
cout << "DEBUG MODE" << endl;
|
||||
//cout << "DEBUG MODE" << endl;
|
||||
rcbasic_build_debug = true;
|
||||
}
|
||||
else if(cmd_arg.compare("--no-presets")==0)
|
||||
{
|
||||
cout << "DISABLE PRESETS" << endl;
|
||||
//cout << "DISABLE PRESETS" << endl;
|
||||
enable_presets = false;
|
||||
}
|
||||
else if(cmd_arg.compare("--no-clean")==0)
|
||||
|
||||
@@ -8,7 +8,6 @@ void init_embedded_functions()
|
||||
add_embedded_arg("txt$", ID_TYPE_STR);
|
||||
embed_function("Input$", ID_TYPE_FN_STR);
|
||||
add_embedded_arg("prompt$", ID_TYPE_STR);
|
||||
embed_function("tst", ID_TYPE_SUB);
|
||||
embed_function("ArrayDim", ID_TYPE_FN_NUM);
|
||||
add_embedded_arg("id", ID_TYPE_BYREF_NUM);
|
||||
embed_function("StringArrayDim", ID_TYPE_FN_NUM);
|
||||
@@ -1275,7 +1274,7 @@ void init_embedded_functions()
|
||||
embed_function("HasClipboardText", ID_TYPE_FN_NUM);
|
||||
embed_function("ReadInput_Start", ID_TYPE_SUB);
|
||||
embed_function("ReadInput_Stop", ID_TYPE_SUB);
|
||||
embed_function("ReadInput_Text$", ID_TYPE_FN_STR);
|
||||
embed_function("ReadInput_GetText$", ID_TYPE_FN_STR);
|
||||
embed_function("ReadInput_SetText", ID_TYPE_SUB);
|
||||
add_embedded_arg("txt$", ID_TYPE_STR);
|
||||
embed_function("ReadInput_ToggleBackspace", ID_TYPE_SUB);
|
||||
@@ -1516,6 +1515,50 @@ void init_embedded_functions()
|
||||
add_embedded_arg("flag", ID_TYPE_NUM);
|
||||
embed_function("spriteIsFixedRotation", ID_TYPE_FN_NUM);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
embed_function("SetSpriteDensity", ID_TYPE_SUB);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
add_embedded_arg("density", ID_TYPE_NUM);
|
||||
embed_function("GetSpriteDensity", ID_TYPE_FN_NUM);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
embed_function("SetSpriteFriction", ID_TYPE_SUB);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
add_embedded_arg("friction", ID_TYPE_NUM);
|
||||
embed_function("GetSpriteFriction", ID_TYPE_FN_NUM);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
embed_function("SetSpriteRestitution", ID_TYPE_SUB);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
add_embedded_arg("restitution", ID_TYPE_NUM);
|
||||
embed_function("GetSpriteRestitution", ID_TYPE_FN_NUM);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
embed_function("SetSpriteRestitutionThreshold", ID_TYPE_SUB);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
add_embedded_arg("threshold", ID_TYPE_NUM);
|
||||
embed_function("GetSpriteRestitutionThreshold", ID_TYPE_FN_NUM);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
embed_function("GetSpriteAABB", ID_TYPE_SUB);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
add_embedded_arg("x1", ID_TYPE_BYREF_NUM);
|
||||
add_embedded_arg("y1", ID_TYPE_BYREF_NUM);
|
||||
add_embedded_arg("x2", ID_TYPE_BYREF_NUM);
|
||||
add_embedded_arg("y2", ID_TYPE_BYREF_NUM);
|
||||
embed_function("SetGravity2D", ID_TYPE_SUB);
|
||||
add_embedded_arg("x", ID_TYPE_NUM);
|
||||
add_embedded_arg("y", ID_TYPE_NUM);
|
||||
embed_function("GetGravity2D", ID_TYPE_SUB);
|
||||
add_embedded_arg("x", ID_TYPE_BYREF_NUM);
|
||||
add_embedded_arg("y", ID_TYPE_BYREF_NUM);
|
||||
embed_function("SetWorld2DTimeStep", ID_TYPE_SUB);
|
||||
add_embedded_arg("ts", ID_TYPE_NUM);
|
||||
embed_function("SetWorld2DVelocityIterations", ID_TYPE_SUB);
|
||||
add_embedded_arg("v", ID_TYPE_NUM);
|
||||
embed_function("SetWorld2DPositionIterations", ID_TYPE_SUB);
|
||||
add_embedded_arg("p", ID_TYPE_NUM);
|
||||
embed_function("GetWorld2DTimeStep", ID_TYPE_FN_NUM);
|
||||
embed_function("GetWorld2DVelocityIterations", ID_TYPE_FN_NUM);
|
||||
embed_function("GetWorld2DPositionIterations", ID_TYPE_FN_NUM);
|
||||
embed_function("SetWorld2DAutoClearForces", ID_TYPE_SUB);
|
||||
add_embedded_arg("flag", ID_TYPE_NUM);
|
||||
embed_function("GetWorld2DAutoClearForces", ID_TYPE_FN_NUM);
|
||||
embed_function("createDistanceJoint", ID_TYPE_FN_NUM);
|
||||
add_embedded_arg("spriteA", ID_TYPE_NUM);
|
||||
add_embedded_arg("spriteB", ID_TYPE_NUM);
|
||||
@@ -2647,6 +2690,8 @@ void init_embedded_functions()
|
||||
add_embedded_arg("steps", ID_TYPE_NUM);
|
||||
embed_function("SetWorld3DTimeStep", ID_TYPE_SUB);
|
||||
add_embedded_arg("ts", ID_TYPE_NUM);
|
||||
embed_function("GetWorld3DMaxSubSteps", ID_TYPE_FN_NUM);
|
||||
embed_function("GetWorld3DTimeStep", ID_TYPE_FN_NUM);
|
||||
embed_function("startParticleEmitter", ID_TYPE_SUB);
|
||||
add_embedded_arg("actor", ID_TYPE_NUM);
|
||||
embed_function("stopParticleEmitter", ID_TYPE_SUB);
|
||||
|
||||
@@ -31,6 +31,7 @@ embedded_functions.bas
|
||||
/home/n00b/Projects/RCBASIC4/rcbasic_build/intern_lib/tilemaps.bas
|
||||
/home/n00b/Projects/RCBASIC4/rcbasic_build/intern_lib/mesh.bas
|
||||
/home/n00b/Projects/RCBASIC4/rcbasic_build/intern_lib/actor.bas
|
||||
/home/n00b/Projects/RCBASIC4/rcbasic_build/intern_lib/actor_animation.bas
|
||||
/home/n00b/Projects/RCBASIC4/rcbasic_build/intern_lib/actor_physics.bas
|
||||
/home/n00b/Projects/RCBASIC4/rcbasic_build/intern_lib/constraint3D.bas
|
||||
/home/n00b/Projects/RCBASIC4/rcbasic_build/intern_lib/camera.bas
|
||||
@@ -39,5 +40,4 @@ embedded_functions.bas
|
||||
/home/n00b/Projects/RCBASIC4/rcbasic_build/intern_lib/lights.bas
|
||||
/home/n00b/Projects/RCBASIC4/rcbasic_build/intern_lib/terrain.bas
|
||||
/home/n00b/Projects/RCBASIC4/rcbasic_build/intern_lib/water.bas
|
||||
/home/n00b/Projects/RCBASIC4/rcbasic_build/intern_lib/actor_animation.bas
|
||||
/home/n00b/Projects/RCBASIC4/rcbasic_build/intern_lib/materials.bas
|
||||
|
||||
@@ -331,12 +331,10 @@ N main.CanvasClip w 2
|
||||
N main.CanvasClip h 3
|
||||
N main.SetCanvasPhysics2D c_num 0
|
||||
N main.SetCanvasPhysics2D state 1
|
||||
N main.OpenCanvasSpriteLayer w 0
|
||||
N main.OpenCanvasSpriteLayer h 1
|
||||
N main.OpenCanvasSpriteLayer viewport_x 2
|
||||
N main.OpenCanvasSpriteLayer viewport_y 3
|
||||
N main.OpenCanvasSpriteLayer viewport_w 4
|
||||
N main.OpenCanvasSpriteLayer viewport_h 5
|
||||
N main.OpenCanvasSpriteLayer viewport_x 0
|
||||
N main.OpenCanvasSpriteLayer viewport_y 1
|
||||
N main.OpenCanvasSpriteLayer viewport_w 2
|
||||
N main.OpenCanvasSpriteLayer viewport_h 3
|
||||
N main.Circle x 0
|
||||
N main.Circle y 1
|
||||
N main.Circle radius 2
|
||||
@@ -924,6 +922,320 @@ N main.NumSpriteAnimationLoops sprite 0
|
||||
N main.SpriteAnimationIsPlaying sprite 0
|
||||
N main.DeleteSpriteAnimation sprite 0
|
||||
N main.DeleteSpriteAnimation animation 1
|
||||
N main.getSpriteCenter spr_id 0
|
||||
BN main.getSpriteCenter x 1
|
||||
BN main.getSpriteCenter y 2
|
||||
N main.setSpriteLinearVelocity spr_id 0
|
||||
N main.setSpriteLinearVelocity x 1
|
||||
N main.setSpriteLinearVelocity y 2
|
||||
N main.getSpriteLinearVelocity spr_id 0
|
||||
BN main.getSpriteLinearVelocity x 1
|
||||
BN main.getSpriteLinearVelocity y 2
|
||||
N main.setSpriteAngularVelocity spr_id 0
|
||||
N main.setSpriteAngularVelocity av 1
|
||||
N main.getSpriteAngularVelocity spr_id 0
|
||||
N main.applySpriteForce spr_id 0
|
||||
N main.applySpriteForce fX 1
|
||||
N main.applySpriteForce fY 2
|
||||
N main.applySpriteForce pX 3
|
||||
N main.applySpriteForce pY 4
|
||||
N main.applySpriteCentralForce spr_id 0
|
||||
N main.applySpriteCentralForce x 1
|
||||
N main.applySpriteCentralForce y 2
|
||||
N main.applySpriteTorque spr_id 0
|
||||
N main.applySpriteTorque torque 1
|
||||
N main.applySpriteLinearImpulse spr_id 0
|
||||
N main.applySpriteLinearImpulse iX 1
|
||||
N main.applySpriteLinearImpulse iY 2
|
||||
N main.applySpriteLinearImpulse pX 3
|
||||
N main.applySpriteLinearImpulse pY 4
|
||||
N main.applySpriteAngularImpulse spr_id 0
|
||||
N main.applySpriteAngularImpulse impulse 1
|
||||
N main.getSpriteMass spr_id 0
|
||||
N main.getSpriteInertia spr_id 0
|
||||
N main.getSpriteWorldPoint spr_id 0
|
||||
N main.getSpriteWorldPoint lX 1
|
||||
N main.getSpriteWorldPoint lY 2
|
||||
BN main.getSpriteWorldPoint x 3
|
||||
BN main.getSpriteWorldPoint y 4
|
||||
N main.getSpriteWorldVector spr_id 0
|
||||
N main.getSpriteWorldVector lX 1
|
||||
N main.getSpriteWorldVector lY 2
|
||||
BN main.getSpriteWorldVector x 3
|
||||
BN main.getSpriteWorldVector y 4
|
||||
N main.getSpriteLocalPoint spr_id 0
|
||||
N main.getSpriteLocalPoint wX 1
|
||||
N main.getSpriteLocalPoint wY 2
|
||||
BN main.getSpriteLocalPoint x 3
|
||||
BN main.getSpriteLocalPoint y 4
|
||||
N main.getSpriteLocalVector spr_id 0
|
||||
N main.getSpriteLocalVector wX 1
|
||||
N main.getSpriteLocalVector wY 2
|
||||
BN main.getSpriteLocalVector x 3
|
||||
BN main.getSpriteLocalVector y 4
|
||||
N main.getSpriteLinearVelocityFromLocalPoint spr_id 0
|
||||
N main.getSpriteLinearVelocityFromLocalPoint pX 1
|
||||
N main.getSpriteLinearVelocityFromLocalPoint pY 2
|
||||
BN main.getSpriteLinearVelocityFromLocalPoint x 3
|
||||
BN main.getSpriteLinearVelocityFromLocalPoint y 4
|
||||
N main.getSpriteLinearVelocityFromWorldPoint spr_id 0
|
||||
N main.getSpriteLinearVelocityFromWorldPoint wX 1
|
||||
N main.getSpriteLinearVelocityFromWorldPoint wY 2
|
||||
BN main.getSpriteLinearVelocityFromWorldPoint x 3
|
||||
BN main.getSpriteLinearVelocityFromWorldPoint y 4
|
||||
N main.getSpriteLinearDamping spr_id 0
|
||||
N main.setSpriteLinearDamping spr_id 0
|
||||
N main.setSpriteLinearDamping linearDamping 1
|
||||
N main.getSpriteAngularDamping spr_id 0
|
||||
N main.setSpriteAngularDamping spr_id 0
|
||||
N main.setSpriteAngularDamping angularDamping 1
|
||||
N main.getSpriteGravityScale spr_id 0
|
||||
N main.setSpriteGravityScale spr_id 0
|
||||
N main.setSpriteGravityScale g_scale 1
|
||||
N main.setSpriteBullet spr_id 0
|
||||
N main.setSpriteBullet flag 1
|
||||
N main.spriteIsBullet spr_id 0
|
||||
N main.setSpriteSleepAllowed spr_id 0
|
||||
N main.setSpriteSleepAllowed flag 1
|
||||
N main.spriteSleepAllowed spr_id 0
|
||||
N main.setSpriteAwake spr_id 0
|
||||
N main.setSpriteAwake flag 1
|
||||
N main.spriteIsAwake spr_id 0
|
||||
N main.setSpriteFixedRotation spr_id 0
|
||||
N main.setSpriteFixedRotation flag 1
|
||||
N main.spriteIsFixedRotation spr_id 0
|
||||
N main.SetSpriteDensity spr_id 0
|
||||
N main.SetSpriteDensity density 1
|
||||
N main.GetSpriteDensity spr_id 0
|
||||
N main.SetSpriteFriction spr_id 0
|
||||
N main.SetSpriteFriction friction 1
|
||||
N main.GetSpriteFriction spr_id 0
|
||||
N main.SetSpriteRestitution spr_id 0
|
||||
N main.SetSpriteRestitution restitution 1
|
||||
N main.GetSpriteRestitution spr_id 0
|
||||
N main.SetSpriteRestitutionThreshold spr_id 0
|
||||
N main.SetSpriteRestitutionThreshold threshold 1
|
||||
N main.GetSpriteRestitutionThreshold spr_id 0
|
||||
N main.GetSpriteAABB spr_id 0
|
||||
BN main.GetSpriteAABB x1 1
|
||||
BN main.GetSpriteAABB y1 2
|
||||
BN main.GetSpriteAABB x2 3
|
||||
BN main.GetSpriteAABB y2 4
|
||||
N main.SetGravity2D x 0
|
||||
N main.SetGravity2D y 1
|
||||
BN main.GetGravity2D x 0
|
||||
BN main.GetGravity2D y 1
|
||||
N main.SetWorld2DTimeStep ts 0
|
||||
N main.SetWorld2DVelocityIterations v 0
|
||||
N main.SetWorld2DPositionIterations p 0
|
||||
N main.SetWorld2DAutoClearForces flag 0
|
||||
N main.createDistanceJoint spriteA 0
|
||||
N main.createDistanceJoint spriteB 1
|
||||
N main.createDistanceJoint aX 2
|
||||
N main.createDistanceJoint aY 3
|
||||
N main.createDistanceJoint bX 4
|
||||
N main.createDistanceJoint bY 5
|
||||
N main.createDistanceJoint collide_connect 6
|
||||
N main.createFrictionJoint spriteA 0
|
||||
N main.createFrictionJoint spriteB 1
|
||||
N main.createFrictionJoint x 2
|
||||
N main.createFrictionJoint y 3
|
||||
N main.createFrictionJoint collide_connect 4
|
||||
N main.createGearJoint jointA 0
|
||||
N main.createGearJoint jointB 1
|
||||
N main.createGearJoint g_ratio 2
|
||||
N main.createGearJoint collide_connect 3
|
||||
N main.createMotorJoint spriteA 0
|
||||
N main.createMotorJoint spriteB 1
|
||||
N main.createMotorJoint collide_connect 2
|
||||
N main.createPrismaticJoint spriteA 0
|
||||
N main.createPrismaticJoint spriteB 1
|
||||
N main.createPrismaticJoint aX 2
|
||||
N main.createPrismaticJoint aY 3
|
||||
N main.createPrismaticJoint axisX 4
|
||||
N main.createPrismaticJoint axisY 5
|
||||
N main.createPrismaticJoint collide_connect 6
|
||||
N main.createPulleyJoint spriteA 0
|
||||
N main.createPulleyJoint spriteB 1
|
||||
N main.createPulleyJoint gaX 2
|
||||
N main.createPulleyJoint gaY 3
|
||||
N main.createPulleyJoint gbX 4
|
||||
N main.createPulleyJoint gbY 5
|
||||
N main.createPulleyJoint aX 6
|
||||
N main.createPulleyJoint aY 7
|
||||
N main.createPulleyJoint bX 8
|
||||
N main.createPulleyJoint bY 9
|
||||
N main.createPulleyJoint j_ratio 10
|
||||
N main #fn11 11
|
||||
N main.createPulleyJoint collide_connect 11
|
||||
N main.createRevoluteJoint spriteA 0
|
||||
N main.createRevoluteJoint spriteB 1
|
||||
N main.createRevoluteJoint x 2
|
||||
N main.createRevoluteJoint y 3
|
||||
N main.createRevoluteJoint collide_connect 4
|
||||
N main.createWeldJoint spriteA 0
|
||||
N main.createWeldJoint spriteB 1
|
||||
N main.createWeldJoint x 2
|
||||
N main.createWeldJoint y 3
|
||||
N main.createWeldJoint collide_connect 4
|
||||
N main.createWheelJoint spriteA 0
|
||||
N main.createWheelJoint spriteB 1
|
||||
N main.createWheelJoint aX 2
|
||||
N main.createWheelJoint aY 3
|
||||
N main.createWheelJoint axisX 4
|
||||
N main.createWheelJoint axisY 5
|
||||
N main.createWheelJoint collide_connect 6
|
||||
N main.getJointWorldAnchorA joint_id 0
|
||||
BN main.getJointWorldAnchorA x 1
|
||||
BN main.getJointWorldAnchorA y 2
|
||||
N main.getJointWorldAnchorB joint_id 0
|
||||
BN main.getJointWorldAnchorB x 1
|
||||
BN main.getJointWorldAnchorB y 2
|
||||
N main.getJointReactionForce joint_id 0
|
||||
N main.getJointReactionForce inv_dt 1
|
||||
BN main.getJointReactionForce x 2
|
||||
BN main.getJointReactionForce y 3
|
||||
N main.getJointReactionTorque joint_id 0
|
||||
N main.getJointReactionTorque inv_dt 1
|
||||
N main.getJointLocalAnchorA joint_id 0
|
||||
BN main.getJointLocalAnchorA x 1
|
||||
BN main.getJointLocalAnchorA y 2
|
||||
N main.getJointLocalAnchorB joint_id 0
|
||||
BN main.getJointLocalAnchorB x 1
|
||||
BN main.getJointLocalAnchorB y 2
|
||||
N main.setJointLength joint_id 0
|
||||
N main.setJointLength jlen 1
|
||||
N main.getJointLength joint_id 0
|
||||
N main.setJointMinLength joint_id 0
|
||||
N main.setJointMinLength jlen 1
|
||||
N main.getJointMinLength joint_id 0
|
||||
N main.setJointMaxLength joint_id 0
|
||||
N main.setJointMaxLength jlen 1
|
||||
N main.getJointMaxLength joint_id 0
|
||||
N main.getJointCurrentLength joint_id 0
|
||||
N main.setJointStiffness joint_id 0
|
||||
N main.setJointStiffness stiffness 1
|
||||
N main.getJointStiffness joint_id 0
|
||||
N main.setJointDamping joint_id 0
|
||||
N main.setJointDamping damping 1
|
||||
N main.getJointDamping joint_id 0
|
||||
N main.setJointMaxForce joint_id 0
|
||||
N main.setJointMaxForce force 1
|
||||
N main.getJointMaxForce joint_id 0
|
||||
N main.setJointMaxTorque joint_id 0
|
||||
N main.setJointMaxTorque torque 1
|
||||
N main.getJointMaxTorque joint_id 0
|
||||
N main.setJointCorrectionFactor joint_id 0
|
||||
N main.setJointCorrectionFactor factor 1
|
||||
N main.getJointCorrectionFactor joint_id 0
|
||||
N main.setJointRatio joint_id 0
|
||||
N main.setJointRatio j_ratio 1
|
||||
N main.getJointRatio joint_id 0
|
||||
N main.setJointLinearOffset joint_id 0
|
||||
N main.setJointLinearOffset x 1
|
||||
N main.setJointLinearOffset y 2
|
||||
N main.getJointLinearOffset joint_id 0
|
||||
BN main.getJointLinearOffset x 1
|
||||
BN main.getJointLinearOffset y 2
|
||||
N main.setJointAngularOffset joint_id 0
|
||||
N main.setJointAngularOffset angleOffset 1
|
||||
N main.getJointAngularOffset joint_id 0
|
||||
N main.getJointLocalAxisA joint_id 0
|
||||
BN main.getJointLocalAxisA x 1
|
||||
BN main.getJointLocalAxisA y 2
|
||||
N main.getJointReferenceAngle joint_id 0
|
||||
N main.getJointTranslation joint_id 0
|
||||
N main.getJointSpeed joint_id 0
|
||||
N main.jointIsLimitEnabled joint_id 0
|
||||
N main.enableJointLimit joint_id 0
|
||||
N main.enableJointLimit flag 1
|
||||
N main.getJointLowerLimit joint_id 0
|
||||
N main.getJointUpperLimit joint_id 0
|
||||
N main.setJointLimits joint_id 0
|
||||
N main.setJointLimits lower_limit 1
|
||||
N main.setJointLimits upper_limit 2
|
||||
N main.jointMotorIsEnabled joint_id 0
|
||||
N main.enableJointMotor joint_id 0
|
||||
N main.enableJointMotor flag 1
|
||||
N main.setJointMotorSpeed joint_id 0
|
||||
N main.setJointMotorSpeed speed 1
|
||||
N main.getJointMotorSpeed joint_id 0
|
||||
N main.setJointMaxMotorForce joint_id 0
|
||||
N main.setJointMaxMotorForce force 1
|
||||
N main.getJointMaxMotorForce joint_id 0
|
||||
N main.getJointMotorForce joint_id 0
|
||||
N main.getJointMotorForce inv_dt 1
|
||||
N main.setJointMaxMotorTorque joint_id 0
|
||||
N main.setJointMaxMotorTorque torque 1
|
||||
N main.getJointMaxMotorTorque joint_id 0
|
||||
N main.getJointMotorTorque joint_id 0
|
||||
N main.getJointMotorTorque inv_dt 1
|
||||
N main.getJointGroundAnchorA joint_id 0
|
||||
BN main.getJointGroundAnchorA x 1
|
||||
BN main.getJointGroundAnchorA y 2
|
||||
N main.getJointGroundAnchorB joint_id 0
|
||||
BN main.getJointGroundAnchorB x 1
|
||||
BN main.getJointGroundAnchorB y 2
|
||||
N main.getJointLengthA joint_id 0
|
||||
N main.getJointLengthB joint_id 0
|
||||
N main.getJointCurrentLengthA joint_id 0
|
||||
N main.getJointCurrentLengthB joint_id 0
|
||||
N main.setJointOrigin joint_id 0
|
||||
N main.setJointOrigin x 1
|
||||
N main.setJointOrigin y 2
|
||||
N main.getJointAngle joint_id 0
|
||||
N main.getJointLinearSpeed joint_id 0
|
||||
N main.getJointAngularSpeed joint_id 0
|
||||
N main.DeleteJoint joint_id 0
|
||||
N main.CreateTileSet img_id 0
|
||||
N main.CreateTileSet tile_w 1
|
||||
N main.CreateTileSet tile_h 2
|
||||
N main.SetTileAnimationLength tileset 0
|
||||
N main.SetTileAnimationLength base_tile 1
|
||||
N main.SetTileAnimationLength num_frames 2
|
||||
N main.GetTileAnimationLength tileset 0
|
||||
N main.GetTileAnimationLength base_tile 1
|
||||
N main.SetTileAnimationFrame tileset 0
|
||||
N main.SetTileAnimationFrame base_tile 1
|
||||
N main.SetTileAnimationFrame anim_frame 2
|
||||
N main.SetTileAnimationFrame tile_frame 3
|
||||
N main.GetTileAnimationFrame tileset 0
|
||||
N main.GetTileAnimationFrame base_tile 1
|
||||
N main.GetTileAnimationFrame anim_frame 2
|
||||
N main.SetTileAnimationSpeed tileset 0
|
||||
N main.SetTileAnimationSpeed base_tile 1
|
||||
N main.SetTileAnimationSpeed speed 2
|
||||
N main.GetTileAnimationSpeed tileset 0
|
||||
N main.GetTileAnimationSpeed base_tile 1
|
||||
N main.CreateTileMap tileset 0
|
||||
N main.CreateTileMap widthInTiles 1
|
||||
N main.CreateTileMap heightInTiles 2
|
||||
N main.SetTileMapSize tilemap 0
|
||||
N main.SetTileMapSize widthInTiles 1
|
||||
N main.SetTileMapSize heightInTiles 2
|
||||
N main.GetTileMapSize tilemap 0
|
||||
BN main.GetTileMapSize widthInTiles 1
|
||||
BN main.GetTileMapSize heightInTiles 2
|
||||
N main.SetTile tilemap 0
|
||||
N main.SetTile tile 1
|
||||
N main.SetTile x 2
|
||||
N main.SetTile y 3
|
||||
N main.GetTile tilemap 0
|
||||
N main.GetTile x 1
|
||||
N main.GetTile y 2
|
||||
N main.FillTile tilemap 0
|
||||
N main.FillTile tile 1
|
||||
N main.FillTile x 2
|
||||
N main.FillTile y 3
|
||||
N main.FillTile widthInTiles 4
|
||||
N main.FillTile heightInTiles 5
|
||||
N main.DrawTileMap tilemap 0
|
||||
N main.DrawTileMap x 1
|
||||
N main.DrawTileMap y 2
|
||||
N main.DrawTileMap w 3
|
||||
N main.DrawTileMap h 4
|
||||
N main.DrawTileMap offset_x 5
|
||||
N main.DrawTileMap offset_y 6
|
||||
S main.LoadMesh mesh_file$ 0
|
||||
N main.DeleteMesh mesh 0
|
||||
N main.AddMeshBuffer mesh 0
|
||||
@@ -1007,6 +1319,40 @@ N main.GetActorAutoCulling actor 0
|
||||
N main.AddActorShadow actor 0
|
||||
N main.RemoveActorShadow actor 0
|
||||
N main.ActorExists actor 0
|
||||
N main.CreateActorAnimation actor 0
|
||||
N main.CreateActorAnimation start_frame 1
|
||||
N main.CreateActorAnimation end_frame 2
|
||||
N main.CreateActorAnimation speed 3
|
||||
N main.SetActorAnimation actor 0
|
||||
N main.SetActorAnimation animation 1
|
||||
N main.SetActorAnimation num_loops 2
|
||||
N main.SetActorAnimationSpeed actor 0
|
||||
N main.SetActorAnimationSpeed animation 1
|
||||
N main.SetActorAnimationSpeed speed 2
|
||||
N main.SetActorAnimationFrames actor 0
|
||||
N main.SetActorAnimationFrames animation 1
|
||||
N main.SetActorAnimationFrames start_frame 2
|
||||
N main.SetActorAnimationFrames end_frame 3
|
||||
N main.GetActorCurrentAnimation actor 0
|
||||
N main.GetActorAnimationSpeed actor 0
|
||||
N main.GetActorAnimationSpeed animation 1
|
||||
N main.GetActorAnimationStartFrame actor 0
|
||||
N main.GetActorAnimationStartFrame animation 1
|
||||
N main.GetActorAnimationEndFrame actor 0
|
||||
N main.GetActorAnimationEndFrame animation 1
|
||||
N main.SetActorFrame actor 0
|
||||
N main.SetActorFrame frame 1
|
||||
N main.GetActorFrame actor 0
|
||||
N main.ActorAnimationIsPlaying actor 0
|
||||
N main.NumActorAnimationLoops actor 0
|
||||
N main.SetActorMD2Animation actor 0
|
||||
N main.SetActorMD2Animation anim 1
|
||||
N main.SetActorMD2Animation num_loops 2
|
||||
N main.SetActorMD2AnimationByName actor 0
|
||||
S main.SetActorMD2AnimationByName anim_name$ 0
|
||||
N main.SetActorMD2AnimationByName num_loops 1
|
||||
N main.DeleteActorAnimation actor 0
|
||||
N main.DeleteActorAnimation animation 1
|
||||
N main.SetGravity3D x 0
|
||||
N main.SetGravity3D y 1
|
||||
N main.SetGravity3D z 2
|
||||
@@ -1136,10 +1482,10 @@ N main.applyActorImpulseWorld rel_y 5
|
||||
N main.applyActorImpulseWorld rel_z 6
|
||||
N main.clearActorForces actor 0
|
||||
N main.updateActorInertiaTensor actor 0
|
||||
N main.getActorCOMPosition actor 0
|
||||
BN main.getActorCOMPosition x 1
|
||||
BN main.getActorCOMPosition y 2
|
||||
BN main.getActorCOMPosition z 3
|
||||
N main.getActorCenter actor 0
|
||||
BN main.getActorCenter x 1
|
||||
BN main.getActorCenter y 2
|
||||
BN main.getActorCenter z 3
|
||||
N main.getActorRotationQ actor 0
|
||||
BN main.getActorRotationQ x 1
|
||||
BN main.getActorRotationQ y 2
|
||||
@@ -1169,13 +1515,13 @@ N main.setActorAngularVelocityWorld actor 0
|
||||
N main.setActorAngularVelocityWorld x 1
|
||||
N main.setActorAngularVelocityWorld y 2
|
||||
N main.setActorAngularVelocityWorld z 3
|
||||
N main.getActorLocalPointVelocity actor 0
|
||||
N main.getActorLocalPointVelocity rel_x 1
|
||||
N main.getActorLocalPointVelocity rel_y 2
|
||||
N main.getActorLocalPointVelocity rel_z 3
|
||||
BN main.getActorLocalPointVelocity x 4
|
||||
BN main.getActorLocalPointVelocity y 5
|
||||
BN main.getActorLocalPointVelocity z 6
|
||||
N main.getActorVelocityInLocalPoint actor 0
|
||||
N main.getActorVelocityInLocalPoint rel_x 1
|
||||
N main.getActorVelocityInLocalPoint rel_y 2
|
||||
N main.getActorVelocityInLocalPoint rel_z 3
|
||||
BN main.getActorVelocityInLocalPoint x 4
|
||||
BN main.getActorVelocityInLocalPoint y 5
|
||||
BN main.getActorVelocityInLocalPoint z 6
|
||||
N main.getActorLinearVelocityLocal actor 0
|
||||
BN main.getActorLinearVelocityLocal x 1
|
||||
BN main.getActorLinearVelocityLocal y 2
|
||||
@@ -1655,40 +2001,6 @@ N main.SetTerrainPatchLOD actor 0
|
||||
N main.SetTerrainPatchLOD patchX 1
|
||||
N main.SetTerrainPatchLOD patchZ 2
|
||||
N main.SetTerrainPatchLOD LOD 3
|
||||
N main.CreateActorAnimation actor 0
|
||||
N main.CreateActorAnimation start_frame 1
|
||||
N main.CreateActorAnimation end_frame 2
|
||||
N main.CreateActorAnimation speed 3
|
||||
N main.SetActorAnimation actor 0
|
||||
N main.SetActorAnimation animation 1
|
||||
N main.SetActorAnimation num_loops 2
|
||||
N main.SetActorAnimationSpeed actor 0
|
||||
N main.SetActorAnimationSpeed animation 1
|
||||
N main.SetActorAnimationSpeed speed 2
|
||||
N main.SetActorAnimationFrames actor 0
|
||||
N main.SetActorAnimationFrames animation 1
|
||||
N main.SetActorAnimationFrames start_frame 2
|
||||
N main.SetActorAnimationFrames end_frame 3
|
||||
N main.GetActorCurrentAnimation actor 0
|
||||
N main.GetActorAnimationSpeed actor 0
|
||||
N main.GetActorAnimationSpeed animation 1
|
||||
N main.GetActorAnimationStartFrame actor 0
|
||||
N main.GetActorAnimationStartFrame animation 1
|
||||
N main.GetActorAnimationEndFrame actor 0
|
||||
N main.GetActorAnimationEndFrame animation 1
|
||||
N main.SetActorFrame actor 0
|
||||
N main.SetActorFrame frame 1
|
||||
N main.GetActorFrame actor 0
|
||||
N main.ActorAnimationIsPlaying actor 0
|
||||
N main.NumActorAnimationLoops actor 0
|
||||
N main.SetActorMD2Animation actor 0
|
||||
N main.SetActorMD2Animation anim 1
|
||||
N main.SetActorMD2Animation num_loops 2
|
||||
N main.SetActorMD2AnimationByName actor 0
|
||||
S main.SetActorMD2AnimationByName anim_name$ 0
|
||||
N main.SetActorMD2AnimationByName num_loops 1
|
||||
N main.DeleteActorAnimation actor 0
|
||||
N main.DeleteActorAnimation animation 1
|
||||
N main.deleteMaterial material_id 0
|
||||
N main.setActorMaterial actor 0
|
||||
N main.setActorMaterial material_num 1
|
||||
|
||||
Binary file not shown.
@@ -1,17 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_layout_file>
|
||||
<FileVersion major="1" minor="0" />
|
||||
<ActiveTarget name="Debug" />
|
||||
<File name="identifier.h" open="1" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="30056" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="tokenizer.h" open="1" top="0" tabpos="26" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<ActiveTarget name="Release" />
|
||||
<File name="tokenizer.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="41970" topLine="1016" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_global.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="13014" topLine="163" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_vm_asm.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="41761" topLine="1347" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="parser.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="99035" topLine="1896" />
|
||||
@@ -51,44 +56,39 @@
|
||||
<Collapse line="6878" />
|
||||
</Folding>
|
||||
</File>
|
||||
<File name="main.cpp" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="29416" topLine="904" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="identifier.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="33082" topLine="992" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_utility.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1747" topLine="56" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_vm_asm.h" open="1" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="41761" topLine="1347" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_global.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="13014" topLine="163" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="main.cpp" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="10783" topLine="908" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="keywords.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="env_resolve.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="615" topLine="32" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="keywords.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_builtin.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="112317" topLine="2509" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="constants.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_builtin.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="112317" topLine="2496" />
|
||||
</Cursor>
|
||||
</File>
|
||||
</CodeBlocks_layout_file>
|
||||
|
||||
@@ -2,7 +2,6 @@ embed_function("Fprint", ID_TYPE_SUB);
|
||||
add_embedded_arg("txt$", ID_TYPE_STR);
|
||||
embed_function("Input$", ID_TYPE_FN_STR);
|
||||
add_embedded_arg("prompt$", ID_TYPE_STR);
|
||||
embed_function("tst", ID_TYPE_SUB);
|
||||
embed_function("ArrayDim", ID_TYPE_FN_NUM);
|
||||
add_embedded_arg("id", ID_TYPE_BYREF_NUM);
|
||||
embed_function("StringArrayDim", ID_TYPE_FN_NUM);
|
||||
@@ -1269,7 +1268,7 @@ add_embedded_arg("txt$", ID_TYPE_STR);
|
||||
embed_function("HasClipboardText", ID_TYPE_FN_NUM);
|
||||
embed_function("ReadInput_Start", ID_TYPE_SUB);
|
||||
embed_function("ReadInput_Stop", ID_TYPE_SUB);
|
||||
embed_function("ReadInput_Text$", ID_TYPE_FN_STR);
|
||||
embed_function("ReadInput_GetText$", ID_TYPE_FN_STR);
|
||||
embed_function("ReadInput_SetText", ID_TYPE_SUB);
|
||||
add_embedded_arg("txt$", ID_TYPE_STR);
|
||||
embed_function("ReadInput_ToggleBackspace", ID_TYPE_SUB);
|
||||
@@ -1510,6 +1509,50 @@ add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
add_embedded_arg("flag", ID_TYPE_NUM);
|
||||
embed_function("spriteIsFixedRotation", ID_TYPE_FN_NUM);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
embed_function("SetSpriteDensity", ID_TYPE_SUB);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
add_embedded_arg("density", ID_TYPE_NUM);
|
||||
embed_function("GetSpriteDensity", ID_TYPE_FN_NUM);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
embed_function("SetSpriteFriction", ID_TYPE_SUB);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
add_embedded_arg("friction", ID_TYPE_NUM);
|
||||
embed_function("GetSpriteFriction", ID_TYPE_FN_NUM);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
embed_function("SetSpriteRestitution", ID_TYPE_SUB);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
add_embedded_arg("restitution", ID_TYPE_NUM);
|
||||
embed_function("GetSpriteRestitution", ID_TYPE_FN_NUM);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
embed_function("SetSpriteRestitutionThreshold", ID_TYPE_SUB);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
add_embedded_arg("threshold", ID_TYPE_NUM);
|
||||
embed_function("GetSpriteRestitutionThreshold", ID_TYPE_FN_NUM);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
embed_function("GetSpriteAABB", ID_TYPE_SUB);
|
||||
add_embedded_arg("spr_id", ID_TYPE_NUM);
|
||||
add_embedded_arg("x1", ID_TYPE_BYREF_NUM);
|
||||
add_embedded_arg("y1", ID_TYPE_BYREF_NUM);
|
||||
add_embedded_arg("x2", ID_TYPE_BYREF_NUM);
|
||||
add_embedded_arg("y2", ID_TYPE_BYREF_NUM);
|
||||
embed_function("SetGravity2D", ID_TYPE_SUB);
|
||||
add_embedded_arg("x", ID_TYPE_NUM);
|
||||
add_embedded_arg("y", ID_TYPE_NUM);
|
||||
embed_function("GetGravity2D", ID_TYPE_SUB);
|
||||
add_embedded_arg("x", ID_TYPE_BYREF_NUM);
|
||||
add_embedded_arg("y", ID_TYPE_BYREF_NUM);
|
||||
embed_function("SetWorld2DTimeStep", ID_TYPE_SUB);
|
||||
add_embedded_arg("ts", ID_TYPE_NUM);
|
||||
embed_function("SetWorld2DVelocityIterations", ID_TYPE_SUB);
|
||||
add_embedded_arg("v", ID_TYPE_NUM);
|
||||
embed_function("SetWorld2DPositionIterations", ID_TYPE_SUB);
|
||||
add_embedded_arg("p", ID_TYPE_NUM);
|
||||
embed_function("GetWorld2DTimeStep", ID_TYPE_FN_NUM);
|
||||
embed_function("GetWorld2DVelocityIterations", ID_TYPE_FN_NUM);
|
||||
embed_function("GetWorld2DPositionIterations", ID_TYPE_FN_NUM);
|
||||
embed_function("SetWorld2DAutoClearForces", ID_TYPE_SUB);
|
||||
add_embedded_arg("flag", ID_TYPE_NUM);
|
||||
embed_function("GetWorld2DAutoClearForces", ID_TYPE_FN_NUM);
|
||||
embed_function("createDistanceJoint", ID_TYPE_FN_NUM);
|
||||
add_embedded_arg("spriteA", ID_TYPE_NUM);
|
||||
add_embedded_arg("spriteB", ID_TYPE_NUM);
|
||||
@@ -2641,6 +2684,8 @@ embed_function("SetWorld3DMaxSubSteps", ID_TYPE_SUB);
|
||||
add_embedded_arg("steps", ID_TYPE_NUM);
|
||||
embed_function("SetWorld3DTimeStep", ID_TYPE_SUB);
|
||||
add_embedded_arg("ts", ID_TYPE_NUM);
|
||||
embed_function("GetWorld3DMaxSubSteps", ID_TYPE_FN_NUM);
|
||||
embed_function("GetWorld3DTimeStep", ID_TYPE_FN_NUM);
|
||||
embed_function("startParticleEmitter", ID_TYPE_SUB);
|
||||
add_embedded_arg("actor", ID_TYPE_NUM);
|
||||
embed_function("stopParticleEmitter", ID_TYPE_SUB);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,9 +4,6 @@ case FN_Fprint: //Sub Procedure
|
||||
case FN_Input$: //String Function
|
||||
rc_push_str(rc_input( INPUT$_PROMPT$ ));
|
||||
break;
|
||||
case FN_tst: //Sub Procedure
|
||||
rc_tst( );
|
||||
break;
|
||||
case FN_ArrayDim: //Number Function
|
||||
//DUMMY CASE
|
||||
|
||||
@@ -1364,8 +1361,8 @@ case FN_ReadInput_Start: //Sub Procedure
|
||||
case FN_ReadInput_Stop: //Sub Procedure
|
||||
rc_readInput_Stop( );
|
||||
break;
|
||||
case FN_ReadInput_Text$: //String Function
|
||||
rc_push_str(rc_readInput_Text( ));
|
||||
case FN_ReadInput_GetText$: //String Function
|
||||
rc_push_str(rc_readInput_GetText( ));
|
||||
break;
|
||||
case FN_ReadInput_SetText: //Sub Procedure
|
||||
rc_readInput_SetText( READINPUT_SETTEXT_TXT$ );
|
||||
@@ -1592,6 +1589,63 @@ case FN_setSpriteFixedRotation: //Sub Procedure
|
||||
case FN_spriteIsFixedRotation: //Number Function
|
||||
rc_push_num(rc_spriteIsFixedRotation( SPRITEISFIXEDROTATION_SPR_ID ));
|
||||
break;
|
||||
case FN_SetSpriteDensity: //Sub Procedure
|
||||
rc_setSpriteDensity( SETSPRITEDENSITY_SPR_ID, SETSPRITEDENSITY_DENSITY );
|
||||
break;
|
||||
case FN_GetSpriteDensity: //Number Function
|
||||
rc_push_num(rc_getSpriteDensity( GETSPRITEDENSITY_SPR_ID ));
|
||||
break;
|
||||
case FN_SetSpriteFriction: //Sub Procedure
|
||||
rc_setSpriteFriction( SETSPRITEFRICTION_SPR_ID, SETSPRITEFRICTION_FRICTION );
|
||||
break;
|
||||
case FN_GetSpriteFriction: //Number Function
|
||||
rc_push_num(rc_getSpriteFriction( GETSPRITEFRICTION_SPR_ID ));
|
||||
break;
|
||||
case FN_SetSpriteRestitution: //Sub Procedure
|
||||
rc_setSpriteRestitution( SETSPRITERESTITUTION_SPR_ID, SETSPRITERESTITUTION_RESTITUTION );
|
||||
break;
|
||||
case FN_GetSpriteRestitution: //Number Function
|
||||
rc_push_num(rc_getSpriteRestitution( GETSPRITERESTITUTION_SPR_ID ));
|
||||
break;
|
||||
case FN_SetSpriteRestitutionThreshold: //Sub Procedure
|
||||
rc_setSpriteRestitutionThreshold( SETSPRITERESTITUTIONTHRESHOLD_SPR_ID, SETSPRITERESTITUTIONTHRESHOLD_THRESHOLD );
|
||||
break;
|
||||
case FN_GetSpriteRestitutionThreshold: //Number Function
|
||||
rc_push_num(rc_getSpriteRestitutionThreshold( GETSPRITERESTITUTIONTHRESHOLD_SPR_ID ));
|
||||
break;
|
||||
case FN_GetSpriteAABB: //Sub Procedure
|
||||
rc_getSpriteAABB( GETSPRITEAABB_SPR_ID, &GETSPRITEAABB_X1, &GETSPRITEAABB_Y1, &GETSPRITEAABB_X2, &GETSPRITEAABB_Y2 );
|
||||
break;
|
||||
case FN_SetGravity2D: //Sub Procedure
|
||||
rc_setGravity2D( SETGRAVITY2D_X, SETGRAVITY2D_Y );
|
||||
break;
|
||||
case FN_GetGravity2D: //Sub Procedure
|
||||
rc_getGravity2D( &GETGRAVITY2D_X, &GETGRAVITY2D_Y );
|
||||
break;
|
||||
case FN_SetWorld2DTimeStep: //Sub Procedure
|
||||
rc_setWorld2DTimeStep( SETWORLD2DTIMESTEP_TS );
|
||||
break;
|
||||
case FN_SetWorld2DVelocityIterations: //Sub Procedure
|
||||
rc_setWorld2DVelocityIterations( SETWORLD2DVELOCITYITERATIONS_V );
|
||||
break;
|
||||
case FN_SetWorld2DPositionIterations: //Sub Procedure
|
||||
rc_setWorld2DPositionIterations( SETWORLD2DPOSITIONITERATIONS_P );
|
||||
break;
|
||||
case FN_GetWorld2DTimeStep: //Number Function
|
||||
rc_push_num(rc_getWorld2DTimeStep( ));
|
||||
break;
|
||||
case FN_GetWorld2DVelocityIterations: //Number Function
|
||||
rc_push_num(rc_getWorld2DVelocityIterations( ));
|
||||
break;
|
||||
case FN_GetWorld2DPositionIterations: //Number Function
|
||||
rc_push_num(rc_getWorld2DPositionIterations( ));
|
||||
break;
|
||||
case FN_SetWorld2DAutoClearForces: //Sub Procedure
|
||||
rc_setWorld2DAutoClearForces( SETWORLD2DAUTOCLEARFORCES_FLAG );
|
||||
break;
|
||||
case FN_GetWorld2DAutoClearForces: //Number Function
|
||||
rc_push_num(rc_getWorld2DAutoClearForces( ));
|
||||
break;
|
||||
case FN_createDistanceJoint: //Number Function
|
||||
rc_push_num(rc_createDistanceJoint( CREATEDISTANCEJOINT_SPRITEA, CREATEDISTANCEJOINT_SPRITEB, CREATEDISTANCEJOINT_AX, CREATEDISTANCEJOINT_AY, CREATEDISTANCEJOINT_BX, CREATEDISTANCEJOINT_BY, CREATEDISTANCEJOINT_COLLIDE_CONNECT ));
|
||||
break;
|
||||
@@ -2567,6 +2621,12 @@ case FN_SetWorld3DMaxSubSteps: //Sub Procedure
|
||||
case FN_SetWorld3DTimeStep: //Sub Procedure
|
||||
rc_setWorld3DTimeStep( SETWORLD3DTIMESTEP_TS );
|
||||
break;
|
||||
case FN_GetWorld3DMaxSubSteps: //Number Function
|
||||
rc_push_num(rc_getWorld3DMaxSubSteps( ));
|
||||
break;
|
||||
case FN_GetWorld3DTimeStep: //Number Function
|
||||
rc_push_num(rc_getWorld3DTimeStep( ));
|
||||
break;
|
||||
case FN_startParticleEmitter: //Sub Procedure
|
||||
rc_startParticleEmitter( STARTPARTICLEEMITTER_ACTOR );
|
||||
break;
|
||||
|
||||
68
rcbasic_runtime/em_build.sh
Executable file
68
rcbasic_runtime/em_build.sh
Executable file
@@ -0,0 +1,68 @@
|
||||
#!/bin/bash
|
||||
|
||||
BASEDIR=$(dirname $0)
|
||||
|
||||
cd $BASEDIR
|
||||
|
||||
export PROG_LOCATION=/home/n00b/projects/rcbasic_alpha3/test_project
|
||||
export OUT_HTML=/home/n00b/projects/rc_em/output/test.html
|
||||
|
||||
export EMSDK_PATH=$BASEDIR/emsdk
|
||||
export RCBASIC_SRC_PATH=$PWD/..
|
||||
|
||||
RC_EMSDK_VERSION=3.1.72
|
||||
|
||||
if [ ! -e $EMSDK_PATH ]
|
||||
then
|
||||
git clone https://github.com/emscripten-core/emsdk.git
|
||||
pushd $EMSDK_PATH
|
||||
# I am selecting a version that I know works here since this might get broken by emscripten in the future
|
||||
./emsdk install $RC_EMSDK_VERSION
|
||||
popd
|
||||
fi
|
||||
|
||||
|
||||
pushd $EMSDK_PATH
|
||||
# I am selecting a version that I know works here since this might get broken by emscripten in the future
|
||||
./emsdk activate $RC_EMSDK_VERSION
|
||||
source ./emsdk_env.sh
|
||||
popd
|
||||
|
||||
|
||||
emcc \
|
||||
-L$BASEDIR \
|
||||
--use-port=freetype \
|
||||
libIrrlicht.a \
|
||||
-lbox2d \
|
||||
-lBullet3Collision -lBullet3Common -lBullet3Dynamics -lBullet3Geometry -lBulletCollision -lBulletDynamics -lBulletInverseDynamics -lBulletSoftBody -lLinearMath \
|
||||
-s FULL_ES2=1 \
|
||||
-s USE_SDL=2 -s USE_SDL_IMAGE=2 -s USE_SDL_MIXER=2 -s USE_SDL_NET=2 -s USE_OGG=1 -s USE_VORBIS=1 -ltheora -ltheoradec -O3 -s ASYNCIFY -s SDL2_IMAGE_FORMATS='["bmp","png","xpm"]' --use-preload-plugins \
|
||||
gui_freetype_font.o \
|
||||
irrBulletBoxShape.o \
|
||||
irrBulletBvhTriangleMeshShape.o \
|
||||
irrBulletCapsuleShape.o \
|
||||
irrBulletCollisionCallBackInformation.o \
|
||||
irrBulletCollisionObjectAffectorAttract.o \
|
||||
irrBulletCollisionObjectAffectorDelete.o \
|
||||
irrBulletCollisionObjectAffector.o \
|
||||
irrBulletCollisionObject.o \
|
||||
irrBulletCollisionShape.o \
|
||||
irrBulletcommon.o \
|
||||
irrBulletConeShape.o \
|
||||
irrBulletConvexHullShape.o \
|
||||
irrBulletCylinderShape.o \
|
||||
irrBulletPhysicsDebug.o \
|
||||
irrBulletRayCastVehicle.o \
|
||||
irrBullet.o \
|
||||
irrBulletRigidBody.o \
|
||||
irrBulletLiquidBody.o \
|
||||
irrBulletSoftBody.o \
|
||||
irrBulletSphereShape.o \
|
||||
main.o \
|
||||
theoraplay.o \
|
||||
irrBulletGhostObject.o \
|
||||
irrBulletGImpactMeshShape.o \
|
||||
irrBulletMotionState.o \
|
||||
irrBulletTriangleMeshShape.o \
|
||||
irrBulletWorld.o \
|
||||
-o "$OUT_HTML" --preload-file $PROG_LOCATION@ --use-preload-plugins -s TOTAL_MEMORY=134217728 -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=1073741824
|
||||
115
rcbasic_runtime/em_setup.sh
Executable file
115
rcbasic_runtime/em_setup.sh
Executable file
@@ -0,0 +1,115 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PROG_LOCATION=/home/n00b/projects/rcbasic_alpha3/test_project
|
||||
export OUT_HTML=/home/n00b/projects/rc_em/output/test.html
|
||||
|
||||
export EMSDK_PATH=/home/n00b/Programs/emsdk
|
||||
|
||||
export THEORA_LIB=/home/n00b/Projects/rc_em/libtheora-1.1.1/out/lib
|
||||
export THEORA_INCLUDE=/home/n00b/Projects/rc_em/libtheora-1.1.1/out/include
|
||||
|
||||
export IRR_LIB=/home/n00b/Projects/RCIrrlicht/lib/emscripten
|
||||
export IRR_INCLUDE=/home/n00b/Projects/RCIrrlicht/include
|
||||
|
||||
export BULLET_LINKER_LIBS="
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/Bullet3Collision
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/Bullet3Common
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/Bullet3Dynamics
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/Bullet3Geometry
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/Bullet3OpenCL
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/Bullet3Serialize
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/BulletCollision
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/BulletDynamics
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/BulletInverseDynamics
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/BulletSoftBody
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/LinearMath
|
||||
"
|
||||
export BULLET_INCLUDE=/home/n00b/Projects/bullet3/em_build/include
|
||||
export BULLET_INCLUDE_LOCAL=/home/n00b/Projects/bullet3/em_build/include/bullet
|
||||
|
||||
export IRR_BULLET_SRC_DIR=/home/n00b/Projects/irrBullet/src
|
||||
|
||||
# export IRR_BULLET_SRC=
|
||||
|
||||
export IRR_BULLET_INCLUDE=/home/n00b/Projects/irrBullet/include
|
||||
|
||||
export IRR_THEORA_INCLUDE=/home/n00b/Projects/irrTheora
|
||||
|
||||
export AN8_INCLUDE=/home/n00b/Projects/an8-parser
|
||||
|
||||
export BOX2D_LIB=/home/n00b/Projects/box2d-2.4.2/box2d-2.4.2/em_build/bin
|
||||
export BOX2D_INCLUDE=/home/n00b/Projects/box2d-2.4.2/box2d-2.4.2/include
|
||||
|
||||
export RCBASIC_SRC_PATH=$PWD/..
|
||||
|
||||
emcc -c $RCBASIC_SRC_PATH/main.cpp \
|
||||
-c $RCBASIC_SRC_PATH/theoraplay.c \
|
||||
-c $RCBASIC_SRC_PATH/gui_freetype_font.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletBoxShape.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletBvhTriangleMeshShape.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletCapsuleShape.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletCollisionCallBackInformation.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletCollisionObjectAffectorAttract.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletCollisionObjectAffector.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletCollisionObjectAffectorDelete.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletCollisionObject.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletCollisionShape.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletcommon.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletConeShape.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletConvexHullShape.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBullet.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletCylinderShape.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletGhostObject.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletGImpactMeshShape.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletLiquidBody.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletMotionState.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletPhysicsDebug.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletRayCastVehicle.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletRigidBody.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletSoftBody.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletSphereShape.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletTriangleMeshShape.cpp \
|
||||
-c $IRR_BULLET_SRC_DIR/irrBulletWorld.cpp \
|
||||
"-I$IRR_BULLET_INCLUDE" \
|
||||
"-L$THEORA_LIB" \
|
||||
"-I$THEORA_INCLUDE" \
|
||||
"-L$IRR_LIB" \
|
||||
"-I$IRR_INCLUDE" \
|
||||
"$IRR_LIB/libIrrlicht.a" \
|
||||
"-I$BULLET_INCLUDE" \
|
||||
"-I$BULLET_INCLUDE_LOCAL" \
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/Bullet3Collision \
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/Bullet3Common \
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/Bullet3Dynamics \
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/Bullet3Geometry \
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/Bullet3OpenCL \
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/Bullet3Serialize \
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/BulletCollision \
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/BulletDynamics \
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/BulletInverseDynamics \
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/BulletSoftBody \
|
||||
-L/home/n00b/Projects/bullet3/em_build/src/LinearMath \
|
||||
-lBullet3Collision -lBullet3Common -lBullet3Dynamics -lBullet3Geometry -lBulletCollision -lBulletDynamics -lBulletInverseDynamics -lBulletSoftBody -lLinearMath \
|
||||
"-I$IRR_THEORA_INCLUDE" \
|
||||
"-I$AN8_INCLUDE" \
|
||||
"-L$BOX2D_LIB" \
|
||||
"-I$BOX2D_INCLUDE" \
|
||||
-lbox2d \
|
||||
--use-port=freetype \
|
||||
-s FULL_ES2=1 \
|
||||
-s USE_SDL=2 -s USE_SDL_IMAGE=2 -s USE_SDL_MIXER=2 -s USE_SDL_NET=2 -s USE_OGG=1 -s USE_VORBIS=1 -ltheora -ltheoradec -O3 -s ASYNCIFY -s SDL2_IMAGE_FORMATS='["bmp","png","xpm"]' --use-preload-plugins
|
||||
|
||||
|
||||
# --use-port=bullet \
|
||||
|
||||
# -L/home/n00b/Projects/bullet3/em_build/src/Bullet3Collision \
|
||||
# -L/home/n00b/Projects/bullet3/em_build/src/Bullet3Common \
|
||||
# -L/home/n00b/Projects/bullet3/em_build/src/Bullet3Dynamics \
|
||||
# -L/home/n00b/Projects/bullet3/em_build/src/Bullet3Geometry \
|
||||
# -L/home/n00b/Projects/bullet3/em_build/src/Bullet3OpenCL \
|
||||
# -L/home/n00b/Projects/bullet3/em_build/src/Bullet3Serialize \
|
||||
# -L/home/n00b/Projects/bullet3/em_build/src/BulletCollision \
|
||||
# -L/home/n00b/Projects/bullet3/em_build/src/BulletDynamics \
|
||||
# -L/home/n00b/Projects/bullet3/em_build/src/BulletInverseDynamics \
|
||||
# -L/home/n00b/Projects/bullet3/em_build/src/BulletSoftBody \
|
||||
# -L/home/n00b/Projects/bullet3/em_build/src/LinearMath \
|
||||
@@ -662,21 +662,15 @@ bool rcbasic_load(std::string filename)
|
||||
|
||||
uint64_t readInt()
|
||||
{
|
||||
for(int i = 0; i < sizeof(uint64_t); i++)
|
||||
{
|
||||
readint_val.data[i] = segment[current_segment][current_address];
|
||||
current_address++;
|
||||
}
|
||||
readint_val.i = ((uint64_t*)&segment[current_segment][current_address] )[0];
|
||||
current_address += sizeof(uint64_t);
|
||||
return readint_val.i;
|
||||
}
|
||||
|
||||
double readDouble()
|
||||
{
|
||||
for(int i = 0; i < sizeof(double); i++)
|
||||
{
|
||||
readdouble_val.data[i] = segment[current_segment][current_address];
|
||||
current_address++;
|
||||
}
|
||||
readdouble_val.f = ((double*)&segment[current_segment][current_address] )[0];
|
||||
current_address += sizeof(double);
|
||||
return readdouble_val.f;
|
||||
}
|
||||
|
||||
@@ -4349,11 +4343,7 @@ void rcbasic_test()
|
||||
SDL_DestroyWindow(win);
|
||||
}
|
||||
|
||||
#ifdef RC_ANDROID
|
||||
void android_main( android_app* application )
|
||||
{
|
||||
}
|
||||
#else
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
//rcbasic_test();
|
||||
@@ -4450,6 +4440,25 @@ int main(int argc, char * argv[])
|
||||
rc_filename = "main.cbc";
|
||||
#endif
|
||||
|
||||
//ogles2 test
|
||||
#ifdef RC_TESTING
|
||||
std::string debug_opt = "a";
|
||||
std::cin >> debug_opt;
|
||||
if(debug_opt.compare("a")==0)
|
||||
{
|
||||
rc_intern_dirChange("/home/n00b/projects/bu/rcbasic_v400a5_linux/test_project_v4a5");
|
||||
rc_filename = "test.cbc";
|
||||
}
|
||||
else
|
||||
{
|
||||
rc_intern_dirChange("/home/n00b/projects/rcbasic_alpha3/test_project");
|
||||
}
|
||||
#endif
|
||||
//---------------
|
||||
|
||||
if( rc_filename.compare("")==0 )
|
||||
rc_filename = "main.cbc";
|
||||
|
||||
if(rcbasic_load(rc_filename))
|
||||
{
|
||||
#ifdef RCBASIC_DEBUG
|
||||
@@ -4482,4 +4491,3 @@ int main(int argc, char * argv[])
|
||||
//cout << "Hello world!" << endl;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -307,6 +307,9 @@ int rc_createAnimatedActor(int mesh_id)
|
||||
animation.frame_start_time = SDL_GetTicks();
|
||||
animation.frame_swap_time = 1000/60;
|
||||
rc_actor[actor_id].animation.push_back(animation);
|
||||
rc_actor[actor_id].current_animation = 0;
|
||||
rc_actor[actor_id].current_animation_loop = 0;
|
||||
rc_actor[actor_id].num_animation_loops = 0;
|
||||
rc_animEndCallBack* anim_callback = new rc_animEndCallBack();
|
||||
anim_callback->ref_actor = &rc_actor[actor_id];
|
||||
anim_callback->OnAnimationEnd(node);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,9 +4,6 @@ case FN_Fprint: //Sub Procedure
|
||||
case FN_Input$: //String Function
|
||||
rc_push_str(rc_input( INPUT$_PROMPT$ ));
|
||||
break;
|
||||
case FN_tst: //Sub Procedure
|
||||
rc_tst( );
|
||||
break;
|
||||
case FN_ArrayDim: //Number Function
|
||||
//DUMMY CASE
|
||||
|
||||
@@ -1364,8 +1361,8 @@ case FN_ReadInput_Start: //Sub Procedure
|
||||
case FN_ReadInput_Stop: //Sub Procedure
|
||||
rc_readInput_Stop( );
|
||||
break;
|
||||
case FN_ReadInput_Text$: //String Function
|
||||
rc_push_str(rc_readInput_Text( ));
|
||||
case FN_ReadInput_GetText$: //String Function
|
||||
rc_push_str(rc_readInput_GetText( ));
|
||||
break;
|
||||
case FN_ReadInput_SetText: //Sub Procedure
|
||||
rc_readInput_SetText( READINPUT_SETTEXT_TXT$ );
|
||||
@@ -1592,6 +1589,63 @@ case FN_setSpriteFixedRotation: //Sub Procedure
|
||||
case FN_spriteIsFixedRotation: //Number Function
|
||||
rc_push_num(rc_spriteIsFixedRotation( SPRITEISFIXEDROTATION_SPR_ID ));
|
||||
break;
|
||||
case FN_SetSpriteDensity: //Sub Procedure
|
||||
rc_setSpriteDensity( SETSPRITEDENSITY_SPR_ID, SETSPRITEDENSITY_DENSITY );
|
||||
break;
|
||||
case FN_GetSpriteDensity: //Number Function
|
||||
rc_push_num(rc_getSpriteDensity( GETSPRITEDENSITY_SPR_ID ));
|
||||
break;
|
||||
case FN_SetSpriteFriction: //Sub Procedure
|
||||
rc_setSpriteFriction( SETSPRITEFRICTION_SPR_ID, SETSPRITEFRICTION_FRICTION );
|
||||
break;
|
||||
case FN_GetSpriteFriction: //Number Function
|
||||
rc_push_num(rc_getSpriteFriction( GETSPRITEFRICTION_SPR_ID ));
|
||||
break;
|
||||
case FN_SetSpriteRestitution: //Sub Procedure
|
||||
rc_setSpriteRestitution( SETSPRITERESTITUTION_SPR_ID, SETSPRITERESTITUTION_RESTITUTION );
|
||||
break;
|
||||
case FN_GetSpriteRestitution: //Number Function
|
||||
rc_push_num(rc_getSpriteRestitution( GETSPRITERESTITUTION_SPR_ID ));
|
||||
break;
|
||||
case FN_SetSpriteRestitutionThreshold: //Sub Procedure
|
||||
rc_setSpriteRestitutionThreshold( SETSPRITERESTITUTIONTHRESHOLD_SPR_ID, SETSPRITERESTITUTIONTHRESHOLD_THRESHOLD );
|
||||
break;
|
||||
case FN_GetSpriteRestitutionThreshold: //Number Function
|
||||
rc_push_num(rc_getSpriteRestitutionThreshold( GETSPRITERESTITUTIONTHRESHOLD_SPR_ID ));
|
||||
break;
|
||||
case FN_GetSpriteAABB: //Sub Procedure
|
||||
rc_getSpriteAABB( GETSPRITEAABB_SPR_ID, &GETSPRITEAABB_X1, &GETSPRITEAABB_Y1, &GETSPRITEAABB_X2, &GETSPRITEAABB_Y2 );
|
||||
break;
|
||||
case FN_SetGravity2D: //Sub Procedure
|
||||
rc_setGravity2D( SETGRAVITY2D_X, SETGRAVITY2D_Y );
|
||||
break;
|
||||
case FN_GetGravity2D: //Sub Procedure
|
||||
rc_getGravity2D( &GETGRAVITY2D_X, &GETGRAVITY2D_Y );
|
||||
break;
|
||||
case FN_SetWorld2DTimeStep: //Sub Procedure
|
||||
rc_setWorld2DTimeStep( SETWORLD2DTIMESTEP_TS );
|
||||
break;
|
||||
case FN_SetWorld2DVelocityIterations: //Sub Procedure
|
||||
rc_setWorld2DVelocityIterations( SETWORLD2DVELOCITYITERATIONS_V );
|
||||
break;
|
||||
case FN_SetWorld2DPositionIterations: //Sub Procedure
|
||||
rc_setWorld2DPositionIterations( SETWORLD2DPOSITIONITERATIONS_P );
|
||||
break;
|
||||
case FN_GetWorld2DTimeStep: //Number Function
|
||||
rc_push_num(rc_getWorld2DTimeStep( ));
|
||||
break;
|
||||
case FN_GetWorld2DVelocityIterations: //Number Function
|
||||
rc_push_num(rc_getWorld2DVelocityIterations( ));
|
||||
break;
|
||||
case FN_GetWorld2DPositionIterations: //Number Function
|
||||
rc_push_num(rc_getWorld2DPositionIterations( ));
|
||||
break;
|
||||
case FN_SetWorld2DAutoClearForces: //Sub Procedure
|
||||
rc_setWorld2DAutoClearForces( SETWORLD2DAUTOCLEARFORCES_FLAG );
|
||||
break;
|
||||
case FN_GetWorld2DAutoClearForces: //Number Function
|
||||
rc_push_num(rc_getWorld2DAutoClearForces( ));
|
||||
break;
|
||||
case FN_createDistanceJoint: //Number Function
|
||||
rc_push_num(rc_createDistanceJoint( CREATEDISTANCEJOINT_SPRITEA, CREATEDISTANCEJOINT_SPRITEB, CREATEDISTANCEJOINT_AX, CREATEDISTANCEJOINT_AY, CREATEDISTANCEJOINT_BX, CREATEDISTANCEJOINT_BY, CREATEDISTANCEJOINT_COLLIDE_CONNECT ));
|
||||
break;
|
||||
@@ -2567,6 +2621,12 @@ case FN_SetWorld3DMaxSubSteps: //Sub Procedure
|
||||
case FN_SetWorld3DTimeStep: //Sub Procedure
|
||||
rc_setWorld3DTimeStep( SETWORLD3DTIMESTEP_TS );
|
||||
break;
|
||||
case FN_GetWorld3DMaxSubSteps: //Number Function
|
||||
rc_push_num(rc_getWorld3DMaxSubSteps( ));
|
||||
break;
|
||||
case FN_GetWorld3DTimeStep: //Number Function
|
||||
rc_push_num(rc_getWorld3DTimeStep( ));
|
||||
break;
|
||||
case FN_startParticleEmitter: //Sub Procedure
|
||||
rc_startParticleEmitter( STARTPARTICLEEMITTER_ACTOR );
|
||||
break;
|
||||
|
||||
@@ -218,6 +218,7 @@ bool rc_gfx_init()
|
||||
}
|
||||
}
|
||||
SDL_SetHint("SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS", "1");
|
||||
SDL_SetHint("SDL_HINT_EMSCRIPTEN_ASYNCIFY", "1");
|
||||
|
||||
return true;
|
||||
|
||||
@@ -269,7 +270,11 @@ bool rc_windowOpenEx(std::string title, int x, int y, int w, int h, uint32_t win
|
||||
|
||||
SIrrlichtCreationParameters irr_creation_params;
|
||||
irr_creation_params.DeviceType = EIDT_SDL;
|
||||
#if defined(RC_DRIVER_GLES2)
|
||||
irr_creation_params.DriverType = video::EDT_OGLES2;
|
||||
#else
|
||||
irr_creation_params.DriverType = video::EDT_OPENGL;
|
||||
#endif // defined
|
||||
irr_creation_params.WindowId = rc_window;
|
||||
irr_creation_params.WindowSize = dimension2d<u32>((u32)w, (u32)h);
|
||||
irr_creation_params.Bits = 16;
|
||||
@@ -279,6 +284,7 @@ bool rc_windowOpenEx(std::string title, int x, int y, int w, int h, uint32_t win
|
||||
irr_creation_params.EventReceiver = 0;
|
||||
irr_creation_params.WindowPosition = position2d<s32>(x, y);
|
||||
irr_creation_params.AntiAlias = AntiAlias;
|
||||
irr_creation_params.OGLES2ShaderPath = "media/Shaders/";
|
||||
|
||||
device = createDeviceEx(irr_creation_params);
|
||||
|
||||
@@ -299,12 +305,23 @@ bool rc_windowOpenEx(std::string title, int x, int y, int w, int h, uint32_t win
|
||||
rc_font.clear();
|
||||
|
||||
rc_canvas_obj back_buffer;
|
||||
//std::cout << std::endl << "back start" << std::endl;
|
||||
#ifdef RC_WEB
|
||||
Uint32 size_n = 2;
|
||||
Uint32 dim_max = (w > h ? w : h);
|
||||
while(size_n < dim_max) size_n *= 2;
|
||||
back_buffer.texture = VideoDriver->addRenderTargetTexture(irr::core::dimension2d<irr::u32>((irr::u32)size_n, (irr::u32)size_n), "rt", ECF_A8R8G8B8);
|
||||
#else
|
||||
back_buffer.texture = VideoDriver->addRenderTargetTexture(irr::core::dimension2d<irr::u32>((irr::u32)w, (irr::u32)h), "rt", ECF_A8R8G8B8);
|
||||
#endif // RC_WEB
|
||||
//std::cout << "back_buffer done" << std::endl << std::endl;
|
||||
back_buffer.dimension.Width = w;
|
||||
back_buffer.dimension.Height = h;
|
||||
back_buffer.viewport.position.set(0,0);
|
||||
back_buffer.viewport.dimension.set(w,h);
|
||||
//std::cout << std::endl << "tgt start" << std::endl;
|
||||
VideoDriver->setRenderTarget(back_buffer.texture, true, true);
|
||||
//std::cout << "tgt done" << std::endl << std::endl;
|
||||
rc_canvas.push_back(back_buffer);
|
||||
|
||||
rc_physics3D.world = createIrrBulletWorld(device, true, false);
|
||||
@@ -750,38 +767,23 @@ bool rc_restoreWindow()
|
||||
return false;
|
||||
}
|
||||
|
||||
void rc_setWindowIcon(int slot)
|
||||
void rc_setWindowIcon(int img_id)
|
||||
{
|
||||
SDL_Rect img_rect;
|
||||
img_rect.x = 0;
|
||||
img_rect.y = 0;
|
||||
//img_rect.w = rc_image_width[slot];
|
||||
//img_rect.h = rc_image_height[slot];
|
||||
/*
|
||||
if(rc_himage[slot][win_num] != NULL)
|
||||
{
|
||||
//SDL_RendererFlip rf = (SDL_RendererFlip)(SDL_FLIP_VERTICAL);
|
||||
if(img_id < 0 || img_id >= rc_image.size())
|
||||
return;
|
||||
|
||||
SDL_Surface * tmp_surf = SDL_CreateRGBSurface(0, rc_image_width[slot], rc_image_height[slot], 32, 0, 0, 0, 0);
|
||||
SDL_Texture * tmp_tex = SDL_CreateTexture(rc_win_renderer[rc_active_window], rc_pformat->format, SDL_TEXTUREACCESS_TARGET, rc_image_width[slot], rc_image_height[slot]);
|
||||
SDL_SetRenderTarget(rc_win_renderer[rc_active_window],NULL);
|
||||
SDL_RenderCopy(rc_win_renderer[rc_active_window],rc_himage[slot][rc_active_window],NULL,&img_rect);
|
||||
//SDL_RenderCopyEx(rc_win_renderer[rc_active_window],rc_himage[slot][rc_active_window],NULL,NULL,0,NULL,rf);
|
||||
if(!rc_image[img_id].image)
|
||||
return;
|
||||
|
||||
SDL_RenderReadPixels(rc_win_renderer[rc_active_window], &img_rect, rc_pformat->format,tmp_surf->pixels,tmp_surf->pitch);
|
||||
SDL_Surface* img_surface = convertTextureToSurface(rc_image[img_id].image);
|
||||
|
||||
SDL_SetColorKey(tmp_surf,SDL_TRUE,rc_image_colorKey[slot]);
|
||||
if(!img_surface)
|
||||
return;
|
||||
|
||||
SDL_SetWindowIcon(rc_win[rc_active_window], tmp_surf);
|
||||
SDL_SetColorKey(img_surface,SDL_TRUE,0);
|
||||
SDL_SetWindowIcon(rc_window, img_surface);
|
||||
|
||||
|
||||
if(rc_active_screen >= 0)
|
||||
SDL_SetRenderTarget(rc_win_renderer[rc_active_window], rc_hscreen[rc_active_window][rc_active_screen]);
|
||||
|
||||
SDL_DestroyTexture(tmp_tex);
|
||||
SDL_FreeSurface(tmp_surf);
|
||||
}
|
||||
*/
|
||||
SDL_FreeSurface(img_surface);
|
||||
}
|
||||
|
||||
|
||||
@@ -866,6 +868,24 @@ void sortCanvasZ()
|
||||
//std::cout << std::endl;
|
||||
}
|
||||
|
||||
void rc_setActiveCanvas(int canvas_id)
|
||||
{
|
||||
rc_active_canvas = canvas_id;
|
||||
|
||||
if(rc_active_canvas >= 0 && rc_active_canvas < rc_canvas.size())
|
||||
{
|
||||
if(rc_canvas[rc_active_canvas].texture)
|
||||
VideoDriver->setRenderTarget(rc_canvas[rc_active_canvas].texture, false, false);
|
||||
|
||||
rc_setDriverMaterial();
|
||||
}
|
||||
}
|
||||
|
||||
int rc_activeCanvas()
|
||||
{
|
||||
return rc_active_canvas;
|
||||
}
|
||||
|
||||
int rc_canvasOpen(int w, int h, int vx, int vy, int vw, int vh, int mode, int canvas_type=RC_CANVAS_TYPE_2D)
|
||||
{
|
||||
if(!VideoDriver)
|
||||
@@ -876,7 +896,14 @@ int rc_canvasOpen(int w, int h, int vx, int vy, int vw, int vh, int mode, int ca
|
||||
canvas.show3D = false;
|
||||
canvas.physics2D.enabled = false;
|
||||
|
||||
#ifdef RC_WEB
|
||||
Uint32 size_n = 2;
|
||||
Uint32 dim_max = (w > h ? w : h);
|
||||
while(size_n < dim_max) size_n *= 2;
|
||||
canvas.texture = VideoDriver->addRenderTargetTexture(irr::core::dimension2d<u32>(size_n,size_n), "rt", ECF_A8R8G8B8);
|
||||
#else
|
||||
canvas.texture = VideoDriver->addRenderTargetTexture(irr::core::dimension2d<u32>(w,h), "rt", ECF_A8R8G8B8);
|
||||
#endif // RC_WEB
|
||||
//canvas.sprite_layer = VideoDriver->addRenderTargetTexture(irr::core::dimension2d<u32>(w,h), "rt", ECF_A8R8G8B8);
|
||||
|
||||
if(!canvas.texture)
|
||||
@@ -953,7 +980,10 @@ int rc_canvasOpen(int w, int h, int vx, int vy, int vw, int vh, int mode, int ca
|
||||
}
|
||||
|
||||
if(rc_active_canvas < 0)
|
||||
{
|
||||
rc_active_canvas = canvas_id;
|
||||
rc_setActiveCanvas(rc_active_canvas);
|
||||
}
|
||||
|
||||
for(int i = 0; i < rc_canvas_zOrder.size(); i++)
|
||||
{
|
||||
@@ -1043,28 +1073,22 @@ void rc_setCanvasPhysics2D(int canvas_id, bool flag)
|
||||
rc_canvas[canvas_id].physics2D.enabled = flag;
|
||||
}
|
||||
|
||||
void rc_setActiveCanvas(int canvas_id)
|
||||
{
|
||||
rc_active_canvas = canvas_id;
|
||||
|
||||
if(rc_active_canvas >= 0 && rc_active_canvas < rc_canvas.size())
|
||||
{
|
||||
if(rc_canvas[rc_active_canvas].texture)
|
||||
VideoDriver->setRenderTarget(rc_canvas[rc_active_canvas].texture, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
int rc_activeCanvas()
|
||||
{
|
||||
return rc_active_canvas;
|
||||
}
|
||||
|
||||
void rc_clearCanvas()
|
||||
{
|
||||
if(rc_active_canvas >= 0 && rc_active_canvas < rc_canvas.size())
|
||||
{
|
||||
if(rc_canvas[rc_active_canvas].texture)
|
||||
switch(rc_canvas[rc_active_canvas].type)
|
||||
{
|
||||
case RC_CANVAS_TYPE_2D:
|
||||
VideoDriver->clearBuffers(true, true, true, rc_clear_color);
|
||||
break;
|
||||
default:
|
||||
VideoDriver->clearBuffers(true, true, true, rc_clear_color);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1372,7 +1396,10 @@ void rc_setColor(Uint32 color)
|
||||
|
||||
Uint32 rc_getPixel(int x, int y)
|
||||
{
|
||||
if(!rc_canvas[0].texture)
|
||||
if(rc_active_canvas < 0 || rc_active_canvas >= rc_canvas.size())
|
||||
return 0;
|
||||
|
||||
if(!rc_canvas[rc_active_canvas].texture)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -1384,7 +1411,7 @@ Uint32 rc_getPixel(int x, int y)
|
||||
y = 0;
|
||||
|
||||
|
||||
irr::video::ITexture* texture = rc_canvas[0].texture;
|
||||
irr::video::ITexture* texture = rc_canvas[rc_active_canvas].texture;
|
||||
|
||||
video::ECOLOR_FORMAT format = texture->getColorFormat(); //std::cout << "format = " << (int) format << std::endl;
|
||||
|
||||
@@ -1400,10 +1427,12 @@ Uint32 rc_getPixel(int x, int y)
|
||||
|
||||
irr::video::SColor * texel = (SColor *)(texels + ((y * pitch) + (x * sizeof(SColor))));
|
||||
|
||||
//irr::video::SColor c = texel[0];
|
||||
irr::video::SColor c = texel[0];
|
||||
|
||||
texture->unlock();
|
||||
|
||||
color = c.color;
|
||||
|
||||
//std::cout << "color(" << x << ", " << y << ") = " << c.getRed() << ", " << c.getGreen() << ", " << c.getBlue() << std::endl;
|
||||
}
|
||||
|
||||
@@ -1429,13 +1458,6 @@ void rc_drawRectFill(int x, int y, int w, int h)
|
||||
VideoDriver->draw2DRectangle(rc_active_color, r);
|
||||
}
|
||||
|
||||
void rc_drawCircle(int x, int y, double r)
|
||||
{
|
||||
irr::core::vector2d<s32> r_pos(x,y);
|
||||
|
||||
VideoDriver->draw2DPolygon(r_pos, r, rc_active_color, 30);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Filled Circle Code from CuteAlien on Irrlicht forum
|
||||
@@ -1467,23 +1489,6 @@ void makeCircle(irr::core::array<irr::video::S3DVertex>& vertices, irr::core::ar
|
||||
}
|
||||
}
|
||||
|
||||
void rc_drawCircleFill(int x, int y, double r)
|
||||
{
|
||||
irr::core::vector2d<s32> r_pos(x,y);
|
||||
|
||||
// create the circle
|
||||
irr::core::array<irr::video::S3DVertex> verticesCircle;
|
||||
irr::core::array<irr::u16> indicesCircle;
|
||||
CircleSettings circle;
|
||||
circle.center = r_pos;
|
||||
circle.radius = r;
|
||||
circle.color = rc_active_color;
|
||||
makeCircle(verticesCircle, indicesCircle, circle);
|
||||
|
||||
VideoDriver->draw2DVertexPrimitiveList(verticesCircle.pointer(), verticesCircle.size(),
|
||||
indicesCircle.pointer(), indicesCircle.size()-2, video::EVT_STANDARD, scene::EPT_TRIANGLE_FAN,
|
||||
video::EIT_16BIT);
|
||||
}
|
||||
|
||||
void rc_drawLine(int x1, int y1, int x2, int y2)
|
||||
{
|
||||
@@ -1533,8 +1538,8 @@ void makeEllipse(irr::core::array<irr::video::S3DVertex>& vertices, irr::core::a
|
||||
int ry = settings.radius;
|
||||
for ( u32 i=1; i < settings.numVertices; i++ )
|
||||
{
|
||||
irr::f32 x = rx * std::cos( radians(i*stepSize) ) + centerf.Y ;
|
||||
irr::f32 y = ry * std::sin( radians(i*stepSize) ) + centerf.X ;
|
||||
irr::f32 x = rx * std::cos( radians(i*stepSize) ) + centerf.X ;
|
||||
irr::f32 y = ry * std::sin( radians(i*stepSize) ) + centerf.Y ;
|
||||
|
||||
vertices[i] = video::S3DVertex(x, y, 0.f, 0.f, 1.f, 0.f, settings.color, 0.5f, 0.5f);
|
||||
}
|
||||
@@ -1557,6 +1562,7 @@ void rc_drawEllipse(int x, int y, int rx, int ry)
|
||||
|
||||
for(int i = 2; i < verticesCircle.size(); i++)
|
||||
{
|
||||
//std::cout << "V[" << i << "] = (" << verticesCircle[i-1].Pos.X << ", " << verticesCircle[i-1].Pos.Y << ") (" << verticesCircle[i].Pos.X << ", " << verticesCircle[i].Pos.Y << ")" << std::endl;
|
||||
rc_drawLine(verticesCircle[i-1].Pos.X, verticesCircle[i-1].Pos.Y, verticesCircle[i].Pos.X, verticesCircle[i].Pos.Y);
|
||||
}
|
||||
|
||||
@@ -1564,6 +1570,7 @@ void rc_drawEllipse(int x, int y, int rx, int ry)
|
||||
rc_drawLine(verticesCircle[n].Pos.X, verticesCircle[n].Pos.Y, verticesCircle[1].Pos.X, verticesCircle[1].Pos.Y);
|
||||
}
|
||||
|
||||
|
||||
void rc_drawEllipseFill(int x, int y, int rx, int ry)
|
||||
{
|
||||
irr::core::vector2d<s32> r_pos(x,y);
|
||||
@@ -1584,6 +1591,31 @@ void rc_drawEllipseFill(int x, int y, int rx, int ry)
|
||||
video::EIT_16BIT);
|
||||
}
|
||||
|
||||
void rc_drawCircle(int x, int y, double r)
|
||||
{
|
||||
rc_drawEllipse(x, y, r, r);
|
||||
}
|
||||
|
||||
void rc_drawCircleFill(int x, int y, double r)
|
||||
{
|
||||
rc_drawEllipseFill(x, y, r, r);
|
||||
return;
|
||||
|
||||
irr::core::vector2d<s32> r_pos(x,y);
|
||||
|
||||
// create the circle
|
||||
irr::core::array<irr::video::S3DVertex> verticesCircle;
|
||||
irr::core::array<irr::u16> indicesCircle;
|
||||
CircleSettings circle;
|
||||
circle.center = r_pos;
|
||||
circle.radius = r;
|
||||
circle.color = rc_active_color;
|
||||
makeCircle(verticesCircle, indicesCircle, circle);
|
||||
|
||||
VideoDriver->draw2DVertexPrimitiveList(verticesCircle.pointer(), verticesCircle.size(),
|
||||
indicesCircle.pointer(), indicesCircle.size()-2, video::EVT_STANDARD, scene::EPT_TRIANGLE_FAN,
|
||||
video::EIT_16BIT);
|
||||
}
|
||||
|
||||
|
||||
int rc_loadFont(std::string fnt_file, int font_size)
|
||||
@@ -1827,6 +1859,7 @@ int rc_inKey()
|
||||
|
||||
int rc_key(int check_Key)
|
||||
{
|
||||
keyState = SDL_GetKeyboardState(NULL);
|
||||
return keyState[SDL_GetScancodeFromKey(check_Key)];
|
||||
}
|
||||
|
||||
@@ -2157,7 +2190,7 @@ void rc_readInput_Stop()
|
||||
SDL_StopTextInput();
|
||||
}
|
||||
|
||||
std::string rc_readInput_Text()
|
||||
std::string rc_readInput_GetText()
|
||||
{
|
||||
return rc_textinput_string;
|
||||
}
|
||||
@@ -2304,6 +2337,7 @@ void rc_getImageBuffer(int img_id, double * pdata)
|
||||
void rc_setBilinearFilter(bool flag)
|
||||
{
|
||||
rc_bilinear_filter = flag;
|
||||
rc_setDriverMaterial();
|
||||
}
|
||||
|
||||
bool rc_getBilinearFilter()
|
||||
@@ -2351,6 +2385,8 @@ void rc_setBlendMode(int blend_mode)
|
||||
case 8: rc_blend_mode = EBO_MIN_ALPHA; break;
|
||||
case 9: rc_blend_mode = EBO_MAX_ALPHA; break;
|
||||
}
|
||||
|
||||
rc_setDriverMaterial();
|
||||
}
|
||||
|
||||
int rc_getBlendMode()
|
||||
@@ -3363,7 +3399,7 @@ bool rc_update()
|
||||
irrevent.UserEvent.UserData1 = reinterpret_cast<uintptr_t>(SDL_event.user.data1);
|
||||
irrevent.UserEvent.UserData2 = reinterpret_cast<uintptr_t>(SDL_event.user.data2);
|
||||
|
||||
device->postEventFromUser(irrevent);
|
||||
//device->postEventFromUser(irrevent);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -3372,16 +3408,19 @@ bool rc_update()
|
||||
|
||||
} // end while
|
||||
|
||||
|
||||
if(!Close)
|
||||
{
|
||||
irrtheora::updateVideo();
|
||||
|
||||
VideoDriver->setRenderTarget(rc_canvas[0].texture);
|
||||
irr::core::vector2d<s32> bb_position(0,0);
|
||||
irr::core::dimension2d<u32> bb_dimension(win_w, win_h);
|
||||
irr::core::dimension2d<u32> bb_dimension = rc_canvas[0].texture->getSize();
|
||||
irr::core::dimension2d<u32> win_dimension(win_w, win_h);
|
||||
VideoDriver->setViewPort( irr::core::rect<irr::s32>(bb_position, bb_dimension) );
|
||||
|
||||
irr::core::vector2d<irr::f32> screenSize( (irr::f32) rc_canvas[0].dimension.Width, (irr::f32) rc_canvas[0].dimension.Height );
|
||||
//irr::core::vector2d<irr::f32> screenSize( (irr::f32) win_h, (irr::f32) win_w );
|
||||
|
||||
Uint32 current_time_ms = SDL_GetTicks();
|
||||
double frame_current_time = ((double)current_time_ms)/1000.0;
|
||||
@@ -3437,12 +3476,13 @@ bool rc_update()
|
||||
|
||||
rc_canvas[i].camera.update();
|
||||
|
||||
VideoDriver->setViewPort(irr::core::rect<irr::s32>(0,0,rc_canvas[i].viewport.dimension.Width,rc_canvas[i].viewport.dimension.Height));
|
||||
VideoDriver->setViewPort(irr::core::rect<irr::s32>(0,0,rc_canvas[i].texture->getSize().Width,rc_canvas[i].texture->getSize().Height));
|
||||
|
||||
//irr::core::rect viewport(irr::core::position, rc_canvas[i].viewport.dimension);
|
||||
//VideoDriver->setViewPort(viewport);
|
||||
|
||||
SceneManager->drawAll();
|
||||
//VideoDriver->draw2DRectangle(irr::video::SColor(255,0,255,0), irr::core::rect<irr::s32>(10,40,100,500));
|
||||
|
||||
vector3df p0(0, 0, 0);
|
||||
vector3df p1(10, 30, 0);
|
||||
@@ -3468,8 +3508,32 @@ bool rc_update()
|
||||
irr::video::SColor color(rc_canvas[canvas_id].color_mod);
|
||||
//color.set(255,255,255,255);
|
||||
|
||||
//std::cout << "draw canvas[" << canvas_id << "]" << std::endl;
|
||||
//std::cout << "draw canvas[" << canvas_id << "] (" << rc_canvas[canvas_id].offset.X << ", " << rc_canvas[canvas_id].offset.Y << ") (" << rc_canvas[canvas_id].viewport.dimension.Width << ", " << rc_canvas[canvas_id].dimension.Height << ")" << std::endl;
|
||||
|
||||
#if defined(RC_DRIVER_GLES2)
|
||||
if(rc_canvas[canvas_id].type == RC_CANVAS_TYPE_3D)
|
||||
{
|
||||
src = irr::core::rect<s32>( irr::core::vector2d<s32>(0, 0), rc_canvas[canvas_id].texture->getSize() );
|
||||
dest = irr::core::rect<s32>( irr::core::vector2d<s32>(dest.UpperLeftCorner.X, dest.UpperLeftCorner.Y + dest.getHeight()), irr::core::dimension2d<s32>(dest.getWidth(), -1*dest.getHeight()) );
|
||||
}
|
||||
else if(rc_canvas[canvas_id].type == RC_CANVAS_TYPE_2D)
|
||||
{
|
||||
irr::core::dimension2d<irr::u32> cv_dim = rc_canvas[canvas_id].viewport.dimension;
|
||||
irr::core::position2d<irr::s32> cv_pos = rc_canvas[canvas_id].viewport.position;
|
||||
irr::core::vector2d<irr::s32> cv_offset(rc_canvas[canvas_id].offset.X, rc_canvas[canvas_id].texture->getSize().Height - rc_canvas[canvas_id].offset.Y - cv_dim.Height);
|
||||
src = irr::core::rect<s32>( cv_offset, cv_dim );
|
||||
dest = irr::core::rect<s32>( irr::core::vector2d<s32>(cv_pos.X, cv_pos.Y + cv_dim.Height), irr::core::dimension2d<s32>(cv_dim.Width, -1*cv_dim.Height) );
|
||||
}
|
||||
else if(rc_canvas[canvas_id].type == RC_CANVAS_TYPE_SPRITE)
|
||||
{
|
||||
|
||||
src = irr::core::rect<s32>( irr::core::vector2d<s32>(0, 0), rc_canvas[canvas_id].texture->getSize() );
|
||||
dest = irr::core::rect<s32>( irr::core::vector2d<s32>(dest.UpperLeftCorner.X, dest.UpperLeftCorner.Y + dest.getHeight()), irr::core::dimension2d<s32>(dest.getWidth(), -1*dest.getHeight()) );
|
||||
drawSprites(canvas_id);
|
||||
}
|
||||
//dest = irr::core::rect<s32>( irr::core::vector2d<s32>(dest.UpperLeftCorner.X, dest.UpperLeftCorner.Y + dest.getHeight()), irr::core::dimension2d<s32>(dest.getWidth(), -1*dest.getHeight()) );
|
||||
draw2DImage2(VideoDriver, rc_canvas[canvas_id].texture, src, dest, irr::core::position2d<irr::s32>(0, 0), 0, true, color, screenSize);
|
||||
#else
|
||||
if(rc_canvas[canvas_id].type == RC_CANVAS_TYPE_SPRITE)
|
||||
{
|
||||
|
||||
@@ -3478,6 +3542,7 @@ bool rc_update()
|
||||
}
|
||||
|
||||
draw2DImage2(VideoDriver, rc_canvas[canvas_id].texture, src, dest, irr::core::position2d<irr::s32>(0, 0), 0, true, color, screenSize);
|
||||
#endif // defined
|
||||
|
||||
//drawSprites(canvas_id);
|
||||
//draw2DImage2(VideoDriver, rc_canvas[canvas_id].sprite_layer, src, dest, irr::core::vector2d<irr::s32>(0, 0), 0, true, color, screenSize);
|
||||
@@ -3489,10 +3554,26 @@ bool rc_update()
|
||||
}
|
||||
|
||||
//env->drawAll();
|
||||
//VideoDriver->draw2DRectangle(irr::video::SColor(255,255,0,0), irr::core::rect<irr::s32>(0,0,100,500));
|
||||
|
||||
VideoDriver->setRenderTarget(0);
|
||||
//VideoDriver->beginScene(true, true);
|
||||
VideoDriver->draw2DImage(rc_canvas[0].texture, irr::core::vector2d<irr::s32>(0,0));
|
||||
//VideoDriver->draw2DImage(rc_canvas[0].texture, irr::core::vector2d<irr::s32>(0,0));
|
||||
|
||||
//debug
|
||||
irr::core::rect<s32> src( irr::core::vector2d<s32>(0,0), rc_canvas[0].texture->getSize() );
|
||||
irr::core::rect<s32> dest( irr::core::vector2d<s32>(0,0), irr::core::dimension2d<s32>(win_w, win_h) );
|
||||
irr::video::SColor color(0);
|
||||
VideoDriver->draw2DImage(rc_canvas[0].texture, dest, src);
|
||||
//draw2DImage2(VideoDriver, rc_canvas[0].texture, src, dest, irr::core::position2d<irr::s32>(0, 0), 0, false, color, screenSize);
|
||||
//irr::core::rect<irr::s32> src( irr::core::vector2d<irr::s32>(0, 0), rc_canvas[0].texture->getSize() );
|
||||
//irr::core::rect<irr::s32> dest( irr::core::vector2d<irr::s32>(0, 0), irr::core::dimension2d<irr::s32>( );
|
||||
//draw2DImage2(VideoDriver, rc_canvas[canvas_id].texture, src, dest, irr::core::position2d<irr::s32>(0, 0), 0, true, color, screenSize);
|
||||
|
||||
//VideoDriver->draw2DImage(rc_image[0].image, irr::core::rect<irr::s32>(0,0,100,100), irr::core::rect<irr::s32>(0,0,100,100));
|
||||
//VideoDriver->draw2DRectangle(irr::video::SColor(255,2555,0,0), irr::core::rect<irr::s32>(0,0,100,100));
|
||||
//end debug
|
||||
|
||||
//device->getGUIEnvironment()->drawAll();
|
||||
VideoDriver->endScene();
|
||||
|
||||
|
||||
@@ -583,13 +583,35 @@ class rc_animEndCallBack : public IAnimationEndCallBack
|
||||
//std::cout << "animating" << std::endl;
|
||||
irr::scene::IAnimatedMeshSceneNode* node = (irr::scene::IAnimatedMeshSceneNode*) ref_actor->mesh_node;
|
||||
int animation = ref_actor->current_animation;
|
||||
if(animation < 0 || animation >= ref_actor->animation.size())
|
||||
if(animation == RC_ANIMATION_MD2)
|
||||
{
|
||||
int start_frame = node->getStartFrame();
|
||||
int end_frame = node->getEndFrame();
|
||||
node->setFrameLoop(start_frame, end_frame);
|
||||
ref_actor->current_animation_loop++;
|
||||
}
|
||||
else if(animation == RC_ANIMATION_TRANSITION)
|
||||
{
|
||||
//TODO: Transitions are currently broken
|
||||
}
|
||||
else if(animation < 0 || animation >= ref_actor->animation.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!ref_actor->animation[animation].active)
|
||||
{
|
||||
ref_actor->isPlaying = false;
|
||||
ref_actor->current_animation_loop = 0;
|
||||
return;
|
||||
}
|
||||
int start_frame = ref_actor->animation[animation].start_frame;
|
||||
int end_frame = ref_actor->animation[animation].end_frame;
|
||||
node->setFrameLoop(start_frame, end_frame);
|
||||
ref_actor->current_animation_loop++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ref_actor->isPlaying = false;
|
||||
@@ -716,6 +738,28 @@ irr::video::E_BLEND_OPERATION rc_blend_mode = irr::video::EBO_ADD;
|
||||
bool rc_bilinear_filter = false;
|
||||
|
||||
|
||||
void rc_setDriverMaterial()
|
||||
{
|
||||
if(!VideoDriver)
|
||||
return;
|
||||
|
||||
irr::video::SMaterial material;
|
||||
material.Lighting = false;
|
||||
material.ZWriteEnable = irr::video::EZW_OFF;
|
||||
material.ZBuffer = false;
|
||||
material.BackfaceCulling = false;
|
||||
material.TextureLayer[0].Texture = 0;
|
||||
material.TextureLayer[0].BilinearFilter = rc_bilinear_filter;
|
||||
material.MaterialTypeParam = irr::video::pack_textureBlendFunc(irr::video::EBF_SRC_ALPHA, irr::video::EBF_ONE_MINUS_SRC_ALPHA, irr::video::EMFN_MODULATE_1X, irr::video::EAS_TEXTURE | irr::video::EAS_VERTEX_COLOR);
|
||||
material.BlendOperation = rc_blend_mode;
|
||||
material.BlendOperation = irr::video::EBO_ADD;
|
||||
|
||||
material.MaterialType = irr::video::EMT_ONETEXTURE_BLEND;
|
||||
|
||||
VideoDriver->setMaterial(material);
|
||||
}
|
||||
|
||||
|
||||
void draw2DImage(irr::video::IVideoDriver *driver, irr::video::ITexture* texture, irr::core::rect<irr::s32> sourceRect, irr::core::position2d<irr::s32> position, irr::core::position2d<irr::s32> rotationPoint, irr::f32 rotation, irr::core::vector2df scale, bool useAlphaChannel, irr::video::SColor color, irr::core::vector2d<irr::f32> screenSize)
|
||||
{
|
||||
if(rc_active_canvas < 0 || rc_active_canvas >= rc_canvas.size())
|
||||
@@ -804,6 +848,8 @@ void draw2DImage(irr::video::IVideoDriver *driver, irr::video::ITexture* texture
|
||||
driver->setTransform(irr::video::ETS_PROJECTION,oldProjMat);
|
||||
driver->setTransform(irr::video::ETS_VIEW,oldViewMat);
|
||||
driver->setTransform(irr::video::ETS_WORLD,oldWorldMat);
|
||||
|
||||
rc_setDriverMaterial();
|
||||
}
|
||||
|
||||
void draw2DImage2(irr::video::IVideoDriver *driver, irr::video::ITexture* texture, irr::core::rect<irr::s32> sourceRect, irr::core::rect<irr::s32> destRect, irr::core::position2d<irr::s32> rotationPoint, irr::f32 rotation, bool useAlphaChannel, irr::video::SColor color, irr::core::vector2d<irr::f32> screenSize )
|
||||
@@ -894,8 +940,39 @@ void draw2DImage2(irr::video::IVideoDriver *driver, irr::video::ITexture* textur
|
||||
driver->setTransform(irr::video::ETS_PROJECTION,oldProjMat);
|
||||
driver->setTransform(irr::video::ETS_VIEW,oldViewMat);
|
||||
driver->setTransform(irr::video::ETS_WORLD,oldWorldMat);
|
||||
|
||||
rc_setDriverMaterial();
|
||||
}
|
||||
|
||||
|
||||
SDL_Surface* convertTextureToSurface(irr::video::ITexture* itexture)
|
||||
{
|
||||
Uint32 t_width, t_height;
|
||||
t_width = itexture->getSize().Width;
|
||||
t_height = itexture->getSize().Height;
|
||||
|
||||
SDL_Surface* surface = SDL_CreateRGBSurface(0, t_width, t_height, 32, 0, 0, 0, 0);
|
||||
|
||||
if(surface)
|
||||
{
|
||||
Uint32* surface_pixels = (Uint32*)surface->pixels;
|
||||
|
||||
Uint32* texture_pixels = (Uint32*)rc_canvas[rc_active_canvas].texture->lock();
|
||||
|
||||
int i = 0;
|
||||
for(int y = 0; y < t_height; y++)
|
||||
{
|
||||
for(int x = 0; x < t_width; x++)
|
||||
{
|
||||
surface_pixels[i] = texture_pixels[i];
|
||||
}
|
||||
}
|
||||
|
||||
rc_canvas[rc_active_canvas].texture->unlock();
|
||||
}
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
||||
|
||||
#endif // RC_GFX_CORE_H_INCLUDED
|
||||
|
||||
@@ -1,25 +1,48 @@
|
||||
#ifndef RC_OS_DEFINES_H_INCLUDED
|
||||
#define RC_OS_DEFINES_H_INCLUDED
|
||||
|
||||
//USED FOR TESTING ONLY
|
||||
//#define RC_TESTING
|
||||
|
||||
//I am checking Android first since I think it also defines __linux__
|
||||
|
||||
#if defined(__ANDROID__)
|
||||
#define RC_ANDROID
|
||||
#elif defined(__linux__)
|
||||
#define RC_LINUX
|
||||
//#define RC_WEB
|
||||
//#define RC_WINDOWS
|
||||
//#define RC_ANDROID
|
||||
//#define RC_MAC
|
||||
//#define RC_IOS
|
||||
#elif __EMSCRIPTEN__
|
||||
#define RC_WEB
|
||||
#elif defined(_WIN32) || defined(_WIN64)
|
||||
#define RC_WINDOWS
|
||||
#elif defined(__APPLE__) && defined(__MACH__) // Apple OSX and iOS (Darwin)
|
||||
#include <TargetConditionals.h>
|
||||
#if defined(TARGET_IPHONE_SIMULATOR) || defined(TARGET_OS_IPHONE)
|
||||
#define RC_IOS
|
||||
#else
|
||||
#define RC_MAC
|
||||
#endif // TARGET_IPHONE_SIMULATOR
|
||||
#endif // defined
|
||||
|
||||
#ifdef RC_WEB
|
||||
#define RC_LINUX
|
||||
#define RC_DRIVER_GLES2
|
||||
#endif
|
||||
|
||||
#ifdef RC_ANDROID
|
||||
#define RC_MOBILE
|
||||
#define RC_DRIVER_GLES2
|
||||
#endif
|
||||
|
||||
#ifdef RC_IOS
|
||||
#define RC_MOBILE
|
||||
#define RC_DRIVER_GLES2
|
||||
#endif
|
||||
|
||||
//FOR TESTING PURPOSES
|
||||
#ifdef RC_TESTING
|
||||
//#define RC_DRIVER_GLES2
|
||||
#endif // RC_TESTING
|
||||
|
||||
#define RC_PI 3.14159265359
|
||||
|
||||
inline double rc_util_radians(double degrees)
|
||||
|
||||
@@ -32,4 +32,14 @@ void rc_setWorld3DTimeStep(double ts)
|
||||
rc_physics3D.fixedTimeStep = ts;
|
||||
}
|
||||
|
||||
double rc_getWorld3DMaxSubSteps()
|
||||
{
|
||||
return rc_physics3D.maxSubSteps;
|
||||
}
|
||||
|
||||
double rc_getWorld3DTimeStep()
|
||||
{
|
||||
return rc_physics3D.fixedTimeStep;
|
||||
}
|
||||
|
||||
#endif // RC_PHYSICS3D_BASE_H_INCLUDED
|
||||
|
||||
@@ -43,6 +43,8 @@ void rc_setSpriteAngularVelocity(int spr_id, double av)
|
||||
if(!rc_sprite[spr_id].active)
|
||||
return;
|
||||
|
||||
av = rc_util_radians(av);
|
||||
|
||||
rc_sprite[spr_id].physics.body->SetAngularVelocity(av);
|
||||
}
|
||||
|
||||
@@ -54,7 +56,7 @@ double rc_getSpriteAngularVelocity(int spr_id)
|
||||
if(!rc_sprite[spr_id].active)
|
||||
return 0;
|
||||
|
||||
return (double)rc_sprite[spr_id].physics.body->GetAngularVelocity();
|
||||
return (double)rc_util_degrees(rc_sprite[spr_id].physics.body->GetAngularVelocity());
|
||||
}
|
||||
|
||||
void rc_applySpriteForce(int spr_id, double fX, double fY, double pX, double pY)
|
||||
@@ -365,3 +367,222 @@ bool rc_spriteIsFixedRotation(int spr_id)
|
||||
|
||||
return rc_sprite[spr_id].physics.body->IsFixedRotation();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void rc_setSpriteDensity( int spr_id, double density )
|
||||
{
|
||||
if(spr_id < 0 || spr_id >= rc_sprite.size())
|
||||
return;
|
||||
|
||||
if(!rc_sprite[spr_id].active)
|
||||
return;
|
||||
|
||||
rc_sprite[spr_id].physics.fixture->SetDensity(density);
|
||||
}
|
||||
|
||||
double rc_getSpriteDensity( int spr_id )
|
||||
{
|
||||
if(spr_id < 0 || spr_id >= rc_sprite.size())
|
||||
return 0;
|
||||
|
||||
if(!rc_sprite[spr_id].active)
|
||||
return 0;
|
||||
|
||||
return rc_sprite[spr_id].physics.fixture->GetDensity();
|
||||
}
|
||||
|
||||
void rc_setSpriteFriction( int spr_id, double friction )
|
||||
{
|
||||
if(spr_id < 0 || spr_id >= rc_sprite.size())
|
||||
return;
|
||||
|
||||
if(!rc_sprite[spr_id].active)
|
||||
return;
|
||||
|
||||
rc_sprite[spr_id].physics.fixture->SetFriction(friction);
|
||||
}
|
||||
|
||||
double rc_getSpriteFriction( int spr_id )
|
||||
{
|
||||
if(spr_id < 0 || spr_id >= rc_sprite.size())
|
||||
return 0;
|
||||
|
||||
if(!rc_sprite[spr_id].active)
|
||||
return 0;
|
||||
|
||||
return rc_sprite[spr_id].physics.fixture->GetFriction();
|
||||
}
|
||||
|
||||
void rc_setSpriteRestitution( int spr_id, double restitution )
|
||||
{
|
||||
if(spr_id < 0 || spr_id >= rc_sprite.size())
|
||||
return;
|
||||
|
||||
if(!rc_sprite[spr_id].active)
|
||||
return;
|
||||
|
||||
rc_sprite[spr_id].physics.fixture->SetRestitution(restitution);
|
||||
}
|
||||
|
||||
double rc_getSpriteRestitution( int spr_id )
|
||||
{
|
||||
if(spr_id < 0 || spr_id >= rc_sprite.size())
|
||||
return 0;
|
||||
|
||||
if(!rc_sprite[spr_id].active)
|
||||
return 0;
|
||||
|
||||
return rc_sprite[spr_id].physics.fixture->GetRestitution();
|
||||
}
|
||||
|
||||
void rc_setSpriteRestitutionThreshold( int spr_id, double threshold )
|
||||
{
|
||||
if(spr_id < 0 || spr_id >= rc_sprite.size())
|
||||
return;
|
||||
|
||||
if(!rc_sprite[spr_id].active)
|
||||
return;
|
||||
|
||||
rc_sprite[spr_id].physics.fixture->SetRestitutionThreshold(threshold);
|
||||
}
|
||||
|
||||
double rc_getSpriteRestitutionThreshold( int spr_id )
|
||||
{
|
||||
if(spr_id < 0 || spr_id >= rc_sprite.size())
|
||||
return 0;
|
||||
|
||||
if(!rc_sprite[spr_id].active)
|
||||
return 0;
|
||||
|
||||
return rc_sprite[spr_id].physics.fixture->GetRestitutionThreshold();
|
||||
}
|
||||
|
||||
void rc_getSpriteAABB( int spr_id, double* x1, double* y1, double* x2, double* y2 )
|
||||
{
|
||||
if(spr_id < 0 || spr_id >= rc_sprite.size())
|
||||
return;
|
||||
|
||||
if(!rc_sprite[spr_id].active)
|
||||
return;
|
||||
|
||||
b2AABB bound_box = rc_sprite[spr_id].physics.fixture->GetAABB(0);
|
||||
*x1 = bound_box.upperBound.x;
|
||||
*y1 = bound_box.upperBound.y;
|
||||
*x2 = bound_box.lowerBound.x;
|
||||
*y2 = bound_box.lowerBound.y;
|
||||
}
|
||||
|
||||
void rc_setWorld2DTimeStep( double ts )
|
||||
{
|
||||
if(rc_active_canvas < 0 || rc_active_canvas >= rc_canvas.size())
|
||||
return;
|
||||
|
||||
if(rc_canvas[rc_active_canvas].type != RC_CANVAS_TYPE_SPRITE)
|
||||
return;
|
||||
|
||||
rc_canvas[rc_active_canvas].physics2D.timeStep = ts;
|
||||
}
|
||||
|
||||
void rc_setWorld2DVelocityIterations( double v )
|
||||
{
|
||||
if(rc_active_canvas < 0 || rc_active_canvas >= rc_canvas.size())
|
||||
return;
|
||||
|
||||
if(rc_canvas[rc_active_canvas].type != RC_CANVAS_TYPE_SPRITE)
|
||||
return;
|
||||
|
||||
rc_canvas[rc_active_canvas].physics2D.velocityIterations = (int)v;
|
||||
}
|
||||
|
||||
void rc_setWorld2DPositionIterations( double p )
|
||||
{
|
||||
if(rc_active_canvas < 0 || rc_active_canvas >= rc_canvas.size())
|
||||
return;
|
||||
|
||||
if(rc_canvas[rc_active_canvas].type != RC_CANVAS_TYPE_SPRITE)
|
||||
return;
|
||||
|
||||
rc_canvas[rc_active_canvas].physics2D.positionIterations = (int)p;
|
||||
}
|
||||
|
||||
double rc_getWorld2DTimeStep()
|
||||
{
|
||||
if(rc_active_canvas < 0 || rc_active_canvas >= rc_canvas.size())
|
||||
return 0;
|
||||
|
||||
if(rc_canvas[rc_active_canvas].type != RC_CANVAS_TYPE_SPRITE)
|
||||
return 0;
|
||||
|
||||
return rc_canvas[rc_active_canvas].physics2D.timeStep;
|
||||
}
|
||||
|
||||
double rc_getWorld2DVelocityIterations()
|
||||
{
|
||||
if(rc_active_canvas < 0 || rc_active_canvas >= rc_canvas.size())
|
||||
return 0;
|
||||
|
||||
if(rc_canvas[rc_active_canvas].type != RC_CANVAS_TYPE_SPRITE)
|
||||
return 0;
|
||||
|
||||
return rc_canvas[rc_active_canvas].physics2D.velocityIterations;
|
||||
}
|
||||
|
||||
double rc_getWorld2DPositionIterations()
|
||||
{
|
||||
if(rc_active_canvas < 0 || rc_active_canvas >= rc_canvas.size())
|
||||
return 0;
|
||||
|
||||
if(rc_canvas[rc_active_canvas].type != RC_CANVAS_TYPE_SPRITE)
|
||||
return 0;
|
||||
|
||||
return rc_canvas[rc_active_canvas].physics2D.positionIterations;
|
||||
}
|
||||
|
||||
void rc_setWorld2DAutoClearForces( bool flag )
|
||||
{
|
||||
if(rc_active_canvas < 0 || rc_active_canvas >= rc_canvas.size())
|
||||
return;
|
||||
|
||||
if(rc_canvas[rc_active_canvas].type != RC_CANVAS_TYPE_SPRITE)
|
||||
return;
|
||||
|
||||
rc_canvas[rc_active_canvas].physics2D.world->SetAutoClearForces(flag);
|
||||
}
|
||||
|
||||
bool rc_getWorld2DAutoClearForces()
|
||||
{
|
||||
if(rc_active_canvas < 0 || rc_active_canvas >= rc_canvas.size())
|
||||
return false;
|
||||
|
||||
if(rc_canvas[rc_active_canvas].type != RC_CANVAS_TYPE_SPRITE)
|
||||
return false;
|
||||
|
||||
return rc_canvas[rc_active_canvas].physics2D.world->GetAutoClearForces();
|
||||
}
|
||||
|
||||
|
||||
void rc_setGravity2D(double x, double y)
|
||||
{
|
||||
if(rc_active_canvas < 0 || rc_active_canvas >= rc_canvas.size())
|
||||
return;
|
||||
|
||||
if(rc_canvas[rc_active_canvas].type != RC_CANVAS_TYPE_SPRITE)
|
||||
return;
|
||||
|
||||
b2Vec2 gravity(x, y);
|
||||
rc_canvas[rc_active_canvas].physics2D.world->SetGravity(gravity);
|
||||
|
||||
}
|
||||
|
||||
void rc_getGravity2D(double* x, double* y)
|
||||
{
|
||||
if(rc_active_canvas < 0 || rc_active_canvas >= rc_canvas.size())
|
||||
return;
|
||||
|
||||
if(rc_canvas[rc_active_canvas].type != RC_CANVAS_TYPE_SPRITE)
|
||||
return;
|
||||
|
||||
*x = rc_canvas[rc_active_canvas].physics2D.world->GetGravity().x;
|
||||
*y = rc_canvas[rc_active_canvas].physics2D.world->GetGravity().y;
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@ int rc_createSprite(int img_id, double w, double h)
|
||||
|
||||
b2BodyDef sprBodyDef;
|
||||
sprBodyDef.type = b2_dynamicBody;
|
||||
sprBodyDef.position.Set(0, 0);
|
||||
sprBodyDef.position.Set(w/2, h/2);
|
||||
sprBodyDef.angle = 0;
|
||||
sprBodyDef.userData.pointer = (uintptr_t)&rc_sprite[spr_id];
|
||||
rc_sprite[spr_id].physics.body = rc_canvas[rc_active_canvas].physics2D.world->CreateBody(&sprBodyDef);
|
||||
@@ -364,8 +364,8 @@ int rc_createSprite(int img_id, double w, double h)
|
||||
sprFixtureDef.density = 1;
|
||||
rc_sprite[spr_id].physics.fixture = rc_sprite[spr_id].physics.body->CreateFixture(&sprFixtureDef);
|
||||
|
||||
rc_sprite[spr_id].physics.offset_x = 0;
|
||||
rc_sprite[spr_id].physics.offset_y = 0;
|
||||
rc_sprite[spr_id].physics.offset_x = w/2;
|
||||
rc_sprite[spr_id].physics.offset_y = h/2;
|
||||
rc_sprite[spr_id].isSolid = false;
|
||||
|
||||
if(rc_sprite[spr_id].image_id < 0)
|
||||
@@ -513,7 +513,9 @@ void rc_setSpritePosition(int spr_id, double x, double y)
|
||||
return;
|
||||
|
||||
float current_angle = rc_sprite[spr_id].physics.body->GetAngle();
|
||||
rc_sprite[spr_id].physics.body->SetTransform(b2Vec2(x, y), current_angle);
|
||||
double off_x = rc_sprite[spr_id].physics.offset_x;
|
||||
double off_y = rc_sprite[spr_id].physics.offset_y;
|
||||
rc_sprite[spr_id].physics.body->SetTransform(b2Vec2(x+off_x, y+off_y), current_angle);
|
||||
}
|
||||
|
||||
void rc_translateSprite(int spr_id, double x, double y)
|
||||
@@ -538,8 +540,11 @@ void rc_getSpritePosition(int spr_id, double* x, double* y)
|
||||
if(!rc_sprite[spr_id].active)
|
||||
return;
|
||||
|
||||
*x = (double)rc_sprite[spr_id].physics.body->GetPosition().x;
|
||||
*y = (double)rc_sprite[spr_id].physics.body->GetPosition().y;
|
||||
double off_x = rc_sprite[spr_id].physics.offset_x;
|
||||
double off_y = rc_sprite[spr_id].physics.offset_y;
|
||||
|
||||
*x = (double)rc_sprite[spr_id].physics.body->GetPosition().x - off_x;
|
||||
*y = (double)rc_sprite[spr_id].physics.body->GetPosition().y - off_y;
|
||||
}
|
||||
|
||||
double rc_spriteX(int spr_id)
|
||||
@@ -550,7 +555,9 @@ double rc_spriteX(int spr_id)
|
||||
if(!rc_sprite[spr_id].active)
|
||||
return 0;
|
||||
|
||||
return (double)rc_sprite[spr_id].physics.body->GetPosition().x;
|
||||
double off_x = rc_sprite[spr_id].physics.offset_x;
|
||||
|
||||
return (double)rc_sprite[spr_id].physics.body->GetPosition().x - off_x;
|
||||
}
|
||||
|
||||
double rc_spriteY(int spr_id)
|
||||
@@ -561,7 +568,9 @@ double rc_spriteY(int spr_id)
|
||||
if(!rc_sprite[spr_id].active)
|
||||
return 0;
|
||||
|
||||
return (double)rc_sprite[spr_id].physics.body->GetPosition().y;
|
||||
double off_y = rc_sprite[spr_id].physics.offset_y;
|
||||
|
||||
return (double)rc_sprite[spr_id].physics.body->GetPosition().y - off_y;
|
||||
}
|
||||
|
||||
void rc_setSpriteRotation(int spr_id, double angle)
|
||||
@@ -788,7 +797,6 @@ bool rc_spriteIsVisible(int spr_id)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-----------------------------------PHYSICS----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -843,13 +851,13 @@ void drawSprites(int canvas_id)
|
||||
continue;
|
||||
|
||||
physics_pos = sprite->physics.body->GetPosition();
|
||||
x = (int)physics_pos.x - offset_x;
|
||||
y = (int)physics_pos.y - offset_y;
|
||||
x = (int)(physics_pos.x - sprite->physics.offset_x) - offset_x;
|
||||
y = (int)(physics_pos.y - sprite->physics.offset_y) - offset_y;
|
||||
|
||||
int xf = x + sprite->frame_size.Width;
|
||||
int yf = y + sprite->frame_size.Height;
|
||||
|
||||
//std::cout << "sprite info: " << xf << ", " << x << ", " << rc_canvas[canvas_id].viewport.dimension.Width << std::endl;
|
||||
//std::cout << "sprite info[" << spr_index << "]: (" << x << ", " << y << ") (" << xf << ", " << yf << ")" << std::endl;
|
||||
|
||||
if( (xf < 0) || (x > ((int)rc_canvas[canvas_id].viewport.dimension.Width)) )
|
||||
{
|
||||
|
||||
@@ -73,18 +73,31 @@
|
||||
<Unit filename="gui_freetype_font.cpp" />
|
||||
<Unit filename="gui_freetype_font.h" />
|
||||
<Unit filename="main.cpp" />
|
||||
<Unit filename="rc_actor_animation.h" />
|
||||
<Unit filename="rc_actor_material.h" />
|
||||
<Unit filename="rc_actor_physics.h" />
|
||||
<Unit filename="rc_audio.h" />
|
||||
<Unit filename="rc_base_actor.h" />
|
||||
<Unit filename="rc_camera.h" />
|
||||
<Unit filename="rc_constraint.h" />
|
||||
<Unit filename="rc_defines.h" />
|
||||
<Unit filename="rc_font.h" />
|
||||
<Unit filename="rc_func130_cases.h" />
|
||||
<Unit filename="rc_geometry.h" />
|
||||
<Unit filename="rc_gfx.h" />
|
||||
<Unit filename="rc_gfx3D.h" />
|
||||
<Unit filename="rc_gfx_core.h" />
|
||||
<Unit filename="rc_joints.h" />
|
||||
<Unit filename="rc_matrix.h" />
|
||||
<Unit filename="rc_media.h" />
|
||||
<Unit filename="rc_mesh.h" />
|
||||
<Unit filename="rc_net.h" />
|
||||
<Unit filename="rc_os_defines.h" />
|
||||
<Unit filename="rc_particles.h" />
|
||||
<Unit filename="rc_physics3D_base.h" />
|
||||
<Unit filename="rc_scene.h" />
|
||||
<Unit filename="rc_sprite2D.h" />
|
||||
<Unit filename="rc_sprite_physics.h" />
|
||||
<Unit filename="rc_spritelib.h" />
|
||||
<Unit filename="rc_stdlib.h" />
|
||||
<Unit filename="rc_test.h" />
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,44 +2,79 @@
|
||||
<CodeBlocks_layout_file>
|
||||
<FileVersion major="1" minor="0" />
|
||||
<ActiveTarget name="Release" />
|
||||
<File name="camera.h" open="1" top="0" tabpos="22" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="rc_sprite_physics.h" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="0" />
|
||||
<Cursor1 position="9674" topLine="436" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_net.h" open="1" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="../../irrBullet/src/irrBulletcommon.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="924" topLine="6" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_net.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1339" topLine="12" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_stdlib.h" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="rc_func130_cases.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="20548" topLine="882" />
|
||||
<Cursor1 position="50816" topLine="1359" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_spritelib.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="21830" topLine="918" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_audio.h" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6531" topLine="311" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_actor_material.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2143" topLine="318" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="gui_freetype_font.cpp" open="0" top="0" tabpos="24" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="792" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_defines.h" open="1" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="113947" topLine="1753" />
|
||||
<Cursor1 position="190390" topLine="2844" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="main.cpp" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="rc_actor_animation.h" open="1" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="396" topLine="8" />
|
||||
<Cursor1 position="3250" topLine="93" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="gui_freetype_font.cpp" open="1" top="0" tabpos="24" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="gui_freetype_font.h" open="0" top="0" tabpos="23" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4946" topLine="0" />
|
||||
<Cursor1 position="183" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_video.h" open="1" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="rc_gfx_core.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="0" />
|
||||
<Cursor1 position="31644" topLine="927" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_audio.h" open="1" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="rc_tilemap.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6531" topLine="311" />
|
||||
<Cursor1 position="243" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_sprite2D.h" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1444" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_matrix.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="116" topLine="3" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_media.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
@@ -47,9 +82,54 @@
|
||||
<Cursor1 position="17752" topLine="630" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_gfx.h" open="1" top="1" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="../../irrBullet/src/irrBullet.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="91126" topLine="3193" />
|
||||
<Cursor1 position="0" topLine="7" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_os_defines.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="292" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_geometry.h" open="0" top="0" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="20919" topLine="652" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="main.cpp" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="133376" topLine="4431" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_base_actor.h" open="1" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="9392" topLine="296" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_gfx3D.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="583" topLine="15" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_video.h" open="0" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_test.h" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="115" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="camera.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="261" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_gfx.h" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="54930" topLine="2196" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../irrBullet/src/irrBulletWorld.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
@@ -57,54 +137,19 @@
|
||||
<Cursor1 position="2750" topLine="75" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_gfx_core.h" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="rc_physics3D_base.h" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="80" topLine="0" />
|
||||
<Cursor1 position="785" topLine="19" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_geometry.h" open="1" top="0" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="rc_actor_physics.h" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="20919" topLine="653" />
|
||||
<Cursor1 position="0" topLine="668" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_matrix.h" open="1" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="rc_stdlib.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="16042" topLine="586" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="gui_freetype_font.h" open="1" top="0" tabpos="23" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="183" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_func130_cases.h" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="52186" topLine="1376" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_os_defines.h" open="1" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="67" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../irrBullet/src/irrBullet.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="7" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_test.h" open="1" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="115" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_gfx3D.h" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="74" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_sprite2D.h" open="1" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="501" topLine="0" />
|
||||
<Cursor1 position="24553" topLine="1081" />
|
||||
</Cursor>
|
||||
</File>
|
||||
</CodeBlocks_layout_file>
|
||||
|
||||
Reference in New Issue
Block a user