2 * Elite - The New Kind.
4 * Reverse engineered from the BBC disk version of Elite.
5 * Additional material by C.J.Pinder.
7 * The original Elite code is (C) I.Bell & D.Braben 1984.
8 * This version re-engineered in C by C.J.Pinder 1999-2001.
10 * email: <christian@newkind.co.uk>
18 * Run the two intro screens.
19 * First is a rolling Cobra MkIII.
20 * Second is a parade of the various ships.
43 static int min_dist[NO_OF_SHIPS+1] = {0, 200, 800, 200, 200, 200, 300, 384, 200,
44 200, 200, 420, 900, 500, 800, 384, 384,
45 384, 384, 384, 200, 384, 384, 384, 0,
46 384, 0, 384, 384, 700, 384, 0, 0,
50 static Matrix intro_ship_matrix;
54 void initialise_intro1 (void)
57 set_init_matrix (intro_ship_matrix);
58 add_new_ship (SHIP_COBRA3, 0, 0, 4500, intro_ship_matrix, -127, -127);
62 void initialise_intro2 (void)
71 set_init_matrix (intro_ship_matrix);
72 add_new_ship (1, 0, 0, 5000, intro_ship_matrix, -127, -127);
77 void update_intro1 (void)
79 universe[0].location.z -= 100;
81 if (universe[0].location.z < 384)
82 universe[0].location.z = 384;
89 gfx_draw_sprite(IMG_ELITE_TXT, -1, 10);
91 gfx_display_centre_text (310, "Original Game (C) I.Bell & D.Braben.", 120, GFX_COL_WHITE);
92 gfx_display_centre_text (330, "Re-engineered by C.J.Pinder.", 120, GFX_COL_WHITE);
93 gfx_display_centre_text (360, "Load New Commander (Y/N)?", 140, GFX_COL_GOLD);
96 static void next_ship(int bump)
101 if (ship_no > NO_OF_SHIPS)
104 ship_no = NO_OF_SHIPS;
105 } while (min_dist[ship_no] == 0);
110 ship_count[universe[0].type] = 0;
111 universe[0].type = 0;
113 add_new_ship (ship_no, 0, 0, 4500, intro_ship_matrix, -127,
118 void update_intro2 (void)
123 if (kbd_left_pressed == 1) {
125 direction = -direction;
126 } else if (kbd_right_pressed == 1) {
128 direction = -direction;
129 } else if (show_time >= 140)
130 direction = -direction;
133 universe[0].location.z += direction;
135 if (universe[0].location.z < min_dist[ship_no])
136 universe[0].location.z = min_dist[ship_no];
138 if (universe[0].location.z > 4500)
139 next_ship(ship_bump);
146 gfx_draw_sprite (IMG_ELITE_TXT, -1, 10);
148 gfx_display_centre_text (360, "Press Fire or Space, Commander.", 140, GFX_COL_GOLD);
149 gfx_display_centre_text (330, ship_list[ship_no]->name, 120, GFX_COL_WHITE);