1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-26 14:38:30 +02:00
VVVVVV/desktop_version/src/Otherlevel.h
Misa b53d2ae53f Remove i/j/k attributes from classes that don't need them
The only class that actually needs its i/j/k kept is scriptclass,
because some custom levels rely on it for creating custom activity
zones. So I haven't touched that.

Other than that, there's no chance that anything important relies on
i/j/k in any other class. For that to be the case, it would have to use
i/j/k without initializing it beforehand, and that can simply be
detected by removing the attribute from the header file and seeing where
the compiler complains. And the compiler complains only about cases
where it's initialized first. (Note that due to this check, I *haven't*
removed Graphics's `m` as it precisely does exactly this, using it
without initializing it first.)

Interestingly enough, otherlevelclass and towerclass have unused i/k
variables for whatever reason.
2020-06-14 14:37:29 -04:00

42 lines
591 B
C++

#ifndef OTHERLEVEL_H
#define OTHERLEVEL_H
#include "Game.h"
#include "Entity.h"
#include <string>
#include <vector>
struct Roomtext
{
int x, y;
std::string text;
};
class otherlevelclass
{
public:
enum
{
BLOCK = 0,
TRIGGER,
DAMAGE,
DIRECTIONAL,
SAFE,
ACTIVITY
};
void addline(std::string t);
std::vector<int> loadlevel(int rx, int ry);
std::string roomname;
int roomtileset;
// roomtext thing in other level
bool roomtexton;
std::vector<Roomtext> roomtext;
};
#endif /* OTHERLEVEL_H */