Skip to content

Commit 16c7207

Browse files
committed
foliage is flammable
1 parent ade3178 commit 16c7207

15 files changed

Lines changed: 33 additions & 28 deletions

src/level_alive_api.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -980,10 +980,10 @@ auto level_alive_is_unused24(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> T
980980
return level_alive(g, v, l, is_unused24, p);
981981
}
982982

983-
auto level_alive_is_unused25(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp
983+
auto level_alive_is_flammable(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp
984984
{
985985
TRACE_DEBUG();
986-
return level_alive(g, v, l, is_unused25, p);
986+
return level_alive(g, v, l, is_flammable, p);
987987
}
988988

989989
auto level_alive_is_auto_wield(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp

src/level_count_api.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -981,10 +981,10 @@ auto level_count_is_unused24(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> u
981981
return level_count(g, v, l, is_unused24, p);
982982
}
983983

984-
auto level_count_is_unused25(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> uint32_t
984+
auto level_count_is_flammable(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> uint32_t
985985
{
986986
TRACE_DEBUG();
987-
return level_count(g, v, l, is_unused25, p);
987+
return level_count(g, v, l, is_flammable, p);
988988
}
989989

990990
auto level_count_is_auto_wield(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> uint32_t

src/level_flag_api.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -980,10 +980,10 @@ auto level_is_unused24(Gamep g, Levelsp v, Levelp l, const bpoint &p, Thingp me)
980980
return level_flag(g, v, l, is_unused24, p, me);
981981
}
982982

983-
auto level_is_unused25(Gamep g, Levelsp v, Levelp l, const bpoint &p, Thingp me) -> Thingp
983+
auto level_is_flammable(Gamep g, Levelsp v, Levelp l, const bpoint &p, Thingp me) -> Thingp
984984
{
985985
TRACE_DEBUG();
986-
return level_flag(g, v, l, is_unused25, p, me);
986+
return level_flag(g, v, l, is_flammable, p, me);
987987
}
988988

989989
auto level_is_auto_wield(Gamep g, Levelsp v, Levelp l, const bpoint &p, Thingp me) -> Thingp

src/level_flag_api_cached.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -980,10 +980,10 @@ auto level_is_unused24_cached(Gamep g, Levelsp v, Levelp l, const bpoint &p) ->
980980
return level_flag_cached(g, v, l, is_unused24, p);
981981
}
982982

983-
auto level_is_unused25_cached(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> bool
983+
auto level_is_flammable_cached(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> bool
984984
{
985985
TRACE_DEBUG();
986-
return level_flag_cached(g, v, l, is_unused25, p);
986+
return level_flag_cached(g, v, l, is_flammable, p);
987987
}
988988

989989
auto level_is_auto_wield_cached(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> bool

src/level_open_api.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -980,10 +980,10 @@ auto level_open_is_unused24(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Th
980980
return level_open(g, v, l, is_unused24, p);
981981
}
982982

983-
auto level_open_is_unused25(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp
983+
auto level_open_is_flammable(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp
984984
{
985985
TRACE_DEBUG();
986-
return level_open(g, v, l, is_unused25, p);
986+
return level_open(g, v, l, is_flammable, p);
987987
}
988988

989989
auto level_open_is_auto_wield(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp

src/my_level.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,7 @@ void level_fov(const FovContext & /*ctx*/);
968968
[[nodiscard]] auto level_is_extinguished_on_death(Gamep g, Levelsp v, Levelp l, const bpoint &p, Thingp me = nullptr) -> Thingp;
969969
[[nodiscard]] auto level_is_fire(Gamep g, Levelsp v, Levelp l, const bpoint &p, Thingp me = nullptr) -> Thingp;
970970
[[nodiscard]] auto level_is_fireball(Gamep g, Levelsp v, Levelp l, const bpoint &p, Thingp me = nullptr) -> Thingp;
971+
[[nodiscard]] auto level_is_flammable(Gamep g, Levelsp v, Levelp l, const bpoint &p, Thingp me = nullptr) -> Thingp;
971972
[[nodiscard]] auto level_is_flat(Gamep g, Levelsp v, Levelp l, const bpoint &p, Thingp me = nullptr) -> Thingp;
972973
[[nodiscard]] auto level_is_flesh(Gamep g, Levelsp v, Levelp l, const bpoint &p, Thingp me = nullptr) -> Thingp;
973974
[[nodiscard]] auto level_is_floating(Gamep g, Levelsp v, Levelp l, const bpoint &p, Thingp me = nullptr) -> Thingp;
@@ -1073,7 +1074,6 @@ void level_fov(const FovContext & /*ctx*/);
10731074
[[nodiscard]] auto level_is_unused22(Gamep g, Levelsp v, Levelp l, const bpoint &p, Thingp me = nullptr) -> Thingp;
10741075
[[nodiscard]] auto level_is_unused23(Gamep g, Levelsp v, Levelp l, const bpoint &p, Thingp me = nullptr) -> Thingp;
10751076
[[nodiscard]] auto level_is_unused24(Gamep g, Levelsp v, Levelp l, const bpoint &p, Thingp me = nullptr) -> Thingp;
1076-
[[nodiscard]] auto level_is_unused25(Gamep g, Levelsp v, Levelp l, const bpoint &p, Thingp me = nullptr) -> Thingp;
10771077
[[nodiscard]] auto level_is_unused3(Gamep g, Levelsp v, Levelp l, const bpoint &p, Thingp me = nullptr) -> Thingp;
10781078
[[nodiscard]] auto level_is_unused4(Gamep g, Levelsp v, Levelp l, const bpoint &p, Thingp me = nullptr) -> Thingp;
10791079
[[nodiscard]] auto level_is_unused46(Gamep g, Levelsp v, Levelp l, const bpoint &p, Thingp me = nullptr) -> Thingp;
@@ -1189,6 +1189,7 @@ void level_fov(const FovContext & /*ctx*/);
11891189
[[nodiscard]] auto level_is_extinguished_on_death_cached(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> bool;
11901190
[[nodiscard]] auto level_is_fire_cached(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> bool;
11911191
[[nodiscard]] auto level_is_fireball_cached(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> bool;
1192+
[[nodiscard]] auto level_is_flammable_cached(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> bool;
11921193
[[nodiscard]] auto level_is_flat_cached(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> bool;
11931194
[[nodiscard]] auto level_is_flesh_cached(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> bool;
11941195
[[nodiscard]] auto level_is_floating_cached(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> bool;
@@ -1294,7 +1295,6 @@ void level_fov(const FovContext & /*ctx*/);
12941295
[[nodiscard]] auto level_is_unused22_cached(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> bool;
12951296
[[nodiscard]] auto level_is_unused23_cached(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> bool;
12961297
[[nodiscard]] auto level_is_unused24_cached(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> bool;
1297-
[[nodiscard]] auto level_is_unused25_cached(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> bool;
12981298
[[nodiscard]] auto level_is_unused3_cached(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> bool;
12991299
[[nodiscard]] auto level_is_unused4_cached(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> bool;
13001300
[[nodiscard]] auto level_is_unused46_cached(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> bool;
@@ -1408,6 +1408,7 @@ void level_fov(const FovContext & /*ctx*/);
14081408
[[nodiscard]] auto level_alive_is_extinguished_on_death(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
14091409
[[nodiscard]] auto level_alive_is_fire(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
14101410
[[nodiscard]] auto level_alive_is_fireball(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
1411+
[[nodiscard]] auto level_alive_is_flammable(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
14111412
[[nodiscard]] auto level_alive_is_flat(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
14121413
[[nodiscard]] auto level_alive_is_flesh(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
14131414
[[nodiscard]] auto level_alive_is_floating(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
@@ -1513,7 +1514,6 @@ void level_fov(const FovContext & /*ctx*/);
15131514
[[nodiscard]] auto level_alive_is_unused22(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
15141515
[[nodiscard]] auto level_alive_is_unused23(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
15151516
[[nodiscard]] auto level_alive_is_unused24(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
1516-
[[nodiscard]] auto level_alive_is_unused25(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
15171517
[[nodiscard]] auto level_alive_is_unused3(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
15181518
[[nodiscard]] auto level_alive_is_unused4(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
15191519
[[nodiscard]] auto level_alive_is_unused46(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
@@ -1627,6 +1627,7 @@ void level_fov(const FovContext & /*ctx*/);
16271627
[[nodiscard]] auto level_count_is_extinguished_on_death(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> uint32_t;
16281628
[[nodiscard]] auto level_count_is_fire(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> uint32_t;
16291629
[[nodiscard]] auto level_count_is_fireball(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> uint32_t;
1630+
[[nodiscard]] auto level_count_is_flammable(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> uint32_t;
16301631
[[nodiscard]] auto level_count_is_flat(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> uint32_t;
16311632
[[nodiscard]] auto level_count_is_flesh(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> uint32_t;
16321633
[[nodiscard]] auto level_count_is_floating(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> uint32_t;
@@ -1732,7 +1733,6 @@ void level_fov(const FovContext & /*ctx*/);
17321733
[[nodiscard]] auto level_count_is_unused22(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> uint32_t;
17331734
[[nodiscard]] auto level_count_is_unused23(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> uint32_t;
17341735
[[nodiscard]] auto level_count_is_unused24(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> uint32_t;
1735-
[[nodiscard]] auto level_count_is_unused25(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> uint32_t;
17361736
[[nodiscard]] auto level_count_is_unused3(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> uint32_t;
17371737
[[nodiscard]] auto level_count_is_unused4(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> uint32_t;
17381738
[[nodiscard]] auto level_count_is_unused46(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> uint32_t;
@@ -1853,6 +1853,7 @@ void level_fov(const FovContext & /*ctx*/);
18531853
[[nodiscard]] auto level_open_is_extinguished_on_death(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
18541854
[[nodiscard]] auto level_open_is_fire(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
18551855
[[nodiscard]] auto level_open_is_fireball(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
1856+
[[nodiscard]] auto level_open_is_flammable(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
18561857
[[nodiscard]] auto level_open_is_flat(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
18571858
[[nodiscard]] auto level_open_is_flesh(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
18581859
[[nodiscard]] auto level_open_is_floating(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
@@ -1958,7 +1959,6 @@ void level_fov(const FovContext & /*ctx*/);
19581959
[[nodiscard]] auto level_open_is_unused22(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
19591960
[[nodiscard]] auto level_open_is_unused23(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
19601961
[[nodiscard]] auto level_open_is_unused24(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
1961-
[[nodiscard]] auto level_open_is_unused25(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
19621962
[[nodiscard]] auto level_open_is_unused3(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
19631963
[[nodiscard]] auto level_open_is_unused4(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;
19641964
[[nodiscard]] auto level_open_is_unused46(Gamep g, Levelsp v, Levelp l, const bpoint &p) -> Thingp;

src/my_thing.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,7 @@ using Thing = struct Thing {
744744
[[nodiscard]] auto thing_is_falling_incr(Gamep g, Levelsp v, Levelp l, Thingp t, int val = 1) -> int;
745745
[[nodiscard]] auto thing_is_fire(Thingp t) -> bool;
746746
[[nodiscard]] auto thing_is_fireball(Thingp t) -> bool;
747+
[[nodiscard]] auto thing_is_flammable(Thingp t) -> bool;
747748
[[nodiscard]] auto thing_is_flat(Thingp t) -> bool;
748749
[[nodiscard]] auto thing_is_flesh(Thingp t) -> bool;
749750
[[nodiscard]] auto thing_is_floating(Thingp t) -> bool;
@@ -854,7 +855,6 @@ using Thing = struct Thing {
854855
[[nodiscard]] auto thing_is_unused22(Thingp t) -> bool;
855856
[[nodiscard]] auto thing_is_unused23(Thingp t) -> bool;
856857
[[nodiscard]] auto thing_is_unused24(Thingp t) -> bool;
857-
[[nodiscard]] auto thing_is_unused25(Thingp t) -> bool;
858858
[[nodiscard]] auto thing_is_unused3(Thingp t) -> bool;
859859
[[nodiscard]] auto thing_is_unused4(Thingp t) -> bool;
860860
[[nodiscard]] auto thing_is_unused46(Thingp t) -> bool;

src/my_tp.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
list_macro(is_unused22, "is_unused22"), /* newline */ \
156156
list_macro(is_unused23, "is_unused23"), /* newline */ \
157157
list_macro(is_unused24, "is_unused24"), /* newline */ \
158-
list_macro(is_unused25, "is_unused25"), /* newline */ \
158+
list_macro(is_flammable, "is_flammable"), /* newline */ \
159159
list_macro(is_auto_wield, "is_auto_wield"), /* newline */ \
160160
list_macro(is_dead_when_discharged, "is_dead_when_discharged"), /* newline */ \
161161
list_macro(is_able_to_be_wielded, "is_able_to_be_wielded"), /* newline */ \
@@ -605,6 +605,7 @@ class Tp;
605605
[[nodiscard]] auto tp_is_extinguished_on_death(Tpp tp) -> bool;
606606
[[nodiscard]] auto tp_is_fire(Tpp tp) -> bool;
607607
[[nodiscard]] auto tp_is_fireball(Tpp tp) -> bool;
608+
[[nodiscard]] auto tp_is_flammable(Tpp tp) -> bool;
608609
[[nodiscard]] auto tp_is_flat(Tpp tp) -> bool;
609610
[[nodiscard]] auto tp_is_flesh(Tpp tp) -> bool;
610611
[[nodiscard]] auto tp_is_floating(Tpp tp) -> bool;
@@ -712,7 +713,6 @@ class Tp;
712713
[[nodiscard]] auto tp_is_unused22(Tpp tp) -> bool;
713714
[[nodiscard]] auto tp_is_unused23(Tpp tp) -> bool;
714715
[[nodiscard]] auto tp_is_unused24(Tpp tp) -> bool;
715-
[[nodiscard]] auto tp_is_unused25(Tpp tp) -> bool;
716716
[[nodiscard]] auto tp_is_unused3(Tpp tp) -> bool;
717717
[[nodiscard]] auto tp_is_unused4(Tpp tp) -> bool;
718718
[[nodiscard]] auto tp_is_unused46(Tpp tp) -> bool;

src/thing_api.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,15 +1545,15 @@ auto thing_is_unused24(Thingp t) -> bool
15451545
return tp_flag(thing_tp(t), is_unused24) != 0;
15461546
}
15471547

1548-
auto thing_is_unused25(Thingp t) -> bool
1548+
auto thing_is_flammable(Thingp t) -> bool
15491549
{
15501550
TRACE_DEBUG();
15511551

15521552
if (t == nullptr) {
15531553
ERR("no thing pointer");
15541554
return false;
15551555
}
1556-
return tp_flag(thing_tp(t), is_unused25) != 0;
1556+
return tp_flag(thing_tp(t), is_flammable) != 0;
15571557
}
15581558

15591559
auto thing_is_auto_wield(Thingp t) -> bool

src/thing_burning.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void thing_continue_to_burn_check(Gamep g, Levelsp v, Levelp l, Thingp t)
7373
//
7474
// Spawn more flames?
7575
//
76-
if (thing_is_combustible(t)) {
76+
if (thing_is_flying(t) || thing_is_combustible(t)) {
7777
if (level_count_is_fire(g, v, l, thing_at(t)) < 2) {
7878
THING_DBG(t, "spawn additional flames");
7979
TRACE_INDENT();

0 commit comments

Comments
 (0)