Updated text.
This commit is contained in:
parent
7401cfcd34
commit
01d7d61e4a
@ -4,15 +4,14 @@ CastleTour
|
|||||||
This repo is a combination of a few Irrlicht tutorials.
|
This repo is a combination of a few Irrlicht tutorials.
|
||||||
|
|
||||||
### Compiling
|
### 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
|
$ make
|
||||||
```
|
```
|
||||||
The binary should be in the ```bin``` directory.
|
The binary should be in the ```bin``` directory.
|
||||||
|
|
||||||
### Contributing
|
### 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
|
### 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.
|
||||||
|
@ -25,7 +25,7 @@ int main() {
|
|||||||
scene::ISceneManager *smgr = device->getSceneManager();
|
scene::ISceneManager *smgr = device->getSceneManager();
|
||||||
gui::IGUIEnvironment *guienv = device->getGUIEnvironment();
|
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");
|
device->getFileSystem()->addFileArchive("../res/map-20kdm2.pk3");
|
||||||
scene::IAnimatedMesh *mapmesh = smgr->getMesh("20kdm2.bsp");
|
scene::IAnimatedMesh *mapmesh = smgr->getMesh("20kdm2.bsp");
|
||||||
@ -42,7 +42,7 @@ int main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Setup new keys
|
// Setup new keys
|
||||||
SKeyMap keyMap[5];
|
SKeyMap keyMap[6];
|
||||||
keyMap[0].Action = EKA_MOVE_FORWARD;
|
keyMap[0].Action = EKA_MOVE_FORWARD;
|
||||||
keyMap[0].KeyCode = KEY_KEY_W;
|
keyMap[0].KeyCode = KEY_KEY_W;
|
||||||
keyMap[1].Action = EKA_MOVE_BACKWARD;
|
keyMap[1].Action = EKA_MOVE_BACKWARD;
|
||||||
@ -53,8 +53,10 @@ int main() {
|
|||||||
keyMap[3].KeyCode = KEY_KEY_D;
|
keyMap[3].KeyCode = KEY_KEY_D;
|
||||||
keyMap[4].Action = EKA_JUMP_UP;
|
keyMap[4].Action = EKA_JUMP_UP;
|
||||||
keyMap[4].KeyCode = KEY_SPACE;
|
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->setPosition(core::vector3df(50, 50, -60));
|
||||||
cam->setTarget(core::vector3df(-70, 30, -60));
|
cam->setTarget(core::vector3df(-70, 30, -60));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user