move ui_rand to cDialog
This commit is contained in:
@@ -41,6 +41,7 @@ const short cDialog::BG_DARK = 5, cDialog::BG_LIGHT = 16;
|
|||||||
short cDialog::defaultBackground = cDialog::BG_DARK;
|
short cDialog::defaultBackground = cDialog::BG_DARK;
|
||||||
cDialog* cDialog::topWindow = nullptr;
|
cDialog* cDialog::topWindow = nullptr;
|
||||||
void (*cDialog::redraw_everything)() = nullptr;
|
void (*cDialog::redraw_everything)() = nullptr;
|
||||||
|
std::mt19937 cDialog::ui_rand;
|
||||||
|
|
||||||
std::string cDialog::generateRandomString(){
|
std::string cDialog::generateRandomString(){
|
||||||
// Not bothering to seed, because it doesn't actually matter if it's truly random.
|
// Not bothering to seed, because it doesn't actually matter if it's truly random.
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
#include <exception>
|
#include <exception>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
#include <random>
|
||||||
|
|
||||||
#include "ticpp.h"
|
#include "ticpp.h"
|
||||||
#include "dialogxml/keycodes.hpp"
|
#include "dialogxml/keycodes.hpp"
|
||||||
@@ -70,6 +71,7 @@ class cDialog {
|
|||||||
std::vector<std::pair<std::string,cTextField*>> tabOrder;
|
std::vector<std::pair<std::string,cTextField*>> tabOrder;
|
||||||
static cDialog* topWindow; // Tracks the frontmost dialog.
|
static cDialog* topWindow; // Tracks the frontmost dialog.
|
||||||
static bool initCalled;
|
static bool initCalled;
|
||||||
|
static std::mt19937 ui_rand;
|
||||||
public:
|
public:
|
||||||
static void (*redraw_everything)();
|
static void (*redraw_everything)();
|
||||||
/// Performs essential startup initialization. Generally should not be called directly.
|
/// Performs essential startup initialization. Generally should not be called directly.
|
||||||
|
@@ -10,7 +10,6 @@
|
|||||||
#include "mathutil.hpp"
|
#include "mathutil.hpp"
|
||||||
|
|
||||||
std::mt19937 game_rand;
|
std::mt19937 game_rand;
|
||||||
std::mt19937 ui_rand;
|
|
||||||
|
|
||||||
short get_ran (short times,short min,short max){
|
short get_ran (short times,short min,short max){
|
||||||
long int store;
|
long int store;
|
||||||
|
@@ -24,7 +24,6 @@
|
|||||||
using std::abs;
|
using std::abs;
|
||||||
|
|
||||||
extern std::mt19937 game_rand;
|
extern std::mt19937 game_rand;
|
||||||
extern std::mt19937 ui_rand;
|
|
||||||
|
|
||||||
short get_ran(short times, short min, short max);
|
short get_ran(short times, short min, short max);
|
||||||
short max(short a,short b);
|
short max(short a,short b);
|
||||||
|
Reference in New Issue
Block a user