mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 06:44:38 +01:00
Integrate gScreenshotCountdown
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "../game.h"
|
||||
#include "../editor.h"
|
||||
#include "../interface/chat.h"
|
||||
#include "../interface/screenshot.h"
|
||||
#include "../input.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../network/network.h"
|
||||
@@ -480,7 +481,7 @@ static void shortcut_show_map()
|
||||
|
||||
static void shortcut_screenshot()
|
||||
{
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREENSHOT_COUNTDOWN, uint8) = 2;
|
||||
gScreenshotCountdown = 2;
|
||||
}
|
||||
|
||||
static void shortcut_reduce_game_speed()
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include "screenshot.h"
|
||||
#include "viewport.h"
|
||||
|
||||
uint8 gScreenshotCountdown = 0;
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006E3AEC
|
||||
@@ -37,9 +39,9 @@ void screenshot_check()
|
||||
{
|
||||
int screenshotIndex;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREENSHOT_COUNTDOWN, uint8) != 0) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREENSHOT_COUNTDOWN, uint8)--;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREENSHOT_COUNTDOWN, uint8) == 0) {
|
||||
if (gScreenshotCountdown != 0) {
|
||||
gScreenshotCountdown--;
|
||||
if (gScreenshotCountdown == 0) {
|
||||
// update_rain_animation();
|
||||
screenshotIndex = screenshot_dump();
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
#include "../drawing/drawing.h"
|
||||
|
||||
extern uint8 gScreenshotCountdown;
|
||||
|
||||
void screenshot_check();
|
||||
int screenshot_dump();
|
||||
int screenshot_dump_png(rct_drawpixelinfo *dpi);
|
||||
|
||||
Reference in New Issue
Block a user