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:
parent
3c30d9b7f0
commit
47d01277bf
5 changed files with 8 additions and 7 deletions
|
@ -1073,7 +1073,7 @@ bool customlevelclass::load(std::string& _path)
|
||||||
{
|
{
|
||||||
for( tinyxml2::XMLElement* edEntityEl = pElem->FirstChildElement(); edEntityEl; edEntityEl=edEntityEl->NextSiblingElement())
|
for( tinyxml2::XMLElement* edEntityEl = pElem->FirstChildElement(); edEntityEl; edEntityEl=edEntityEl->NextSiblingElement())
|
||||||
{
|
{
|
||||||
edentities entity = edentities();
|
CustomEntity entity = CustomEntity();
|
||||||
const char* text = edEntityEl->GetText();
|
const char* text = edEntityEl->GetText();
|
||||||
|
|
||||||
if (text != NULL)
|
if (text != NULL)
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
class edentities{
|
class CustomEntity
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
int x, y, t;
|
int x, y, t;
|
||||||
//parameters
|
//parameters
|
||||||
|
@ -60,7 +61,7 @@ struct LevelMetaData
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern std::vector<edentities> edentity;
|
extern std::vector<CustomEntity> edentity;
|
||||||
|
|
||||||
class EditorData
|
class EditorData
|
||||||
{
|
{
|
||||||
|
|
|
@ -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)
|
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.x=xp;
|
||||||
entity.y=yp;
|
entity.y=yp;
|
||||||
|
|
|
@ -453,7 +453,7 @@ void mapclass::initcustommapdata(void)
|
||||||
#if !defined(NO_CUSTOM_LEVELS)
|
#if !defined(NO_CUSTOM_LEVELS)
|
||||||
for (size_t i = 0; i < edentity.size(); i++)
|
for (size_t i = 0; i < edentity.size(); i++)
|
||||||
{
|
{
|
||||||
const edentities& ent = edentity[i];
|
const CustomEntity& ent = edentity[i];
|
||||||
if (ent.t != 9)
|
if (ent.t != 9)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
@ -1637,7 +1637,7 @@ void mapclass::loadlevel(int rx, int ry)
|
||||||
for (size_t edi = 0; edi < edentity.size(); edi++)
|
for (size_t edi = 0; edi < edentity.size(); edi++)
|
||||||
{
|
{
|
||||||
// If entity is in this room, create it
|
// 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 tsx = ent.x / 40;
|
||||||
const int tsy = ent.y / 30;
|
const int tsy = ent.y / 30;
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
scriptclass script;
|
scriptclass script;
|
||||||
|
|
||||||
#ifndef NO_CUSTOM_LEVELS
|
#ifndef NO_CUSTOM_LEVELS
|
||||||
std::vector<edentities> edentity;
|
std::vector<CustomEntity> edentity;
|
||||||
customlevelclass cl;
|
customlevelclass cl;
|
||||||
# ifndef NO_EDITOR
|
# ifndef NO_EDITOR
|
||||||
editorclass ed;
|
editorclass ed;
|
||||||
|
|
Loading…
Reference in a new issue