diff --git a/C++ProjectTemplate b/C++ProjectTemplate index e663769..05d32ee 100755 Binary files a/C++ProjectTemplate and b/C++ProjectTemplate differ diff --git a/main.cpp b/main.cpp index 4108890..c3d3327 100644 --- a/main.cpp +++ b/main.cpp @@ -317,20 +317,7 @@ enum class ItemName{ KEY_TO_THE_PALACE, }; -template -inline T - transform_to ( F str ) noexcept -{ -// note: F has to have -// the empty()method -if (str.empty()) - return {}; -// note: F must be able to work -// with std begin and end - return { std::begin(str), std::end(str) }; -// also the above line requires, T has a constructor -// that will take begin and end values of type F. -}; +template inline T transform_to( F str ) noexcept{if (str.empty()) return {}; return { std::begin(str), std::end(str) };}; namespace Battle{ class Move{ @@ -1441,7 +1428,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), } if (EDITING_LAYER==layer::ENCOUNTER&&GetMouse(0).bPressed) { for (int i=0;iencounters.size();i++) { - if(CURRENT_MAP->encounters[i]->pos==HIGHLIGHTED_TILE*32) { + if(CURRENT_MAP->encounters[i]->pos==(vd2d)HIGHLIGHTED_TILE*32) { EDITING_ENCOUNTER=CURRENT_MAP->encounters[i]; TextEntryEnable(true); break; @@ -1453,7 +1440,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), } else if (EDITING_LAYER==layer::ENCOUNTER&&GetMouse(1).bPressed) { for (int i=0;iencounters.size();i++) { - if(CURRENT_MAP->encounters[i]->pos==HIGHLIGHTED_TILE*32) { + if(CURRENT_MAP->encounters[i]->pos==(vd2d)HIGHLIGHTED_TILE*32) { for (int j=0;jencounters[i]->objs.size();j++) { int index=CURRENT_MAP->encounters[i]->objs[j]->obj->objArrElement; delete OBJECTS[index]; @@ -1473,7 +1460,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), } else if (EDITING_LAYER==layer::OBJECT&&GetMouse(1).bReleased) { for (int i=0;iGetPos()==HIGHLIGHTED_TILE*32) { + if (OBJECTS[i]->GetPos()==(vd2d)HIGHLIGHTED_TILE*32) { delete OBJECTS[i]; OBJECTS.erase(OBJECTS.begin()+i--); } else { @@ -3535,14 +3522,14 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), } bool nonSolid=false; //Ran into a non-solid instance, which means we can't mark the tile, but we can continue moving through. for (int i=0;iGetPosWithOrigin()-cameraPos)/32*32) { + if (CURRENT_TURN!=-i-1&&pos==(vd2d)(vi2d)(PARTY_MEMBER_OBJ[i]->GetPosWithOrigin()-cameraPos)/32*32) { nonSolid=true; break; } } if (!nonSolid) { for (int i=0;iobjs.size();i++) { - if (pos==(vi2d)(BATTLE_ENCOUNTER->objs[i]->obj->GetPosWithOrigin()-cameraPos)/32*32) { + if (pos==(vd2d)(vi2d)(BATTLE_ENCOUNTER->objs[i]->obj->GetPosWithOrigin()-cameraPos)/32*32) { nonSolid=true; break; }