Improved Makefile (and reset just in case you fall off the map).
This commit is contained in:
parent
320458ead7
commit
9f1ce610d0
12
Makefile
12
Makefile
@ -8,11 +8,15 @@ MV=mv
|
|||||||
MKDIR=mkdir -p
|
MKDIR=mkdir -p
|
||||||
RM=rm -rf
|
RM=rm -rf
|
||||||
|
|
||||||
main:
|
SRC_FILES := $(wildcard src/*.cpp)
|
||||||
|
OBJ_FILES := $(addprefix src/, $(notdir $(SRC_FILES:.cpp=.o)))
|
||||||
|
|
||||||
|
all: $(OBJ_FILES)
|
||||||
$(MKDIR) bin
|
$(MKDIR) bin
|
||||||
$(CXX) $(INCLUDES) -c -o src/main.o src/main.cpp
|
$(CXX) $(CXXFLAGS) $(LIBS) -o bin/castletour src/*.o
|
||||||
$(CXX) $(INCLUDES) -c -o src/eventReceiver.o src/eventReceiver.cpp
|
|
||||||
$(CXX) $(LIBS) -o bin/castletour src/*.o
|
src/%.o: src/%.cpp
|
||||||
|
$(CXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) src/*.o
|
$(RM) src/*.o
|
||||||
|
@ -23,7 +23,7 @@ int main() {
|
|||||||
gui::IGUIEnvironment *guienv = device->getGUIEnvironment();
|
gui::IGUIEnvironment *guienv = device->getGUIEnvironment();
|
||||||
|
|
||||||
// Add text to game
|
// Add text to game
|
||||||
guienv->addStaticText(L"Use WASD to move\nUse SPACE to jump\nUse ESC to exit", core::rect<s32>(30, 30, 120, 65), false, false, 0, -1, true);
|
guienv->addStaticText(L"Use WASD to move\nUse SPACE to jump\nUse R to reset\nUse ESC to exit", core::rect<s32>(30, 30, 120, 72), false, false, 0, -1, true);
|
||||||
|
|
||||||
// Load map
|
// Load map
|
||||||
device->getFileSystem()->addFileArchive("../res/map-20kdm2.pk3");
|
device->getFileSystem()->addFileArchive("../res/map-20kdm2.pk3");
|
||||||
@ -86,6 +86,10 @@ int main() {
|
|||||||
if(eventReceiver.IsKeyDown(KEY_ESCAPE)) {
|
if(eventReceiver.IsKeyDown(KEY_ESCAPE)) {
|
||||||
device->closeDevice();
|
device->closeDevice();
|
||||||
}
|
}
|
||||||
|
if(eventReceiver.IsKeyDown(KEY_KEY_R)) {
|
||||||
|
cam->setPosition(core::vector3df(50, 50, -60));
|
||||||
|
cam->setTarget(core::vector3df(-70, 30, -60));
|
||||||
|
}
|
||||||
|
|
||||||
// Print FPS
|
// Print FPS
|
||||||
int fps = driver->getFPS();
|
int fps = driver->getFPS();
|
||||||
|
Loading…
Reference in New Issue
Block a user