Repository navigation
API Documentation
NOTE; this page is still under construction and some info may be incorrect for the latest version
Backend VGDL-E API
Class SpriteSet
addSprite(Sprite* newSprite)
Adds newSprite to the Sprite pointer list.
addRootSprite(Sprite* rSprite)
Adds rSprite in the root sprite list.
addChildToSprite(int parentIndex, Sprite* childSprite)
Adds childSprite as a child of the sprite in the position parentIndex in the Sprite list.
addChildToSprite(Sprite* parentSprite, Sprite* childSprite)
Adds childSprite as a child of parentSprite.
modifySprite(Sprite* newSprite, int index)
Deletes the sprite at position index in the Sprite list, and replaces it with newSprite.
changeParenthood(Sprite* oldParent, Sprite* newParent, Sprite* childSprite)
changeParentHood(Sprite* oldParent, int newParentIndex, Sprite* childSprite)
deleteSprite(Sprite* erasedSprite)
Goes through the Sprite list until it finds the erasedSprite, deletes the object and its list pointer.
deleteSprite(int index)
Deletes Sprite at position index.
deleteSprite(string spriteName)
Goes through the Sprite list until it finds the sprite whose name equals spriteName, deletes the object and its pointer.
removeRootSprite(Sprite* rSprite)
Removes rSprite from root sprite list.
deleteChild(int parentIndex, Sprite* childSprite)
Deletes childSprite from the child list of the sprite in the position parentIndex in the Sprite list.
deleteChild(Sprite* parentSprite, Sprite* childSprite)
Deletes childSprite from the child list of parentSprite.
Class InteractionSet
InteractionSet();
InteractionSet(std::vector intList);
most likely won’t use this, as I might just add interactions one by one
~InteractionSet();
std::vector getInteractionTypeList();
gets interaction type list; used for drop down menus in GUI
std::vector getInteractionParametersList();
gets possible parameters list; used for drop down menus in GUI
std::vector getInteractionList();
returns the existing list of interactions
void setInteractionList(std::vector newIntList);
sets a whole interaction list; probably not going to be used void
addInteraction(Interaction newInteraction);
adds new interaction to list //deletes Interaction from the Interaction list; has to check all, so O(n), but list will be small, so it should be fine
bool deleteInteraction(Interaction erasedInteraction);
bool deleteInteraction(std::string interactedSpriteName);
deletes interaction by getting the first case where the interacted sprite = parameter
bool deleteInteraction(int index);
deletes interaction based on its position in the list
modifyInteraction(Interaction newInteraction, int index);
puts newInteraction in InteractionList at the position index void
Class TerminationSet
void setTerminationList(std::vector newTerminationList);
void addTermination(Termination newTermination);
bool deleteTermination(Termination deletedTermination);
bool deleteTermination(int index);
delete termination based on the index of the termination in the list
void modifyTermination(Termination newTermination, int index);
puts newTermination in terminationList at position index
Class Sprite
Sprite()
Default constructor
Sprite(string newName, string stype, bool hasParent = false, Sprite* parent = NULL)
Builds a sprite with the name “newName”, the sprite type “stype”, whether it has a parent or not, and who that parent is(by default, it has no parent).
Sprite(string newName, string stype, vector paramList, bool hasParent = false, Sprite* parent =NULL)
Builds a sprite with the name “newName”, the sprite type “stype”, a list of parameters, whether it has a parent or not, and who that parent is(by default, it has no parent).
ClassTermination
Interaction functions: