Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-12-20 21:32:51 +0000
committerStijn Buys <ingar@osirion.org>2008-12-20 21:32:51 +0000
commitda4b99de2cf290ccdd22587a8c50aeeadd5ac957 (patch)
treebe6f4f215bfb104833fbb69051d5ced6e1263ba6 /src/render/render.cc
parent988d88a366329d99794e9271b648dccef451efbc (diff)
single file particle scripts
Diffstat (limited to 'src/render/render.cc')
-rw-r--r--src/render/render.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/render/render.cc b/src/render/render.cc
index 1abd197..dcede48 100644
--- a/src/render/render.cc
+++ b/src/render/render.cc
@@ -37,6 +37,11 @@ void func_list_textures(std::string const &args)
Textures::list();
}
+void func_list_particles(std::string const &args)
+{
+ ParticleScript::list();
+}
+
void init(int width, int height)
{
con_print << "^BInitializing renderer..." << std::endl;
@@ -56,8 +61,6 @@ void init(int width, int height)
Dust::init();
- ParticleScript::init();
-
// size of the vertex array in megabytes
r_arraysize = core::Cvar::get("r_arraysize", 0.0f , core::Cvar::Archive);
r_arraysize->set_info("[int] size of the vertex array in Mb");
@@ -95,6 +98,9 @@ void init(int width, int height)
// engine functions
core::Func *func = core::Func::add("list_textures", func_list_textures);
func->set_info("list loaded textures");
+
+ func = core::Func::add("list_particles", func_list_particles);
+ func->set_info("list loaded particle scripts");
}
// unload game assets (zone change)
@@ -177,8 +183,6 @@ void reset()
Textures::init();
- ParticleScript::init();
-
size_t mb = (size_t) r_arraysize->value();
if (mb < 4 * sizeof(float))
mb = 4 * sizeof(float);
@@ -199,6 +203,7 @@ void shutdown()
{
con_print << "^BShutting down renderer..." << std::endl;
+ core::Func::remove("list_particles");
core::Func::remove("list_textures");
clear();