House collision shenanigans

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
sigonasr2 2022-11-05 16:21:58 -07:00
parent b33359a22f
commit 5c307dd296
12 changed files with 28 additions and 35 deletions

Binary file not shown.

View File

@ -3,9 +3,9 @@
??????????????????91;191;1??91:1:1:1;1?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????91;191;1??91:1:1:1;1??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????91:1;1?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????92:2;2?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????:0??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??00????????????????????92:2;2?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??00??????????????????????91:1;1????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??66???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??66????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
@ -95,3 +95,4 @@ TRIGGER32;288;1;32;32
TRIGGER96;352;1;32;32 TRIGGER96;352;1;32;32
TRIGGER32;384;1;32;32 TRIGGER32;384;1;32;32
TRIGGER32;288;1;32;32 TRIGGER32;288;1;32;32
TRIGGER448;256;2;32;32;1;160.000000;224.000000

View File

@ -4,9 +4,9 @@
??????????????????92;292;2??92:2:2:2;2?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????92;292;2??92:2:2:2;2??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????92:2;2?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????92:2;2?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????92:2;2?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????????????92:2;2????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??????????????????????065656565616?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????????065656565616??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

View File

@ -1,14 +1,14 @@
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??????????????????<2>2<2>2??<2=2=2=2>2??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??????????????????93;393;3??93:3:3:3;3??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??????????0717?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????0717??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????????????<2=2>2????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????93:3;3?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????????:5????????;4??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????15?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????????081818181828??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??????????????????????065656565616?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????????065656565616??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??????????????????????9256?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????????9256??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????56?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????56??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

View File

@ -3,9 +3,9 @@
??????????????????91;191;1??91:1:1:1;1?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????91;191;1??91:1:1:1;1??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??????????????????????????:0????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????91:1;1?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????91:1;1??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????92:2;2??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????92:2;2??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
101010?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? 101010??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

View File

@ -4,8 +4,8 @@
??????????????????92;292;2??92:2:2:2;2?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????92;292;2??92:2:2:2;2??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????92:2;2?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????92:2;2?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
????????????????????????92:2;2?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????92:2;2??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

View File

@ -2,11 +2,11 @@
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??????????????????93;393;3??93:3:3:3;3?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????<2=2>2??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

View File

@ -1155,11 +1155,13 @@ Object*SeasonI::AddObjectToWorld(Object*obj) {
PARTY_MEMBER_OBJ[0]=(NPC_Obj*)obj; PARTY_MEMBER_OBJ[0]=(NPC_Obj*)obj;
PARTY_MEMBER_ID[0]=0; PARTY_MEMBER_ID[0]=0;
PARTY_MEMBER_OBJ[0]->name="PLAYER"; PARTY_MEMBER_OBJ[0]->name="PLAYER";
PARTY_MEMBER_OBJ[0]->hasCollision=false;
PARTY_MEMBER_STATS[PARTY_MEMBER_ID[0]]->obj=PARTY_MEMBER_OBJ[0]; PARTY_MEMBER_STATS[PARTY_MEMBER_ID[0]]->obj=PARTY_MEMBER_OBJ[0];
for (int i=(int)Flag::HAS_MAIN+1;i<=(int)Flag::HAS_POO;i++) { for (int i=(int)Flag::HAS_MAIN+1;i<=(int)Flag::HAS_POO;i++) {
if (GetGameFlag(i)) { if (GetGameFlag(i)) {
PARTY_MEMBER_ID[PARTY_MEMBER_COUNT]=(int)PLAYER+i-(int)Flag::HAS_MAIN; PARTY_MEMBER_ID[PARTY_MEMBER_COUNT]=(int)PLAYER+i-(int)Flag::HAS_MAIN;
PARTY_MEMBER_OBJ[PARTY_MEMBER_COUNT]=(NPC_Obj*)AddObjectToWorld(CreateObject((int)PLAYER+i-(int)Flag::HAS_MAIN,PARTY_MEMBER_OBJ[0]->GetPos())); PARTY_MEMBER_OBJ[PARTY_MEMBER_COUNT]=(NPC_Obj*)AddObjectToWorld(CreateObject((int)PLAYER+i-(int)Flag::HAS_MAIN,PARTY_MEMBER_OBJ[0]->GetPos()));
PARTY_MEMBER_OBJ[PARTY_MEMBER_COUNT]->hasCollision=false;
switch ((int)PLAYER+i-(int)Flag::HAS_MAIN) { switch ((int)PLAYER+i-(int)Flag::HAS_MAIN) {
case 0:{PARTY_MEMBER_OBJ[PARTY_MEMBER_COUNT]->name="PLAYER";}break; case 0:{PARTY_MEMBER_OBJ[PARTY_MEMBER_COUNT]->name="PLAYER";}break;
case 1:{PARTY_MEMBER_OBJ[PARTY_MEMBER_COUNT]->name="NESS";}break; case 1:{PARTY_MEMBER_OBJ[PARTY_MEMBER_COUNT]->name="NESS";}break;
@ -2423,6 +2425,7 @@ void SeasonI::keyUpdates() {
} }
if (GetKey(K1).bPressed) { if (GetKey(K1).bPressed) {
EDITING_LAYER=layer::COLLISION; EDITING_LAYER=layer::COLLISION;
SELECTED_TRIGGER=TriggerName::NONE;
EnableLayer(layer::COLLISION,true); EnableLayer(layer::COLLISION,true);
SetLayerTint(layer::COLLISION,{255,0,0,215}); SetLayerTint(layer::COLLISION,{255,0,0,215});
} }
@ -3032,6 +3035,7 @@ void SeasonI::drawGame(){
}break; }break;
case GameState::TILE_SELECT:{ case GameState::TILE_SELECT:{
//14x14 pixels per tile. //14x14 pixels per tile.
Clear(Pixel(64,64,128));
DrawDecal({0,0},SPRITES["terrainmap.png"],{TILEMAP_EDITOR_DRAW_MULT,TILEMAP_EDITOR_DRAW_MULT}); DrawDecal({0,0},SPRITES["terrainmap.png"],{TILEMAP_EDITOR_DRAW_MULT,TILEMAP_EDITOR_DRAW_MULT});
DrawRectDecal(SELECTED_TILE*(TILEMAP_EDITOR_TILESIZE),{TILEMAP_EDITOR_TILESIZE,TILEMAP_EDITOR_TILESIZE},RED); DrawRectDecal(SELECTED_TILE*(TILEMAP_EDITOR_TILESIZE),{TILEMAP_EDITOR_TILESIZE,TILEMAP_EDITOR_TILESIZE},RED);
}break; }break;

View File

@ -49,6 +49,7 @@ class Object{
bool temp=false; //If set to true, it's marked for deletion after cutscene handling. bool temp=false; //If set to true, it's marked for deletion after cutscene handling.
bool enc=false; //If set to true, it's not included in the main list of entities for map saving because it's from an encounter. bool enc=false; //If set to true, it's not included in the main list of entities for map saving because it's from an encounter.
bool dead=false; //If set to true, this object was properly part of an Entity and got declared as dead. bool dead=false; //If set to true, this object was properly part of an Entity and got declared as dead.
bool hasCollision=true; //Set to false to prevent resolving of collisions.
int blinkFrames=0; //Frame count of how much time is left for the image to be blinking. Used when enemies take damage. int blinkFrames=0; //Frame count of how much time is left for the image to be blinking. Used when enemies take damage.
//animationSpd is how long to wait before switching frames. //animationSpd is how long to wait before switching frames.
bool highlighted=false; //Whether or not this object has been declared as highlighted by a target range selector. bool highlighted=false; //Whether or not this object has been declared as highlighted by a target range selector.
@ -59,7 +60,7 @@ class Object{
return true; return true;
} else { } else {
for (int i=0;i<OBJECTS.size();i++) { for (int i=0;i<OBJECTS.size();i++) {
if (OBJECTS[i]!=this) { if (OBJECTS[i]!=this&&OBJECTS[i]->hasCollision) {
if (std::abs(OBJECTS[i]->GetPosWithOrigin().x-pos.x)+std::abs(OBJECTS[i]->GetPosWithOrigin().y-pos.y)<4) { if (std::abs(OBJECTS[i]->GetPosWithOrigin().x-pos.x)+std::abs(OBJECTS[i]->GetPosWithOrigin().y-pos.y)<4) {
return true; return true;
} }
@ -124,7 +125,7 @@ class Object{
if (move.x!=0) { if (move.x!=0) {
for (int i=0;i<wiggleRoom;i++) { //Search Up. for (int i=0;i<wiggleRoom;i++) { //Search Up.
if (!Collision({originPos.x+move.x,originPos.y-i})) { if (!Collision({originPos.x+move.x,originPos.y-i})) {
//There is potentially to move up-right here, so we will do so. //There is potentially to move up-right/up-left here, so we will do so.
Move({0,-1}); Move({0,-1});
originPos.y+=-1; originPos.y+=-1;
return true; return true;
@ -132,20 +133,7 @@ class Object{
} }
for (int i=0;i<wiggleRoom;i++) { //Search Down. for (int i=0;i<wiggleRoom;i++) { //Search Down.
if (!Collision({originPos.x+move.x,originPos.y+i})) { if (!Collision({originPos.x+move.x,originPos.y+i})) {
//There is potentially to move down-right here, so we will do so. //There is potentially to move down-right/down-left here, so we will do so.
Move({0,1});
return true;
}
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});
return true;
}
}
for (int i=0;i<wiggleRoom;i++) { //Search Down.
if (!Collision({originPos.x+move.x,originPos.y+i})) {
//There is potentially to move down-left here, so we will do so.
Move({0,1}); Move({0,1});
return true; return true;
} }
@ -154,14 +142,14 @@ class Object{
if (move.y!=0) { if (move.y!=0) {
for (int i=0;i<wiggleRoom;i++) { //Search Left. for (int i=0;i<wiggleRoom;i++) { //Search Left.
if (!Collision({originPos.x-i,originPos.y+move.y})) { if (!Collision({originPos.x-i,originPos.y+move.y})) {
//There is potentially to move down-left here, so we will do so. //There is potentially to move up-left/up-right here, so we will do so.
Move({-1,0}); Move({-1,0});
return true; return true;
} }
} }
for (int i=0;i<wiggleRoom;i++) { //Search Right. for (int i=0;i<wiggleRoom;i++) { //Search Right.
if (!Collision({originPos.x+i,originPos.y+move.y})) { if (!Collision({originPos.x+i,originPos.y+move.y})) {
//There is potentially to move down-right here, so we will do so. //There is potentially to move down-right/down-left here, so we will do so.
Move({1,0}); Move({1,0});
return true; return true;
} }

2
save0
View File

@ -1 +1 @@
120 120 PLAYER 30 30 8 8 4 0 0 0 0 0 0 0 11 9 10 13 14 15 16 17 33 29 21 25 1 4 6 3 -1 -1 -1 365 288 120 120 NESS 30 30 8 8 4 0 0 0 0 0 0 0 6 33 34 29 30 31 32 0 3 -1 -1 -1 354 277 120 120 PAULA 30 30 8 8 4 0 0 0 0 0 0 0 6 21 22 23 24 37 38 0 3 -1 -1 -1 342 277 120 120 JEFF 30 30 8 8 4 0 0 0 0 0 0 0 1 0 0 3 -1 -1 -1 -999 -999 120 120 ANNA 30 30 8 8 4 0 0 0 0 0 0 0 4 21 25 26 29 0 3 -1 -1 -1 330 277 120 120 KING 30 30 8 8 4 0 0 0 0 0 0 0 1 0 0 3 -1 -1 -1 -999 -999 120 120 POO 30 30 8 8 4 0 0 0 0 0 0 0 1 0 0 3 -1 -1 -1 -999 -999 66 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 6 8 3 3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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7939 PLAYER 0 120 120 PLAYER 5 30 8 8 4 0 0 0 0 0 0 0 11 9 10 13 14 15 16 17 33 29 21 25 1 4 6 3 -1 -1 -1 328 215 120 120 NESS 30 30 8 8 4 0 0 0 0 0 0 0 6 33 34 29 30 31 32 0 3 -1 -1 -1 328 215 120 120 PAULA 30 30 8 8 4 0 0 0 0 0 0 0 6 21 22 23 24 37 38 0 3 -1 -1 -1 328 215 120 120 JEFF 30 30 8 8 4 0 0 0 0 0 0 0 1 0 0 3 -1 -1 -1 -999 -999 120 120 ANNA 30 30 8 8 4 0 0 0 0 0 0 0 4 21 25 26 29 0 3 -1 -1 -1 328 215 120 120 KING 30 30 8 8 4 0 0 0 0 0 0 0 1 0 0 3 -1 -1 -1 -999 -999 120 120 POO 30 30 8 8 4 0 0 0 0 0 0 0 1 0 0 3 -1 -1 -1 -999 -999 66 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 6 8 3 3 3 10 10 10 10 12 12 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 2 2 2 2 2 2 2 2 5 11 512 1 1 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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