mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-31 13:10:39 +00:00
- Duke: const-ify SE24 tile lists
This commit is contained in:
parent
c8d65a1f06
commit
f4cc5b5b89
4 changed files with 7 additions and 7 deletions
|
@ -4501,11 +4501,11 @@ void handle_se27(DDukeActor* actor)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void handle_se24(DDukeActor *actor, int16_t *list1, int16_t *list2, bool scroll, int TRIPBOMB, int LASERLINE, int CRANE, int shift)
|
||||
void handle_se24(DDukeActor *actor, const int16_t *list1, const int16_t *list2, bool scroll, int TRIPBOMB, int LASERLINE, int CRANE, int shift)
|
||||
{
|
||||
int* t = &actor->temp_data[0];
|
||||
|
||||
auto testlist = [](int16_t* list, int val) { for (int i = 0; list[i] > 0; i++) if (list[i] == val) return true; return false; };
|
||||
auto testlist = [](const int16_t* list, int val) { for (int i = 0; list[i] > 0; i++) if (list[i] == val) return true; return false; };
|
||||
|
||||
if (t[4]) return;
|
||||
|
||||
|
|
|
@ -3696,8 +3696,8 @@ void moveeffectors_d(void) //STATNUM 3
|
|||
case SE_24_CONVEYOR:
|
||||
case SE_34:
|
||||
{
|
||||
static int16_t list1[] = { BLOODPOOL, PUKE, FOOTPRINTS, FOOTPRINTS2, FOOTPRINTS3, FOOTPRINTS4, BULLETHOLE, BLOODSPLAT1, BLOODSPLAT2, BLOODSPLAT3, BLOODSPLAT4, -1 };
|
||||
static int16_t list2[] = { BOLT1, BOLT1 + 1,BOLT1 + 2, BOLT1 + 3, SIDEBOLT1, SIDEBOLT1 + 1, SIDEBOLT1 + 2, SIDEBOLT1 + 3, -1 };
|
||||
static const int16_t list1[] = { BLOODPOOL, PUKE, FOOTPRINTS, FOOTPRINTS2, FOOTPRINTS3, FOOTPRINTS4, BULLETHOLE, BLOODSPLAT1, BLOODSPLAT2, BLOODSPLAT3, BLOODSPLAT4, -1 };
|
||||
static const int16_t list2[] = { BOLT1, BOLT1 + 1,BOLT1 + 2, BOLT1 + 3, SIDEBOLT1, SIDEBOLT1 + 1, SIDEBOLT1 + 2, SIDEBOLT1 + 3, -1 };
|
||||
handle_se24(act, list1, list2, true, TRIPBOMB, LASERLINE, CRANE, 2);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -3574,8 +3574,8 @@ void moveeffectors_r(void) //STATNUM 3
|
|||
case SE_24_CONVEYOR:
|
||||
case SE_34:
|
||||
{
|
||||
static int16_t list1[] = { BLOODPOOL, PUKE, FOOTPRINTS, FOOTPRINTS2, FOOTPRINTS3, -1 };
|
||||
static int16_t list2[] = { BOLT1, BOLT1 + 1,BOLT1 + 2, BOLT1 + 3, -1 };
|
||||
static const int16_t list1[] = { BLOODPOOL, PUKE, FOOTPRINTS, FOOTPRINTS2, FOOTPRINTS3, -1 };
|
||||
static const int16_t list2[] = { BOLT1, BOLT1 + 1,BOLT1 + 2, BOLT1 + 3, -1 };
|
||||
handle_se24(act, list1, list2, st != 156, BULLETHOLE, -1, CRANE, 1);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ void handle_se19(DDukeActor* i, int BIGFORCE);
|
|||
void handle_se20(DDukeActor* i);
|
||||
void handle_se21(DDukeActor* i);
|
||||
void handle_se22(DDukeActor* i);
|
||||
void handle_se24(DDukeActor* actor, int16_t* list1, int16_t* list2, bool scroll, int TRIPBOMB, int LASERLINE, int CRANE, int shift);
|
||||
void handle_se24(DDukeActor* actor, const int16_t* list1, const int16_t* list2, bool scroll, int TRIPBOMB, int LASERLINE, int CRANE, int shift);
|
||||
void handle_se25(DDukeActor* a, int t_index, int snd1, int snd2);
|
||||
void handle_se26(DDukeActor* i);
|
||||
void handle_se27(DDukeActor* i);
|
||||
|
|
Loading…
Reference in a new issue