fixed re-used canvas slot not being set

This commit is contained in:
n00b
2025-04-26 16:20:38 -04:00
parent 65a37690ef
commit 51c64fa857
3 changed files with 170 additions and 166 deletions

View File

@@ -1084,6 +1084,10 @@ int rc_canvasOpen(int w, int h, int vx, int vy, int vw, int vh, int mode, int ca
canvas_id = rc_canvas.size();
rc_canvas.push_back(canvas);
}
else
{
rc_canvas[canvas_id] = canvas;
}
if(rc_active_canvas < 0)
{

View File

@@ -2492,7 +2492,7 @@
<cmath>
<cstdint>
1742507800 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_spritelib.h
1744672115 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_spritelib.h
"SDL.h"
<SDL2/SDL.h>
"rc_sprite2D.h"

View File

@@ -2,110 +2,9 @@
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Debug" />
<File name="rc_sprite2D.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="CShader.h" open="1" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="111" topLine="0" />
</Cursor>
</File>
<File name="RealisticWater.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7671" topLine="204" />
</Cursor>
</File>
<File name="rc_scene.h" open="1" top="0" tabpos="24" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1298" topLine="28" />
</Cursor>
</File>
<File name="rc_constraint.h" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8391" topLine="231" />
</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="../../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_particles.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6262" topLine="615" />
</Cursor>
</File>
<File name="rc_gfx.h" open="1" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="62441" topLine="2461" />
</Cursor>
</File>
<File name="rc_matrix.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="116" topLine="804" />
</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="rc_os_defines.h" open="1" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="91" topLine="0" />
</Cursor>
</File>
<File name="rc_base_actor.h" open="1" top="0" tabpos="27" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="20658" topLine="779" />
</Cursor>
</File>
<File name="rc_fx_materials.h" open="1" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="16692" topLine="566" />
</Cursor>
<Folding>
<Collapse line="47" />
</Folding>
</File>
<File name="rc_mesh.h" open="1" top="0" tabpos="30" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3504" topLine="179" />
</Cursor>
</File>
<File name="rc_gfx_core.h" open="1" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="14625" topLine="417" />
</Cursor>
<Folding>
<Collapse line="85" />
</Folding>
</File>
<File name="rc_actor_material.h" open="1" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5301" topLine="744" />
</Cursor>
</File>
<File name="rc_sprite_physics.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="13990" topLine="0" />
</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="main.cpp" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="133403" topLine="4444" />
</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">
<Cursor>
<Cursor1 position="924" topLine="6" />
<Cursor1 position="2314" topLine="101" />
</Cursor>
</File>
<File name="rc_actor_animation.h" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@@ -113,64 +12,39 @@
<Cursor1 position="6134" topLine="75" />
</Cursor>
</File>
<File name="rc_defines.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<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="190390" topLine="2847" />
<Cursor1 position="115" topLine="0" />
</Cursor>
</File>
<File name="../../irrBullet/src/irrBulletCollisionObject.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="rc_constraint.h" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="384" />
<Cursor1 position="8391" topLine="231" />
</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">
<File name="RealisticWater.cpp" 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="7671" topLine="204" />
</Cursor>
</File>
<File name="rc_actor_physics.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="rc_mesh.h" open="1" top="0" tabpos="32" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
<Cursor1 position="3504" topLine="179" />
</Cursor>
</File>
<File name="rc_physics3D_base.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3283" topLine="66" />
</Cursor>
</File>
<File name="ProjectiveTextures.cpp" open="1" top="0" tabpos="29" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="ProjectiveTextures.cpp" open="1" top="0" tabpos="31" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="348" topLine="0" />
</Cursor>
</File>
<File name="rc_func130_cases.h" open="1" top="0" tabpos="26" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="134546" topLine="2964" />
</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">
<Cursor>
<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">
<Cursor>
<Cursor1 position="0" topLine="7" />
</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="3769" topLine="186" />
</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">
<Cursor>
<Cursor1 position="243" topLine="26" />
</Cursor>
</File>
<File name="rc_stdlib.h" open="1" top="0" tabpos="25" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="CShader.cpp" open="1" top="0" tabpos="22" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="24491" topLine="1074" />
<Cursor1 position="10120" topLine="352" />
</Cursor>
</File>
<File name="rc_gfx3D.h" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@@ -178,19 +52,24 @@
<Cursor1 position="565" topLine="0" />
</Cursor>
</File>
<File name="rc_spritelib.h" open="1" top="1" tabpos="31" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="rc_sprite_physics.h" open="1" top="0" tabpos="34" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="32398" topLine="1236" />
<Cursor1 position="316" topLine="0" />
</Cursor>
</File>
<File name="ProjectiveTextures.h" open="1" top="0" tabpos="28" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="rc_func130_cases.h" open="1" top="0" tabpos="28" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="110" topLine="0" />
<Cursor1 position="134546" topLine="2964" />
</Cursor>
</File>
<File name="rc_tilelib.h" open="0" top="0" tabpos="22" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="rc_particles.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3693" topLine="136" />
<Cursor1 position="6262" topLine="615" />
</Cursor>
</File>
<File name="rc_os_defines.h" open="1" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="91" topLine="0" />
</Cursor>
</File>
<File name="../../irrBullet/src/irrBulletRigidBody.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@@ -198,14 +77,47 @@
<Cursor1 position="2046" topLine="42" />
</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">
<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="169" topLine="6" />
<Cursor1 position="3769" topLine="186" />
</Cursor>
</File>
<File name="CShader.cpp" open="1" top="0" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="rc_gfx_core.h" open="1" top="0" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10120" topLine="352" />
<Cursor1 position="14625" topLine="417" />
</Cursor>
<Folding>
<Collapse line="85" />
</Folding>
</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="../../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_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="rc_matrix.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="116" topLine="804" />
</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_stdlib.h" open="1" top="0" tabpos="27" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="24491" topLine="1074" />
</Cursor>
</File>
<File name="rc_joints.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@@ -213,29 +125,39 @@
<Cursor1 position="310" topLine="0" />
</Cursor>
</File>
<File name="rc_windowclose.h" open="1" top="0" tabpos="22" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<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="18958" topLine="206" />
</Cursor>
<Folding>
<Collapse line="157" />
<Collapse line="492" />
<Collapse line="555" />
</Folding>
</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" />
<Cursor1 position="2750" topLine="75" />
</Cursor>
</File>
<File name="camera.h" open="1" top="0" tabpos="23" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="rc_defines.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4654" topLine="100" />
<Cursor1 position="190390" topLine="2847" />
</Cursor>
</File>
<File name="CShader.h" open="1" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="rc_spritelib.h" open="1" top="0" tabpos="33" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2314" topLine="101" />
<Cursor1 position="17594" topLine="1314" />
</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="169" topLine="6" />
</Cursor>
</File>
<File name="rc_physics3D_base.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3283" topLine="66" />
</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="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="183" topLine="0" />
</Cursor>
</File>
<File name="rc_font.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@@ -243,4 +165,82 @@
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="ProjectiveTextures.h" open="1" top="0" tabpos="30" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="110" topLine="0" />
</Cursor>
</File>
<File name="camera.h" open="1" top="0" tabpos="25" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4654" topLine="100" />
</Cursor>
</File>
<File name="../../irrBullet/src/irrBulletCollisionObject.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="384" />
</Cursor>
</File>
<File name="rc_base_actor.h" open="1" top="0" tabpos="29" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="20658" topLine="779" />
</Cursor>
</File>
<File name="rc_scene.h" open="1" top="0" tabpos="26" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1298" topLine="28" />
</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="rc_sprite2D.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="111" topLine="0" />
</Cursor>
</File>
<File name="rc_windowclose.h" open="1" top="1" tabpos="24" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3185" topLine="124" />
</Cursor>
<Folding>
<Collapse line="157" />
<Collapse line="492" />
<Collapse line="555" />
</Folding>
</File>
<File name="rc_fx_materials.h" open="1" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="16692" topLine="566" />
</Cursor>
<Folding>
<Collapse line="47" />
</Folding>
</File>
<File name="rc_actor_material.h" open="1" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5301" topLine="744" />
</Cursor>
</File>
<File name="rc_gfx.h" open="1" top="0" tabpos="23" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="64041" topLine="2545" />
</Cursor>
</File>
<File name="rc_tilelib.h" open="0" top="0" tabpos="22" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3693" topLine="136" />
</Cursor>
</File>
<File name="rc_actor_physics.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="main.cpp" open="1" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="133403" topLine="4444" />
</Cursor>
</File>
</CodeBlocks_layout_file>