1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00

Rename edentities to CustomEntity

That's what it is - it's an entity in a custom level. Not something to
do with the editor, necessarily. Like before, the name of the XML
element will remain the same.
This commit is contained in:
Misa 2021-02-20 15:56:59 -08:00 committed by Misa Elizabeth Kai
parent 3c30d9b7f0
commit 47d01277bf
5 changed files with 8 additions and 7 deletions

View file

@ -1073,7 +1073,7 @@ bool customlevelclass::load(std::string& _path)
{
for( tinyxml2::XMLElement* edEntityEl = pElem->FirstChildElement(); edEntityEl; edEntityEl=edEntityEl->NextSiblingElement())
{
edentities entity = edentities();
CustomEntity entity = CustomEntity();
const char* text = edEntityEl->GetText();
if (text != NULL)

View file

@ -7,7 +7,8 @@
#include <string>
#include <vector>
class edentities{
class CustomEntity
{
public:
int x, y, t;
//parameters
@ -60,7 +61,7 @@ struct LevelMetaData
};
extern std::vector<edentities> edentity;
extern std::vector<CustomEntity> edentity;
class EditorData
{

View file

@ -245,7 +245,7 @@ void editorclass::getlin(const enum textmode mode, const std::string& prompt, st
static void addedentity( int xp, int yp, int tp, int p1 = 0, int p2 = 0, int p3 = 0, int p4 = 0, int p5 = 320, int p6 = 240)
{
edentities entity;
CustomEntity entity;
entity.x=xp;
entity.y=yp;

View file

@ -453,7 +453,7 @@ void mapclass::initcustommapdata(void)
#if !defined(NO_CUSTOM_LEVELS)
for (size_t i = 0; i < edentity.size(); i++)
{
const edentities& ent = edentity[i];
const CustomEntity& ent = edentity[i];
if (ent.t != 9)
{
continue;
@ -1637,7 +1637,7 @@ void mapclass::loadlevel(int rx, int ry)
for (size_t edi = 0; edi < edentity.size(); edi++)
{
// If entity is in this room, create it
const edentities& ent = edentity[edi];
const CustomEntity& ent = edentity[edi];
const int tsx = ent.x / 40;
const int tsy = ent.y / 30;

View file

@ -32,7 +32,7 @@
scriptclass script;
#ifndef NO_CUSTOM_LEVELS
std::vector<edentities> edentity;
std::vector<CustomEntity> edentity;
customlevelclass cl;
# ifndef NO_EDITOR
editorclass ed;