Summer 19 Edition (Version C)

Rolling in improvements from the tvbowl branch: reading in starting lineup information from the tactics screen in 17 and 18, adding cardLimit variable to AATF to make changing card limits easier
master
Noteperson 3 years ago
parent 49926fa1b2
commit dac478c02d
  1. 38
      aatf.cpp
  2. 2
      editor.h
  3. 2
      main.cpp
  4. 10
      pes17.cpp
  5. 11
      pes18.cpp

@ -20,8 +20,6 @@ void aatf_single(HWND hAatfbox, int pesVersion, int teamSel, player_entry* gplay
int manletBonus = 5;
int ii,jj;
int numGK = 0;
//Player ratings
int numReg = 0;
@ -35,10 +33,10 @@ void aatf_single(HWND hAatfbox, int pesVersion, int teamSel, player_entry* gplay
bool usingRed = false;
int errorTot = 0;
for(ii=0; ii<gteams[teamSel].num_on_team; ii++)
for(int ii=0; ii<gteams[teamSel].num_on_team; ii++)
{
//Find each player on team
for(jj=0; jj<gnum_players; jj++)
for(int jj=0; jj<gnum_players; jj++)
{
if(gplayers[jj].id == gteams[teamSel].players[ii])
{
@ -55,6 +53,7 @@ void aatf_single(HWND hAatfbox, int pesVersion, int teamSel, player_entry* gplay
int cardCount = 0;
int cardMod = 0;
int cardLimit = 0;
bool hasTrick = false;
int targetRate = 0, targetRate2 = 0;
int rating = player.drib;
@ -158,7 +157,7 @@ void aatf_single(HWND hAatfbox, int pesVersion, int teamSel, player_entry* gplay
//Count A positions
int countA = 0;
for(jj=0;jj<13;jj++)
for(int jj=0;jj<13;jj++)
{
if(player.play_pos[jj] > 0)
countA++;
@ -182,7 +181,7 @@ void aatf_single(HWND hAatfbox, int pesVersion, int teamSel, player_entry* gplay
}
//Count cards
for(jj=0;jj<28;jj++)
for(int jj=0;jj<28;jj++)
{
if(player.play_skill[jj])
{
@ -195,7 +194,7 @@ void aatf_single(HWND hAatfbox, int pesVersion, int teamSel, player_entry* gplay
hasTrick = true;
}
}
for(jj=0;jj<7;jj++)
for(int jj=0;jj<7;jj++)
{
if(player.com_style[jj])
cardCount++;
@ -257,12 +256,15 @@ void aatf_single(HWND hAatfbox, int pesVersion, int teamSel, player_entry* gplay
errorTot++;
errorMsg << _T("Form is ") << player.form+1 << _T(", should be 4; ");
}
cardLimit = 2 + cardMod;
if(player.reg_pos == 0) //GK gets 1 card, height capped to 185cm
{
if(cardCount > 1 + cardMod)
cardLimit = 1 + cardMod;
if(cardCount > cardLimit)
{
errorTot++;
errorMsg << _T("Has ") << cardCount << _T(" cards, only allowed ") << 1 + cardMod << _T("; ");
errorMsg << _T("Has ") << cardCount << _T(" cards, only allowed ") << cardLimit << _T("; ");
}
if(player.height > 185)
{
@ -270,10 +272,10 @@ void aatf_single(HWND hAatfbox, int pesVersion, int teamSel, player_entry* gplay
errorMsg << _T("GK height over 185cm; ");
}
}
else if(cardCount > 2 + cardMod)
else if(cardCount > cardLimit)
{
errorTot++;
errorMsg << _T("Has ") << cardCount << _T(" cards, only allowed ") << 2 + cardMod << _T("; ");
errorMsg << _T("Has ") << cardCount << _T(" cards, only allowed ") << cardLimit << _T("; ");
}
if(player.reg_pos == 0) //GK gets target rate is 72
@ -305,6 +307,7 @@ void aatf_single(HWND hAatfbox, int pesVersion, int teamSel, player_entry* gplay
numSilver++;
targetRate = 91;
targetRate2 = 91;
if(numSilver>2)
{
errorTot++;
@ -329,10 +332,12 @@ void aatf_single(HWND hAatfbox, int pesVersion, int teamSel, player_entry* gplay
cardMod++;
if(player.play_skill[11]) //Free FTS for medals
cardMod++;
if(cardCount > 3 + cardMod)
cardLimit = 3 + cardMod;
if(cardCount > cardLimit)
{
errorTot++;
errorMsg << _T("Has ") << cardCount << _T(" cards, only allowed ") << 3 + cardMod << _T("; ");
errorMsg << _T("Has ") << cardCount << _T(" cards, only allowed ") << cardLimit << _T("; ");
}
if(rating != targetRate)
{
@ -345,6 +350,7 @@ void aatf_single(HWND hAatfbox, int pesVersion, int teamSel, player_entry* gplay
numGold++;
targetRate = 99;
targetRate2 = 99;
if(numGold>2)
{
errorTot++;
@ -369,10 +375,12 @@ void aatf_single(HWND hAatfbox, int pesVersion, int teamSel, player_entry* gplay
cardMod++;
if(player.play_skill[11]) //Free FTS for medals
cardMod++;
if(cardCount > 4 + cardMod)
cardLimit = 4 + cardMod;
if(cardCount > cardLimit)
{
errorTot++;
errorMsg << _T("Has ") << cardCount << _T(" cards, only allowed ") << 4 + cardMod << _T("; ");
errorMsg << _T("Has ") << cardCount << _T(" cards, only allowed ") << cardLimit << _T("; ");
}
if(rating != targetRate)
{

@ -601,6 +601,7 @@ struct team_entry
int num_on_team;
int starting11[11];
char captain_ind;
char color1_red;
@ -621,6 +622,7 @@ struct team_entry
b_edit_name = false;
memset(name,0,sizeof(name));
memset(short_name,0,sizeof(short_name));
for(int ii=0; ii<11; ii++) starting11[ii]=0;
num_on_team = 0;
color1_red = 0;
color1_blue = 0;

@ -198,7 +198,7 @@ int APIENTRY _tWinMain(HINSTANCE I, HINSTANCE PI, LPTSTR CL, int SC)
ghw_main = CreateWindowEx(
0,
wc.lpszClassName,
_T("4ccEditor Summer 19 Edition (Version B)"),
_T("4ccEditor Summer 19 Edition (Version C)"),
WS_OVERLAPPEDWINDOW,
20, 20, 1120, 700,
NULL, NULL, ghinst, NULL);

@ -488,7 +488,15 @@ void fill_team_tactics17(int &current_byte, void* ghdescriptor, team_entry* gtea
{
if(team_id == gteams[t_ind].id) break;
}
current_byte+=0x209;
current_byte+=0x1E0;
//Starting lineup
for(int ii=0; ii<11; ii++)
{
gteams[t_ind].starting11[ii] = pDescriptorOld->data[current_byte];
current_byte++;
}
current_byte+=0x1E;
gteams[t_ind].captain_ind = (char)pDescriptorOld->data[current_byte];
current_byte+=0x67;

@ -500,7 +500,16 @@ void fill_team_tactics18(int &current_byte, void* ghdescriptor, team_entry* gtea
{
if(team_id == gteams[t_ind].id) break;
}
current_byte+=0x209;
//current_byte+=0x209;
current_byte+=0x1E0;
//Starting lineup
for(int ii=0; ii<11; ii++)
{
gteams[t_ind].starting11[ii] = pDescriptorNew->data[current_byte];
current_byte++;
}
current_byte+=0x1E;
gteams[t_ind].captain_ind = (char)pDescriptorNew->data[current_byte];
current_byte+=0x67;

Loading…
Cancel
Save