diff --git a/Makefile.mac b/Makefile.mac index 502e79c5..46847ecf 100644 --- a/Makefile.mac +++ b/Makefile.mac @@ -6,7 +6,8 @@ # Run "brew install sdl_ttf". # Run "make -f Makefile.mac" to build HyperRogue as ./hyper. -CXXFLAGS += -std=c++11 -DMAC +CXXFLAGS += -std=c++11 -march=native -DMAC +# CXXFLAGS += -DCAP_ROGUEVIZ CXXFLAGS += -W -Wall -Wextra -pedantic CXXFLAGS += -Wno-format-pedantic -Wno-unused-parameter -Wno-char-subscripts -Wno-missing-field-initializers -Wno-vla-extension CXXFLAGS += ${EXTRA_CXXFLAGS} @@ -19,7 +20,7 @@ hyper: hyper.o hyper.o: *.cpp language-data.cpp $(CXX) $(CXXFLAGS) -O2 -c hyper.cpp -langen: langen.cpp +langen: langen.cpp language-??.cpp language-ptbr.cpp $(CXX) $(CXXFLAGS) -O0 -Wno-embedded-directive langen.cpp -o langen # Generation of language-data.cpp diff --git a/game.cpp b/game.cpp index 8c0e47eb..2f5ecdc2 100644 --- a/game.cpp +++ b/game.cpp @@ -1157,8 +1157,6 @@ bool outlawNearby(cell *c, int dist) { return false; } -// int monstersnear(cell *c, cell *nocount = NULL, eMonster who = moPlayer, cell *pushto = NULL) { - namespace stalemate { vector moves; bool nextturn; @@ -1197,12 +1195,12 @@ eMonster active_switch() { vector crush_now, crush_next; -int monstersnear(stalemate1& sm) { +bool monstersnear(stalemate1& sm) { cell *c = sm.moveto; bool eaten = false; - if(hardcore && sm.who == moPlayer) return 0; + if(hardcore && sm.who == moPlayer) return false; int res = 0; bool fast = false; @@ -1286,12 +1284,12 @@ int monstersnear(stalemate1& sm) { if(sm.who == moPlayer && res && markOrb2(itOrbDomination) && c->monst) res = 0; - return res; + return !!res; } namespace multi { bool aftermove; } -int monstersnear2(); +bool monstersnear2(); int lastkills; @@ -1324,9 +1322,9 @@ bool swordConflict(const stalemate1& sm1, const stalemate1& sm2) { return false; } -int monstersnear2() { +bool monstersnear2() { multi::cpid++; - int b = 0; + bool b = false; bool recorduse[ittypes]; for(int i=0; i 8) - { b = 1; which = moAirball; } + { b = true; which = moAirball; } } for(int i=0; !b && i x7(stalemate::who, who); - int b; + bool b; if(who == moPlayer && c->wall == waBigStatue) { eWall w = comefrom->wall; c->wall = waNone; diff --git a/orbs.cpp b/orbs.cpp index b273b040..c95eb9df 100644 --- a/orbs.cpp +++ b/orbs.cpp @@ -947,12 +947,12 @@ void useOrbOfDragon(cell *c) { checkmoveO(); } -int monstersnearO(orbAction a, cell *c, cell *nocount, eMonster who, cell *pushto, cell *comefrom) { +bool monstersnearO(orbAction a, cell *c, cell *nocount, eMonster who, cell *pushto, cell *comefrom) { // printf("[a = %d] ", a); - if(shmup::on) return 0; + if(shmup::on) return false; if(a == roCheck && multi::players > 1) - return 1; - else if(a == roMultiCheck) return 0; + return true; + else if(a == roMultiCheck) return false; else return monstersnear(c, nocount, who, pushto, comefrom); }