Compare commits
2 Commits
6953f34966
...
2bf805b941
| Author | SHA1 | Date | |
|---|---|---|---|
| 2bf805b941 | |||
| 9d84dfe38e |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
.vscode
|
||||
build/
|
||||
data/config/config.txt
|
||||
*.DS_Store
|
||||
thumbs.db
|
||||
|
||||
197
Makefile
197
Makefile
@@ -1,132 +1,125 @@
|
||||
executable = coffee_crisis_arcade_edition
|
||||
source = source/*.cpp source/common/*.cpp
|
||||
appName = Coffee Crisis Arcade Edition
|
||||
releaseFolder = ccae_release
|
||||
version = v0.01
|
||||
###############################################################################
|
||||
# #
|
||||
# DIRECTORIES #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
# Release names
|
||||
windowsRelease = $(executable)-$(version)-win32-x64.zip
|
||||
macosIntelRelease = $(executable)-$(version)-macos-intel.dmg
|
||||
macosAppleSiliconRelease = $(executable)-$(version)-macos-apple-silicon.dmg
|
||||
linuxRelease = $(executable)-$(version)-linux.tar.gz
|
||||
# Project root directory, so everything will be relative to it:
|
||||
DIR_ROOT:= $(dir $(abspath $(MAKEFILE_LIST)))
|
||||
|
||||
windows:
|
||||
@echo off
|
||||
g++ $(source) -std=c++11 -Wall -Os -lmingw32 -lws2_32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(executable).exe"
|
||||
strip -s -R .comment -R .gnu.version "$(executable).exe" --strip-unneeded
|
||||
# Root directory for the source code:
|
||||
DIR_SOURCES:= $(addsuffix /, $(DIR_ROOT)source)
|
||||
|
||||
windows_debug:
|
||||
@echo off
|
||||
g++ $(source) -D DEBUG -std=c++11 -Wall -Os -lmingw32 -lws2_32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(executable)_debug.exe"
|
||||
strip -s -R .comment -R .gnu.version "$(executable)_debug.exe" --strip-unneeded
|
||||
# Executables will be here.
|
||||
DIR_BIN:= $(addsuffix /, $(DIR_ROOT))
|
||||
|
||||
windows_release:
|
||||
@echo off
|
||||
# Directories for build artifacts (.o and .d files):
|
||||
DIR_BUILD:= $(addsuffix /, $(DIR_ROOT)build)
|
||||
|
||||
# Create release folder
|
||||
powershell if (Test-Path "$(releaseFolder)") {Remove-Item "$(releaseFolder)" -Recurse -Force}
|
||||
powershell if (-not (Test-Path "$(releaseFolder)")) {New-Item "$(releaseFolder)" -ItemType Directory}
|
||||
INCLUDES:= -I$(DIR_SOURCES)
|
||||
|
||||
# Prepare data folder
|
||||
powershell Copy-Item -Path "data" -Destination "$(releaseFolder)" -recurse -Force
|
||||
###############################################################################
|
||||
# #
|
||||
# FLAGS #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
# Copy root files
|
||||
powershell Copy-Item "LICENSE" -Destination "$(releaseFolder)"
|
||||
powershell Copy-Item "README.md" -Destination "$(releaseFolder)"
|
||||
powershell Copy-Item "release\*.dll" -Destination "$(releaseFolder)"
|
||||
# Compiler flags (for the C++ compiler):
|
||||
CXXFLAGS:= -std=c++11 -Wall -Os -ffunction-sections -fdata-sections
|
||||
|
||||
# Build
|
||||
g++ $(source) -std=c++11 -Wall -Os -lmingw32 -lws2_32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(releaseFolder)/$(executable).exe"
|
||||
strip -s -R .comment -R .gnu.version "$(releaseFolder)/$(executable).exe" --strip-unneeded
|
||||
# Linker flags (SFML libraries):
|
||||
LDFLAGS:= -lSDL2
|
||||
|
||||
# Create ZIP
|
||||
powershell if (Test-Path $(windowsRelease)) {Remove-Item $(windowsRelease)}
|
||||
powershell Compress-Archive -Path "$(releaseFolder)"/* -DestinationPath $(windowsRelease)
|
||||
###############################################################################
|
||||
# #
|
||||
# FILES #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
# Remove folder
|
||||
powershell if (Test-Path "$(releaseFolder)") {Remove-Item "$(releaseFolder)" -Recurse -Force}
|
||||
SOURCES := $(shell find $(DIR_SOURCES) -name '*.cpp')
|
||||
OBJECTS := $(subst $(DIR_SOURCES), $(DIR_BUILD), $(SOURCES))
|
||||
OBJECTS := $(OBJECTS:.cpp=.o)
|
||||
DEPENDENCIES:= $(OBJECTS:.o=.d)
|
||||
|
||||
macos:
|
||||
clang++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -o "$(executable)"
|
||||
###############################################################################
|
||||
# #
|
||||
# TARGETS #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
macos_debug:
|
||||
clang++ $(source) -D DEBUG -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -o "$(executable)_debug"
|
||||
TARGET_NAME:= coffee_crisis_arcade_edition
|
||||
TARGET_FILE:= $(DIR_BIN)$(TARGET_NAME)
|
||||
|
||||
macos_release:
|
||||
# Remove data and possible data from previous builds
|
||||
rm -rdf "$(releaseFolder)"
|
||||
rm -rdf Frameworks
|
||||
rm -f tmp.dmg
|
||||
rm -f "$(macosIntelRelease)"
|
||||
rm -f "$(macosAppleSiliconRelease)"
|
||||
###############################################################################
|
||||
# #
|
||||
# OTHER COMMANDS #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
# Create folders
|
||||
mkdir -p "$(releaseFolder)/$(appName).app/Contents/Frameworks"
|
||||
mkdir -p "$(releaseFolder)/$(appName).app/Contents/MacOS"
|
||||
mkdir -p "$(releaseFolder)/$(appName).app/Contents/Resources"
|
||||
mkdir -p Frameworks
|
||||
RM:= rm -rf
|
||||
|
||||
# Copy folders and files
|
||||
cp -R data "$(releaseFolder)/$(appName).app/Contents/Resources"
|
||||
cp -R release/SDL2.framework "$(releaseFolder)/$(appName).app/Contents/Frameworks"
|
||||
cp -R release/SDL2.framework Frameworks
|
||||
###############################################################################
|
||||
# #
|
||||
# RULES #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
# Copy files
|
||||
cp release/*.icns "$(releaseFolder)/$(appName).app/Contents/Resources"
|
||||
cp release/Info.plist "$(releaseFolder)/$(appName).app/Contents"
|
||||
cp LICENSE "$(releaseFolder)"
|
||||
cp README.md "$(releaseFolder)"
|
||||
.PHONY: all a1
|
||||
|
||||
# Create links
|
||||
ln -s /Applications "$(releaseFolder)"/Applications
|
||||
all: a1
|
||||
|
||||
# Build INTEL
|
||||
clang++ $(source) -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12
|
||||
a1: $(TARGET_FILE)
|
||||
|
||||
# Build INTEL DMG
|
||||
hdiutil create tmp.dmg -ov -volname "$(appName)" -fs HFS+ -srcfolder "$(releaseFolder)"
|
||||
hdiutil convert tmp.dmg -format UDZO -o "$(macosIntelRelease)"
|
||||
rm -f tmp.dmg
|
||||
$(TARGET_FILE): $(OBJECTS)
|
||||
mkdir -p $(@D)
|
||||
$(CXX) $(OBJECTS) $(LDFLAGS) -o $(TARGET_FILE)
|
||||
|
||||
# Build APPLE SILICON
|
||||
clang++ $(source) -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target arm64-apple-macos11
|
||||
$(DIR_BUILD)%.o: $(DIR_SOURCES)%.cpp
|
||||
mkdir -p $(@D)
|
||||
$(CXX) -c $< $(CXXFLAGS) $(INCLUDES) -o $@
|
||||
|
||||
# Build APPLE SILICON DMG
|
||||
hdiutil create tmp.dmg -ov -volname "$(appName)" -fs HFS+ -srcfolder "$(releaseFolder)"
|
||||
hdiutil convert tmp.dmg -format UDZO -o "$(macosAppleSiliconRelease)"
|
||||
rm -f tmp.dmg
|
||||
-include $(DEPENDENCIES)
|
||||
|
||||
# Remove data
|
||||
rm -rdf Frameworks
|
||||
rm -rdf "$(releaseFolder)"
|
||||
###############################################################################
|
||||
# #
|
||||
# CLEAN #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
linux:
|
||||
g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o "$(executable)"
|
||||
strip -s -R .comment -R .gnu.version "$(executable)" --strip-unneeded
|
||||
.PHONY: clean
|
||||
|
||||
linux_debug:
|
||||
g++ $(source) -D DEBUG -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o "$(executable)_debug"
|
||||
strip -s -R .comment -R .gnu.version "$(executable)_debug" --strip-unneeded
|
||||
clean:
|
||||
$(RM) $(DIR_BIN) $(DIR_BUILD)
|
||||
|
||||
linux_release:
|
||||
# Remove data
|
||||
rm -rdf "$(releaseFolder)"
|
||||
###############################################################################
|
||||
# #
|
||||
# PRINT-VARIABLES #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
# Create folders
|
||||
mkdir -p "$(releaseFolder)"
|
||||
.PHONY: print-variables
|
||||
|
||||
# Copy data
|
||||
cp -R data "$(releaseFolder)"
|
||||
cp LICENSE "$(releaseFolder)"
|
||||
cp README.md "$(releaseFolder)"
|
||||
print-variables:
|
||||
@echo MAKEFILE_LIST: $(MAKEFILE_LIST)
|
||||
|
||||
@echo "DIR_ROOT :" $(DIR_ROOT)
|
||||
@echo "DIR_SOURCES:" $(DIR_SOURCES)
|
||||
@echo "DIR_BIN :" $(DIR_BIN)
|
||||
@echo "DIR_BUILD :" $(DIR_BUILD)
|
||||
|
||||
# Build
|
||||
g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o "$(releaseFolder)/$(executable)"
|
||||
strip -s -R .comment -R .gnu.version "$(releaseFolder)/$(executable)" --strip-unneeded
|
||||
@echo "DIR_IMGUI :" $(DIR_IMGUI)
|
||||
@echo "DIR_IMGUI_SFML:" $(DIR_IMGUI_SFML)
|
||||
@echo "INCLUDES :" $(INCLUDES)
|
||||
|
||||
# Pack files
|
||||
rm -f "$(linuxRelease)"
|
||||
cd "$(releaseFolder)" && tar -czvf "../$(linuxRelease)" *
|
||||
@echo CXX: $(CXX)
|
||||
@echo CXXFLAGS: $(CXXFLAGS)
|
||||
@echo LDFLAGS: $(LDFLAGS)
|
||||
|
||||
# Remove data
|
||||
rm -rdf "$(releaseFolder)"
|
||||
@echo SOURCES: $(SOURCES)
|
||||
@echo OBJECTS: $(OBJECTS)
|
||||
@echo DEPENDENCIES: $(DEPENDENCIES)
|
||||
|
||||
@echo TARGET_NAME: $(TARGET_NAME)
|
||||
@echo TARGET_FILE: $(TARGET_FILE)
|
||||
|
||||
@echo RM: $(RM)
|
||||
|
||||
132
Makefile.old
Normal file
132
Makefile.old
Normal file
@@ -0,0 +1,132 @@
|
||||
executable = coffee_crisis_arcade_edition
|
||||
source = source/*.cpp source/common/*.cpp
|
||||
appName = Coffee Crisis Arcade Edition
|
||||
releaseFolder = ccae_release
|
||||
version = v0.01
|
||||
|
||||
# Release names
|
||||
windowsRelease = $(executable)-$(version)-win32-x64.zip
|
||||
macosIntelRelease = $(executable)-$(version)-macos-intel.dmg
|
||||
macosAppleSiliconRelease = $(executable)-$(version)-macos-apple-silicon.dmg
|
||||
linuxRelease = $(executable)-$(version)-linux.tar.gz
|
||||
|
||||
windows:
|
||||
@echo off
|
||||
g++ $(source) -std=c++11 -Wall -Os -lmingw32 -lws2_32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(executable).exe"
|
||||
strip -s -R .comment -R .gnu.version "$(executable).exe" --strip-unneeded
|
||||
|
||||
windows_debug:
|
||||
@echo off
|
||||
g++ $(source) -D DEBUG -std=c++11 -Wall -Os -lmingw32 -lws2_32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(executable)_debug.exe"
|
||||
strip -s -R .comment -R .gnu.version "$(executable)_debug.exe" --strip-unneeded
|
||||
|
||||
windows_release:
|
||||
@echo off
|
||||
|
||||
# Create release folder
|
||||
powershell if (Test-Path "$(releaseFolder)") {Remove-Item "$(releaseFolder)" -Recurse -Force}
|
||||
powershell if (-not (Test-Path "$(releaseFolder)")) {New-Item "$(releaseFolder)" -ItemType Directory}
|
||||
|
||||
# Prepare data folder
|
||||
powershell Copy-Item -Path "data" -Destination "$(releaseFolder)" -recurse -Force
|
||||
|
||||
# Copy root files
|
||||
powershell Copy-Item "LICENSE" -Destination "$(releaseFolder)"
|
||||
powershell Copy-Item "README.md" -Destination "$(releaseFolder)"
|
||||
powershell Copy-Item "release\*.dll" -Destination "$(releaseFolder)"
|
||||
|
||||
# Build
|
||||
g++ $(source) -std=c++11 -Wall -Os -lmingw32 -lws2_32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(releaseFolder)/$(executable).exe"
|
||||
strip -s -R .comment -R .gnu.version "$(releaseFolder)/$(executable).exe" --strip-unneeded
|
||||
|
||||
# Create ZIP
|
||||
powershell if (Test-Path $(windowsRelease)) {Remove-Item $(windowsRelease)}
|
||||
powershell Compress-Archive -Path "$(releaseFolder)"/* -DestinationPath $(windowsRelease)
|
||||
|
||||
# Remove folder
|
||||
powershell if (Test-Path "$(releaseFolder)") {Remove-Item "$(releaseFolder)" -Recurse -Force}
|
||||
|
||||
macos:
|
||||
clang++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -o "$(executable)"
|
||||
|
||||
macos_debug:
|
||||
clang++ $(source) -D DEBUG -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -o "$(executable)_debug"
|
||||
|
||||
macos_release:
|
||||
# Remove data and possible data from previous builds
|
||||
rm -rdf "$(releaseFolder)"
|
||||
rm -rdf Frameworks
|
||||
rm -f tmp.dmg
|
||||
rm -f "$(macosIntelRelease)"
|
||||
rm -f "$(macosAppleSiliconRelease)"
|
||||
|
||||
# Create folders
|
||||
mkdir -p "$(releaseFolder)/$(appName).app/Contents/Frameworks"
|
||||
mkdir -p "$(releaseFolder)/$(appName).app/Contents/MacOS"
|
||||
mkdir -p "$(releaseFolder)/$(appName).app/Contents/Resources"
|
||||
mkdir -p Frameworks
|
||||
|
||||
# Copy folders and files
|
||||
cp -R data "$(releaseFolder)/$(appName).app/Contents/Resources"
|
||||
cp -R release/SDL2.framework "$(releaseFolder)/$(appName).app/Contents/Frameworks"
|
||||
cp -R release/SDL2.framework Frameworks
|
||||
|
||||
# Copy files
|
||||
cp release/*.icns "$(releaseFolder)/$(appName).app/Contents/Resources"
|
||||
cp release/Info.plist "$(releaseFolder)/$(appName).app/Contents"
|
||||
cp LICENSE "$(releaseFolder)"
|
||||
cp README.md "$(releaseFolder)"
|
||||
|
||||
# Create links
|
||||
ln -s /Applications "$(releaseFolder)"/Applications
|
||||
|
||||
# Build INTEL
|
||||
clang++ $(source) -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12
|
||||
|
||||
# Build INTEL DMG
|
||||
hdiutil create tmp.dmg -ov -volname "$(appName)" -fs HFS+ -srcfolder "$(releaseFolder)"
|
||||
hdiutil convert tmp.dmg -format UDZO -o "$(macosIntelRelease)"
|
||||
rm -f tmp.dmg
|
||||
|
||||
# Build APPLE SILICON
|
||||
clang++ $(source) -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target arm64-apple-macos11
|
||||
|
||||
# Build APPLE SILICON DMG
|
||||
hdiutil create tmp.dmg -ov -volname "$(appName)" -fs HFS+ -srcfolder "$(releaseFolder)"
|
||||
hdiutil convert tmp.dmg -format UDZO -o "$(macosAppleSiliconRelease)"
|
||||
rm -f tmp.dmg
|
||||
|
||||
# Remove data
|
||||
rm -rdf Frameworks
|
||||
rm -rdf "$(releaseFolder)"
|
||||
|
||||
linux:
|
||||
g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o "$(executable)"
|
||||
strip -s -R .comment -R .gnu.version "$(executable)" --strip-unneeded
|
||||
|
||||
linux_debug:
|
||||
g++ $(source) -D DEBUG -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o "$(executable)_debug"
|
||||
strip -s -R .comment -R .gnu.version "$(executable)_debug" --strip-unneeded
|
||||
|
||||
linux_release:
|
||||
# Remove data
|
||||
rm -rdf "$(releaseFolder)"
|
||||
|
||||
# Create folders
|
||||
mkdir -p "$(releaseFolder)"
|
||||
|
||||
# Copy data
|
||||
cp -R data "$(releaseFolder)"
|
||||
cp LICENSE "$(releaseFolder)"
|
||||
cp README.md "$(releaseFolder)"
|
||||
|
||||
# Build
|
||||
g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o "$(releaseFolder)/$(executable)"
|
||||
strip -s -R .comment -R .gnu.version "$(releaseFolder)/$(executable)" --strip-unneeded
|
||||
|
||||
# Pack files
|
||||
rm -f "$(linuxRelease)"
|
||||
cd "$(releaseFolder)" && tar -czvf "../$(linuxRelease)" *
|
||||
|
||||
# Remove data
|
||||
rm -rdf "$(releaseFolder)"
|
||||
125
Makefile_no
Normal file
125
Makefile_no
Normal file
@@ -0,0 +1,125 @@
|
||||
###############################################################################
|
||||
# #
|
||||
# DIRECTORIES #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
# Project root directory, so everything will be relative to it:
|
||||
DIR_ROOT:= $(dir $(abspath $(MAKEFILE_LIST)))
|
||||
|
||||
# Root directory for the source code:
|
||||
DIR_SOURCES:= $(addsuffix /, $(DIR_ROOT)source)
|
||||
|
||||
# Executables will be here.
|
||||
DIR_BIN:= $(addsuffix /, $(DIR_ROOT))
|
||||
|
||||
# Directories for build artifacts (.o and .d files):
|
||||
DIR_BUILD:= $(addsuffix /, $(DIR_ROOT)build)
|
||||
|
||||
INCLUDES:= -I$(DIR_SOURCES)
|
||||
|
||||
###############################################################################
|
||||
# #
|
||||
# FLAGS #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
# Compiler flags (for the C++ compiler):
|
||||
CXXFLAGS:= -std=c++11 -Wall -Os -ffunction-sections -fdata-sections
|
||||
|
||||
# Linker flags (SFML libraries):
|
||||
LDFLAGS:= -lSDL2
|
||||
|
||||
###############################################################################
|
||||
# #
|
||||
# FILES #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
SOURCES := $(shell find $(DIR_SOURCES) -name '*.cpp')
|
||||
OBJECTS := $(subst $(DIR_SOURCES), $(DIR_BUILD), $(SOURCES))
|
||||
OBJECTS := $(OBJECTS:.cpp=.o)
|
||||
DEPENDENCIES:= $(OBJECTS:.o=.d)
|
||||
|
||||
###############################################################################
|
||||
# #
|
||||
# TARGETS #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
TARGET_NAME:= coffee_crisis_arcade_edition
|
||||
TARGET_FILE:= $(DIR_BIN)$(TARGET_NAME)
|
||||
|
||||
###############################################################################
|
||||
# #
|
||||
# OTHER COMMANDS #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
RM:= rm -rf
|
||||
|
||||
###############################################################################
|
||||
# #
|
||||
# RULES #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
.PHONY: all a1
|
||||
|
||||
all: a1
|
||||
|
||||
a1: $(TARGET_FILE)
|
||||
|
||||
$(TARGET_FILE): $(OBJECTS)
|
||||
mkdir -p $(@D)
|
||||
$(CXX) $(SOURCES) $(CXXFLAGS) $(INCLUDES) $(LDFLAGS) -o $(TARGET_FILE)
|
||||
|
||||
$(DIR_BUILD)%.o: $(DIR_SOURCES)%.cpp
|
||||
mkdir -p $(@D)
|
||||
$(CXX) -c $< $(CXXFLAGS) $(INCLUDES) -o $@
|
||||
|
||||
-include $(DEPENDENCIES)
|
||||
|
||||
###############################################################################
|
||||
# #
|
||||
# CLEAN #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
$(RM) $(DIR_BIN) $(DIR_BUILD)
|
||||
|
||||
###############################################################################
|
||||
# #
|
||||
# PRINT-VARIABLES #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
.PHONY: print-variables
|
||||
|
||||
print-variables:
|
||||
@echo MAKEFILE_LIST: $(MAKEFILE_LIST)
|
||||
|
||||
@echo "DIR_ROOT :" $(DIR_ROOT)
|
||||
@echo "DIR_SOURCES:" $(DIR_SOURCES)
|
||||
@echo "DIR_BIN :" $(DIR_BIN)
|
||||
@echo "DIR_BUILD :" $(DIR_BUILD)
|
||||
|
||||
@echo "DIR_IMGUI :" $(DIR_IMGUI)
|
||||
@echo "DIR_IMGUI_SFML:" $(DIR_IMGUI_SFML)
|
||||
@echo "INCLUDES :" $(INCLUDES)
|
||||
|
||||
@echo CXX: $(CXX)
|
||||
@echo CXXFLAGS: $(CXXFLAGS)
|
||||
@echo LDFLAGS: $(LDFLAGS)
|
||||
|
||||
@echo SOURCES: $(SOURCES)
|
||||
@echo OBJECTS: $(OBJECTS)
|
||||
@echo DEPENDENCIES: $(DEPENDENCIES)
|
||||
|
||||
@echo TARGET_NAME: $(TARGET_NAME)
|
||||
@echo TARGET_FILE: $(TARGET_FILE)
|
||||
|
||||
@echo RM: $(RM)
|
||||
@@ -20,6 +20,14 @@ Input::Input(std::string file)
|
||||
|
||||
verbose = true;
|
||||
enabled = true;
|
||||
|
||||
gameInputs.push_back(input_fire_left);
|
||||
gameInputs.push_back(input_fire_center);
|
||||
gameInputs.push_back(input_fire_right);
|
||||
gameInputs.push_back(input_up);
|
||||
gameInputs.push_back(input_down);
|
||||
gameInputs.push_back(input_left);
|
||||
gameInputs.push_back(input_right);
|
||||
}
|
||||
|
||||
// Actualiza el estado del objeto
|
||||
|
||||
@@ -68,6 +68,7 @@ private:
|
||||
std::vector<keyBindings_t> keyBindings; // Vector con las teclas asociadas a los inputs predefinidos
|
||||
std::vector<GameControllerBindings_t> gameControllerBindings; // Vector con las teclas asociadas a los inputs predefinidos
|
||||
std::vector<std::string> controllerNames; // Vector con los nombres de los mandos
|
||||
std::vector<inputs_e> gameInputs; // Inputs usados para jugar, normalmente direcciones y botones
|
||||
int numGamepads; // Numero de mandos conectados
|
||||
std::string dbPath; // Ruta al archivo gamecontrollerdb.txt
|
||||
bool verbose; // Indica si ha de mostrar mensajes
|
||||
|
||||
@@ -177,6 +177,9 @@ void Screen::setVideoMode(int videoMode)
|
||||
options->video.mode = videoMode;
|
||||
options->video.window.width = windowWidth;
|
||||
options->video.window.height = windowHeight;
|
||||
|
||||
// Recalcula los valores de los efectos
|
||||
setShake();
|
||||
}
|
||||
|
||||
// Camibia entre pantalla completa y ventana
|
||||
|
||||
@@ -16,7 +16,7 @@ Director::Director(int argc, char *argv[])
|
||||
{
|
||||
// Inicializa variables
|
||||
section = new section_t();
|
||||
section->name = SECTION_PROG_LOGO;
|
||||
section->name = SECTION_PROG_TITLE;
|
||||
|
||||
// Inicializa las opciones del programa
|
||||
initOptions();
|
||||
|
||||
@@ -2725,7 +2725,7 @@ void Game::render()
|
||||
screen->start();
|
||||
|
||||
// Limpia la pantalla
|
||||
//screen->clean(bgColor);
|
||||
screen->clean(bgColor);
|
||||
|
||||
SDL_RenderCopy(renderer, canvas, nullptr, &playArea);
|
||||
scoreboard->render();
|
||||
|
||||
@@ -26,7 +26,6 @@ private:
|
||||
SDL_Event *eventHandler; // Manejador de eventos
|
||||
std::vector<Sprite *> sprite; // Vector con los sprites de cada linea que forman el bitmap JAILGAMES
|
||||
Sprite *sprite2; // Sprite para manejar la textura2
|
||||
options_t *options; // Puntero a las opciones del juego
|
||||
section_t *section; // Estado del bucle principal para saber si continua o se sale
|
||||
|
||||
// Variables
|
||||
|
||||
Reference in New Issue
Block a user