diff --git a/client/scenes/base_scene.cpp b/client/base_scene.cpp similarity index 100% rename from client/scenes/base_scene.cpp rename to client/base_scene.cpp diff --git a/client/scenes/base_scene.hpp b/client/base_scene.hpp similarity index 100% rename from client/scenes/base_scene.hpp rename to client/base_scene.hpp diff --git a/client/scenes/in_world.cpp b/client/gameplay_scenes/in_world.cpp similarity index 100% rename from client/scenes/in_world.cpp rename to client/gameplay_scenes/in_world.cpp diff --git a/client/scenes/in_world.hpp b/client/gameplay_scenes/in_world.hpp similarity index 100% rename from client/scenes/in_world.hpp rename to client/gameplay_scenes/in_world.hpp diff --git a/client/scenes/makefile b/client/gameplay_scenes/makefile similarity index 100% rename from client/scenes/makefile rename to client/gameplay_scenes/makefile diff --git a/client/makefile b/client/makefile index 68ce8d9..b931b13 100644 --- a/client/makefile +++ b/client/makefile @@ -1,5 +1,5 @@ #include directories -INCLUDES+=. client_utilities entities scenes ../common/debugging ../common/gameplay ../common/graphics ../common/map ../common/network ../common/network/packet_types ../common/ui ../common/utilities +INCLUDES+=. client_utilities entities gameplay_scenes menu_scenes ../common/debugging ../common/gameplay ../common/graphics ../common/map ../common/network ../common/network/packet_types ../common/ui ../common/utilities #libraries #the order of the $(LIBS) is important, at least for MinGW @@ -27,7 +27,8 @@ OUT=$(addprefix $(OUTDIR)/,client) all: $(OBJ) $(OUT) $(MAKE) -C client_utilities $(MAKE) -C entities - $(MAKE) -C scenes + $(MAKE) -C gameplay_scenes + $(MAKE) -C menu_scenes $(CXX) $(CXXFLAGS) -o $(OUT) $(OBJ) $(LIBS) $(OBJ): | $(OBJDIR) diff --git a/client/scenes/disconnected_screen.cpp b/client/menu_scenes/disconnected_screen.cpp similarity index 100% rename from client/scenes/disconnected_screen.cpp rename to client/menu_scenes/disconnected_screen.cpp diff --git a/client/scenes/disconnected_screen.hpp b/client/menu_scenes/disconnected_screen.hpp similarity index 100% rename from client/scenes/disconnected_screen.hpp rename to client/menu_scenes/disconnected_screen.hpp diff --git a/client/scenes/lobby_menu.cpp b/client/menu_scenes/lobby_menu.cpp similarity index 100% rename from client/scenes/lobby_menu.cpp rename to client/menu_scenes/lobby_menu.cpp diff --git a/client/scenes/lobby_menu.hpp b/client/menu_scenes/lobby_menu.hpp similarity index 100% rename from client/scenes/lobby_menu.hpp rename to client/menu_scenes/lobby_menu.hpp diff --git a/client/scenes/main_menu.cpp b/client/menu_scenes/main_menu.cpp similarity index 100% rename from client/scenes/main_menu.cpp rename to client/menu_scenes/main_menu.cpp diff --git a/client/scenes/main_menu.hpp b/client/menu_scenes/main_menu.hpp similarity index 100% rename from client/scenes/main_menu.hpp rename to client/menu_scenes/main_menu.hpp diff --git a/client/menu_scenes/makefile b/client/menu_scenes/makefile new file mode 100644 index 0000000..24dfb60 --- /dev/null +++ b/client/menu_scenes/makefile @@ -0,0 +1,37 @@ +#config +INCLUDES+=. .. ../../common/graphics ../../common/map ../../common/network ../../common/network/packet_types ../../common/ui ../../common/utilities +LIBS+= +CXXFLAGS+=-std=c++11 $(addprefix -I,$(INCLUDES)) + +#source +CXXSRC=$(wildcard *.cpp) + +#objects +OBJDIR=obj +OBJ+=$(addprefix $(OBJDIR)/,$(CXXSRC:.cpp=.o)) + +#output +OUTDIR=.. +OUT=$(addprefix $(OUTDIR)/,client.a) + +#targets +all: $(OBJ) $(OUT) + ar -crs $(OUT) $(OBJ) + +$(OBJ): | $(OBJDIR) + +$(OUT): | $(OUTDIR) + +$(OBJDIR): + mkdir $(OBJDIR) + +$(OUTDIR): + mkdir $(OUTDIR) + +$(OBJDIR)/%.o: %.cpp + $(CXX) $(CXXFLAGS) -c -o $@ $< + +clean: + $(RM) *.o *.a *.exe + +rebuild: clean all diff --git a/client/scenes/options_menu.cpp b/client/menu_scenes/options_menu.cpp similarity index 100% rename from client/scenes/options_menu.cpp rename to client/menu_scenes/options_menu.cpp diff --git a/client/scenes/options_menu.hpp b/client/menu_scenes/options_menu.hpp similarity index 100% rename from client/scenes/options_menu.hpp rename to client/menu_scenes/options_menu.hpp diff --git a/client/scenes/splash_screen.cpp b/client/menu_scenes/splash_screen.cpp similarity index 100% rename from client/scenes/splash_screen.cpp rename to client/menu_scenes/splash_screen.cpp diff --git a/client/scenes/splash_screen.hpp b/client/menu_scenes/splash_screen.hpp similarity index 100% rename from client/scenes/splash_screen.hpp rename to client/menu_scenes/splash_screen.hpp