Revision: 1641
          http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=1641&view=rev
Author:   rorthomas
Date:     2011-02-03 02:14:34 +0000 (Thu, 03 Feb 2011)

Log Message:
-----------
fixed spawning bug in lua
added DOF option to configurator

Modified Paths:
--------------
    trunk/bin/resources/scripts.zip
    trunk/source/configurator/configurator.cpp
    trunk/source/main/collisions.cpp
    trunk/source/main/collisions.h
    trunk/source/main/luasystem.cpp
    trunk/source/main/luasystem.h

Modified: trunk/bin/resources/scripts.zip
===================================================================
(Binary files differ)

Modified: trunk/source/configurator/configurator.cpp
===================================================================
--- trunk/source/configurator/configurator.cpp  2011-02-03 01:41:22 UTC (rev 
1640)
+++ trunk/source/configurator/configurator.cpp  2011-02-03 02:14:34 UTC (rev 
1641)
@@ -303,6 +303,7 @@
        wxCheckBox *sunburn;
        wxCheckBox *hdr;
        wxCheckBox *glow;
+       wxCheckBox *dof;
        wxCheckBox *mblur;
        wxCheckBox *skidmarks;
        wxCheckBox *creaksound;
@@ -1803,6 +1804,9 @@
        y+=15;
        glow=new wxCheckBox(graphicsPanel, -1, _("Glow"), wxPoint(x_row1, y));
        glow->SetToolTip(_("Adds a glow effect to lights"));
+       
+       dof=new wxCheckBox(graphicsPanel, -1, _("DOF"), wxPoint(x_row2, y));
+       dof->SetToolTip(_("Adds a nice Depth of field effect to the scene."));
        y+=25;
 
        dText = new wxStaticText(graphicsPanel, -1, _("Screenshot Format:"), 
wxPoint(10, y));
@@ -2449,6 +2453,7 @@
        //wxCheckBox *hdr;
        hdr->SetValue(false);
        glow->SetValue(false);
+       dof->SetValue(false);
        //wxCheckBox *mblur;
        mblur->SetValue(false);
        skidmarks->SetValue(false);
@@ -2512,6 +2517,7 @@
        settings["Sunburn"] = (sunburn->GetValue()) ? "Yes" : "No";
        settings["HDR"] = (hdr->GetValue()) ? "Yes" : "No";
        settings["Glow"] = (glow->GetValue()) ? "Yes" : "No";
+       settings["DOF"] = (dof->GetValue()) ? "Yes" : "No";
        settings["Motion blur"] = (mblur->GetValue()) ? "Yes" : "No";
        settings["Skidmarks"] = (skidmarks->GetValue()) ? "Yes" : "No";
        settings["Creak Sound"] = (creaksound->GetValue()) ? "No" : "Yes";
@@ -2603,6 +2609,7 @@
        st = settings["Sunburn"]; if (st.length()>0) 
sunburn->SetValue(st=="Yes");
        st = settings["HDR"]; if (st.length()>0) hdr->SetValue(st=="Yes");
        st = settings["Glow"]; if (st.length()>0) glow->SetValue(st=="Yes");
+       st = settings["DOF"]; if (st.length()>0) dof->SetValue(st=="Yes");
        st = settings["Motion blur"]; if (st.length()>0) 
mblur->SetValue(st=="Yes");
        st = settings["Skidmarks"]; if (st.length()>0) 
skidmarks->SetValue(st=="Yes");
        st = settings["3D Sound renderer"]; if (st.length()>0) 
sound->SetStringSelection(conv(st));

Modified: trunk/source/main/collisions.cpp
===================================================================
--- trunk/source/main/collisions.cpp    2011-02-03 01:41:22 UTC (rev 1640)
+++ trunk/source/main/collisions.cpp    2011-02-03 02:14:34 UTC (rev 1641)
@@ -740,6 +740,12 @@
        }
        return handled;
 }
+
+void Collisions::clearEventCache()
+{
+       last_called_cbox = 0;
+}
+
 bool Collisions::collisionCorrect(Vector3 *refpos)
 {
        //find the correct cell

Modified: trunk/source/main/collisions.h
===================================================================
--- trunk/source/main/collisions.h      2011-02-03 01:41:22 UTC (rev 1640)
+++ trunk/source/main/collisions.h      2011-02-03 02:14:34 UTC (rev 1641)
@@ -157,6 +157,8 @@
 
        eventsource_t *getEvent(int eventID) { return &eventsources[eventID]; };
 
+       void clearEventCache();
+
        Collisions() {}; // for wrapper, DO NOT USE!
 
   Collisions(

Modified: trunk/source/main/luasystem.cpp
===================================================================
--- trunk/source/main/luasystem.cpp     2011-02-03 01:41:22 UTC (rev 1640)
+++ trunk/source/main/luasystem.cpp     2011-02-03 02:14:34 UTC (rev 1641)
@@ -48,6 +48,7 @@
 static int SLUAspawnBeam(lua_State *lua) {return luaInstance->spawnBeam(lua);}
 static int SLUApointArrow(lua_State *lua) {return 
luaInstance->pointArrow(lua);}
 static int SLUAstopTimer(lua_State *lua) {return luaInstance->stopTimer(lua);}
+static int SLUAclearEvents(lua_State *lua) {return 
luaInstance->clearEvents(lua);}
 static int SLUAstartTimer(lua_State *lua) {return 
luaInstance->startTimer(lua);}
 static int SLUAgetInterfaceVersion(lua_State *lua) {return 
luaInstance->getVersion(lua);}
 static int SLUAgetSetting(lua_State *lua) {return 
luaInstance->getSetting(lua);}
@@ -259,6 +260,8 @@
        lua_setglobal (L, "pointArrow");
        lua_pushcclosure (L, SLUAstopTimer, 0);
        lua_setglobal (L, "stopTimer");
+       lua_pushcclosure (L, SLUAclearEvents, 0);
+       lua_setglobal (L, "clearEvents");
        lua_pushcclosure (L, SLUAstartTimer, 0);
        lua_setglobal (L, "startTimer");
        lua_pushcclosure (L, SLUAgetSetting, 0);
@@ -281,6 +284,12 @@
        return 0;
 }
 
+int LuaSystem::clearEvents(lua_State *lua)
+{
+       mefl->getCollisions()->clearEventCache();
+       return 0;
+}
+
 int LuaSystem::unregisterCallBack(lua_State *lua)
 {
        const char *type = lua_tostring (lua, 1);

Modified: trunk/source/main/luasystem.h
===================================================================
--- trunk/source/main/luasystem.h       2011-02-03 01:41:22 UTC (rev 1640)
+++ trunk/source/main/luasystem.h       2011-02-03 02:14:34 UTC (rev 1641)
@@ -65,6 +65,7 @@
        int flashMessage(lua_State *lua);
        int log(lua_State *lua);
        int showChooser(lua_State *lua);
+       int clearEvents(lua_State *lua);
        int repairVehicle(lua_State *lua);
        int removeVehicle(lua_State *lua);
        int getTime(lua_State *lua);


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Rigsofrods-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel

Reply via email to