Compare commits
9 Commits
RCBasic4-A
...
RCBasic4-A
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
adec3d0039 | ||
|
|
917a2a10eb | ||
|
|
26f89808ba | ||
|
|
a2363aa63a | ||
|
|
d79a8f9602 | ||
|
|
b56f0185cf | ||
|
|
f3c49b8a8b | ||
|
|
33ece2b755 | ||
|
|
5048597745 |
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
|
||||
|
||||
@@ -85,8 +85,6 @@ ul, #myUL {
|
||||
|
||||
<li><a href="input.html" target="main">Input$</a></li>
|
||||
|
||||
<li><a href="tst.html" target="main">tst</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -1149,7 +1147,7 @@ ul, #myUL {
|
||||
|
||||
<li><a href="readinput_stop.html" target="main">ReadInput_Stop</a></li>
|
||||
|
||||
<li><a href="readinput_text.html" target="main">ReadInput_Text$</a></li>
|
||||
<li><a href="readinput_gettext.html" target="main">ReadInput_GetText$</a></li>
|
||||
|
||||
<li><a href="readinput_settext.html" target="main">ReadInput_SetText</a></li>
|
||||
|
||||
|
||||
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$()
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
,n00b,fedora,15.11.2024 20:29,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 )
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
sub Fprint(txt$)
|
||||
function Input$(prompt$)
|
||||
sub tst()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
sub ReadInput_Start()
|
||||
sub ReadInput_Stop()
|
||||
function ReadInput_Text$()
|
||||
function ReadInput_GetText$()
|
||||
sub ReadInput_SetText(txt$)
|
||||
sub ReadInput_ToggleBackspace(flag)
|
||||
|
||||
@@ -919,9 +919,11 @@ int main(int argc, char * argv[])
|
||||
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);
|
||||
@@ -1534,6 +1533,8 @@ void init_embedded_functions()
|
||||
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);
|
||||
|
||||
@@ -1015,6 +1015,7 @@ 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
|
||||
|
||||
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);
|
||||
@@ -1528,6 +1527,8 @@ 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);
|
||||
|
||||
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$ );
|
||||
@@ -1613,6 +1610,9 @@ case FN_GetSpriteRestitution: //Number Function
|
||||
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;
|
||||
|
||||
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
|
||||
@@ -40,35 +40,36 @@ 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/..
|
||||
|
||||
em++ main.cpp \
|
||||
theoraplay.c \
|
||||
gui_freetype_font.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletBoxShape.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletBvhTriangleMeshShape.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletCapsuleShape.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletCollisionCallBackInformation.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletCollisionObjectAffectorAttract.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletCollisionObjectAffector.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletCollisionObjectAffectorDelete.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletCollisionObject.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletCollisionShape.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletcommon.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletConeShape.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletConvexHullShape.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBullet.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletCylinderShape.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletGhostObject.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletGImpactMeshShape.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletLiquidBody.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletMotionState.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletPhysicsDebug.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletRayCastVehicle.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletRigidBody.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletSoftBody.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletSphereShape.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletTriangleMeshShape.cpp \
|
||||
$IRR_BULLET_SRC_DIR/irrBulletWorld.cpp \
|
||||
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" \
|
||||
@@ -96,7 +97,7 @@ em++ main.cpp \
|
||||
-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 -o "$OUT_HTML" --preload-file $PROG_LOCATION@ -O3 -s ASYNCIFY -s SDL2_IMAGE_FORMATS='["bmp","png","xpm"]' --use-preload-plugins -s TOTAL_MEMORY=134217728 -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=1073741824
|
||||
-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 \
|
||||
|
||||
@@ -4442,10 +4442,22 @@ int main(int argc, char * argv[])
|
||||
|
||||
//ogles2 test
|
||||
#ifdef RC_TESTING
|
||||
rc_intern_dirChange("/home/n00b/projects/rcbasic_alpha3/test_project");
|
||||
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
|
||||
rc_filename = "main.cbc";
|
||||
//---------------
|
||||
//---------------
|
||||
|
||||
if( rc_filename.compare("")==0 )
|
||||
rc_filename = "main.cbc";
|
||||
|
||||
if(rcbasic_load(rc_filename))
|
||||
{
|
||||
|
||||
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$ );
|
||||
@@ -1613,6 +1610,9 @@ case FN_GetSpriteRestitution: //Number Function
|
||||
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;
|
||||
|
||||
@@ -868,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)
|
||||
@@ -962,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_active_canvas = canvas_id;
|
||||
rc_setActiveCanvas(rc_active_canvas);
|
||||
}
|
||||
|
||||
for(int i = 0; i < rc_canvas_zOrder.size(); i++)
|
||||
{
|
||||
@@ -1052,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)
|
||||
VideoDriver->clearBuffers(true, true, true, rc_clear_color);
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1381,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;
|
||||
}
|
||||
@@ -1393,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;
|
||||
|
||||
@@ -1409,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;
|
||||
}
|
||||
|
||||
@@ -1438,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
|
||||
@@ -1476,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)
|
||||
{
|
||||
@@ -1542,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);
|
||||
}
|
||||
@@ -1566,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);
|
||||
}
|
||||
|
||||
@@ -1573,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);
|
||||
@@ -1593,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)
|
||||
@@ -2167,7 +2190,7 @@ void rc_readInput_Stop()
|
||||
SDL_StopTextInput();
|
||||
}
|
||||
|
||||
std::string rc_readInput_Text()
|
||||
std::string rc_readInput_GetText()
|
||||
{
|
||||
return rc_textinput_string;
|
||||
}
|
||||
@@ -2314,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()
|
||||
@@ -2361,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()
|
||||
|
||||
@@ -738,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())
|
||||
@@ -826,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 )
|
||||
@@ -916,6 +940,8 @@ 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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define RC_OS_DEFINES_H_INCLUDED
|
||||
|
||||
//USED FOR TESTING ONLY
|
||||
#define RC_TESTING
|
||||
//#define RC_TESTING
|
||||
|
||||
//I am checking Android first since I think it also defines __linux__
|
||||
|
||||
|
||||
@@ -447,6 +447,17 @@ void rc_setSpriteRestitutionThreshold( int spr_id, double threshold )
|
||||
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())
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# depslib dependency file v1.0
|
||||
1731729523 source:/home/n00b/Projects/RCBASIC4/rcbasic_runtime/main.cpp
|
||||
1732450472 source:/home/n00b/Projects/RCBASIC4/rcbasic_runtime/main.cpp
|
||||
"rc_os_defines.h"
|
||||
<emscripten.h>
|
||||
<sys/param.h>
|
||||
@@ -32,10 +32,10 @@
|
||||
<irrtheora.h>
|
||||
"rc_func130_cases.h"
|
||||
|
||||
1731728855 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_os_defines.h
|
||||
1732450897 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_os_defines.h
|
||||
<TargetConditionals.h>
|
||||
|
||||
1731722537 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_defines.h
|
||||
1732393499 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_defines.h
|
||||
|
||||
1730291453 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_stdlib.h
|
||||
"rc_os_defines.h"
|
||||
@@ -1247,7 +1247,7 @@
|
||||
1727545973 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/RealisticWater.h
|
||||
<irrlicht.h>
|
||||
|
||||
1731729912 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_gfx.h
|
||||
1732450927 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_gfx.h
|
||||
"SDL.h"
|
||||
<SDL2/SDL.h>
|
||||
<irrlicht.h>
|
||||
@@ -1271,7 +1271,7 @@
|
||||
"rc_joints.h"
|
||||
<irrtheora.h>
|
||||
|
||||
1731727404 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_gfx_core.h
|
||||
1732372339 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_gfx_core.h
|
||||
"SDL.h"
|
||||
"btBulletDynamicsCommon.h"
|
||||
"BulletSoftBody/btSoftRigidDynamicsWorld.h"
|
||||
@@ -2272,7 +2272,7 @@
|
||||
"rc_gfx_core.h"
|
||||
<irrtheora.h>
|
||||
|
||||
1731722537 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_func130_cases.h
|
||||
1732393499 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_func130_cases.h
|
||||
|
||||
1724469097 source:/home/n00b/Projects/irrBullet/src/irrBullet.cpp
|
||||
"irrBullet.h"
|
||||
@@ -2505,7 +2505,7 @@
|
||||
<irrlicht.h>
|
||||
<vector>
|
||||
|
||||
1731722537 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_sprite_physics.h
|
||||
1731903210 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_sprite_physics.h
|
||||
"rc_sprite2D.h"
|
||||
|
||||
1730291453 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_joints.h
|
||||
|
||||
@@ -2,29 +2,9 @@
|
||||
<CodeBlocks_layout_file>
|
||||
<FileVersion major="1" minor="0" />
|
||||
<ActiveTarget name="Release" />
|
||||
<File name="rc_net.h" open="0" top="0" tabpos="13" 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="1339" topLine="12" />
|
||||
</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">
|
||||
<Cursor>
|
||||
<Cursor1 position="2750" topLine="75" />
|
||||
</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="21" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_spritelib.h" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="8770" topLine="54" />
|
||||
</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">
|
||||
<Cursor>
|
||||
<Cursor1 position="17752" topLine="630" />
|
||||
<Cursor1 position="9674" topLine="436" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="../../irrBullet/src/irrBulletcommon.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
@@ -32,19 +12,19 @@
|
||||
<Cursor1 position="924" topLine="6" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_gfx_core.h" open="1" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<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="22725" topLine="825" />
|
||||
<Cursor1 position="1339" topLine="12" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_defines.h" open="0" top="0" tabpos="16" 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="113947" topLine="2998" />
|
||||
<Cursor1 position="50816" topLine="1359" />
|
||||
</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">
|
||||
<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="115" topLine="0" />
|
||||
<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">
|
||||
@@ -52,14 +32,24 @@
|
||||
<Cursor1 position="6531" topLine="311" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_matrix.h" open="1" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<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="116" topLine="3" />
|
||||
<Cursor1 position="2143" topLine="318" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_stdlib.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<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="24553" topLine="1081" />
|
||||
<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="190390" topLine="2844" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<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="3250" topLine="93" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="gui_freetype_font.h" open="0" top="0" tabpos="23" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
@@ -67,59 +57,9 @@
|
||||
<Cursor1 position="183" 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">
|
||||
<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="7" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_gfx.h" open="1" top="1" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="99487" topLine="3515" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_func130_cases.h" open="1" top="0" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="12494" topLine="362" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_actor_animation.h" open="1" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3353" topLine="183" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_os_defines.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="107" 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="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="4946" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="main.cpp" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="74" topLine="3" />
|
||||
</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_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_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" />
|
||||
<Cursor1 position="31644" topLine="927" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="rc_tilemap.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
@@ -127,4 +67,89 @@
|
||||
<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">
|
||||
<Cursor>
|
||||
<Cursor1 position="17752" topLine="630" />
|
||||
</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_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">
|
||||
<Cursor>
|
||||
<Cursor1 position="2750" topLine="75" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<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="785" topLine="19" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<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="0" topLine="668" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<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="24553" topLine="1081" />
|
||||
</Cursor>
|
||||
</File>
|
||||
</CodeBlocks_layout_file>
|
||||
|
||||
Reference in New Issue
Block a user