mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-06-25 05:58:30 +02:00
Colors in over-30-FPS mode shouldn't be updating every deltaframe; mostly to ensure determinism between switching 30-mode and over-30 mode. I'm going to overhaul RNG in 2.4 anyway, but right now I'm going to fix this because I missed it. The RNG of each special text box is stored in a temporary variable on the text box itself, and only updated if the color uses it (hence the big if-statement). Lots of code duplication, but this is acceptable for now.
53 lines
753 B
C++
53 lines
753 B
C++
#ifndef TEXTBOX_H
|
|
#define TEXTBOX_H
|
|
|
|
#include <SDL.h>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class textboxclass
|
|
{
|
|
public:
|
|
textboxclass(void);
|
|
|
|
void centerx(void);
|
|
|
|
void centery(void);
|
|
|
|
void adjust(void);
|
|
|
|
void initcol(int rr, int gg, int bb);
|
|
|
|
void setcol(int rr, int gg, int bb);
|
|
|
|
void update(void);
|
|
|
|
void remove(void);
|
|
|
|
void removefast(void);
|
|
|
|
void resize(void);
|
|
|
|
void addline(std::string t);
|
|
public:
|
|
//Fundamentals
|
|
std::vector<std::string> line;
|
|
int xp, yp, lw, w, h;
|
|
int r,g,b;
|
|
int tr,tg,tb;
|
|
int timer;
|
|
|
|
float tl;
|
|
float prev_tl;
|
|
int tm;
|
|
|
|
int max;
|
|
|
|
/* Whether to flip text box y-position in Flip Mode. */
|
|
bool flipme;
|
|
|
|
int rand;
|
|
};
|
|
|
|
#endif /* TEXTBOX_H */
|