Updated text.

This commit is contained in:
Deathsbreed 2014-10-19 17:06:41 -05:00
parent 7401cfcd34
commit 01d7d61e4a
2 changed files with 8 additions and 7 deletions

View File

@ -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.

View File

@ -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<s32>(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<s32>(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));