From c7ff0e8ca3a3c7aa44a9d38a4d95d391e75d6b98 Mon Sep 17 00:00:00 2001 From: still-flow <46608177+still-flow@users.noreply.github.com> Date: Mon, 2 Nov 2020 18:54:13 +0300 Subject: [PATCH 1/6] add bringris to Makefile and mymake - add bringris entry to Makefile.simple - add -bringris option to mymake --- Makefile.simple | 3 +++ mymake.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Makefile.simple b/Makefile.simple index dc5b843ce..ef6ccee54 100644 --- a/Makefile.simple +++ b/Makefile.simple @@ -171,6 +171,9 @@ emscripten: hyper.html hyper.emscripten-sources: *.cpp autohdr.h +bringris$(EXE_EXTENSION): autohdr.h + $(CXX) $(CXXFLAGS) -Wno-error -DBRINGRIS rogueviz/bringris.cpp $(LDFLAGS) $(hyper_LDFLAGS) -o $@ + .PHONY: clean clean: diff --git a/mymake.cpp b/mymake.cpp index 19c66297d..564a61122 100644 --- a/mymake.cpp +++ b/mymake.cpp @@ -142,6 +142,10 @@ int main(int argc, char **argv) { obj_dir += "/web"; setdir += "../"; } + else if(s == "-bringris") { + modules.push_back("rogueviz/bringris"); + modules.push_back("rogueviz/subquotient"); + } else if(s.substr(0, 2) == "-f") { opts += " " + s; obj_dir += "/"; From 4889f554f92d77a13e78e76435eaf038ed21a1d0 Mon Sep 17 00:00:00 2001 From: still-flow <46608177+still-flow@users.noreply.github.com> Date: Mon, 2 Nov 2020 21:46:32 +0300 Subject: [PATCH 2/6] refactor Makefile.simple; fix one warning --- Makefile.simple | 10 ++++++++-- graph.cpp | 3 +-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile.simple b/Makefile.simple index ef6ccee54..b945357b1 100644 --- a/Makefile.simple +++ b/Makefile.simple @@ -108,6 +108,9 @@ endif hyper_OBJS = hyper$(OBJ_EXTENSION) hyper_LDFLAGS = $(LDFLAGS_GL) $(LDFLAGS_SDL) +bringris_CXXFLAGS = -DBRINGRIS -Wno-unused-variable +bringris_LDFLAGS = $(hyper_LDFLAGS) + ifeq (${HYPERROGUE_USE_GLEW},1) CXXFLAGS_EARLY += -DCAP_GLEW=1 hyper_LDFLAGS += $(LDFLAGS_GLEW) @@ -171,8 +174,11 @@ emscripten: hyper.html hyper.emscripten-sources: *.cpp autohdr.h -bringris$(EXE_EXTENSION): autohdr.h - $(CXX) $(CXXFLAGS) -Wno-error -DBRINGRIS rogueviz/bringris.cpp $(LDFLAGS) $(hyper_LDFLAGS) -o $@ +bringris.o: rogueviz/bringris.cpp autohdr.h + $(CXX) $(CXXFLAGS) $(bringris_CXXFLAGS) rogueviz/bringris.cpp -c -o $@ + +bringris$(EXE_EXTENSION): bringris.o + $(CXX) $(CXXFLAGS) $(bringris_CXXFLAGS) bringris.o $(LDFLAGS) $(bringris_LDFLAGS) -o $@ .PHONY: clean diff --git a/graph.cpp b/graph.cpp index 29ee18c12..b6616f3ee 100644 --- a/graph.cpp +++ b/graph.cpp @@ -5065,8 +5065,7 @@ EX void normalscreen() { cmode = sm::NORMAL | sm::DOTOUR | sm::CENTER; if(viewdists && show_distance_lists) cmode |= sm::SIDE | sm::MAYDARK; gamescreen((vid.highlightmode == (hiliteclick ? 0 : 2)) ? 1 : 0); drawStats(); - if(nomenukey || ISMOBILE) - ; + if(nomenukey || ISMOBILE) {} #if CAP_TOUR else if(tour::on) displayButton(vid.xres-8, vid.yres-vid.fsize, XLAT("(ESC) tour menu"), SDLK_ESCAPE, 16); From 8da810faa4ae793b7edcd0dbe85618cc31173f61 Mon Sep 17 00:00:00 2001 From: still-flow <46608177+still-flow@users.noreply.github.com> Date: Mon, 2 Nov 2020 22:04:42 +0300 Subject: [PATCH 3/6] add Travis entries for bringris --- .travis.yml | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5da342ab0..2c861504e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -122,6 +122,34 @@ matrix: HYPERROGUE_USE_GLEW=1 HYPERROGUE_USE_PNG=1 HYPERROGUE_USE_ROGUEVIZ=1 + - os: linux # Linux, make, Bringris + compiler: gcc + env: >- + TRAVIS_OS_NAME=linux + TRAVIS_COMPILER_NAME=gcc + TRAVIS_BUILD_SYSTEM=Makefile + HYPERROGUE_USE_BRINGRIS=1 + - os: linux # Linux, mymake, Bringris + compiler: gcc + env: >- + TRAVIS_OS_NAME=linux + TRAVIS_COMPILER_NAME=gcc + TRAVIS_BUILD_SYSTEM=mymake + HYPERROGUE_USE_BRINGRIS=1 + - os: osx # OSX, make, Bringris + compiler: clang + env: >- + TRAVIS_OS_NAME=osx + TRAVIS_COMPILER_NAME=clang + TRAVIS_BUILD_SYSTEM=Makefile + HYPERROGUE_USE_BRINGRIS=1 + - os: osx # OSX, mymake, Bringris + compiler: clang + env: >- + TRAVIS_OS_NAME=osx + TRAVIS_COMPILER_NAME=clang + TRAVIS_BUILD_SYSTEM=mymake + HYPERROGUE_USE_BRINGRIS=1 - os: linux # Emscripten env: >- TRAVIS_OS_NAME=linux @@ -184,11 +212,18 @@ script: ./configure CXXFLAGS="-W -Wall -Wextra -Werror -Wno-unused-parameter -Wno-maybe-uninitialized -Wno-unknown-warning-option" make elif [[ "$TRAVIS_BUILD_SYSTEM" == "Makefile" ]]; then - make -f Makefile.simple + if [[ "$HYPERROGUE_USE_BRINGRIS" == "1" ]]; then + make -f Makefile.simple bringris + mv bringris hyperrogue + else + make -f Makefile.simple + fi elif [[ "$TRAVIS_BUILD_SYSTEM" == "mymake" ]]; then make -f Makefile.simple mymake if [[ "$HYPERROGUE_USE_ROGUEVIZ" == "1" ]]; then ./mymake -rv + elif [[ "$HYPERROGUE_USE_BRINGRIS" == "1" ]]; then + ./mymake -bringris else ./mymake fi From ee047d2d4e185a6e49bc79c41ec035a3dfb1ee39 Mon Sep 17 00:00:00 2001 From: still-flow <46608177+still-flow@users.noreply.github.com> Date: Mon, 2 Nov 2020 22:14:42 +0300 Subject: [PATCH 4/6] add GH CI entries for bringris --- .github/workflows/build.sh | 11 ++++++++++- .github/workflows/github_ci.yml | 23 +++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index d415b203d..4fc5989d0 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -17,11 +17,20 @@ if [[ "$GH_HYP_RVIZ" == "rviz_1" ]]; then GH_AUTOTOOLS_CXXFLAGS+=" -std=c++17 -DCAP_ROGUEVIZ=1" fi +if [[ "$GH_HYP_BRINGRIS" == "bringris_1" ]]; then + GH_MYMAKE_ARGS+=" -bringris" +fi + export CC=$GH_COMPILER export CXX=${CC%cc}++ if [[ "$GH_BUILDSYS" == "makefile" ]]; then - make -f Makefile.simple + if [[ "$GH_HYP_BRINGRIS" == "bringris_1" ]]; then + make -f Makefile.simple bringris + mv bringris hyperrogue + else + make -f Makefile.simple + fi elif [[ "$GH_BUILDSYS" == "autotools" ]]; then autoreconf -vfi ./configure CXXFLAGS="${GH_AUTOTOOLS_CXXFLAGS}" diff --git a/.github/workflows/github_ci.yml b/.github/workflows/github_ci.yml index 5127f76da..ff5c3345f 100644 --- a/.github/workflows/github_ci.yml +++ b/.github/workflows/github_ci.yml @@ -71,6 +71,29 @@ jobs: - name: Do a simple test run: .github/workflows/test_simple.sh + bringris: + name: Bringris + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + compiler: [gcc, clang] + build_system: [makefile, mymake] + env: + GH_OS: ${{ matrix.os }} + GH_COMPILER: ${{ matrix.compiler }} + GH_BUILDSYS: ${{ matrix.build_system }} + GH_HYP_BRINGRIS: bringris_1 + steps: + - uses: actions/checkout@v2 + - name: Install build dependencies + run: .github/workflows/install_deps.sh + - name: Build + run: .github/workflows/build.sh + - name: Do a simple test + run: .github/workflows/test_simple.sh + emscripten: runs-on: ubuntu-latest steps: From 12031b334b55b5f43f4c2a50fceeec161214df3f Mon Sep 17 00:00:00 2001 From: still-flow <46608177+still-flow@users.noreply.github.com> Date: Tue, 3 Nov 2020 02:55:10 +0300 Subject: [PATCH 5/6] glew stuff together --- .github/workflows/github_ci.yml | 1 + .travis.yml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/github_ci.yml b/.github/workflows/github_ci.yml index ff5c3345f..756f82cde 100644 --- a/.github/workflows/github_ci.yml +++ b/.github/workflows/github_ci.yml @@ -85,6 +85,7 @@ jobs: GH_COMPILER: ${{ matrix.compiler }} GH_BUILDSYS: ${{ matrix.build_system }} GH_HYP_BRINGRIS: bringris_1 + GH_HYP_GLEW: glew_1 steps: - uses: actions/checkout@v2 - name: Install build dependencies diff --git a/.travis.yml b/.travis.yml index 2c861504e..5c512e007 100644 --- a/.travis.yml +++ b/.travis.yml @@ -128,6 +128,7 @@ matrix: TRAVIS_OS_NAME=linux TRAVIS_COMPILER_NAME=gcc TRAVIS_BUILD_SYSTEM=Makefile + HYPERROGUE_USE_GLEW=1 HYPERROGUE_USE_BRINGRIS=1 - os: linux # Linux, mymake, Bringris compiler: gcc @@ -135,6 +136,7 @@ matrix: TRAVIS_OS_NAME=linux TRAVIS_COMPILER_NAME=gcc TRAVIS_BUILD_SYSTEM=mymake + HYPERROGUE_USE_GLEW=1 HYPERROGUE_USE_BRINGRIS=1 - os: osx # OSX, make, Bringris compiler: clang @@ -142,6 +144,7 @@ matrix: TRAVIS_OS_NAME=osx TRAVIS_COMPILER_NAME=clang TRAVIS_BUILD_SYSTEM=Makefile + HYPERROGUE_USE_GLEW=1 HYPERROGUE_USE_BRINGRIS=1 - os: osx # OSX, mymake, Bringris compiler: clang @@ -149,6 +152,7 @@ matrix: TRAVIS_OS_NAME=osx TRAVIS_COMPILER_NAME=clang TRAVIS_BUILD_SYSTEM=mymake + HYPERROGUE_USE_GLEW=1 HYPERROGUE_USE_BRINGRIS=1 - os: linux # Emscripten env: >- From 424bb61f8316baaeca6e796a09149db2091dff39 Mon Sep 17 00:00:00 2001 From: still-flow <46608177+still-flow@users.noreply.github.com> Date: Tue, 3 Nov 2020 03:07:17 +0300 Subject: [PATCH 6/6] fix sometimes-uninitialized warnings --- sky.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sky.cpp b/sky.cpp index 8e4527b18..b566f2d6b 100644 --- a/sky.cpp +++ b/sky.cpp @@ -196,8 +196,8 @@ void celldrawer::draw_ceiling() { case 2: { if(euclid) return; - color_t col; - color_t skycol; + color_t col = skycolor(c); + color_t skycol = 0xA0A0FF; switch(c->land) { case laWineyard: