Skip to content

Commit 40b5f77

Browse files
committed
Move Umbra to a submodule.
1 parent 8bfa59b commit 40b5f77

36 files changed

Lines changed: 38 additions & 3278 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ build/
33

44
# Save data
55
data/sav
6+
7+
# Log file
8+
log.txt

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
path = vcpkg
33
url = https://github.com/microsoft/vcpkg.git
44
shallow = true
5+
[submodule "umbra"]
6+
path = umbra
7+
url = https://github.com/libtcod/umbra.git
8+
shallow = true

.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@
8383
"xlocmes": "cpp",
8484
"xlocmon": "cpp",
8585
"xloctime": "cpp",
86-
"xtree": "cpp"
86+
"xtree": "cpp",
87+
"*.rh": "cpp",
88+
"set": "cpp"
8789
}
8890
}

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE _USE_MATH_DEFINES) # For M_P
3636
target_compile_definitions(${PROJECT_NAME} PRIVATE NO_SOUND)
3737
target_compile_definitions(${PROJECT_NAME} PRIVATE NO_LUA)
3838

39+
add_subdirectory(umbra)
40+
3941
find_package(SDL2 CONFIG REQUIRED)
4042
find_package(libtcod CONFIG REQUIRED)
4143
target_link_libraries(
@@ -44,4 +46,5 @@ target_link_libraries(
4446
SDL2::SDL2
4547
SDL2::SDL2main
4648
libtcod::libtcod
49+
umbra::umbra
4750
)

data/cfg/umbra.txt

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,32 @@
11
/*
22
* UMBRA CONFIGURATION FILE
3+
*
4+
* rootWidth (integer): width of the root console in cells
5+
* rootHeight (integer): height of the root console in cells
6+
* fontID (integer): the ID of the font that is to be used
7+
* fullScreen (boolean): whether the application should run in full screen.
8+
* * true = run in full screen mode
9+
* * false = run in windowed mode (default)
10+
* logLevel (string): which messages are supposed to be logged.
11+
* * "info" = all messages down to the info level
12+
* (full debug mode)
13+
* * "notice" = all debug messages down to notices
14+
* * "warning" = all debug messages down to warnings
15+
* * "error" = log only errors and fatal errors
16+
* (standard debug mode, default)
17+
* * "fatal error" = log only fatal errors
18+
* * "none" = don't create a logfile at all
19+
* (debug mode off)
20+
* fontDir (string): the directory containing font files
21+
* moduleChain (string): the module chain to load (optional)
322
*/
423

524
config {
625
rootWidth = 80
726
rootHeight = 50
827
fontID = 2
928
fullScreen = false
10-
debug = false
29+
logLevel = "info"
1130
fontDir = "data/img"
1231
moduleChain = "pyromancer!"
1332
}

src/main.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2424
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2525
*/
26-
#include "umbra/umbra.hpp"
26+
#include <umbra/umbra.hpp>
2727
#ifndef NO_SOUND
2828
#include "fmod/fmod.h"
2929
#include "fmod/fmod_errors.h"

src/screen_mainmenu.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
#include <stdio.h>
2828
#include "main.hpp"
2929

30+
#include <cassert>
31+
3032
MainMenu *MainMenu::instance=NULL;
3133
static const TCODColor PAPER_COLOR(46,28,18);
3234
//static const TCODColor TEXT_COLOR(205,165,96);
@@ -93,6 +95,7 @@ void MainMenu::onInitialise() {
9395
Screen::onInitialise();
9496
img=new TCODImage(CON_W*2,CON_H*2);
9597
title=new TCODImage("data/img/title.png");
98+
assert(title);
9699
title->getSize(&titlew,&titleh);
97100
titlex = CON_W-titlew/2;
98101
titley = CON_H/3+28;

src/umbra/umbra.hpp

Lines changed: 0 additions & 55 deletions
This file was deleted.

src/umbra/umbra_callback.cpp

Lines changed: 0 additions & 96 deletions
This file was deleted.

src/umbra/umbra_callback.hpp

Lines changed: 0 additions & 136 deletions
This file was deleted.

0 commit comments

Comments
 (0)