Skip to content

Commit

Permalink
updating more structs (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnTW committed Oct 18, 2023
1 parent 95d183d commit 20f3007
Show file tree
Hide file tree
Showing 5 changed files with 336 additions and 77 deletions.
10 changes: 5 additions & 5 deletions M2TWEOP Code/M2TWEOP library/fastFuncts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ namespace fastFuncts

for (UINT32 i = 0; i < numFac; i++)
{
for (int j = 0; j < listFac[i]->wathtowersNum; j++)
for (int j = 0; j < listFac[i]->watchtowersNum; j++)
{
watchTowerStruct* towS = listFac[i]->watchTowers[j];
if (towS->xCoord == x && towS->yCoord == y)
Expand Down Expand Up @@ -765,7 +765,7 @@ namespace fastFuncts
}
}

EOP_EXPORT int addAnchillary(namedCharacter* character, anchillary* anch)
EOP_EXPORT int addAnchillary(namedCharacter* character, ancillary* anch)
{
if (character == nullptr || anch == nullptr)return 0;

Expand All @@ -792,7 +792,7 @@ namespace fastFuncts
return retr;
}

EOP_EXPORT void removeAnchillary(namedCharacter* character, anchillary* anch)
EOP_EXPORT void removeAnchillary(namedCharacter* character, ancillary* anch)
{
if (character == nullptr || anch == nullptr)return;

Expand All @@ -817,12 +817,12 @@ namespace fastFuncts
return;
}

EOP_EXPORT anchillary* findAnchillary(char* anchName)
EOP_EXPORT ancillary* findAnchillary(char* anchName)
{
if (anchName == nullptr)return 0;

DWORD adr = 0;
anchillary* retr = nullptr;
ancillary* retr = nullptr;
if (globals::dataS.gamever == 2)//steam
{
adr = 0x008b1d30;
Expand Down
6 changes: 3 additions & 3 deletions M2TWEOP Code/M2TWEOP library/fastFuncts.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ namespace fastFuncts


//add anchillary to character
NOINLINE EOP_EXPORT int addAnchillary(namedCharacter* character, anchillary* anch);
NOINLINE EOP_EXPORT int addAnchillary(namedCharacter* character, ancillary* anch);
//remove anchillary from character
NOINLINE EOP_EXPORT void removeAnchillary(namedCharacter* character, anchillary* anch);
NOINLINE EOP_EXPORT void removeAnchillary(namedCharacter* character, ancillary* anch);
//find anchillary in anch list
NOINLINE EOP_EXPORT anchillary* findAnchillary(char* anchName);
NOINLINE EOP_EXPORT ancillary* findAnchillary(char* anchName);

//edit unit characteristics
NOINLINE EOP_EXPORT void setUnitParams(unit* un, int count, int exp, int armor, int weap);
Expand Down
6 changes: 3 additions & 3 deletions M2TWEOP Code/M2TWEOP library/onlineThings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,13 @@ namespace battleCreator
fileStrings.push_back(tempS);
}

if (gen->genChar->anchNum != 0)
if (gen->genChar->ancNum != 0)
{
tempS = "ancillaries";
UINT32 anchNum = gen->genChar->anchNum;
UINT32 anchNum = gen->genChar->ancNum;
for (UINT32 i = 0; i < anchNum; i++)
{
tempS.append(" ").append(gen->genChar->anchillaries[i]->dataAnch->anchName).append(" ,");
tempS.append(" ").append(gen->genChar->ancillaries[i]->dataAnch->ancName).append(" ,");
}
fileStrings.push_back(tempS);
}
Expand Down
6 changes: 3 additions & 3 deletions M2TWEOP Code/M2TWEOP library/onlineThings2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,14 @@ namespace battleCreator
}


if (gen->genChar->anchNum != 0)
if (gen->genChar->ancNum != 0)
{
jsn::json jAncs= jsn::json::array();

UINT32 anchNum = gen->genChar->anchNum;
UINT32 anchNum = gen->genChar->ancNum;
for (UINT32 i = 0; i < anchNum; i++)
{
jAncs.push_back(gen->genChar->anchillaries[i]->dataAnch->anchName);
jAncs.push_back(gen->genChar->ancillaries[i]->dataAnch->ancName);
}

genJson["ancillaries"] = jAncs;
Expand Down
Loading

0 comments on commit 20f3007

Please sign in to comment.