Skip to content

Commit

Permalink
Updated the renderer with new effects, including DOF and Fog. Also di…
Browse files Browse the repository at this point in the history
…d some tuning to the rendering pipeline.
  • Loading branch information
weigert committed Oct 11, 2019
1 parent 023f14b commit e9a16ff
Show file tree
Hide file tree
Showing 51 changed files with 101,387 additions and 195 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# territory
3D rendered proc-gen world test


/*
Todo:
- Add run-length-encoding for flat-array
Expand Down
6 changes: 3 additions & 3 deletions imgui.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Size=345,111
Collapsed=1

[Window][Territory Controller]
Pos=19,19
Size=496,769
Collapsed=0
Pos=31,31
Size=449,724
Collapsed=1

[Window][Style Editor]
Pos=302,-22
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ OBJS = source/territory.cpp source/include/imgui/imgui.cpp source/include/imgui/

CC = g++ -std=c++11
COMPILER_FLAGS = -Wall
LINKER_FLAGS = -I/usr/local/include -L/usr/local/lib -lSDL2 -lnoise -lSDL2_image -lSDL2_ttf -lGL -lGLEW -lboost_serialization -lboost_system -lboost_filesystem
LINKER_FLAGS = -I/usr/local/include -L/usr/local/lib -lX11 -lpthread -lSDL2 -lnoise -lSDL2_image -lSDL2_ttf -lGL -lGLEW -lboost_serialization -lboost_system -lboost_filesystem
OBJ_NAME = territory
all: $(OBJS)
$(CC) $(OBJS) $(COMPILER_FLAGS) $(LINKER_FLAGS) -o $(OBJ_NAME)
1 change: 1 addition & 0 deletions save/test_flat/world.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22 serialization::archive 15 0 0 9 test_flat 16 5.000000000e+01 5.000000000e+00 5.000000000e+01
12,500 changes: 12,500 additions & 0 deletions save/test_flat/world.region

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions save/test_octree/world.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22 serialization::archive 15 0 0 11 test_octree 16 5.000000000e+01 5.000000000e+00 5.000000000e+01
12,500 changes: 12,500 additions & 0 deletions save/test_octree/world.region

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions save/test_tectonic/world.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22 serialization::archive 15 0 0 13 test_tectonic 16 5.000000000e+01 5.000000000e+00 5.000000000e+01
12,500 changes: 12,500 additions & 0 deletions save/test_tectonic/world.region

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions source/include/forward/billboard.fwd.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#pragma once
class Billboard;
2 changes: 2 additions & 0 deletions source/include/forward/geology.fwd.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#pragma once
class Geology;
10 changes: 10 additions & 0 deletions source/include/game/event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,20 @@ void eventHandler::input(SDL_Event *e, bool &quit){
else if( e->type == SDL_MOUSEWHEEL){
scroll.push_front(e);
}
else if( e->type == SDL_MOUSEBUTTONDOWN){
mouse = e;
move = true;
}
}
}

void eventHandler::update(World &world, Player &player, Population &population, View &view){
//Do this thingy to get the current mouse position that is being thing'd
if(move){
view.focus = glm::vec2(1.0)-glm::vec2(mouse->button.x, mouse->button.y)/glm::vec2(view.SCREEN_WIDTH, view.SCREEN_HEIGHT); //Set current focus
move = false;
}

//Check for rotation
if(!inputs.empty()){
//Handle the Player Move
Expand Down
2 changes: 2 additions & 0 deletions source/include/game/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ This class handles user input, creates an appropriate stack of activated events
std::deque<SDL_Event*> inputs; //General Key Inputs
std::deque<SDL_Event*> scroll; //General Key Inputs
std::deque<SDL_Event*> rotate; //Rotate Key Inputs
SDL_Event* mouse; //Whatever the mouse is doing at a moment
bool move = false;

//Take inputs and add them to stack
void input(SDL_Event *e, bool &quit);
Expand Down
Loading

0 comments on commit e9a16ff

Please sign in to comment.