about summary refs log tree commit diff stats
path: root/data/maps/the_symbolic/rooms/Main Area.txtpb
blob: 37fdb1fc3c886846c78e570aa706b6fdca6a6576 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
#include "message_system.h"
#include "game.h"
#include "util.h"

const int CHARS_TO_REVEAL = 1;
const int CHARS_PER_BEEP = 8;

void MessageSystem::tick(double dt) {
  if (game_.isGameplayPaused()) return;

  if (barsState_ == BarsState::Opening || barsState_ == BarsState::Closing) {
    accum_ += dt;

    if (accum_ >= length_) {
      if (barsState_ == BarsState::Opening) {
        barsState_ = BarsState::Open;
      } else {
        barsState_ = BarsState::Closed;
      }
    }
  } else if (barsState_ == BarsState::Open) {
    if (!linesToShow_.empty()) {
      textAdvTimer_.accumulate(dt);
      while (textAdvTimer_.step()) {
        // Try to advance text on the first line that isn't totally revealed yet.pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
name: "Main Area"
panels {
  name: "JUSTICE"
  path: "Panels/Negation/justice"
  clue: "justice"
  answer: "ice"
  symbols: EVAL
}
panels {
  name: "NOTICE (1)"
  path: "Panels/Negation/notice"
  clue: "notice"
  answer: "water"
  symbols: EVAL
}
panels {
  name: "NOTICE (2)"
  path: "Panels/Negation/notice_neg"
  clue: "notice"
  answer: "ice"
  symbols: EVAL
}
panels {
  name: "NOTICE (3)"
  path: "Panels/Negation/notice_neg2"
  clue: "notice"
  answer: "ice"
  symbols: EVAL
}
panels {
  name: "UNABLE (1)"
  path: "Panels/Negation/notable"
  clue: "unable"
  answer: "notable"
  symbols: EVAL
}
panels {
  name: "UNABLE (2)"
  path: "Panels/Negation/unable"
  clue: "unable"
  answer: "able"
  symbols: SUN
}
panels {
  name: "LINEARLY"
  path: "Panels/Concatenation/linearly"
  clue: "linearly"
  answer: "lily"
  symbols: EVAL
}
panels {
  name: "SADDLED"
  path: "Panels/Concatenation/saddled"
  clue: "saddled"
  answer: "sled"
  symbols: EVAL
}
panels {
  name: "PADDING"
  path: "Panels/Concatenation/saddled2"
  clue: "padding"
  answer: "pinging"
  symbols: EVAL
}
panels {
  name: "BRINGING"
  path: "Panels/Concatenation/stranding"
  clue: "bringing"
  answer: "branding"
  symbols: EVAL
}
panels {
  name: "THOUSANDS"
  path: "Panels/Concatenation/panda"
  clue: "thousands"
  answer: "thou"
  symbols: EVAL
}
panels {
  name: "REINDICT"
  path: "Panels/Insertion/reindict"
  clue: "reindict"
  answer: "direct"
  symbols: EVAL
}
panels {
  name: "LINEAGE"
  path: "Panels/Insertion/lineage"
  clue: "lineage"
  answer: "eagle"
  symbols: EVAL
}
panels {
  name: "TINCTURE"
  path: "Panels/Insertion/tincture"
  clue: "tincture"
  answer: "cure"
  symbols: EVAL
}
panels {
  name: "IMMATURE"
  path: "Panels/Insertion/miniature"
  clue: "immature"
  answer: "miniature"
  symbols: EVAL
}
panels {
  name: "THING"
  path: "Panels/Insertion/hinting"
  clue: "thing"
  answer: "hinting"
  symbols: EVAL
}
panels {
  name: "SOME"
  path: "Panels/Fractions/wholesome"
  clue: "some"
  answer: "wholesome"
  symbols: EVAL
}
panels {
  name: "HALFTIME (1)"
  path: "Panels/Fractions/halftime"
  clue: "halftime"
  answer: "me"
  symbols: EVAL
}
panels {
  name: "HALFTIME (2)"
  path: "Panels/Fractions/halftime2"
  clue: "halftime"
  answer: "i"
  symbols: EVAL
}
panels {
  name: "QUARTERBACK"
  path: "Panels/Fractions/quarterback"
  clue: "quarterback"
  answer: "a"
  symbols: EVAL
}
panels {
  name: "NORTHERN"
  path: "Panels/Removal/northern"
  clue: "northern"
  answer: "then"
  symbols: EVAL
}
panels {
  name: "INMATE"
  path: "Panels/Removal/nominate"
  clue: "inmate"
  answer: "nominate"
  symbols: EVAL
}
panels {
  name: "NOTCHES"
  path: "Panels/Removal/notches"
  clue: "notches"
  answer: "chest"
  symbols: EVAL
}
panels {
  name: "VIOLET (1)"
  path: "Panels/Removal/nonviolent"
  clue: "violet"
  answer: "nonviolent"
  symbols: EVAL
}
panels {
  name: "VIOLET (2)"
  path: "Panels/Removal/violet"
  clue: "violet"
  answer: "violent"
  symbols: SPARKLES
}
panels {
  name: "NONSENSE"
  path: "Panels/Removal/nonsense"
  clue: "nonsense"
  answer: ""
  symbols: EVAL
}
panels {
  name: "DISTANT"
  path: "Panels/Replacement/distant"
  clue: "distant"
  answer: "and"
  symbols: EVAL
}
panels {
  name: "TIGHT (1)"
  path: "Panels/Replacement/fistfight"
  clue: "tight"
  answer: "fistfight"
  symbols: EVAL
}
panels {
  name: "TIGHT (2)"
  path: "Panels/Replacement/fistfight2"
  clue: "tight"
  answer: "fight"
  symbols: SPARKLES
}
panels {
  name: "DISCARD"
  path: "Panels/Replacement/discard"
  clue: "discard"
  answer: "arc"
  symbols: EVAL
}
panels {
  name: "PASSPORT"
  path: "Panels/Replacement/passport"
  clue: "passport"
  answer: "sort"
  symbols: EVAL
}
panels {
  name: "PORT"
  path: "Panels/Replacement/passport2"
  clue: "port"
  answer: "sort"
  symbols: ZERO
}
panels {
  name: "STORMS"
  path: "Panels/Replacement/storms"
  clue: "storms"
  answer: "mr"
  symbols: EVAL
}
panels {
  name: "MS"
  path: "Panels/Replacement/storms2"
  clue: "ms"
  answer: "mr"
  symbols: GENDER
}
panels {
  name: "SOUNDBITE"
  path: "Panels/Homophones/soundbite"
  clue: "soundbite"
  answer: "byte"
  symbols: EVAL
}
panels {
  name: "BORED"
  path: "Panels/Homophones/soundboard"
  clue: "bored"
  answer: "soundboard"
  symbols: EVAL
}
panels {
  name: "VOCALIZE"
  path: "Panels/Homophones/vocalize"
  clue: "vocalize"
  answer: "eyes"
  symbols: EVAL
}
panels {
  name: "VOICEMAIL"
  path: "Panels/Homophones/voicemail"
  clue: "voicemail"
  answer: "male"
  symbols: EVAL
}
panels {
  name: "MIXTURE"
  path: "Panels/Anagram/mixture"
  clue: "mixture"
  answer: "true"
  symbols: EVAL
}
panels {
  name: "PEAT"
  path: "Panels/Anagram/mixtape"
  clue: "peat"
  answer: "mixtape"
  symbols: EVAL
}
panels {
  name: "SHUFFLEBOARD"
  path: "Panels/Anagram/shuffleboard"
  clue: "shuffleboard"
  answer: "broad"
  symbols: EVAL
}
panels {
  name: "BLENDING"
  path: "Panels/Anagram/shuffleboard2"
  clue: "blending"
  answer: "gin"
  symbols: EVAL
}
panels {
  name: "FLIPPER"
  path: "Panels/Reversal/flipper"
  clue: "flipper"
  answer: "rep"
  symbols: EVAL
}
panels {
  name: "PANT"
  path: "Panels/Reversal/flippant"
  clue: "pant"
  answer: "flippant"
  symbols: EVAL
}
panels {
  name: "BACKFIRES"
  path: "Panels/Reversal/backfires"
  clue: "backfires"
  answer: "serif"
  symbols: EVAL
}
panels {
  name: "DRAW"
  path: "Panels/Reversal/backward"
  clue: "draw"
  answer: "backward"
  symbols: EVAL
}
panels {
  name: "OLDTIMER"
  path: "Panels/Time/oldtimer"
  clue: "oldtimer"
  answer: "hourglass"
  symbols: EVAL
}
panels {
  name: "EMULATE"
  path: "Panels/Time/emulate"
  clue: "emulate"
  answer: "egg"
  symbols: EVAL
}
panels {
  name: "CHICKEN"
  path: "Panels/Time/emulate2"
  clue: "chicken"
  answer: "egg"
  symbols: AGE
}
panels {
  name: "PLUMAGED"
  path: "Panels/Time/plumaged"
  clue: "plumaged"
  answer: "prune"
  symbols: EVAL
}
panels {
  name: "BOY (1)"
  path: "Panels/Time/managed"
  clue: "boy"
  answer: "managed"
  symbols: EVAL
}
panels {
  name: "BOY (2)"
  path: "Panels/Time/managed2"
  clue: "boy"
  answer: "man"
  symbols: AGE
}
panels {
  name: "SAGE"
  path: "Panels/Synonym/likewise"
  clue: "sage"
  answer: "likewise"
  symbols: EVAL
}
panels {
  name: "LIKEABLE"
  path: "Panels/Synonym/likeable"
  clue: "likeable"
  answer: "unable"
  symbols: EVAL
}
panels {
  name: "MEANINGFULLY"
  path: "Panels/Synonym/meaningfully"
  clue: "meaningfully"
  answer: "entirely"
  symbols: EVAL
}
panels {
  name: "MORE"
  path: "Panels/Synonym/meaningless"
  clue: "more"
  answer: "meaningless"
  symbols: EVAL
}
panels {
  name: "MOUTHPIECE"
  path: "Panels/Part/mouthpiece"
  clue: "mouthpiece"
  answer: "face"
  symbols: EVAL
}
panels {
  name: "RAMPART"
  path: "Panels/Part/rampart"
  clue: "rampart"
  answer: "horn"
  symbols: EVAL
}
panels {
  name: "INJURY"
  path: "Panels/Part/injury"
  clue: "injury"
  answer: "juror"
  symbols: EVAL
}
panels {
  name: "NUMERATOR"
  path: "Panels/Part/infraction"
  clue: "numerator"
  answer: "infraction"
  symbols: EVAL
}
panels {
  name: "TYPEWRITING"
  path: "Panels/Examples/typewriting"
  clue: "typewriting"
  answer: "poetry"
  symbols: EVAL
}
panels {
  name: "WHIRRED"
  path: "Panels/Examples/typewriting2"
  clue: "whirred"
  answer: "poetry"
  symbols: EXAMPLE
  symbols: EVAL
}
panels {
  name: "BOOMBOX"
  path: "Panels/Examples/boombox"
  clue: "boombox"
  answer: "stereotype"
  symbols: EVAL
}
panels {
  name: "STEREO"
  path: "Panels/Examples/boombox2"
  clue: "stereo"
  answer: "boombox"
  symbols: EXAMPLE
}
panels {
  name: "KINDRED"
  path: "Panels/Examples/kindred"
  clue: "kindred"
  answer: "ruby"
  symbols: EVAL
}
panels {
  name: "GEM"
  path: "Panels/Examples/kindred2"
  clue: "Gem"
  answer: "ruby"
  symbols: EXAMPLE
}
panels {
  name: "GEIGER"
  path: "Panels/Examples/counterexample"
  clue: "geiger"
  answer: "counterexample"
  symbols: EVAL
}
panels {
  name: "COUNTER"
  path: "Panels/Examples/counterexample2"
  clue: "counter"
  answer: "geiger"
  symbols: EXAMPLE
}
panels {
  name: "HORSEMAN"
  path: "Panels/Gender/horseman_neg"
  clue: "horseman"
  answer: "mare"
  symbols: EVAL
}
panels {
  name: "RATHER"
  path: "Panels/Gender/rather"
  clue: "rather"
  answer: "doe"
  symbols: EVAL
}
panels {
  name: "DEAR"
  path: "Panels/Gender/rather2"
  clue: "dear"
  answer: "doe"
  symbols: ZERO
  symbols: GENDER
}
panels {
  name: "COWBOY"
  path: "Panels/Gender/cowbody"
  clue: "cowboy"
  answer: "bull"
  symbols: EVAL
}
panels {
  name: "HEIFER"
  path: "Panels/Gender/cowgirl"
  clue: "heifer"
  answer: "cowgirl"
  symbols: EVAL
}
panels {
  name: "ANYMORE"
  path: "Panels/Intensity/anymore"
  clue: "anymore"
  answer: "all"
  symbols: EVAL
}
panels {
  name: "LIKE"
  path: "Panels/Intensity/loveless"
  clue: "like"
  answer: "loveless"
  symbols: EVAL
}
panels {
  name: "NEEDLESS"
  path: "Panels/Intensity/needless"
  clue: "needless"
  answer: "want"
  symbols: EVAL
}
panels {
  name: "RESTLESS"
  path: "Panels/Intensity/restless"
  clue: "restless"
  answer: "sleep"
  symbols: EVAL
}
std::string text : lineChunks) { if (text.substr(0, 1) == "\f") { text.erase(0, 1); shouldAddBlank = false; if (!lines_.empty()) { lines_.back().pause = true; } } bool bulleted = false; if (text.substr(0, 2) == "* ") { text.erase(0, 2); bulleted = true; } auto words = splitStr<std::list<std::string>>(text, " "); std::string curLine; int curWidth = 0; bool firstWord = true; // I'm gonna be frank and admit it: I'm not gonna take hyphenation into // consideration. Please don't write any words that are wider than the // textbox. for (const std::string& word : words) { int wordWidth = 0; for (int i=0; i<word.size(); i++) { wordWidth += game_.getFont().getCharacterWidth(word[i]); wordWidth++; } int nextWidth = curWidth + wordWidth; if (!firstWord) { nextWidth += game_.getFont().getCharacterWidth(' '); } if (nextWidth > MESSAGE_TEXT_WIDTH) { lines_.push_back({.text = curLine, .bulleted = bulleted}); curLine = word; curWidth = wordWidth + game_.getFont().getCharacterWidth(' '); bulleted = false; if (shouldAddBlank) { shouldAddBlank = false; lines_.back().pause = true; } else { shouldAddBlank = true; } } else { curWidth = nextWidth; if (!firstWord) { curLine.append(" "); } curLine.append(word); } firstWord = false; } lines_.push_back({.text = curLine, .bulleted = bulleted}); if (shouldAddBlank) { shouldAddBlank = false; lines_.back().pause = true; } else { shouldAddBlank = true; } } if (!lines_.empty()) { lines_.back().pause = true; } if (linesToShow_.empty()) { linesToShow_.push_back(lines_.front()); lines_.pop_front(); if (!linesToShow_.back().pause) { linesToShow_.push_back(lines_.front()); lines_.pop_front(); } } } void MessageSystem::showChoice(std::string choice1, std::string choice2) { MessageLine line; line.text = std::string(8, ' ') + choice1 + std::string(11, ' ') + choice2; line.pause = true; line.isChoice = true; line.choicePos[0] = 8; line.choicePos[1] = 8 + 11 + choice1.size(); lines_.push_back(line); } void MessageSystem::advanceText() { // Cutscene must be active. if (barsState_ != BarsState::Open) { return; } if (linesToShow_.empty()) { return; } // We can only advance if all visible lines are fully revealed. for (const MessageLine& line : linesToShow_) { if (line.charsRevealed != line.text.size()) { return; } } // If the last visible line doesn't have a pause, then the cutscene // will automatically progress without us doing anything. if (!linesToShow_.back().pause) { return; } // Clear the current pause. linesToShow_.back().pause = false; showNextArrow_ = false; if (lines_.empty()) { if (isChoiceActive()) { if (choiceSelection_ == 0) { game_.getMixer().playSound("../res/sfx/left_selection.wav"); } else { game_.getMixer().playSound("../res/sfx/right_selection.wav"); } } linesToShow_.clear(); } else { game_.getMixer().playSound("../res/sfx/pageflip.wav"); } } void MessageSystem::selectFirstChoice() { if (isChoiceActive() && choiceSelection_ != 0) { choiceSelection_ = 0; game_.getMixer().playSound("../res/sfx/horizontal_menu.wav"); } } void MessageSystem::selectSecondChoice() { if (isChoiceActive() && choiceSelection_ != 1) { choiceSelection_ = 1; game_.getMixer().playSound("../res/sfx/horizontal_menu.wav"); } } double MessageSystem::getCutsceneBarsProgress() const { switch (barsState_) { case BarsState::Closed: return 0.0; case BarsState::Opening: return accum_ / length_; case BarsState::Open: return 1.0; case BarsState::Closing: return 1.0 - (accum_ / length_); } }