From 01d7d61e4a973a614e15699c0ac0d257183d0422 Mon Sep 17 00:00:00 2001 From: Deathsbreed Date: Sun, 19 Oct 2014 17:06:41 -0500 Subject: [PATCH] Updated text. --- README.md | 7 +++---- src/main.cpp | 8 +++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d548c4a..7e56bc5 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,14 @@ CastleTour This repo is a combination of a few Irrlicht tutorials. ### Compiling -So far I'm using CMake (and only on Debian GNU/Linux). First, compile Irrlicht, move the include and library files to the [include directory](/include) and the [library directory](/libs) (make sure they are named ```libIrrlicht.so``` if you're running Linux and ```libIrrlicht.dll``` if you're running Windows). Then run the following commands from the root directory of the project: +The [Makefile](/Makefile) for this project is so far only for Debian Linux (it's all I can test it on). Please make sure you have all the necessary libraries, make sure that Irrlicht is in your _LD Path_, and also make sure you have the __clang++ compiler__ installed. Then, simply run the following: ``` -$ cmake . $ make ``` The binary should be in the ```bin``` directory. ### Contributing -Feel free to add. This is something I'm using to learn Irrlicht, and it would help if I had a better [CMakeLists](/CMakeLists.txt) file that could compile on multiple platforms. +Feel free to add. This is something I'm using to learn Irrlicht, and it would help if I had a better [Makefile](/Makefile) file that could compile on multiple platforms. ### License -Since this really isn't my code but Irrlicht code I placed it under the [Unlicense](/LICENSE), because kind of like a tutorial. +Since this really isn't my code but a combination of multiple Irrlicht tutorials, I have licensed this project under the [Unlicense](/LICENSE), because it's kind of like a tutorial. diff --git a/src/main.cpp b/src/main.cpp index 7f10ecd..4ec09e3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,7 +25,7 @@ int main() { scene::ISceneManager *smgr = device->getSceneManager(); gui::IGUIEnvironment *guienv = device->getGUIEnvironment(); - guienv->addStaticText(L"Press ESC to quit.", core::rect(10, 10, 150, 22), false, false, 0, -1, true); + guienv->addStaticText(L"Use WASD to move\nUse SPACE to jump\nUse Left Shift to crouch\nUse ESC to exit", core::rect(30, 30, 120, 75), false, false, 0, -1, true); device->getFileSystem()->addFileArchive("../res/map-20kdm2.pk3"); scene::IAnimatedMesh *mapmesh = smgr->getMesh("20kdm2.bsp"); @@ -42,7 +42,7 @@ int main() { } // Setup new keys - SKeyMap keyMap[5]; + SKeyMap keyMap[6]; keyMap[0].Action = EKA_MOVE_FORWARD; keyMap[0].KeyCode = KEY_KEY_W; keyMap[1].Action = EKA_MOVE_BACKWARD; @@ -53,8 +53,10 @@ int main() { keyMap[3].KeyCode = KEY_KEY_D; keyMap[4].Action = EKA_JUMP_UP; keyMap[4].KeyCode = KEY_SPACE; + keyMap[5].Action = EKA_CROUCH; + keyMap[5].KeyCode = KEY_LSHIFT; - scene::ICameraSceneNode *cam = smgr->addCameraSceneNodeFPS(0, 100.0f, .3f, ID_IsNotPickable, keyMap, 5, true, 3.0f); + scene::ICameraSceneNode *cam = smgr->addCameraSceneNodeFPS(0, 100.0f, .3f, ID_IsNotPickable, keyMap, 6, true, 3.0f); cam->setPosition(core::vector3df(50, 50, -60)); cam->setTarget(core::vector3df(-70, 30, -60));