Compare commits

...

5 Commits

Author SHA1 Message Date
Xavier Del Campo Romero e2abc68d8c
Documentation: Update paths to *.png files 2023-07-16 00:46:57 +02:00
Xavier Del Campo Romero f6172f4272
README.md: Limit to 72-column width
Even if Markdown files are typically read from a Markdown viewer, where
long lines are wrapped around, it is still nice to avoid long lines for
those who read README.md directly from the editor.
2023-07-16 00:32:58 +02:00
Xavier Del Campo Romero 1122308c15
Split project into smaller Makefiles
Instead of controlling all logic from the top-level Makefile, splitting
into directory-specific Makefiles allows for:

- Better separation of concerns
- Improved compatibility with POSIX make(1)

As a possible drawback, support for out-of-tree builds has been removed,
in favour of simplicity and POSIX compatibility.
2023-07-16 00:29:42 +02:00
Xavier Del Campo Romero a01a0da03d
Update .gitignore 2023-07-16 00:19:55 +02:00
Xavier Del Campo Romero 2dea14ebe9
Column fixup 2023-07-16 00:19:06 +02:00
12 changed files with 199 additions and 91 deletions

27
.gitignore vendored
View File

@ -1,9 +1,20 @@
# This file is part of LibreWands.
# This file is part of LibreWands.
# LibreWands is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# LibreWands is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LibreWands. If not, see https://www.gnu.org/licenses/.
# LibreWands is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
# LibreWands is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
# You should have received a copy of the GNU General Public License along with LibreWands. If not, see https://www.gnu.org/licenses/.
Build/
*.o
*.pdf
*.log
*.png
*.aux
*.toc

20
Assets/Art/Makefile Normal file
View File

@ -0,0 +1,20 @@
.POSIX:
.SUFFIXES: .svg .png .bmp
DEPS = \
Botan_Map.png \
Botan_Map_Old.png \
Botan_Map_Old_2.png \
World_Map.png \
Controller.png \
QWERTY_keyboard_diagram.png \
Regular_truncation_10_1000.png \
upload.wikimedia.org_wikipedia_commons_3_3f_Placeholder_view_vector.png
all: $(DEPS)
clean:
rm -f $(DEPS)
.svg.png .bmp.png:
convert $< $@

View File

@ -12,12 +12,12 @@
\begin{figure}
\centering
\includegraphics[scale=1.75]{../Build/Art/Botan Map Old.png} \\
The Region of Botan. July 4th 2023.
\includegraphics[scale=1.75]{../Assets/Art/Botan_Map_Old.png} \\
The Region of Botan. July 4th 2023.
\end{figure}
\begin{figure}
\centering
\includegraphics[scale=0.125]{../Build/Art/Botan Map Old 2.png} \\
The Region of Botan. July 7th 2023.
\includegraphics[scale=0.125]{../Assets/Art/Botan_Map_Old_2.png} \\
The Region of Botan. July 7th 2023.
\end{figure}

View File

@ -12,7 +12,7 @@
\begin{figure}
\centering
\includegraphics[scale=0.2]{../Build/Art/commons.wikimedia.org_wiki_File:QWERTY_keyboard_diagram.png} \\
\includegraphics[scale=0.2]{../Assets/Art/QWERTY_keyboard_diagram.png} \\
The keys highlighted in red are described above.
\end{figure}
@ -20,6 +20,6 @@ If you're using a keyboard, you may use either the arrow keys, 'W','A','S','D' o
\begin{figure}
\centering
\includegraphics[scale=0.4]{../Build/Art/Controller.png} \\
These keywords describe their respective buttons on your controller.
\includegraphics[scale=0.4]{../Assets/Art/Controller.png} \\
These keywords describe their respective buttons on your controller.
\end{figure}

View File

@ -11,8 +11,8 @@
\chapter{Gameplay Introduction}
\begin{figure}
\centering
\includegraphics[scale=0.4]{../Build/Art/commons.wikimedia.org_wiki_File:Regular_truncation_10_1000.png}\\
Monster Types
\includegraphics[scale=0.4]{../Assets/Art/Regular_truncation_10_1000.png}\\
Monster Types
\end{figure}
\section{Impossible Monster Types}

View File

@ -6,13 +6,13 @@
%
% LibreWands is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License along with LibreWands. If not, see https://www.gnu.org/licenses/.
% You should have received a copy of the GNU General Public License along with LibreWands. If not, see https://www.gnu.org/licenses/.
\chapter{World Regions Encyclopedia}
\begin{center}
\includegraphics[scale=1.0]{../Build/Art/World Map.png}\\
Map of the World
\includegraphics[scale=1.0]{../Assets/Art/World_Map.png}\\
Map of the World
\end{center}
"As of the moment this encyclopedia was written, there are 22 known regions of the world. Please be patient, as I have travelled all over Botan only. Much of what I know about the world is still very limited." - \textit{Kristina Petrovic, Traveller and Author, 1752}

47
Documentation/Makefile Normal file
View File

@ -0,0 +1,47 @@
# This file is part of LibreWands.
# LibreWands is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# LibreWands is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LibreWands. If not, see https://www.gnu.org/licenses/.
.POSIX:
PROJECT = LibreWands.pdf
DEPS = \
LibreWands.tex \
Articles/Acquiring.tex \
Articles/ConceptArt.tex \
Articles/Controls.tex \
Articles/Credits.tex \
Articles/EngineDesign.tex \
Articles/GameDesign.tex \
Articles/GameplayIntroduction.tex \
Articles/Introduction.tex \
Articles/ItemEncyclopedia.tex \
Articles/MapEditing.tex \
Articles/MonsterEncyclopedia.tex \
Articles/MoveEncyclopedia.tex \
Articles/PackagingGuide.tex \
Articles/Support.tex \
Articles/WorkTimeline.tex \
Articles/WorldEncyclopedia.tex \
all: $(PROJECT)
install: $(PROJECT)
mkdir -p $(PREFIX)/doc
cp $(PROJECT) $(PREFIX)/doc
clean:
rm -f $(PROJECT)
$(PROJECT): $(DEPS)
pdflatex LibreWands.tex

View File

@ -13,7 +13,7 @@
\newcommand{\MonItem}[6]
{
\subsection{#1 - \theMonItem}
\includegraphics[scale=0.2]{../Build/Art/upload.wikimedia.org_wikipedia_commons_3_3f_Placeholder_view_vector.png}
\includegraphics[scale=0.2]{../Assets/Art/upload.wikimedia.org_wikipedia_commons_3_3f_Placeholder_view_vector.png}
\begin{description}
\item[weight] #2
\item[price] #3
@ -38,7 +38,7 @@
{
\subsection{#1 - \theMonMon}
\begin{center}
\includegraphics[scale=0.2]{../Build/Art/upload.wikimedia.org_wikipedia_commons_3_3f_Placeholder_view_vector.png}
\includegraphics[scale=0.2]{../Assets/Art/upload.wikimedia.org_wikipedia_commons_3_3f_Placeholder_view_vector.png}
\end{center}
\begin{multicols}{3}
\begin{description}
@ -96,7 +96,7 @@
{
\subsubsection{#1}
\begin{center}
\includegraphics[scale=0.2]{../Build/Art/upload.wikimedia.org_wikipedia_commons_3_3f_Placeholder_view_vector.png}
\includegraphics[scale=0.2]{../Assets/Art/upload.wikimedia.org_wikipedia_commons_3_3f_Placeholder_view_vector.png}
\end{center}
\begin{description}
\item[type] #2
@ -121,7 +121,7 @@
{
\subsubsection{#1}
\begin{center}
\includegraphics[scale=0.2]{../Build/Art/upload.wikimedia.org_wikipedia_commons_3_3f_Placeholder_view_vector.png}
\includegraphics[scale=0.2]{../Assets/Art/upload.wikimedia.org_wikipedia_commons_3_3f_Placeholder_view_vector.png}
\end{center}
\begin{description}
\item[area] #2

View File

@ -12,69 +12,35 @@
# You should have received a copy of the GNU General Public License
# along with LibreWands. If not, see https://www.gnu.org/licenses/.
version = 0.0.3
.POSIX:
PREFIX = /usr/local/
BUILDDIR = Build/
ARTDIR = $(BUILDDIR)/Art
all: editMaps
install: editMaps
mkdir -p $(DESTDIR)/usr/
mkdir -p $(DESTDIR)/usr/games/
cp Build/librewands_editmaps $(DESTDIR)/usr/games/librewands_editmaps
install:
+cd Source/ && $(MAKE) install PREFIX=$(PREFIX)
+cd Documentation/ && $(MAKE) install PREFIX=$(PREFIX)
install-pdf:
mkdir -p $(DESTDIR)/usr/
mkdir -p $(DESTDIR)/usr/share/
mkdir -p $(DESTDIR)/usr/share/doc/
mkdir -p $(DESTDIR)/usr/share/doc/librewands/
cp Build/LibreWands.pdf $(DESTDIR)/usr/share/doc/librewands/
assets:
+cd Assets/Art/ && $(MAKE) BUILDDIR=$(BUILDDIR)/Art
uninstall:
rm $(DESTDIR)/usr/games/librewands_editmaps
uninstall-pdf:
rm -r $(DESTDIR)/usr/share/doc/librewands/
pdf:
cd Build/;mkdir -p "Art"
convert "./Assets/Art/Botan_Map.svg" "Build/Art/Botan Map.png"
convert "./Assets/Art/Botan_Map_Old.svg" "Build/Art/Botan Map Old.png"
convert "./Assets/Art/Botan_Map_Old_2.bmp" "Build/Art/Botan Map Old 2.png"
convert "./Assets/Art/World_Map.svg" "Build/Art/World Map.png"
convert "./Assets/Art/Controller.svg" "Build/Art/Controller.png"
convert "./Assets/Art/commons.wikimedia.org_wiki_File:QWERTY_keyboard_diagram.svg" "Build/Art/commons.wikimedia.org_wiki_File:QWERTY_keyboard_diagram.png"
convert "./Assets/Art/commons.wikimedia.org_wiki_File:Regular_truncation_10_1000.svg" "Build/Art/commons.wikimedia.org_wiki_File:Regular_truncation_10_1000.png"
convert "./Assets/Art/upload.wikimedia.org_wikipedia_commons_3_3f_Placeholder_view_vector.svg" "Build/Art/upload.wikimedia.org_wikipedia_commons_3_3f_Placeholder_view_vector.png"
cd Build/;pdflatex ../Documentation/LibreWands.tex
clean:
mkdir -p Build/
rm -r Build/*
dist:
mkdir -p "Build/librewands-$(version)"
cp -r "Assets/" "Build/librewands-$(version)"
cp -r "Documentation/" "Build/librewands-$(version)"
cp -r "Packaging/" "Build/librewands-$(version)"
cp -r "Source/" "Build/librewands-$(version)"
cp -r "Tests/" "Build/librewands-$(version)"
cp -r "Tools/" "Build/librewands-$(version)"
cp "_clang-format" "Build/librewands-$(version)"
cp "LICENSE" "Build/librewands-$(version)"
cp "Makefile" "Build/librewands-$(version)"
cp "README.md" "Build/librewands-$(version)"
cd Build/;tar -czf "librewands-$(version).tar.gz" "librewands-$(version)"
doc: assets
+cd Documentation/ && $(MAKE)
editMaps:
cd Build/;gcc ../Source/editMaps.c -lncurses -O3 -o librewands_editmaps
+cd Source/ && $(MAKE) CFLAGS="-O3 -Wall"
editMaps-debug:
cd Build/;gcc ../Source/editMaps.c -lncurses -g3 -Og -Wall -fanalyzer -o librewands_editmaps
+cd Source/ && $(MAKE) \
CFLAGS="-Og -Wall -fanalyzer" \
PROJECT=librewands_editmaps
test:
cd Build/;gcc ../Tests/main.c -lncurses -g3 -Og -Wall -fanalyzer -o tests;./tests
+cd Tests/ && $(MAKE)
format:
clang-format -i Source/*
clang-format -i Tests/*
+cd Source/ && $(MAKE) format
+cd Tests/ && $(MAKE) format

View File

@ -1,10 +1,12 @@
# LibreWands
A collaboratively made ncurses RPG featuring magick and monsters.
A collaboratively made ncurses RPG featuring magick and monsters.
## Project Goal
To collaboratively create a unique and high quality ncurses RPG that takes cultural inspiration from the rennaissance and baroque periods in Southern Europe. See the provided documentation for details.
To collaboratively create a unique and high quality ncurses RPG that
takes cultural inspiration from the rennaissance and baroque periods in
Southern Europe. See the provided documentation for details.
## Limitations
@ -25,17 +27,19 @@ Documentation is installed to the /usr/doc/librewands/ directory.
### Supported Platforms
Currently, the only supported platform is GNU/Linux. Support for other operating systems is planned.
Currently, the only supported platform is GNU/Linux. Support for other
operating systems is planned.
## Contributing
There are a vast number of ways you can contribute to this project. Any and all help is greatly appreciated.
There are a vast number of ways you can contribute to this project. Any
and all help is greatly appreciated.
* Help design the world using the map editor.
* Help design the world with pencil and paper.
* Help build and tune the game engine.
* Help write the game.
* Help hunt for bugs.
* Help write the game.
* Help hunt for bugs.
* Submit issue reports.
* Edit this README file.
* Edit our Makefile.
@ -44,18 +48,24 @@ There are a vast number of ways you can contribute to this project. Any and all
* Help implement multiplayer.
* Help write our documentation.
* Develop software quality tests.
* Package this software for your favourite operating system.
* Spread the word about this project.
* Tell me how I can make contributing easier.
* Package this software for your favourite operating system.
* Spread the word about this project.
* Tell me how I can make contributing easier.
* Support my efforts at [LiberaPay.](https://liberapay.com/lofenyy/)
## Copyright Notice
This file is part of LibreWands.
This file is part of LibreWands.
LibreWands is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
LibreWands is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.
LibreWands is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with LibreWands. If not, see https://www.gnu.org/licenses/.
LibreWands is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with LibreWands. If not, see https://www.gnu.org/licenses/.

39
Source/Makefile Normal file
View File

@ -0,0 +1,39 @@
# This file is part of LibreWands.
# LibreWands is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# LibreWands is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LibreWands. If not, see https://www.gnu.org/licenses/.
.POSIX:
PROJECT = librewands
LIBS = -lncurses
DEPS = \
editMaps.o \
engineCore.o \
engineMaps.o \
engineSound.o \
playJoycon.o
SRCS = $(DEPS:.o=.c)
all: $(PROJECT)
install: $(PROJECT)
mkdir -p $(PREFIX)/bin
cp $(PROJECT) $(PREFIX)/bin
format: $(SRCS)
clang-format -i $(SRCS)
$(PROJECT): $(DEPS)
$(CC) $(DEPS) $(LDFLAGS) $(LIBS) -o $@

15
Tests/Makefile Normal file
View File

@ -0,0 +1,15 @@
.POSIX:
PROJECT = test
DEPS = main.o
SRCS = $(DEPS:.o=.c)
LIBS = -lncurses
CFLAGS = -Wall -fanalyzer -Og -g3
all: $(PROJECT)
$(PROJECT): $(DEPS)
$(CC) $(DEPS) $(LDFLAGS) $(LIBS) -o $@
format: $(SRCS)
clang-format -i $(SRCS)