@@ -88,15 +88,15 @@ namespace RTE {
88
88
89
89
#pragma region Getters and Setters
90
90
// / <summary>
91
- // / Gets the 8bpp back-buffer bitmap.
91
+ // / Gets the 8bpp backbuffer bitmap.
92
92
// / </summary>
93
- // / <returns>A pointer to the BITMAP 8bpp back-buffer . OWNERSHIP IS NOT TRANSFERRED!</returns>
93
+ // / <returns>A pointer to the BITMAP 8bpp backbuffer . OWNERSHIP IS NOT TRANSFERRED!</returns>
94
94
BITMAP * GetBackBuffer8 () const { return m_BackBuffer8; }
95
95
96
96
// / <summary>
97
- // / Gets the 32bpp back-buffer bitmap. Make sure you don't do any blending stuff to the 8bpp one!
97
+ // / Gets the 32bpp backbuffer bitmap. Make sure you don't do any blending stuff to the 8bpp one!
98
98
// / </summary>
99
- // / <returns>A pointer to the BITMAP 32bpp back-buffer . OWNERSHIP IS NOT TRANSFERRED!</returns>
99
+ // / <returns>A pointer to the BITMAP 32bpp backbuffer . OWNERSHIP IS NOT TRANSFERRED!</returns>
100
100
BITMAP * GetBackBuffer32 () const { return m_BackBuffer32; }
101
101
102
102
// / <summary>
@@ -182,7 +182,7 @@ namespace RTE {
182
182
bool IsValidResolution (unsigned short width, unsigned short height) const ;
183
183
184
184
// / <summary>
185
- // / Tells how many times the screen resolution is being multiplied and the back-buffer stretched across for better readability.
185
+ // / Tells how many times the screen resolution is being multiplied and the backbuffer stretched across for better readability.
186
186
// / </summary>
187
187
// / <returns>What multiple the screen resolution is run in (1 normal).</returns>
188
188
unsigned short ResolutionMultiplier () const { return m_ResMultiplier; }
@@ -316,7 +316,7 @@ namespace RTE {
316
316
317
317
#pragma region Drawing
318
318
// / <summary>
319
- // / Flips the frame buffers, showing the back-buffer on the current display.
319
+ // / Flips the frame buffers, showing the backbuffer on the current display.
320
320
// / </summary>
321
321
void FlipFrameBuffers ();
322
322
@@ -378,80 +378,81 @@ namespace RTE {
378
378
379
379
#pragma region Network Handling
380
380
// / <summary>
381
- // / Returns true if this manager is in multiplayer mode, storing the 8bpp back-buffer for network transmission.
381
+ // / Returns true if this manager is in multiplayer mode, storing the 8bpp backbuffer for network transmission.
382
382
// / </summary>
383
383
// / <returns>True if in multiplayer mode.</returns>
384
384
bool IsInMultiplayerMode () const { return m_StoreNetworkBackBuffer; }
385
385
386
386
// / <summary>
387
- // / Sets the multiplayer mode flag, telling the manager to store the 8bpp back-buffer for network transmission.
387
+ // / Sets the multiplayer mode flag, telling the manager to store the 8bpp backbuffer for network transmission.
388
388
// / </summary>
389
389
// / <param name="value">Whether this manager should operate in multiplayer mode.</param>
390
390
void SetMultiplayerMode (bool value) { m_StoreNetworkBackBuffer = value; }
391
391
392
392
// / <summary>
393
- // / Gets the 8bpp back-buffer bitmap used to draw network transmitted image on top of everything.
393
+ // / Gets the ready 8bpp backbuffer bitmap used to draw network transmitted image on top of everything.
394
394
// / </summary>
395
- // / <param name="player">Which player screen to get back-buffer bitmap from .</param>
396
- // / <returns>A pointer to the 8bpp back-buffer BITMAP. OWNERSHIP IS NOT TRANSFERRED!</returns>
395
+ // / <param name="player">Which player screen to get backbuffer bitmap for .</param>
396
+ // / <returns>A pointer to the 8bpp backbuffer BITMAP. OWNERSHIP IS NOT TRANSFERRED!</returns>
397
397
BITMAP * GetNetworkBackBuffer8Ready (short player) const { return m_NetworkBackBufferFinal8[m_NetworkFrameReady][player]; }
398
398
399
399
// / <summary>
400
- // /
400
+ // / Gets the ready 8bpp backbuffer GUI bitmap used to draw network transmitted image on top of everything.
401
401
// / </summary>
402
- // / <param name="player">Which player screen to get GUI back-buffer bitmap from .</param>
403
- // / <returns>A pointer to the 8bpp GUI back-buffer BITMAP. OWNERSHIP IS NOT TRANSFERRED!</returns>
402
+ // / <param name="player">Which player screen to get GUI backbuffer bitmap for .</param>
403
+ // / <returns>A pointer to the 8bpp GUI backbuffer BITMAP. OWNERSHIP IS NOT TRANSFERRED!</returns>
404
404
BITMAP * GetNetworkBackBufferGUI8Ready (short player) const { return m_NetworkBackBufferFinalGUI8[m_NetworkFrameReady][player]; }
405
405
406
406
// / <summary>
407
- // /
407
+ // / Gets the current 8bpp backbuffer bitmap used to draw network transmitted image on top of everything.
408
408
// / </summary>
409
- // / <param name="player"></param>
410
- // / <returns></returns>
409
+ // / <param name="player">Which player screen to get backbuffer bitmap for. </param>
410
+ // / <returns>A pointer to the 8bpp backbuffer BITMAP. OWNERSHIP IS NOT TRANSFERRED! </returns>
411
411
BITMAP * GetNetworkBackBuffer8Current (short player) const { return m_NetworkBackBufferFinal8[m_NetworkFrameCurrent][player]; }
412
412
413
413
// / <summary>
414
- // /
414
+ // / Gets the current 8bpp backbuffer GUI bitmap used to draw network transmitted image on top of everything.
415
415
// / </summary>
416
- // / <param name="player"></param>
417
- // / <returns></returns>
416
+ // / <param name="player">Which player screen to get backbuffer bitmap for. </param>
417
+ // / <returns>A pointer to the 8bpp GUI backbuffer BITMAP. OWNERSHIP IS NOT TRANSFERRED! </returns>
418
418
BITMAP * GetNetworkBackBufferGUI8Current (short player) const { return m_NetworkBackBufferFinalGUI8[m_NetworkFrameCurrent][player]; }
419
419
420
420
// / <summary>
421
- // / Gets the 8bpp intermediate bitmap used to send network transmitted image.
421
+ // / Gets the ready 8bpp intermediate backbuffer bitmap used to copy network transmitted image to before sending .
422
422
// / </summary>
423
- // / <param name="player">Which player screen to get intermediate bitmap from .</param>
423
+ // / <param name="player">Which player screen to get intermediate bitmap for .</param>
424
424
// / <returns>A pointer to the 8bpp intermediate BITMAP. OWNERSHIP IS NOT TRANSFERRED!</returns>
425
425
BITMAP * GetNetworkBackBufferIntermediate8Ready (short player) const { return m_NetworkBackBufferIntermediate8[m_NetworkFrameReady][player]; }
426
426
427
427
// / <summary>
428
- // /
428
+ // / Gets the ready 8bpp intermediate backbuffer GUI bitmap used to copy network transmitted image to before sending.
429
429
// / </summary>
430
- // / <param name="player">Which player screen to get intermediate GUI bitmap from .</param>
430
+ // / <param name="player">Which player screen to get intermediate GUI bitmap for .</param>
431
431
// / <returns>A pointer to the 8bpp intermediate GUI BITMAP. OWNERSHIP IS NOT TRANSFERRED!</returns>
432
432
BITMAP * GetNetworkBackBufferIntermediate8Current (short player) const { return m_NetworkBackBufferIntermediate8[m_NetworkFrameCurrent][player]; }
433
433
434
434
// / <summary>
435
- // /
435
+ // / Gets the current 8bpp intermediate backbuffer bitmap used to copy network transmitted image to before sending.
436
436
// / </summary>
437
- // / <param name="player"></param>
438
- // / <returns></returns>
437
+ // / <param name="player">Which player screen to get intermediate bitmap for. </param>
438
+ // / <returns>A pointer to the 8bpp intermediate BITMAP. OWNERSHIP IS NOT TRANSFERRED! </returns>
439
439
BITMAP * GetNetworkBackBufferIntermediateGUI8Ready (short player) const { return m_NetworkBackBufferIntermediateGUI8[m_NetworkFrameReady][player]; }
440
440
441
441
// / <summary>
442
- // /
442
+ // / Gets the current 8bpp intermediate backbuffer GUI bitmap used to copy network transmitted image to before sending.
443
443
// / </summary>
444
- // / <param name="player"></param>
445
- // / <returns></returns>
444
+ // / <param name="player">Which player screen to get intermediate GUI bitmap for. </param>
445
+ // / <returns>A pointer to the 8bpp intermediate GUI BITMAP. OWNERSHIP IS NOT TRANSFERRED! </returns>
446
446
BITMAP * GetNetworkBackBufferIntermediateGUI8Current (short player) const { return m_NetworkBackBufferIntermediateGUI8[m_NetworkFrameCurrent][player]; }
447
447
448
448
// / <summary>
449
- // /
449
+ // / Gets whether the network backbuffers are locked to be updated.
450
450
// / </summary>
451
- // / <param name="player"></param>
452
- // / <returns></returns>
451
+ // / <param name="player">Which player screen to check for. </param>
452
+ // / <returns>Whether the network backbuffers are locked to be updated. </returns>
453
453
bool IsNetworkBitmapLocked (short player) const { return m_NetworkBitmapIsLocked[player]; }
454
454
455
+ // TODO: Figure out.
455
456
// / <summary>
456
457
// /
457
458
// / </summary>
@@ -460,30 +461,30 @@ namespace RTE {
460
461
Vector GetTargetPos (short screen) const { return m_TargetPos[m_NetworkFrameReady][screen]; }
461
462
462
463
// / <summary>
463
- // /
464
+ // / Gets whether we are drawing the contents of the network backbuffers on top of m_BackBuffer8 every frame.
464
465
// / </summary>
465
- // / <returns></returns>
466
+ // / <returns>Whether we are drawing the contents of the network backbuffers on top of m_BackBuffer8 every frame or not. </returns>
466
467
bool GetDrawNetworkBackBuffer () const { return m_DrawNetworkBackBuffer; }
467
468
468
469
// / <summary>
469
- // /
470
+ // / Sets whether to draw the contents of the network backbuffers on top of m_BackBuffer8 every frame.
470
471
// / </summary>
471
- // / <param name="value"></param>
472
+ // / <param name="value">Whether to draw the contents of the network backbuffers on top of m_BackBuffer8 every frame or not. </param>
472
473
void SetDrawNetworkBackBuffer (bool value) { m_DrawNetworkBackBuffer = value; }
473
474
474
475
// / <summary>
475
- // /
476
+ // / Gets whether we are dumping the contents of the m_BackBuffer8 to the network backbuffers every frame.
476
477
// / </summary>
477
- // / <returns></returns>
478
+ // / <returns>Whether the contents of the m_BackBuffer8 are being dumped to the network backbuffers every frame. </returns>
478
479
bool GetStoreNetworkBackBuffer () const { return m_StoreNetworkBackBuffer; }
479
480
480
481
// / <summary>
481
- // /
482
+ // / Creates a new set of network backbuffers for the specified player.
482
483
// / </summary>
483
- // / <param name="player"></param>
484
- // / <param name="w"> </param>
485
- // / <param name="h"> </param>
486
- void CreateNewPlayerBackBuffer (short player, unsigned short w , unsigned short h );
484
+ // / <param name="player">Player to create new backbuffer for. </param>
485
+ // / <param name="width">Width of new backbuffer. </param>
486
+ // / <param name="height">Height of new backbuffer </param>
487
+ void CreateNewNetworkPlayerBackBuffer (short player, unsigned short width , unsigned short height );
487
488
#pragma endregion
488
489
489
490
#pragma region Palette Routines
@@ -523,7 +524,7 @@ namespace RTE {
523
524
int SaveBitmapToBMP (BITMAP *bitmap, const char *nameBase) { return SaveBitmap (SingleBitmap, nameBase, bitmap); }
524
525
525
526
// / <summary>
526
- // / Dumps a bitmap of the screen back-buffer to a 8bpp BMP file.
527
+ // / Dumps a bitmap of the screen backbuffer to a 8bpp BMP file.
527
528
// / </summary>
528
529
// / <param name="nameBase">The filename of the file to save to, WITHOUT EXTENSION.</param>
529
530
// / <returns>0 for success, anything below 0 is a sign of failure.</returns>
@@ -604,8 +605,8 @@ namespace RTE {
604
605
bool m_FlashedLastFrame[c_MaxScreenCount]; // !< Whether we flashed last frame or not.
605
606
Timer m_FlashTimer[c_MaxScreenCount]; // !< Flash screen timer.
606
607
607
- BITMAP *m_BackBuffer8; // !< Screen back-buffer , always 8bpp, gets copied to the 32bpp buffer for post-processing.
608
- BITMAP *m_BackBuffer32; // !< 32bpp back-buffer , only used for post-processing.
608
+ BITMAP *m_BackBuffer8; // !< Screen backbuffer , always 8bpp, gets copied to the 32bpp buffer for post-processing.
609
+ BITMAP *m_BackBuffer32; // !< 32bpp backbuffer , only used for post-processing.
609
610
BITMAP *m_ScreenDumpBuffer; // !< Temporary buffer for making quick screencaps.
610
611
BITMAP *m_WorldDumpBuffer; // !< Temporary buffer for making whole scene screencaps.
611
612
@@ -616,13 +617,13 @@ namespace RTE {
616
617
617
618
Vector m_TargetPos[2 ][c_MaxScreenCount]; // !< Frame target position for network players.
618
619
619
- bool m_DrawNetworkBackBuffer ; // !< If true, draws the contents of the m_NetworkBackBuffer8 on top of m_BackBuffer8 every frame in FrameMan.Draw .
620
- bool m_StoreNetworkBackBuffer ; // !< If true, dumps the contents of the m_BackBuffer8 to the m_NetworkBackBuffer8 every frame.
620
+ bool m_StoreNetworkBackBuffer ; // !< If true, dumps the contents of the m_BackBuffer8 to the network backbuffers every frame.
621
+ bool m_DrawNetworkBackBuffer ; // !< If true, draws the contents of the network backbuffers on top of m_BackBuffer8 every frame in FrameMan.Draw .
621
622
622
623
unsigned short m_NetworkFrameCurrent; // !< Which frame index is being rendered, 0 or 1.
623
624
unsigned short m_NetworkFrameReady; // !< Which frame is rendered and ready for transmission, 0 or 1.
624
625
625
- bool m_NetworkBitmapIsLocked[c_MaxScreenCount]; // !< If true then the network bitmap is being updated.
626
+ bool m_NetworkBitmapIsLocked[c_MaxScreenCount]; // !< If true then the network bitmap is being updated (Pseudo mutex lock/unlock) .
626
627
// TODO: Test if this destroys the whole multiplayer and use instead of the one above if it doesn't.
627
628
// std::mutex m_NetworkBitmapIsLocked[c_MaxScreenCount];
628
629
0 commit comments