@@ -172,29 +172,13 @@ public void DrawMessages(IBlitter g)
172
172
}
173
173
174
174
public string InputStrMovie ( )
175
- => MakeStringFor ( _movieSession . MovieController ) ;
176
-
177
- public string InputStrImmediate ( )
178
- => MakeStringFor ( _inputManager . AutofireStickyXorAdapter ) ;
179
-
180
- public string InputPrevious ( )
181
175
{
182
- if ( _movieSession . Movie . IsPlayingOrRecording ( ) )
183
- {
184
- var state = _movieSession . Movie . GetInputState ( _emulator . Frame - 1 ) ;
185
- if ( state != null )
186
- {
187
- return MakeStringFor ( state ) ;
188
- }
189
- }
190
-
191
- return "" ;
176
+ var state = _movieSession . Movie ? . GetInputState ( _emulator . Frame - 1 ) ;
177
+ return state is not null ? MakeStringFor ( state ) : "" ;
192
178
}
193
179
194
- public string InputStrOrAll ( )
195
- => _movieSession . Movie . IsPlayingOrRecording ( ) && _emulator . Frame > 0
196
- ? MakeStringFor ( _inputManager . AutofireStickyXorAdapter . Or ( _movieSession . Movie . GetInputState ( _emulator . Frame - 1 ) ) )
197
- : InputStrImmediate ( ) ;
180
+ public string InputStrImmediate ( )
181
+ => MakeStringFor ( _inputManager . AutofireStickyXorAdapter ) ;
198
182
199
183
private static string MakeStringFor ( IController controller )
200
184
{
@@ -244,34 +228,31 @@ public void DrawScreenInfo(IBlitter g)
244
228
245
229
if ( _config . DisplayInput )
246
230
{
247
- var moviePlaying = _movieSession . Movie . IsPlaying ( ) ;
248
- // After the last frame of the movie, we want both the last movie input and the current inputs.
249
- var atMovieEnd = _movieSession . Movie . IsFinished ( ) && _movieSession . Movie . IsAtEnd ( ) ;
250
- if ( moviePlaying || atMovieEnd )
231
+ if ( _movieSession . Movie . IsPlaying ( ) )
251
232
{
252
233
var input = InputStrMovie ( ) ;
253
234
var point = GetCoordinates ( g , _config . InputDisplay , input ) ;
254
235
var c = Color . FromArgb ( _config . MovieInput ) ;
255
236
g . DrawString ( input , c , point . X , point . Y ) ;
256
237
}
257
-
258
- if ( ! moviePlaying ) // TODO: message config -- allow setting of "mixed", and "auto"
238
+ else // TODO: message config -- allow setting of "mixed", and "auto"
259
239
{
260
240
var previousColor = Color . FromArgb ( _config . LastInputColor ) ;
261
241
var immediateColor = Color . FromArgb ( _config . MessagesColor ) ;
262
242
var autoColor = Color . Pink ;
263
243
var changedColor = Color . PeachPuff ;
264
244
265
- //we need some kind of string for calculating position when right-anchoring, of something like that
266
- var bgStr = InputStrOrAll ( ) ;
267
- var point = GetCoordinates ( g , _config . InputDisplay , bgStr ) ;
268
-
269
245
// now, we're going to render these repeatedly, with higher-priority things overriding
270
246
271
247
// first display previous frame's input.
272
248
// note: that's only available in case we're working on a movie
273
- var previousStr = InputPrevious ( ) ;
274
- g . DrawString ( previousStr , previousColor , point . X , point . Y ) ;
249
+ var previousStr = InputStrMovie ( ) ;
250
+
251
+ //we need some kind of string for calculating position when right-anchoring, of something like that
252
+ var point = GetCoordinates ( g , _config . InputDisplay , previousStr ) ;
253
+
254
+ bool atMovieEnd = _movieSession . Movie . IsFinished ( ) && _movieSession . Movie . IsAtEnd ( ) ;
255
+ g . DrawString ( previousStr , atMovieEnd ? Color . FromArgb ( _config . MovieInput ) : previousColor , point . X , point . Y ) ;
275
256
276
257
// next, draw the immediate input.
277
258
// that is, whatever is being held down interactively right this moment even if the game is paused
0 commit comments