Git Product home page Git Product logo

Comments (6)

lea2501 avatar lea2501 commented on June 12, 2024

Facing the same error here, in a devuan linux:

/home/lea/src/umoria-color/src/dungeon.cpp: In function ‘int caveGetTileColor(const Coord_t&)’:
/home/lea/src/umoria-color/src/dungeon.cpp:253:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
  253 |                 if ((game.treasure.list[tile.treasure_id].sub_category_id & (ITEM_SINGLE_STACK_MIN - 1)) < MAX_MUSHROOMS) {
      |                 ^~
/home/lea/src/umoria-color/src/dungeon.cpp:256:13: note: here
  256 |             default:
      |             ^~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/umoria.dir/build.make:264: CMakeFiles/umoria.dir/src/dungeon.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/umoria.dir/all] Error 2
make: *** [Makefile:103: all] Error 2

my gcc version is 10:
$ gcc --version gcc (Debian 10.2.1-6) 10.2.1 20210110

Kernel is 5.10.0:
$ uname -a Linux devuan 5.10.0-9-amd64 #1 SMP Debian 5.10.70-1 (2021-09-30) x86_64 GNU/Linux

from umoria-color.

andrewtweber avatar andrewtweber commented on June 12, 2024

wow sorry, I wasn't watching this repo and didn't realize there had been issues opened. Has either of you been able to figure it out? @dchmelik @lea2501

from umoria-color.

andrewtweber avatar andrewtweber commented on June 12, 2024

I think I just needed to add a // fall through comment so that the compiler knows I am intentionally not breaking from that switch statement.

Committed to master: a96b8bb

Please fetch the code and try again and let me know if it works. Sorry for the delay

from umoria-color.

dchmelik avatar dchmelik commented on June 12, 2024

wow sorry, I wasn't watching this repo and didn't realize there had been issues opened. Has either of you been able to figure it out?

Comment out CMakeLists.txt: set(cxx_warnings "${cxx_warnings} -Werror"). If you don't more will happen (see below)... I discovered this in recent days but there are bigger issues: the unofficial umoria fork you added colour back to was (I thought) not altering Moria 5.6 (algorithms/gameplay) except for updating to C++. The 5.7 fork has major differences with some aspects non-working/removed.

[ 98%] Building CXX object CMakeFiles/umoria.dir/src/wizard.cpp.o
> /home/d/math/src/games/roguelike/moria_angband_tome/umoria/src/game_save.cpp: In function ‘bool loadGame(bool&)’:
> /home/d/math/src/games/roguelike/moria_angband_tome/umoria/src/game_save.cpp:810:29: error: array subscript 66 is above array bounds of ‘Tile_t [66][198]’ [-Werror=array-bounds]
>   810 |                 if (tile >= &dg.floor[MAX_HEIGHT][0]) {
>       |                             ^~~~~~~~~~~~~~~~~~~~~~~~
> In file included from /home/d/math/src/games/roguelike/moria_angband_tome/umoria/src/headers.h:59,
>                  from /home/d/math/src/games/roguelike/moria_angband_tome/umoria/src/game_save.cpp:8:
> /home/d/math/src/games/roguelike/moria_angband_tome/umoria/src/dungeon.h:55:12: note: while referencing ‘Dungeon_t::floor’
>    55 |     Tile_t floor[MAX_HEIGHT][MAX_WIDTH];
>       |            ^~~~~
> cc1plus: all warnings being treated as errors
> make[2]: *** [CMakeFiles/umoria.dir/build.make:370: CMakeFiles/umoria.dir/src/game_save.cpp.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/umoria.dir/all] Error 2

make: *** [Makefile:91: all] Error 2

Comment out CMakeLists.txt: set(cxx_warnings "${cxx_warnings} -Werror").

from umoria-color.

andrewtweber avatar andrewtweber commented on June 12, 2024

@dchmelik the other commenter who had the same issue on Debian has it compiling successfully now that I’ve updated my color fork with the upstream.

If you’re able to try it again let me know if it’s working on your system too

from umoria-color.

dchmelik avatar dchmelik commented on June 12, 2024

I was able to compile also, though I'm having some other problems with the game which may depend what type of terminal I'm running it in.

from umoria-color.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.