Skip to content
This repository was archived by the owner on Apr 19, 2022. It is now read-only.

Commit 446ba2e

Browse files
authored
Merge pull request #326 from ModusCreateOrg/325
325
2 parents 549ff60 + 9aa383b commit 446ba2e

38 files changed

Lines changed: 1446 additions & 310 deletions

Evade2/Attract.cpp

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ static const char scout_text[] PROGMEM = "SCOUT";
99
static const char bomber_text[] PROGMEM = "BOMBER";
1010
static const char assault_text[] PROGMEM = "ASSAULT";
1111

12-
static const char credits1[] PROGMEM = "CRAFTED BY:\nMODUS CREATE\nDECEMBER 2017.\nHAPPY HOLIDAYS!\n\nhttp://modus.co";
13-
static const char credits2[] PROGMEM = "DESIGN and MUSIC:\nJAY GARCIA";
12+
static const char credits1[] PROGMEM = "CRAFTED BY:\nMODUS CREATE\nDECEMBER 2017\n\n\nhttp://modus.co";
13+
static const char credits2[] PROGMEM = "MUSIC and SFX:\nJAY GARCIA";
1414
static const char credits3[] PROGMEM = "ART:\nMICHAEL TINTIUC\nJON VAN DALEN\nJD JONES\nJAY GARCIA";
15-
static const char credits4[] PROGMEM = "PROGRAMMING:\nMIKE SCHWARTZ\nJAY GARCIA\nDELIO BRIGNOLI\nMICHAEL TINTIUC\nANDY DENNIS";
15+
static const char credits4[] PROGMEM = "PROGRAMMING:\nMIKE SCHWARTZ\nJAY GARCIA\nMICHAEL TINTIUC\n";
16+
static const char credits5[] PROGMEM = "PROGRAMMING:\nDELIO BRIGNOLI\nSETH LEMMONS\nANDY DENNIS";
17+
static const char credits6[] PROGMEM = "PROGRAMMING:\nVADIM POPA\nLUCAS STILL\nGRGUR GRISOGONO";
1618

1719
const BYTE MAX_SCREEN = 2;
18-
const BYTE MAX_CREDITS = 3;
20+
const BYTE MAX_CREDITS = 5;
1921

2022
struct attract_data {
2123
BYTE screen;
@@ -66,9 +68,12 @@ static void init_screen(attract_data *ad, BYTE x = 6, BYTE y = 6) {
6668
case 3:
6769
ad->text = credits4;
6870
break;
69-
// case 4:
70-
// ad->text = credits5;
71-
// break;
71+
case 4:
72+
ad->text = credits5;
73+
break;
74+
case 5:
75+
ad->text = credits6;
76+
break;
7277
}
7378
}
7479

@@ -81,7 +86,6 @@ static void init_screen(attract_data *ad, BYTE x = 6, BYTE y = 6) {
8186

8287
void Attract::next(Process *me, Object *o) {
8388
attract_data *ad = (attract_data *)&o->x;
84-
Sound::play_sound(SFX_ENEMY_SHOOT);
8589

8690
ad->timer--;
8791
if (ad->timer < 0) {
@@ -92,6 +96,7 @@ void Attract::next(Process *me, Object *o) {
9296
return;
9397
}
9498
else {
99+
Sound::play_sound(SFX_NEXT_ATTRACT_SCREEN);
95100
init_screen(ad);
96101
me->sleep(1, typewriter);
97102
}
@@ -125,13 +130,15 @@ void Attract::typewriter(Process *me, Object *o) {
125130
}
126131
ad->timer = TYPEWRITER_SPEED;
127132
ad->offset++;
133+
Sound::play_sound(SFX_NEXT_ATTRACT_CHAR);
134+
128135
}
129136

130137
if (ad->enemy != -1) {
131138
Graphics::drawVectorGraphic(Enemy::enemy_graphic(ad->enemy), 64.0, 24.0, 0.0, 2.0);
132139
}
133140
if (game_mode == MODE_CREDITS) {
134-
Font::scale = .7 * 256;
141+
Font::scale = .85 * 256;
135142
}
136143
PGM_P p = ad->text;
137144
BYTE x = ad->x, y = ad->y;
@@ -154,15 +161,17 @@ void Attract::typewriter(Process *me, Object *o) {
154161
i++;
155162
}
156163
}
157-
if (game_mode == MODE_CREDITS) {
164+
// if (game_mode == MODE_CREDITS) {
158165
Font::scale = 0x100;
159-
}
166+
// }
160167
me->sleep(1);
161168
}
162169

163170
void Attract::entry(Process *me, Object *o) {
164171
attract_data *ad = (attract_data *)&o->x;
165172
ad->screen = 0;
166173
init_screen(ad);
174+
Sound::play_sound(SFX_NEXT_ATTRACT_SCREEN);
175+
167176
me->sleep(1, typewriter);
168177
}

Evade2/Boss.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,9 @@ void Boss::explode(Process *me, Object *o) {
209209
// Done exploding, move forward to the next wave
210210
if (o->state > NUM_FRAMES) {
211211
game_mode = MODE_NEXT_WAVE;
212-
Game::kills = 120;
212+
Game::kills = 65;
213213
Camera::vz = CAMERA_VZ;
214+
Sound::play_score(NEXT_WAVE_SONG);
214215

215216
ProcessManager::birth(Game::next_wave);
216217
me->suicide();
@@ -274,7 +275,7 @@ void Boss::start_action(Process *me, Object *o) {
274275
else {
275276
me->sleep(1);
276277
}
277-
}
278+
}
278279
else {
279280
o->y = Camera::y;
280281
o->z = Camera::z + z_dist;
@@ -302,12 +303,12 @@ void Boss::start_action(Process *me, Object *o) {
302303
}
303304

304305
void Boss::entry(Process *me, Object *o) {
305-
// Debugging
306-
// Boss::boss_type = 1;
307-
308306
// production
309307
Boss::boss_type = random(1, 3);
310308

309+
// Debugging
310+
// Boss::boss_type = 1;
311+
311312
game_mode = MODE_NEXT_WAVE;
312313
Game::kills = 0;
313314
Camera::vz = -20;
@@ -339,7 +340,7 @@ void Boss::entry(Process *me, Object *o) {
339340
init_orbit(o, random() & 1);
340341
Sound::play_score(STAGE_2_BOSS_SONG);
341342
}
342-
else {
343+
else {
343344
o->x = Camera::x - 512;
344345
o->vx = +10;
345346
o->vy = random(-3, 3);

Evade2/Game.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ void Game::next_wave(Process *me, Object *o) {
5353
Font::printf(26, alert_top, "START WAVE %d", Game::wave + 1);
5454
Font::scale = 256;
5555
Player::recharge_shield();
56-
57-
Sound::play_score(GET_READY_SONG);
5856
me->sleep(1);
5957
}
6058
}
@@ -142,8 +140,8 @@ void Game::get_ready(Process *me, Object *o) {
142140

143141
void Game::entry(Process *me, Object *o) {
144142
game_data *d = (game_data *)&o->x;
145-
d->timer = 60;
143+
d->timer = 65;
146144
d->theta = 90;
147-
Sound::play_score(GET_READY_SONG);
145+
Sound::play_score(NEXT_WAVE_SONG);
148146
me->sleep(1, get_ready);
149147
}

Evade2/Sound.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,19 @@ static Arduboy2Audio audio;
1010
// Todo change to <ATMLib.h> once we publish
1111
#include "sound/SFX.h"
1212
#include "sound/evade2_00_intro.h"
13-
#include "sound/evade2_00_intro_alt_smaller.h"
14-
#include "sound/evade2_01_stage_1.h"
13+
// #include "sound/evade2_01_stage_1.h"
1514
#include "sound/evade2_01_stage_1_alt_smaller.h"
1615
#include "sound/evade2_02_stage_1_boss.h"
1716
#include "sound/evade2_03_stage_2_alt_smaller.h"
1817
#include "sound/evade2_04_stage_2_boss.h"
1918

2019
#include "sound/evade2_05_stage_3.h"
2120
#include "sound/evade2_06_stage_3_boss.h"
22-
21+
// #include "sound/evade2_07_stage_4.h"
22+
// #include "sound/evade2_08_stage_4_boss_new.h"
2323
#include "sound/evade2_10_game_over.h"
2424
#include "sound/evade2_11_get_ready.h"
25+
#include "sound/evade2_12_next_wave.h"
2526

2627
BYTE current_song = -1;
2728

@@ -44,6 +45,8 @@ void Sound::play_sound(BYTE id) {
4445
(UBYTE *)&SFX_player_shoot,
4546
(UBYTE *)&SFX_enemy_shoot,
4647
(UBYTE *)&SFX_player_hit,
48+
(UBYTE *)&SFX_next_attract_screen,
49+
(UBYTE *)&SFX_next_attract_char
4750
};
4851

4952
atm_synth_stop_sfx_track(&sfx_state);
@@ -66,8 +69,7 @@ void Sound::stfu() {
6669

6770
void Sound::play_score(BYTE id) {
6871
static const PROGMEM UBYTE *const songs[] = {
69-
(UBYTE *)&evade2_00_intro_alt_smaller, // 0 INTRO_SONG
70-
// (UBYTE *)&evade2_01_stage_1, // 1 STAGE_1_SONG
72+
(UBYTE *)&evade2_00_intro, // 0 INTRO_SONG
7173
(UBYTE *)&evade2_01_stage_1_alt_smaller, // 1 STAGE_1_SONG
7274
(UBYTE *)&evade2_02_stage_1_boss, // 2 STAGE_1_BOSS_SONG
7375
(UBYTE *)&evade2_03_stage_2_alt_smaller, // 3 STAGE_2_SONG
@@ -76,6 +78,7 @@ void Sound::play_score(BYTE id) {
7678
(UBYTE *)&evade2_06_stage_3_boss, // 6 STAGE_3_BOSS_SONG
7779
(UBYTE *)&evade2_10_game_over, // 7 GAME_OVER_SONG
7880
(UBYTE *)&evade2_11_get_ready, // 8 GET_READY_SONG
81+
(UBYTE *)&evade2_12_next_wave, // 9 NEXT_WAVE_SONG
7982
};
8083

8184
if (current_song == id) {

Evade2/Sound.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
const BYTE SFX_PLAYER_SHOOT = 0;
77
const BYTE SFX_ENEMY_SHOOT = 1;
88
const BYTE SFX_PLAYER_HIT_BY_ENEMY = 2;
9+
const BYTE SFX_NEXT_ATTRACT_SCREEN = 3;
10+
const BYTE SFX_NEXT_ATTRACT_CHAR = 4;
911

1012
// SONGS
1113
const BYTE INTRO_SONG = 0;
@@ -15,14 +17,9 @@ const BYTE STAGE_2_SONG = 3;
1517
const BYTE STAGE_2_BOSS_SONG = 4;
1618
const BYTE STAGE_3_SONG = 5;
1719
const BYTE STAGE_3_BOSS_SONG = 6;
18-
19-
#if 0
20-
const BYTE STAGE_4_SONG = 7;
21-
const BYTE STAGE_4_BOSS_SONG = 8;
22-
#endif
23-
2420
const BYTE GAME_OVER_SONG = 7;
2521
const BYTE GET_READY_SONG = 8;
22+
const BYTE NEXT_WAVE_SONG = 9;
2623

2724
class Sound {
2825
public:

Evade2/img/boss_4_img.h

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
11
#ifndef BOSS_4_IMG_H
22
#define BOSS_4_IMG_H
3-
4-
// SVG Graphic source: svg_docs/output_from_ai/assault-1.svg
5-
// Number bytes 59
3+
// SVG Graphic source: svg_docs/output_from_ai/scout-2.svg
4+
// Number bytes 67
65
const PROGMEM BYTE boss_4_img[] = {
76
128, // Width (128 px)
8-
54, // Height (54 px)
9-
14, // Number of rows of coords (14)
7+
73, // Height (73 px)
8+
8, // Number of rows of coords (8)
109
// x0, y0, x1, y1
11-
-21, -27, 21, 16,
12-
-21, 16, 21, -27,
13-
21, -16, 11, -5,
14-
11, -5, 21, 5,
15-
-21, 5, -11, -5,
16-
-11, -5, -21, -16,
17-
-11, 27, -32, 5,
18-
-32, 5, -21, -5,
19-
11, 27, 32, 5,
20-
32, 5, 21, -5,
21-
-21, -16, -64, -16,
22-
21, -16, 64, -16,
23-
-11, 5, 0, 16,
24-
0, 16, 11, 5,
25-
10+
-55, -37, -9, 9,
11+
-64, 9, -37, -18,
12+
-37, 0, 0, -37,
13+
0, -37, 37, 0,
14+
-55, 37, -9, -9,
15+
55, -37, 9, 9,
16+
64, 9, 37, -18,
17+
55, 37, 9, -9,
2618
};
27-
#endif
19+
#endif

Evade2/sound/SFX.h

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,37 @@ const PROGMEM struct SFX_player_hit_data {
5353
},
5454
};
5555

56+
57+
58+
const PROGMEM struct SFX_next_attract_screen_data {
59+
uint8_t fmt;
60+
uint8_t pattern0[11];
61+
} SFX_next_attract_screen = {
62+
.fmt = ATM_SCORE_FMT_MINIMAL_MONO,
63+
.pattern0 = {
64+
ATM_CMD_M_SET_TEMPO(1),
65+
ATM_CMD_M_SET_VOLUME(80),
66+
ATM_CMD_I_NOTE_C5,
67+
ATM_CMD_M_DELAY_TICKS(1),
68+
ATM_CMD_I_NOTE_E5,
69+
ATM_CMD_M_DELAY_TICKS(2),
70+
ATM_CMD_I_STOP,
71+
},
72+
};
73+
74+
75+
const PROGMEM struct SFX_next_attract_char_data {
76+
uint8_t fmt;
77+
uint8_t pattern0[11];
78+
} SFX_next_attract_char = {
79+
.fmt = ATM_SCORE_FMT_MINIMAL_MONO,
80+
.pattern0 = {
81+
ATM_CMD_M_SET_TEMPO(1),
82+
ATM_CMD_M_SET_VOLUME(60),
83+
ATM_CMD_I_NOTE_D5,
84+
ATM_CMD_M_DELAY_TICKS(1),
85+
ATM_CMD_I_STOP,
86+
},
87+
};
88+
5689
#endif

0 commit comments

Comments
 (0)