diff --git a/C++ProjectTemplate b/C++ProjectTemplate index 3e5fd23..552141a 100755 Binary files a/C++ProjectTemplate and b/C++ProjectTemplate differ diff --git a/assets/maps/map0 b/assets/maps/map0 index 61e42c4..85314d6 100644 --- a/assets/maps/map0 +++ b/assets/maps/map0 @@ -53,6 +53,7 @@ OBJECT224.000000;128.000000;8 OBJECT160.000000;128.000000;8 OBJECT192.000000;128.000000;8 OBJECT288.000000;128.000000;8 +OBJECT453.000000;133.000000;0 OBJECT313.000000;151.000000;8 OBJECT313.000000;131.000000;10 OBJECT192.000000;160.000000;8 @@ -60,7 +61,6 @@ OBJECT160.000000;160.000000;8 OBJECT256.000000;160.000000;8 OBJECT224.000000;160.000000;7 OBJECT288.000000;160.000000;7 -OBJECT123.000000;163.000000;0 OBJECT313.000000;136.000000;11 OBJECT313.000000;141.000000;12 OBJECT288.000000;160.000000;9 diff --git a/assets/maps/map0_5 b/assets/maps/map0_5 index 35d7a48..183e6b3 100644 --- a/assets/maps/map0_5 +++ b/assets/maps/map0_5 @@ -2,7 +2,7 @@ ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? -???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? +??????????????????93;393;3??93:3:3:3;3?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????0717?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? diff --git a/main.cpp b/main.cpp index dcf8b07..c19cf65 100644 --- a/main.cpp +++ b/main.cpp @@ -167,11 +167,21 @@ class Object{ Move(move); return true; } else + if (move.x!=0&&!Collision({originPos.x+move.x,originPos.y})) { + Move({move.x,0}); + return true; + } else + if (move.y!=0&&!Collision({originPos.x,originPos.y+move.y})) { + Move({0,move.y}); + return true; + } + else if (move.x>0) { for (int i=0;i0) { for (int i=0;iSmoothMove({0,-1})) { - UpdatePlayerTrail({0,-1}); - moved=true; - } + movementComponents.y-=1; } if (DownHeld()) { - if (PARTY_MEMBER_OBJ[0]->SmoothMove({0,1})) { - UpdatePlayerTrail({0,1}); - moved=true; - } + movementComponents.y+=1; } if (LeftHeld()) { - if (PARTY_MEMBER_OBJ[0]->SmoothMove({-1,0})) { - UpdatePlayerTrail({-1,0}); - moved=true; - } + movementComponents.x-=1; } if (RightHeld()) { - if (PARTY_MEMBER_OBJ[0]->SmoothMove({1,0})) { - UpdatePlayerTrail({1,0}); + movementComponents.x+=1; + } + if (movementComponents.mag()>0) { + if (PARTY_MEMBER_OBJ[0]->SmoothMove(movementComponents)) { + UpdatePlayerTrail(movementComponents); moved=true; } } @@ -1487,7 +1492,7 @@ goes on a very long time, I hope you can understand this is only for testing pur if (POWER_GRADE_CURSOR[-CURRENT_TURN-1]==i) { DrawFancyStringDecal({8+WIDTH/4+4+i*8,12*counter+8+displayYOffset},std::wstring(1,moves[i]->grade)); } else { - DrawFancyStringDecal({8+WIDTH/4+4+i*8,12*counter+8+displayYOffset},std::wstring(1,moves[i]->grade),VERY_DARK_GREY); + DrawFancyStringDecal({8+WIDTH/4+4+i*8,12*counter+8+displayYOffset},std::wstring(1,moves[i]->grade),DARK_GREY); } } else { DrawFancyStringDecal({8+WIDTH/4+4+i*8,12*counter+8+displayYOffset},std::wstring(1,moves[i]->grade)); @@ -1863,7 +1868,6 @@ goes on a very long time, I hope you can understand this is only for testing pur void SetupPartyMemberStats() { for (int i=0;i<7;i++) { PARTY_MEMBER_STATS[i]=new Entity(120,120,30,30,8,{0,0,0,0},4,{MOVELIST[BattleMoveName::TESTMOVE1]}); - printf("HP:%d Max HP:%d",PARTY_MEMBER_STATS[i]->HP,PARTY_MEMBER_STATS[i]->maxHP); } PARTY_MEMBER_STATS[PLAYER]->moveSet={ MOVELIST[BattleMoveName::HAILSTORM_A],