Permalink
Browse files

STARTREK: Save mission-specific variables

  • Loading branch information...
Drenn1 authored and sev- committed Jul 25, 2018
1 parent d23965e commit 55725257910d69eec219d12bf68474289526faaa
Showing with 363 additions and 5 deletions.
  1. +1 −0 engines/startrek/awaymission.h
  2. +5 −4 engines/startrek/room.h
  3. +354 −1 engines/startrek/saveload.cpp
  4. +3 −0 engines/startrek/text.h
@@ -24,6 +24,7 @@
#define STARTREK_AWAYMISSION_H

// All variables here get cleared to 0 upon starting an away mission.
// NOTE: Any added or changed variables here must be mirrored in "saveload.cpp".
struct AwayMission {
// These timers count down automatically when nonzero. When they reach 0,
// ACTION_TIMER_EXPIRED is invoked with the corresponding index (0-7).
@@ -2136,8 +2136,9 @@ class Room {
void trial5UseBlueGem3OnHole3();
void trial5UseMedkitAnywhere();

private:
public:
// Room-specific variables. This is memset'ed to 0 when the room is initialized.
// NOTE: Any changes here must be reflected in saveload.cpp.
union {
struct {
// demon0
@@ -2147,8 +2148,8 @@ class Room {
bool movingToBottomDoor; // 0xcd

// demon1
bool klingonShot[3]; // 0xca
int numKlingonsKilled;
byte klingonShot[3]; // 0xca
int16 numKlingonsKilled;
byte attackIndex;
bool kirkShooting;
char d6[10];
@@ -2263,7 +2264,7 @@ class Room {
// feather1
byte snakeInHole; // 0xca
bool scannedSnake; // 0xcb
bool crewEscaped[4]; // 0xcc
byte crewEscaped[4]; // 0xcc
byte crewmanClimbingVine;

// feather2
Oops, something went wrong.

0 comments on commit 5572525

Please sign in to comment.