Different building process.
This commit is contained in:
parent
75e46bc0ab
commit
002071cef4
4
.gitignore
vendored
4
.gitignore
vendored
@ -4,5 +4,5 @@ CMakeCache.txt
|
||||
cmake_install.cmake
|
||||
Makefile
|
||||
|
||||
# Ignore binary files
|
||||
bin/
|
||||
# Ignore the binary
|
||||
CastleTour
|
||||
|
@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 2.6)
|
||||
project(CastleTour)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-Wall -g")
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake_modules)
|
||||
|
||||
find_package(Irrlicht)
|
||||
@ -15,7 +14,7 @@ include_directories(
|
||||
)
|
||||
|
||||
file(GLOB SRCS src/*.cpp)
|
||||
file(GLOB HDRS src/*.h)
|
||||
file(GLOB HDRS src/*.hpp)
|
||||
|
||||
include_directories(${IRRLICHT_INCLUDE_DIR})
|
||||
|
||||
|
@ -6,10 +6,11 @@ This repo is a combination of a few Irrlicht tutorials.
|
||||
### Compiling
|
||||
This project uses [CMake](http://www.cmake.org/) and has only been tested on a 32-bit Linux computer. To compile this code install Irrlicht (from the repos) and all other necessary libraries (such as OpenGL) and run the following commands:
|
||||
```bash
|
||||
$ cmake .
|
||||
$ cd build/
|
||||
$ cmake ..
|
||||
$ make
|
||||
```
|
||||
This should compile the code and you should find a binary in a directory called `bin`. You should be able to run this project from there.
|
||||
Then, in order to run, use the script [castle-tour.sh](/castle-tour.sh) located in the root directory.
|
||||
|
||||
### License
|
||||
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.
|
||||
|
0
build/.keep
Normal file
0
build/.keep
Normal file
2
castle-tour.sh
Executable file
2
castle-tour.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
./build/CastleTour
|
@ -1,4 +1,4 @@
|
||||
#include "eventReceiver.h"
|
||||
#include "EventReceiver.hpp"
|
||||
|
||||
// Initialize
|
||||
EventReceiver::EventReceiver() {
|
@ -1,7 +1,7 @@
|
||||
#include <iostream>
|
||||
#include <irrlicht/irrlicht.h>
|
||||
#include <irrlicht/driverChoice.h>
|
||||
#include "eventReceiver.h"
|
||||
#include "EventReceiver.hpp"
|
||||
|
||||
using namespace irr;
|
||||
|
||||
@ -14,7 +14,7 @@ int main() {
|
||||
EventReceiver eventReceiver;
|
||||
|
||||
// Create the device we'll be using
|
||||
IrrlichtDevice *device = createDevice(driverType, core::dimension2d<u32>(1280, 720), 32, false, false, false, &eventReceiver);
|
||||
IrrlichtDevice *device = createDevice(driverType, core::dimension2d<u32>(800, 600), 32, false, false, false, &eventReceiver);
|
||||
if(device == 0) return 1;
|
||||
|
||||
// Create other variables we'll need
|
||||
@ -26,7 +26,7 @@ int main() {
|
||||
guienv->addStaticText(L"Use WASD to move\nUse SPACE to jump\nUse R to reset\nUse ESC or Q to exit", core::rect<s32>(30, 30, 120, 72), false, false, 0, -1, true);
|
||||
|
||||
// Load map
|
||||
device->getFileSystem()->addFileArchive("../assets/map-20kdm2.pk3");
|
||||
device->getFileSystem()->addFileArchive("assets/map-20kdm2.pk3");
|
||||
scene::IAnimatedMesh *mapmesh = smgr->getMesh("20kdm2.bsp");
|
||||
scene::IMeshSceneNode *mapnode = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user