mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 19:43:06 +01:00
Integrate gScreenshotCountdown
This commit is contained in:
@@ -148,7 +148,6 @@
|
||||
#define RCT2_ADDRESS_PAINT_BOUNDBOX_OFFSET_Y 0x009DEA54
|
||||
#define RCT2_ADDRESS_PAINT_BOUNDBOX_OFFSET_Z 0x009DEA56
|
||||
|
||||
#define RCT2_ADDRESS_SCREENSHOT_COUNTDOWN 0x009DEA6D
|
||||
#define RCT2_ADDRESS_PLACE_OBJECT_MODIFIER 0x009DEA70
|
||||
#define RCT2_ADDRESS_ON_TUTORIAL 0x009DEA71
|
||||
|
||||
@@ -437,6 +436,7 @@
|
||||
|
||||
#define RCT2_ADDRESS_SCREEN_AGE 0x009DEA66
|
||||
#define RCT2_ADDRESS_SCREEN_FLAGS 0x009DEA68
|
||||
#define RCT2_ADDRESS_SCREENSHOT_COUNTDOWN 0x009DEA6D
|
||||
#define RCT2_ADDRESS_GAME_PAUSED 0x009DEA6E
|
||||
#define RCT2_ADDRESS_WINDOW_DPI 0x009DEA74
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -555,7 +555,7 @@ static void window_top_toolbar_dropdown(rct_window *w, int widgetIndex, int drop
|
||||
window_options_open();
|
||||
break;
|
||||
case DDIDX_SCREENSHOT:
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREENSHOT_COUNTDOWN, sint8) = 10;
|
||||
gScreenshotCountdown = 10;
|
||||
break;
|
||||
case DDIDX_GIANT_SCREENSHOT:
|
||||
screenshot_giant();
|
||||
|
||||
Reference in New Issue
Block a user