Dynamic Polymorphic Object refactoring

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
master
sigonasr2 2 years ago
parent d6840179f0
commit e06a261873
  1. BIN
      C++ProjectTemplate
  2. 1
      assets/maps/map0
  3. BIN
      assets/trashcan.png
  4. 382
      main.cpp
  5. 30
      object.h
  6. 1
      references.h

Binary file not shown.

@ -85,6 +85,7 @@ OBJECT322.000000;288.000000;0
OBJECT192.000000;320.000000;90
OBJECT96.000000;320.000000;90
OBJECT160.000000;384.000000;90
OBJECT96.000000;416.000000;159
ENCOUNTER64.000000;512.000000;90;2
ENCOUNTER192.000000;352.000000;100;1
ENCOUNTER480.000000;160.000000;100;3

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 B

@ -221,9 +221,9 @@ public:
TestCutscene=new Cutscene({
Fade(),
CreateObjects({
new Object(PLAYER,"player",{64,64},ANIMATIONS["player.png"],{1,1},MAGENTA),
new Object(PLAYER,"player",{136,136},ANIMATIONS["player.png"],{1,1},RED),
new Object(PLAYER,"player",{96,96},ANIMATIONS["player.png"],{1,1},DARK_GREEN),
new Standard_Obj(PLAYER,"player",{64,64},ANIMATIONS["player.png"],{1,1},MAGENTA),
new Standard_Obj(PLAYER,"player",{136,136},ANIMATIONS["player.png"],{1,1},RED),
new Standard_Obj(PLAYER,"player",{96,96},ANIMATIONS["player.png"],{1,1},DARK_GREEN),
}),
Fade(true),
SetFlagWhenCutsceneEnds(Flag::TEST_FLAG1),
@ -1893,18 +1893,19 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
//You're probably trying to add an object to the world. Use this function inside of AddObjectToWorld(CreateObject(...))
//You only need to use this function if you want to create an object from pre-defined OBJ_INFO variables.
Object*CreateObject(int id,vd2d pos) {
return new Object(id,OBJ_INFO[id]->name,pos,OBJ_INFO[id]->spr,OBJ_INFO[id]->GetScale(),OBJ_INFO[id]->color,OBJ_INFO[id]->animationSpd);
return OBJ_INFO[id]->CreateType(id,OBJ_INFO[id]->name,pos,OBJ_INFO[id]->spr,OBJ_INFO[id]->GetScale(),OBJ_INFO[id]->color,OBJ_INFO[id]->animationSpd);
}
Object*CreateObjectInfo(Reference ref,std::string name,vd2d pos,std::string spriteFileName,int sprWidth,vd2d scale={1,1},Pixel tint=WHITE,Flag enableFlag=Flag::NONE,Flag disableFlag=Flag::NONE,int animationDelay=1) {
Object*CreateObjectInfo(Object*obj,std::string spriteFileName,int sprWidth,Flag enableFlag=Flag::NONE,Flag disableFlag=Flag::NONE) {
if (!ANIMATIONS.count(spriteFileName)) {
ANIMATIONS[spriteFileName] = new Animation(SPRITES[spriteFileName]=CreateSprite(spriteFileName),32);
ANIMATIONS[spriteFileName] = new Animation(SPRITES[spriteFileName]=CreateSprite(spriteFileName),sprWidth);
}
Object*newObj = new Object(ref,name,pos,ANIMATIONS[spriteFileName],scale,tint,animationDelay);
newObj->disableFlag=disableFlag;
newObj->enableFlag=enableFlag;
OBJ_INFO[ref]=newObj;
return newObj;
obj->spr=ANIMATIONS[spriteFileName];
obj->SetScale(obj->GetScale());
obj->disableFlag=disableFlag;
obj->enableFlag=enableFlag;
OBJ_INFO[obj->id]=obj;
return obj;
}
void SetupPartyMemberStats() {
@ -2019,194 +2020,195 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
}
void SetupObjectInfo() {
CreateObjectInfo(PLAYER,"player",{0,0},"player.png",32,{2,2},WHITE);
CreateObjectInfo(NESS,"Ness",{0,0},"player.png",32,{1,1},YELLOW);
CreateObjectInfo(PAULA,"Paula",{0,0},"player.png",32,{1,1},MAGENTA);
CreateObjectInfo(JEFF,"Jeff",{0,0},"player.png",32,{1,1},DARK_GREEN);
CreateObjectInfo(ANNA,"Anna",{0,0},"player.png",32,{1,1},DARK_MAGENTA);
CreateObjectInfo(KING,"King",{0,0},"player.png",32,{1,1},GREY);
CreateObjectInfo(POO,"Poo",{0,0},"player.png",32,{1,1},DARK_GREY);
CreateObjectInfo(NPC1,"npc1",{0,0},"player.png",32,{1,1},RED,Flag::NONE,Flag::NONE,60);
CreateObjectInfo(NPC2,"npc2",{0,0},"player.png",32,{1,1},GREEN,Flag::NONE,Flag::NONE,2);
CreateObjectInfo(NPC3,"npc3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC4,"npc4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC5,"npc5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC6,"npc6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC7,"npc7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC8,"npc8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC9,"npc9",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC10,"npc10",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC11,"npc11",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC12,"npc12",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC13,"npc13",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC13,"npc14",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC14,"npc15",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC15,"npc16",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC16,"npc17",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC17,"npc18",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC18,"npc19",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC19,"npc20",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC1_2,"npc1_2",{0,0},"player.png",32,{1,1},RED,Flag::NONE,Flag::NONE,60);
CreateObjectInfo(NPC2_2,"npc2_2",{0,0},"player.png",32,{1,1},GREEN,Flag::NONE,Flag::NONE,2);
CreateObjectInfo(NPC3_2,"npc3_2",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC4_2,"npc4_2",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC5_2,"npc5_2",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC6_2,"npc6_2",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC7_2,"npc7_2",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC8_2,"npc8_2",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC9_2,"npc9_2",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC10_2,"npc10_2",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC11_2,"npc11_2",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC12_2,"npc12_2",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC13_2,"npc13_2",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC13_2,"npc14_2",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC14_2,"npc15_2",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC15_2,"npc16_2",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC16_2,"npc17_2",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC17_2,"npc18_2",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC18_2,"npc19_2",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC19_2,"npc20_2",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC1_3,"npc1_3",{0,0},"player.png",32,{1,1},RED,Flag::NONE,Flag::NONE,60);
CreateObjectInfo(NPC2_3,"npc2_3",{0,0},"player.png",32,{1,1},GREEN,Flag::NONE,Flag::NONE,2);
CreateObjectInfo(NPC3_3,"npc3_3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC4_3,"npc4_3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC5_3,"npc5_3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC6_3,"npc6_3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC7_3,"npc7_3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC8_3,"npc8_3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC9_3,"npc9_3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC10_3,"npc10_3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC11_3,"npc11_3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC12_3,"npc12_3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC13_3,"npc13_3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC13_3,"npc14_3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC14_3,"npc15_3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC15_3,"npc16_3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC16_3,"npc17_3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC17_3,"npc18_3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC18_3,"npc19_3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC19_3,"npc20_3",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC1_4,"npc1_4",{0,0},"player.png",32,{1,1},RED,Flag::NONE,Flag::NONE,60);
CreateObjectInfo(NPC2_4,"npc2_4",{0,0},"player.png",32,{1,1},GREEN,Flag::NONE,Flag::NONE,2);
CreateObjectInfo(NPC3_4,"npc3_4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC4_4,"npc4_4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC5_4,"npc5_4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC6_4,"npc6_4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC7_4,"npc7_4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC8_4,"npc8_4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC9_4,"npc9_4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC10_4,"npc10_4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC11_4,"npc11_4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC12_4,"npc12_4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC13_4,"npc13_4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC13_4,"npc14_4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC14_4,"npc15_4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC15_4,"npc16_4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC16_4,"npc17_4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC17_4,"npc18_4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC18_4,"npc19_4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC19_4,"npc20_4",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC1_5,"npc1_5",{0,0},"player.png",32,{1,1},RED,Flag::NONE,Flag::NONE,60);
CreateObjectInfo(NPC2_5,"npc2_5",{0,0},"player.png",32,{1,1},GREEN,Flag::NONE,Flag::NONE,2);
CreateObjectInfo(NPC3_5,"npc3_5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC4_5,"npc4_5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC5_5,"npc5_5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC6_5,"npc6_5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC7_5,"npc7_5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC8_5,"npc8_5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC9_5,"npc9_5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC10_5,"npc10_5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC11_5,"npc11_5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC12_5,"npc12_5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC13_5,"npc13_5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC13_5,"npc14_5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC14_5,"npc15_5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC15_5,"npc16_5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC16_5,"npc17_5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC17_5,"npc18_5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC18_5,"npc19_5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC19_5,"npc20_5",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC1_6,"npc1_6",{0,0},"player.png",32,{1,1},RED,Flag::NONE,Flag::NONE,60);
CreateObjectInfo(NPC2_6,"npc2_6",{0,0},"player.png",32,{1,1},GREEN,Flag::NONE,Flag::NONE,2);
CreateObjectInfo(NPC3_6,"npc3_6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC4_6,"npc4_6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC5_6,"npc5_6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC6_6,"npc6_6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC7_6,"npc7_6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC8_6,"npc8_6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC9_6,"npc9_6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC10_6,"npc10_6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC11_6,"npc11_6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC12_6,"npc12_6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC13_6,"npc13_6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC13_6,"npc14_6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC14_6,"npc15_6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC15_6,"npc16_6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC16_6,"npc17_6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC17_6,"npc18_6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC18_6,"npc19_6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC19_6,"npc20_6",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC1_7,"npc1_7",{0,0},"player.png",32,{1,1},RED,Flag::NONE,Flag::NONE,60);
CreateObjectInfo(NPC2_7,"npc2_7",{0,0},"player.png",32,{1,1},GREEN,Flag::NONE,Flag::NONE,2);
CreateObjectInfo(NPC3_7,"npc3_7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC4_7,"npc4_7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC5_7,"npc5_7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC6_7,"npc6_7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC7_7,"npc7_7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC8_7,"npc8_7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC9_7,"npc9_7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC10_7,"npc10_7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC11_7,"npc11_7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC12_7,"npc12_7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC13_7,"npc13_7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC13_7,"npc14_7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC14_7,"npc15_7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC15_7,"npc16_7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC16_7,"npc17_7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC17_7,"npc18_7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC18_7,"npc19_7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC19_7,"npc20_7",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC1_8,"npc1_8",{0,0},"player.png",32,{1,1},RED,Flag::NONE,Flag::NONE,60);
CreateObjectInfo(NPC2_8,"npc2_8",{0,0},"player.png",32,{1,1},GREEN,Flag::NONE,Flag::NONE,2);
CreateObjectInfo(NPC3_8,"npc3_8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC4_8,"npc4_8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC5_8,"npc5_8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC6_8,"npc6_8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC7_8,"npc7_8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC8_8,"npc8_8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC9_8,"npc9_8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC10_8,"npc10_8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC11_8,"npc11_8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC12_8,"npc12_8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC13_8,"npc13_8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC13_8,"npc14_8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC14_8,"npc15_8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC15_8,"npc16_8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC16_8,"npc17_8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC17_8,"npc18_8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC18_8,"npc19_8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(NPC19_8,"npc20_8",{0,0},"player.png",32,{2,2},BLUE,Flag::NONE,Flag::NONE,20);
CreateObjectInfo(new Standard_Obj(PLAYER,"player",{0,0},nullptr,{2,2},WHITE,32),"player.png",32);
CreateObjectInfo(new Standard_Obj(NESS,"Ness",{0,0},nullptr,{1,1},YELLOW,32),"player.png",32);
CreateObjectInfo(new Standard_Obj(PAULA,"Paula",{0,0},nullptr,{1,1},MAGENTA,32),"player.png",32);
CreateObjectInfo(new Standard_Obj(JEFF,"Jeff",{0,0},nullptr,{1,1},DARK_GREEN,32),"player.png",32);
CreateObjectInfo(new Standard_Obj(ANNA,"Anna",{0,0},nullptr,{1,1},DARK_MAGENTA,32),"player.png",32);
CreateObjectInfo(new Standard_Obj(KING,"King",{0,0},nullptr,{1,1},GREY,32),"player.png",32);
CreateObjectInfo(new Standard_Obj(POO,"Poo",{0,0},nullptr,{1,1},DARK_GREY,32),"player.png",32);
CreateObjectInfo(new Standard_Obj(NPC1,"npc1",{0,0},nullptr,{1,1},RED,60),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC2,"npc2",{0,0},nullptr,{1,1},GREEN,2),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC3,"npc3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC4,"npc4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC5,"npc5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC6,"npc6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC7,"npc7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC8,"npc8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC9,"npc9",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC10,"npc10",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC11,"npc11",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC12,"npc12",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC13,"npc13",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC13,"npc14",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC14,"npc15",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC15,"npc16",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC16,"npc17",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC17,"npc18",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC18,"npc19",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC19,"npc20",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC1_2,"npc1_2",{0,0},nullptr,{1,1},RED,60),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC2_2,"npc2_2",{0,0},nullptr,{1,1},GREEN,2),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC3_2,"npc3_2",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC4_2,"npc4_2",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC5_2,"npc5_2",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC6_2,"npc6_2",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC7_2,"npc7_2",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC8_2,"npc8_2",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC9_2,"npc9_2",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC10_2,"npc10_2",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC11_2,"npc11_2",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC12_2,"npc12_2",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC13_2,"npc13_2",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC13_2,"npc14_2",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC14_2,"npc15_2",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC15_2,"npc16_2",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC16_2,"npc17_2",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC17_2,"npc18_2",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC18_2,"npc19_2",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC19_2,"npc20_2",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC1_3,"npc1_3",{0,0},nullptr,{1,1},RED,60),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC2_3,"npc2_3",{0,0},nullptr,{1,1},GREEN,2),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC3_3,"npc3_3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC4_3,"npc4_3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC5_3,"npc5_3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC6_3,"npc6_3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC7_3,"npc7_3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC8_3,"npc8_3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC9_3,"npc9_3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC10_3,"npc10_3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC11_3,"npc11_3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC12_3,"npc12_3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC13_3,"npc13_3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC13_3,"npc14_3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC14_3,"npc15_3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC15_3,"npc16_3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC16_3,"npc17_3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC17_3,"npc18_3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC18_3,"npc19_3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC19_3,"npc20_3",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC1_4,"npc1_4",{0,0},nullptr,{1,1},RED,60),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC2_4,"npc2_4",{0,0},nullptr,{1,1},GREEN,2),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC3_4,"npc3_4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC4_4,"npc4_4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC5_4,"npc5_4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC6_4,"npc6_4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC7_4,"npc7_4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC8_4,"npc8_4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC9_4,"npc9_4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC10_4,"npc10_4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC11_4,"npc11_4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC12_4,"npc12_4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC13_4,"npc13_4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC13_4,"npc14_4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC14_4,"npc15_4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC15_4,"npc16_4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC16_4,"npc17_4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC17_4,"npc18_4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC18_4,"npc19_4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC19_4,"npc20_4",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC1_5,"npc1_5",{0,0},nullptr,{1,1},RED,60),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC2_5,"npc2_5",{0,0},nullptr,{1,1},GREEN,2),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC3_5,"npc3_5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC4_5,"npc4_5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC5_5,"npc5_5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC6_5,"npc6_5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC7_5,"npc7_5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC8_5,"npc8_5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC9_5,"npc9_5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC10_5,"npc10_5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC11_5,"npc11_5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC12_5,"npc12_5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC13_5,"npc13_5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC13_5,"npc14_5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC14_5,"npc15_5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC15_5,"npc16_5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC16_5,"npc17_5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC17_5,"npc18_5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC18_5,"npc19_5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC19_5,"npc20_5",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC1_6,"npc1_6",{0,0},nullptr,{1,1},RED,60),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC2_6,"npc2_6",{0,0},nullptr,{1,1},GREEN,2),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC3_6,"npc3_6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC4_6,"npc4_6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC5_6,"npc5_6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC6_6,"npc6_6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC7_6,"npc7_6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC8_6,"npc8_6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC9_6,"npc9_6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC10_6,"npc10_6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC11_6,"npc11_6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC12_6,"npc12_6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC13_6,"npc13_6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC13_6,"npc14_6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC14_6,"npc15_6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC15_6,"npc16_6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC16_6,"npc17_6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC17_6,"npc18_6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC18_6,"npc19_6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC19_6,"npc20_6",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC1_7,"npc1_7",{0,0},nullptr,{1,1},RED,60),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC2_7,"npc2_7",{0,0},nullptr,{1,1},GREEN,2),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC3_7,"npc3_7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC4_7,"npc4_7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC5_7,"npc5_7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC6_7,"npc6_7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC7_7,"npc7_7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC8_7,"npc8_7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC9_7,"npc9_7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC10_7,"npc10_7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC11_7,"npc11_7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC12_7,"npc12_7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC13_7,"npc13_7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC13_7,"npc14_7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC14_7,"npc15_7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC15_7,"npc16_7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC16_7,"npc17_7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC17_7,"npc18_7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC18_7,"npc19_7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC19_7,"npc20_7",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC1_8,"npc1_8",{0,0},nullptr,{1,1},RED,60),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC2_8,"npc2_8",{0,0},nullptr,{1,1},GREEN,2),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC3_8,"npc3_8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC4_8,"npc4_8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC5_8,"npc5_8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC6_8,"npc6_8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC7_8,"npc7_8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC8_8,"npc8_8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC9_8,"npc9_8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC10_8,"npc10_8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC11_8,"npc11_8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC12_8,"npc12_8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC13_8,"npc13_8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC13_8,"npc14_8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC14_8,"npc15_8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC15_8,"npc16_8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC16_8,"npc17_8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC17_8,"npc18_8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC18_8,"npc19_8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new Standard_Obj(NPC19_8,"npc20_8",{0,0},nullptr,{2,2},BLUE,20),"player.png",32,Flag::NONE,Flag::NONE);
CreateObjectInfo(new TrashCan_Obj(TRASH_CAN,"trashCan",{0,0},nullptr,{1,1},WHITE,0),"trashcan.png",32,Flag::NONE,Flag::NONE);
}
void SetupEncounters() {
ENCOUNTER_LIST.push_back(new Encounter(encounter::ENCOUNTER_1,{0,0},std::array<vd2d,4>{vd2d
{grid(1,2)},{grid(2,2)},{grid(3,2)},{grid(4,2)}},
std::vector<Entity*>{
new Entity(new Object(
new Entity(new Standard_Obj(
NPC1_4,"Test Obj",3,2,ANIMATIONS["player.png"]),
70, 70, 10, 10, 14,std::array<int,4>{0,0,0,0},0,std::vector<Battle::Move*>{
MOVELIST[BattleMoveName::TESTMOVE1],
MOVELIST[BattleMoveName::TESTMOVE2],
MOVELIST[BattleMoveName::TESTMOVE3],
}),
new Entity(new Object(
new Entity(new Standard_Obj(
NPC1_4,"Test Obj 2",1,3,ANIMATIONS["player.png"]),
70, 70, 10, 10, 14,std::array<int,4>{0,0,0,0},0,std::vector<Battle::Move*>{
MOVELIST[BattleMoveName::TESTMOVE1],
MOVELIST[BattleMoveName::TESTMOVE2],
MOVELIST[BattleMoveName::TESTMOVE3],
}),
new Entity(new Object(
new Entity(new Standard_Obj(
NPC1_4,"Test Obj 3",2,2,ANIMATIONS["player.png"]),
70, 70, 10, 10, 14,std::array<int,4>{0,0,0,0},0,std::vector<Battle::Move*>{
MOVELIST[BattleMoveName::TESTMOVE1],
@ -2217,7 +2219,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
ENCOUNTER_LIST.push_back(new Encounter(encounter::ENCOUNTER_2,{0,0},std::array<vd2d,4>{vd2d
{grid(1,1)},{grid(2,2)},{grid(3,2)},{grid(4,2)}},
std::vector<Entity*>{
new Entity(new Object(
new Entity(new Standard_Obj(
NPC1_4,"Test Obj",1,4,ANIMATIONS["player.png"],{2,2},GREEN,20),
70, 70, 10, 10, 14,std::array<int,4>{0,0,0,0},5,std::vector<Battle::Move*>{
MOVELIST[BattleMoveName::TESTMOVE1],
@ -2229,7 +2231,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
ITEMLIST[ItemName::PIZZA],
ITEMLIST[ItemName::MIRACLE_FOOD_LUNCH],
}),
new Entity(new Object(
new Entity(new Standard_Obj(
NPC1_4,"Test Obj 2",1,2,ANIMATIONS["player.png"],{2,2},GREEN,20),
70, 70, 10, 10, 14,std::array<int,4>{0,0,0,0},5,std::vector<Battle::Move*>{
MOVELIST[BattleMoveName::TESTMOVE1],
@ -2241,7 +2243,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
ITEMLIST[ItemName::PIZZA],
ITEMLIST[ItemName::MIRACLE_FOOD_LUNCH],
}),
new Entity(new Object(
new Entity(new Standard_Obj(
NPC1_4,"Test Obj 3",2,1,ANIMATIONS["player.png"],{2,2},GREEN,20),
70, 70, 10, 10, 14,std::array<int,4>{0,0,0,0},5,std::vector<Battle::Move*>{
MOVELIST[BattleMoveName::TESTMOVE1],
@ -2257,7 +2259,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
ENCOUNTER_LIST.push_back(new Encounter(encounter::ENCOUNTER_3,{0,0},std::array<vd2d,4>{vd2d
{grid(1,1)},{grid(2,2)},{grid(3,2)},{grid(4,2)}},
std::vector<Entity*>{
new Entity(new Object(
new Entity(new Standard_Obj(
NPC1_4,"Test Obj",1,2,ANIMATIONS["player.png"],{1,1},MAGENTA),
70, 70, 10, 10, 14,std::array<int,4>{0,0,0,0},0,std::vector<Battle::Move*>{
MOVELIST[BattleMoveName::TESTMOVE1],
@ -2268,21 +2270,21 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
ENCOUNTER_LIST.push_back(new Encounter(encounter::ENCOUNTER_4,{0,0},std::array<vd2d,4>{vd2d
{grid(1,2)},{grid(2,2)},{grid(3,2)},{grid(4,2)}},
std::vector<Entity*>{
new Entity(new Object(
new Entity(new Standard_Obj(
NPC1_4,"Test Obj",6,2,ANIMATIONS["player.png"],{1,1},MAGENTA),
70, 70, 10, 10, 14,std::array<int,4>{0,0,0,0},0,std::vector<Battle::Move*>{
MOVELIST[BattleMoveName::TESTMOVE1],
MOVELIST[BattleMoveName::TESTMOVE2],
MOVELIST[BattleMoveName::TESTMOVE3],
}),
new Entity(new Object(
new Entity(new Standard_Obj(
NPC1_4,"Test Obj",7,2,ANIMATIONS["player.png"],{1,1},MAGENTA),
70, 70, 10, 10, 14,std::array<int,4>{0,0,0,0},0,std::vector<Battle::Move*>{
MOVELIST[BattleMoveName::TESTMOVE1],
MOVELIST[BattleMoveName::TESTMOVE2],
MOVELIST[BattleMoveName::TESTMOVE3],
}),
new Entity(new Object(
new Entity(new Standard_Obj(
NPC1_4,"Test Obj",3,5,ANIMATIONS["player.png"],{1,1},MAGENTA),
70, 70, 10, 10, 14,std::array<int,4>{0,0,0,0},0,std::vector<Battle::Move*>{
MOVELIST[BattleMoveName::TESTMOVE1],
@ -2526,7 +2528,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
std::vector<Entity*>ents;
for (int i=0;i<ENCOUNTER_LIST[id]->objs.size();i++) {
Entity*ent=ENCOUNTER_LIST[id]->objs[i];
Object*newObj=new Object(ent->obj->id,ent->obj->name,ent->obj->GetPos(),ent->obj->spr,ent->obj->GetScale(),ent->obj->color,ent->obj->animationSpd,ent->obj->temp);
Object*newObj=new Standard_Obj(ent->obj->id,ent->obj->name,ent->obj->GetPos(),ent->obj->spr,ent->obj->GetScale(),ent->obj->color,ent->obj->animationSpd,ent->obj->temp);
ents.push_back(new Entity(newObj,ent->GetHP(),ent->maxHP,ent->GetPP(),ent->maxPP,ent->baseAtk,ent->resistances,ent->speed,ent->moveSet,ent->inventory,ent->equipment,ent->damageReduction,ent->smart,ent->dumb));
}
Encounter*data=new Encounter(id,pos,ENCOUNTER_LIST[id]->playerPos,ents,chance);
@ -3068,7 +3070,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
case ActionType::CREATE_OBJECTS:{
for (auto&obj:((CreateObjects*)CurrentCutscene->GetAction())->GetObjects()) {
obj->temp=true;
AddObjectToWorld(CurrentCutscene->AddCutsceneObject(new Object(obj->id,obj->name,obj->GetPos(),obj->spr,obj->GetScale(),obj->color,obj->animationSpd,true)));
AddObjectToWorld(CurrentCutscene->AddCutsceneObject(new Standard_Obj(obj->id,obj->name,obj->GetPos(),obj->spr,obj->GetScale(),obj->color,obj->animationSpd,true)));
}
CurrentCutscene->AdvanceAction();
}break;

@ -48,9 +48,13 @@ class Object{
SetScale(scale);
this->temp=temp;
}
virtual Object* CreateType(int id,std::string name,vd2d pos,Animation*spr,vd2d scale={1,1},Pixel color=WHITE,int animationSpd=1,bool temp=false)=0;
virtual bool Interact()=0;
void SetScale(vd2d scale) {
this->scale=scale;
this->originPoint={spr->width/2*scale.x,(spr->spr->sprite->height-4)*scale.y};
if (spr!=nullptr) {
this->originPoint={spr->width/2*scale.x,(spr->spr->sprite->height-4)*scale.y};
}
}
vd2d GetScale() {
return scale;
@ -96,10 +100,7 @@ class Object{
Move({0,1});
return true;
}
}
} else
if (move.x<0) {
for (int i=0;i<wiggleRoom;i++) { //Search Up.
if (!Collision({originPos.x+move.x,originPos.y-i})) {
//There is potentially to move up-left here, so we will do so.
Move({0,-1});
@ -149,4 +150,23 @@ class Object{
return false;
}
};
#define DynamicObject(objName) public:\
objName(int id,std::string name,int gridx,int gridy,Animation*spr,vd2d scale={1,1},Pixel color=WHITE,int animationSpd=1,bool temp=false)\
:Object(id,name,gridx,gridy,spr,scale,color,animationSpd,temp){};\
objName(int id,std::string name,vd2d pos,Animation*spr,vd2d scale={1,1},Pixel color=WHITE,int animationSpd=1,bool temp=false)\
:Object(id,name,pos,spr,scale,color,animationSpd,temp){};\
Object* CreateType(int id,std::string name,vd2d pos,Animation*spr,vd2d scale={1,1},Pixel color=WHITE,int animationSpd=1,bool temp=false)override{\
return new objName(id,name,pos,spr,scale,color,animationSpd,temp);\
}
class Standard_Obj : public Object{
DynamicObject(Standard_Obj)
bool Interact()override{return false;}
};
class TrashCan_Obj : public Object{
DynamicObject(TrashCan_Obj)
bool Interact()override{return false;}
};
#endif

@ -160,6 +160,7 @@ enum Reference{
NPC17_8,
NPC18_8,
NPC19_8,
TRASH_CAN
};
namespace cutscene{

Loading…
Cancel
Save