[from now] 2013/05/23 19:03:26

diff --git a/fang.opensdf b/fang.opensdf
new file mode 100755
index 0000000..36c146e
Binary files /dev/null and b/fang.opensdf differ
diff --git a/fang.sdf b/fang.sdf
index 662295b..ad5ee4c 100755
Binary files a/fang.sdf and b/fang.sdf differ
diff --git a/fang.vcxproj b/fang.vcxproj
index a1f79e6..cbaccb7 100755
--- a/fang.vcxproj
+++ b/fang.vcxproj
@@ -51,6 +51,9 @@
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
+    <PreBuildEvent>
+      <Command>make</Command>
+    </PreBuildEvent>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
diff --git a/main.cpp b/main.cpp
old mode 100755
new mode 100644
index 85e7cad..9dbb0aa
--- a/main.cpp
+++ b/main.cpp
@@ -16,60 +16,52 @@ using namespace video;
 using namespace io;
 using namespace gui;

-int main()
+int main()
 {
-	IrrlichtDevice *device = createDevice(video::EDT_OPENGL, dimension2d<u32>(640, 480), 16, false, false, false, 0);
-
-	if (!device)
-		return 1;
-
-	IVideoDriver* driver = device->getVideoDriver();
-	ISceneManager* smgr = device->getSceneManager();
-	IGUIEnvironment* guienv = device->getGUIEnvironment();
-
-	guienv->addStaticText(L"Hello World! This is the Irrlicht Software renderer!", rect<s32>(10,10,260,22), true);
-
-	device->getFileSystem()->addFileArchive("./map-20kdm2.pk3");
-	scene::IAnimatedMesh* mesh = smgr->getMesh("20kdm2.bsp");
-	scene::ISceneNode* node = 0;
-
-	if (mesh)
-		node = smgr->addOctreeSceneNode(mesh->getMesh(0), 0, -1, 1024);
-
-    if (node)
-        node->setPosition(core::vector3df(-1300,-144,-1249));
-
-	smgr->addCameraSceneNodeFPS();
-	device->getCursorControl()->setVisible(false);
-
-	int lastFPS = -1;
-
-	while(device->run())
-	{
-		if (device->isWindowActive())
-		{
-			driver->beginScene(true, true, video::SColor(255,200,200,200));
-			smgr->drawAll();
-			guienv->drawAll();
-			driver->endScene();
-
-			int fps = driver->getFPS();
-
-			if (lastFPS != fps)
-			{
-				core::stringw str = L"Irrlicht Engine - Quake 3 Map example [";
-				str += driver->getName();
-				str += "] FPS:";
-				str += fps;
-
-				device->setWindowCaption(str.c_str());
-				lastFPS = fps;
-			}
-		}
-		else
-			device->yield();
-	}
-	device->drop();
-
-	return 0;
+    IrrlichtDevice *device = createDevice(video::EDT_OPENGL, dimension2d <u32>(640, 480), 16, false, false, false, 0);
+
+    if (!device) return 1;
+
+    IVideoDriver    *driver = device->getVideoDriver();
+    ISceneManager   *smgr   = device->getSceneManager();
+    IGUIEnvironment *guienv = device->getGUIEnvironment();
+
+    guienv->addStaticText(L"Hello World! This is the Irrlicht Software renderer!", rect <s32>(10, 10, 260, 22), true);
+
+    device->getFileSystem()->addFileArchive("./map-20kdm2.pk3");
+    scene::IAnimatedMesh *mesh = smgr->getMesh("20kdm2.bsp");
+    scene::ISceneNode    *node = 0;
+
+    if (mesh) node = smgr->addOctreeSceneNode(mesh->getMesh(0), 0, -1, 1024);
+
+    if (node) node->setPosition(core::vector3df(-1300, -144, -1249));
+
+    smgr->addCameraSceneNodeFPS();
+    device->getCursorControl()->setVisible(false);
+
+    int lastFPS = -1;
+
+    while (device->run()) {
+        if (device->isWindowActive()) {
+            driver->beginScene(true, true, video::SColor(255, 200, 200, 200));
+            smgr->drawAll();
+            guienv->drawAll();
+            driver->endScene();
+
+            int fps = driver->getFPS();
+
+            if (lastFPS != fps) {
+                core::stringw str = L"Irrlicht Engine - Quake 3 Map example [";
+                str += driver->getName();
+                str += "] FPS:";
+                str += fps;
+
+                device->setWindowCaption(str.c_str());
+                lastFPS = fps;
+            }
+        } else device->yield();
+    }
+    device->drop();
+
+    return 0;
 }
\ No newline at end of file