diff --git a/src/alien.cpp b/src/alien.cpp index 1bbc8da..fd1cd9a 100644 --- a/src/alien.cpp +++ b/src/alien.cpp @@ -743,15 +743,15 @@ void aliens_init() break; case MISN_ALLEZ: - aliens[ALIEN_GOODTRANSPORT] = alien_defs[CD_GOODTRANSPORT]; + aliens[ALIEN_FRIEND1] = alien_defs[CD_GOODTRANSPORT]; break; case MISN_URUSOR: - aliens[20] = alien_defs[CD_CARGOSHIP]; - aliens[21] = alien_defs[CD_CARGOSHIP]; - aliens[22] = alien_defs[CD_CARGOSHIP]; - aliens[23] = alien_defs[CD_CARGOSHIP]; - aliens[24] = alien_defs[CD_CARGOSHIP]; + aliens[ALIEN_BOSS_PART1] = alien_defs[CD_CARGOSHIP]; + aliens[ALIEN_BOSS_PART2] = alien_defs[CD_CARGOSHIP]; + aliens[ALIEN_BOSS_PART3] = alien_defs[CD_CARGOSHIP]; + aliens[ALIEN_BOSS_PART4] = alien_defs[CD_CARGOSHIP]; + aliens[ALIEN_BOSS_PART5] = alien_defs[CD_CARGOSHIP]; break; case MISN_ELAMALE: @@ -761,8 +761,8 @@ void aliens_init() aliens[ALIEN_BOSS_PART3] = alien_defs[CD_BOSS2_WING3]; aliens[ALIEN_BOSS_PART4] = alien_defs[CD_BOSS2_WING4]; aliens[ALIEN_KLINE] = alien_defs[CD_KLINE]; - aliens[20] = alien_defs[CD_SLAVETRANSPORT]; - aliens[21] = alien_defs[CD_SLAVETRANSPORT]; + aliens[ALIEN_BOSS_PART5] = alien_defs[CD_SLAVETRANSPORT]; + aliens[ALIEN_BOSS_PART6] = alien_defs[CD_SLAVETRANSPORT]; break; case MISN_ODEON: @@ -775,15 +775,15 @@ void aliens_init() aliens[ALIEN_BOSS_PART2] = alien_defs[CD_BOSS2_WING2]; aliens[ALIEN_BOSS_PART3] = alien_defs[CD_BOSS2_WING3]; aliens[ALIEN_BOSS_PART4] = alien_defs[CD_BOSS2_WING4]; - aliens[ALIEN_GOODTRANSPORT] = alien_defs[CD_REBELCARRIER]; - aliens[20] = alien_defs[CD_REBELCARRIER]; + aliens[ALIEN_FRIEND1] = alien_defs[CD_REBELCARRIER]; + aliens[ALIEN_FRIEND2] = alien_defs[CD_REBELCARRIER]; break; case MISN_ALMARTHA: aliens[ALIEN_BOSS_PART1] = alien_defs[CD_CLOAKFIGHTER]; aliens[ALIEN_BOSS_PART2] = alien_defs[CD_CLOAKFIGHTER]; aliens[ALIEN_BOSS_PART3] = alien_defs[CD_CLOAKFIGHTER]; - aliens[ALIEN_GOODTRANSPORT] = alien_defs[CD_KRASS]; + aliens[ALIEN_FRIEND1] = alien_defs[CD_KRASS]; break; case MISN_POSWIC: @@ -805,8 +805,8 @@ void aliens_init() aliens[ALIEN_BOSS_PART2] = alien_defs[CD_BARRIER]; aliens[ALIEN_BOSS_PART3] = alien_defs[CD_BARRIER]; aliens[ALIEN_BOSS_PART4] = alien_defs[CD_BARRIER]; - aliens[20] = alien_defs[CD_BARRIER]; - aliens[21] = alien_defs[CD_BARRIER]; + aliens[ALIEN_BOSS_PART5] = alien_defs[CD_BARRIER]; + aliens[ALIEN_BOSS_PART6] = alien_defs[CD_BARRIER]; break; case MISN_NEPTUNE: @@ -815,7 +815,7 @@ void aliens_init() aliens[ALIEN_BOSS_PART2] = alien_defs[CD_MOBILESHIELD]; aliens[ALIEN_BOSS_PART3] = alien_defs[CD_MOBILESHIELD]; aliens[ALIEN_BOSS_PART4] = alien_defs[CD_MOBILESHIELD]; - aliens[20] = alien_defs[CD_MOBILESHIELD]; + aliens[ALIEN_BOSS_PART5] = alien_defs[CD_MOBILESHIELD]; break; case MISN_URANUS: @@ -825,12 +825,12 @@ void aliens_init() break; case MISN_SATURN: - aliens[9] = alien_defs[CD_MOBILE_RAY]; - aliens[10] = alien_defs[CD_MOBILE_RAY]; - aliens[11] = alien_defs[CD_MOBILE_RAY]; - aliens[12] = alien_defs[CD_MOBILE_RAY]; - aliens[13] = alien_defs[CD_MOBILE_RAY]; - aliens[14] = alien_defs[CD_MOBILE_RAY]; + aliens[ALIEN_BOSS_PART1] = alien_defs[CD_MOBILE_RAY]; + aliens[ALIEN_BOSS_PART2] = alien_defs[CD_MOBILE_RAY]; + aliens[ALIEN_BOSS_PART3] = alien_defs[CD_MOBILE_RAY]; + aliens[ALIEN_BOSS_PART4] = alien_defs[CD_MOBILE_RAY]; + aliens[ALIEN_BOSS_PART5] = alien_defs[CD_MOBILE_RAY]; + aliens[ALIEN_BOSS_PART6] = alien_defs[CD_MOBILE_RAY]; break; case MISN_JUPITER: @@ -893,7 +893,7 @@ void aliens_init() aliens[i].speed = 3; } - if ((aliens[i].classDef == CD_MOBILE_RAY) && (i >= 11)) + if ((aliens[i].classDef == CD_MOBILE_RAY) && (i >= ALIEN_BOSS_PART3)) { aliens[i].active = false; } diff --git a/src/defs.h b/src/defs.h index 37b048d..1de05da 100644 --- a/src/defs.h +++ b/src/defs.h @@ -133,16 +133,19 @@ enum { // These are for Alien *indexes* NOT classdefs!! enum { - ALIEN_BOSS_PART4 = 10, - ALIEN_BOSS_PART3 = 11, - ALIEN_BOSS_PART2 = 12, - ALIEN_BOSS_PART1 = 13, - ALIEN_BOSS = 14, + ALIEN_BOSS = 10, + ALIEN_BOSS_PART1, + ALIEN_BOSS_PART2, + ALIEN_BOSS_PART3, + ALIEN_BOSS_PART4, + ALIEN_BOSS_PART5, + ALIEN_BOSS_PART6, ALIEN_KLINE, ALIEN_PHOEBE, ALIEN_URSULA, ALIEN_SID, - ALIEN_GOODTRANSPORT = 19, + ALIEN_FRIEND1, + ALIEN_FRIEND2, ALIEN_MAX = 25 }; diff --git a/src/event.cpp b/src/event.cpp index 58826ff..d06c593 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -97,19 +97,19 @@ void events_init() events[3].time = 60; events[3].face = FACE_CREW; strcpy(events[3].message, "Alright! We've got the weapons working again! Now to look at the engines..."); - events[3].entity = ALIEN_GOODTRANSPORT; + events[3].entity = ALIEN_FRIEND1; events[3].flag = -FL_NOFIRE; events[4].time = 80; events[4].face = FACE_CREW; strcpy(events[4].message, "DAMN! The guns are offline again! What you guys doing back there?!"); - events[4].entity = ALIEN_GOODTRANSPORT; + events[4].entity = ALIEN_FRIEND1; events[4].flag = FL_NOFIRE; events[5].time = 100; events[5].face = FACE_CREW; strcpy(events[5].message, "Chris, HELP!! We've lost all system power! We're a sitting duck out here!"); - events[5].entity = ALIEN_GOODTRANSPORT; + events[5].entity = ALIEN_FRIEND1; events[5].flag = FL_DISABLED; events[6].time = 120; @@ -119,7 +119,7 @@ void events_init() events[7].time = 140; events[7].face = FACE_CREW; strcpy(events[7].message, "Okay! We've fixed that one. We think we've found the problem with the engines too..."); - events[7].entity = ALIEN_GOODTRANSPORT; + events[7].entity = ALIEN_FRIEND1; events[7].flag = -FL_DISABLED; events[8].time = 177; @@ -127,7 +127,7 @@ void events_init() strcpy(events[8].message, "Engines fixed! Let's move!"); events[9].time = 180; - events[9].entity = ALIEN_GOODTRANSPORT; + events[9].entity = ALIEN_FRIEND1; events[9].flag = FL_LEAVESECTOR | FL_IMMORTAL; break; @@ -230,7 +230,7 @@ void events_init() events[8].time = 150; events[8].face = FACE_KRASS; strcpy(events[8].message, "I've earned my fee. I'll see you around, boy!"); - events[8].entity = ALIEN_GOODTRANSPORT; + events[8].entity = ALIEN_FRIEND1; events[8].flag = FL_LEAVESECTOR; break; @@ -248,28 +248,28 @@ void events_init() events[0].time = 45; events[0].face = FACE_SID; strcpy(events[0].message, "Chris! Another two of those ray cannons just arrived in your sector!"); - events[0].entity = 11; + events[0].entity = ALIEN_BOSS_PART3; events[0].flag = -FL_ACTIVATE; events[1].time = 45; - events[1].entity = 12; + events[1].entity = ALIEN_BOSS_PART4; events[1].flag = -FL_ACTIVATE; events[2].time = 90; events[2].face = FACE_SID; strcpy(events[2].message, "Two more!"); - events[2].entity = 13; + events[2].entity = ALIEN_BOSS_PART5; events[2].flag = -FL_ACTIVATE; events[3].time = 90; - events[3].entity = 14; + events[3].entity = ALIEN_BOSS_PART6; events[3].flag = -FL_ACTIVATE; break; case MISN_JUPITER: events[0].time = 1; - events[0].entity = 10; + events[0].entity = ALIEN_BOSS_PART1; events[0].flag = -FL_ACTIVATE; events[1].time = 2; @@ -285,7 +285,7 @@ void events_init() strcpy(events[3].message, "Good point. It would be foolish to expect anything else."); events[4].time = 15; - events[4].entity = 11; + events[4].entity = ALIEN_BOSS_PART2; events[4].flag = -FL_ACTIVATE; events[5].time = 20; @@ -297,11 +297,11 @@ void events_init() strcpy(events[6].message, "I have a name, you know. Do you remember it?"); events[4].time = 45; - events[4].entity = 12; + events[4].entity = ALIEN_BOSS_PART3; events[4].flag = -FL_ACTIVATE; events[4].time = 45; - events[4].entity = 13; + events[4].entity = ALIEN_BOSS_PART4; events[4].flag = -FL_ACTIVATE; break; diff --git a/src/game.cpp b/src/game.cpp index a0d1be5..6cccf27 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2041,15 +2041,15 @@ int game_mainLoop() { if ((rand() % 5) > 0) { - aliens[10] = alien_defs[CD_CLOAKFIGHTER]; - aliens[10].owner = &aliens[10]; - aliens[10].target = &aliens[10]; - aliens[10].shield = 1000; - aliens[10].active = true; - aliens[10].x = player.x - 1000; - aliens[10].y = player.y; - player_setTarget(10); - aliens[10].shield = game.experimentalShield; + aliens[ALIEN_BOSS] = alien_defs[CD_CLOAKFIGHTER]; + aliens[ALIEN_BOSS].owner = &aliens[ALIEN_BOSS]; + aliens[ALIEN_BOSS].target = &aliens[ALIEN_BOSS]; + aliens[ALIEN_BOSS].shield = 1000; + aliens[ALIEN_BOSS].active = true; + aliens[ALIEN_BOSS].x = player.x - 1000; + aliens[ALIEN_BOSS].y = player.y; + player_setTarget(ALIEN_BOSS); + aliens[ALIEN_BOSS].shield = game.experimentalShield; } } } @@ -2086,7 +2086,7 @@ int game_mainLoop() player_setTarget(ALIEN_PHOEBE); break; case MISN_ALLEZ: - player_setTarget(ALIEN_GOODTRANSPORT); + player_setTarget(ALIEN_FRIEND1); break; case MISN_URUSOR: player_setTarget(ALIEN_SID);