123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939 |
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- #include <conio.h>
- #include "eurodefs.h"
- #include "euro_fxd.h"
- #include "euro.equ"
- #include "euro_sym.h"
- #include "euro_def.h"
- #include "euro_var.h"
- #include "euro_grf.h"
- #include "euro_dsk.h"
- #include "euro_cnt.h"
- #include "euro_gen.h"
- #include "euro_rnd.h"
- #include "euro_int.h"
- #include "defines.h"
- //********************************************************************************************************************************
- void DisplayRedrawButton( char Match )
- {
- if ( Match == 0 )
- {
- RedrawHandle = AddAnimation( 507, 180,
- ( (float)BUTN_WHBL ), ( (float)BUTN_WHBL+11.9 ),
- 0.0, REDRAW_BOX, CONT_ANIM );
- RedrawHighlight = ControlOptionHighlight( -1, REDRAW_BOX, REDRAWdisp_BOX,
- -1, RedrawHandle, BUTN_LBLS+Redraw );
- }
- }
- //********************************************************************************************************************************
- char FindNextFixtureTeam( char drawcode )
- {
- char team = 0;
- for ( char t=0; t < 16 ; t++ )
- {
- if ( GroupDrawInfo[t] == drawcode )
- {
- team = t;
- break;
- }
- }
- return (team);
- }
- //********************************************************************************************************************************
- char FindTeamInLeague( char posn )
- {
- char team = 0;
- for ( char t=0; t < 16 ; t++ )
- {
- if ( LeaguePositions[t] == posn )
- {
- team = t;
- break;
- }
- }
- return (team);
- }
- //********************************************************************************************************************************
- void GroupFixturesPage( char MENU, signed char BOX )
- {
- if ( MENU == GROUP_FIXTURES && LogicState == RUN_FRONTEND )
- {
- if ( BOX == REDRAW_BOX && ButtonState != 0 )
- {
- Animation_table[RedrawHandle].AnimationSpeed =
- WhichButton( ButtonState, 0.85);
- ChangeMenu = EURO_REDRAW;
- DeBounce = TRUE;
- }
- if ( BOX == NXT_MTCH_BOX && ButtonState != 0 )
- {
-
- /// tempory transfer to next match....
- EUROteamA = FindNextFixtureTeam( Fixtures[MatchNumber].HomeTeam );
- EUROteamB = FindNextFixtureTeam( Fixtures[MatchNumber].AwayTeam );
- ///
- Animation_table[NextMatchHandle].AnimationSpeed =
- WhichButton( ButtonState, 0.85);
-
- if ( MatchNumber<24 )
- ChangeMenu = NEXT_MATCH;
- else
- ChangeMenu = QUALIFIERS;
- DeBounce = TRUE;
- }
-
- RedrawHighlight = ControlOptionHighlight( BOX, REDRAW_BOX, REDRAWdisp_BOX, RedrawHighlight,
- RedrawHandle, BUTN_LBLS+Redraw );
- NextMatchHighlight = ControlOptionHighlight( BOX, NXT_MTCH_BOX, NXT_MTCHdisp_BOX, NextMatchHighlight,
- NextMatchHandle, BUTN_LBLS+NextMatch );
- }
- }
- //********************************************************************************************************************************
- void CalculateLeagueTables()
- {
- //ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
- //º º
- //º VERBOSE INFORMATION, DISPLAYS LEAGUE TABLE DATA IF REQUESTED º
- //º º
- //ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
-
- if ( EUROverbose != 0 )
- {
- printf("\n LEAGUE TABLE CALCULATION DATA:\n\n");
- fflush(stdout);
- printf(" Points for a win: %d\n", WinPts);
- fflush(stdout);
- printf(" Points for a draw: %d\n", DrawPts);
- fflush(stdout);
- }
- for ( char t=0; t < 16 ; t++ )
- {
- LeaguePositions[t] = GroupDrawInfo[t]; //t;
- LeagueTable[t].points =
- ((LeagueTable[t].won*WinPts) + (LeagueTable[t].drew*DrawPts));
- LeagueTable[t].goalDiff =
- (LeagueTable[t].goalsFor-LeagueTable[t].goalsAgainst);
- if ( EUROverbose != 0 )
-
- printf(" (%d) W: %d D: %d L: %d Gf: %d Ga: %d Pts: %d %s\n",
- LeaguePositions[t],
- LeagueTable[t].won, LeagueTable[t].drew, LeagueTable[t].lost,
- LeagueTable[t].goalsFor, LeagueTable[t].goalsAgainst,
- LeagueTable[t].points, GetTEXT(TEAM_NMES+t ) );
- fflush(stdout);
- }
- char SwapTemp;
- for ( char scans = 0; scans < 16; scans++ )
- {
- for ( char teama = 0; teama < 16; teama++ )
- {
- for ( char teamb = 0; teamb < 16; teamb++ )
- {
- if ( teama != teamb &&
- ( (GroupDrawInfo[teama] & 12) == (GroupDrawInfo[teamb] & 12)) )
- {
-
- if (
- ( LeagueTable[ teama ].points < LeagueTable[ teamb ].points &&
- LeaguePositions[ teama ] < LeaguePositions[ teamb ] )
- || ( LeagueTable[ teama ].points == LeagueTable[ teamb ].points &&
- LeagueTable[ teama ].won < LeagueTable[ teamb ].won &&
- LeaguePositions[ teama ] < LeaguePositions[ teamb ] )
-
- || ( LeagueTable[ teama ].points == LeagueTable[ teamb ].points &&
- LeagueTable[ teama ].won == LeagueTable[ teamb ].won &&
- LeagueTable[ teama ].goalDiff < LeagueTable[ teamb ].goalDiff &&
- LeaguePositions[ teama ] < LeaguePositions[ teamb ] )
- )
- {
- SwapTemp = LeaguePositions[ teamb ];
- LeaguePositions[ teamb ] =
- LeaguePositions[ teama ];
- LeaguePositions[ teama ] =
- SwapTemp;
- }
- }
- }
- }
- }
- }
- //********************************************************************************************************************************
- void DisplayLeagueTables()
- {
- char PAL, PAL2;
- short team;
- char *ammount;
- for ( char h=0; h < 16 ; h++ )
- {
- DisplayString(
- (GroupFixtureDEFN[h].xposn)-
- (PixelLengthOfString(GetTEXT( GroupFixtureDEFN[h].string), SMALL_FONT ) /2 ),
- GroupFixtureDEFN[h].yposn,
- GetTEXT( GroupFixtureDEFN[h].string ),
- SMALL_FONT, 22, NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- team = (short)FindTeamInLeague(h);
- PAL = LeagueColourOffsets[team];
- PAL2 = 15;
- if ( MatchNumber > 23 && (h & 2) )
- {
- PAL = 22;
- PAL2 = 22;
- }
- DisplayString(
- LeaguePosnDEFN[h].xposn,
- LeaguePosnDEFN[h].yposn,
- GetTEAMname( team, 11 ),
- SMALL_FONT, PAL, NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- itoa( LeagueTable[team].won, ammount, 10);
- DisplayString(
- WinPosnDEFN[h].xposn -
- (PixelLengthOfString( ammount, SMALL_FONT ) /2 ),
- WinPosnDEFN[h].yposn,
- ammount,
- SMALL_FONT, PAL2, NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- itoa( LeagueTable[team].drew, ammount, 10);
- DisplayString(
- DrawPosnDEFN[h].xposn -
- (PixelLengthOfString( ammount, SMALL_FONT ) /2 ),
- DrawPosnDEFN[h].yposn,
- ammount,
- SMALL_FONT, PAL2, NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- itoa( LeagueTable[team].lost, ammount, 10);
- DisplayString(
- LosePosnDEFN[h].xposn -
- (PixelLengthOfString( ammount, SMALL_FONT ) /2 ),
- LosePosnDEFN[h].yposn,
- ammount,
- SMALL_FONT, PAL2, NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- itoa( LeagueTable[team].points, ammount, 10);
- DisplayString(
- PointsPosnDEFN[h].xposn -
- (PixelLengthOfString( ammount, SMALL_FONT ) /2 ),
- PointsPosnDEFN[h].yposn,
- ammount,
- SMALL_FONT, PAL2, NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- }
- }
- //********************************************************************************************************************************
- void DisplayLeagueFixtures( char Match )
- {
- char NextMtch = Match;
- char PAL;
- char ammount[5];
- if ( Match>23) // if displaying final tables then make slight alteration
- Match = 16; // so fixtures don't zoom ahead....
- Match&= (31-7);
- for ( char f=0; f < 8 ; f++ )
- {
- PAL = 22;
-
- if ( Match == NextMtch )
-
- PAL = 15;
- if ( Match<NextMtch )
- {
-
- char ResText[128];
- strcpy(ResText, GetTEAMname( FindNextFixtureTeam( Fixtures[Match].HomeTeam ), 11) );
- strcat(ResText, " ");
- itoa( (int)Results[Match].HomeScore, EUROammount, 10);
- strcat(ResText, EUROammount);
- DisplayString(
- Fixtures[Match].fixXposn-
- (PixelLengthOfString( ResText,SMALL_FONT) /2 ),
- Fixtures[Match].fixYposn,
- ResText,
- SMALL_FONT, 29, NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- strcpy(ResText, GetTEAMname( FindNextFixtureTeam( Fixtures[Match].AwayTeam ), 11) );
- strcat(ResText, " ");
- itoa( (int)Results[Match].AwayScore, EUROammount, 10);
- strcat(ResText, EUROammount);
- DisplayString(
- (Fixtures[Match].fixXposn+116)-
- (PixelLengthOfString( ResText,SMALL_FONT) /2 ),
- Fixtures[Match].fixYposn,
- ResText,
- SMALL_FONT, 29, NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- }
-
- else
- {
- DisplayString(
- Fixtures[Match].fixXposn-
- (PixelLengthOfString(
- GetTEAMname( FindNextFixtureTeam( Fixtures[Match].HomeTeam ), 11), SMALL_FONT ) /2 ),
- Fixtures[Match].fixYposn,
- GetTEAMname( FindNextFixtureTeam( Fixtures[Match].HomeTeam ), 11), SMALL_FONT,
- PAL, NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- DisplayString(
- (Fixtures[Match].fixXposn+116)-
- (PixelLengthOfString(
- GetTEAMname( FindNextFixtureTeam( Fixtures[Match].AwayTeam), 11), SMALL_FONT ) /2 ),
- Fixtures[Match].fixYposn,
- GetTEAMname( FindNextFixtureTeam( Fixtures[Match].AwayTeam), 11), SMALL_FONT,
- PAL, NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- DisplayString(
- (Fixtures[Match].fixXposn+58)-
- (PixelLengthOfString(GetTEXT( VRUS_LBLE ), SMALL_FONT ) /2 ),
- Fixtures[Match].fixYposn,
- GetTEXT( VRUS_LBLE ),
- SMALL_FONT, PAL, NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- }
- Match++;
- }
- }
- //********************************************************************************************************************************
- //
- //void DisplayVersusList( char Match )
- // {
- //
- // char NextMtch = Match;
- // Match&= (31-7);
- //
- // for ( char v=0; v < 8 ; v++ )
- // {
- //
- // if ( Match >= NextMtch )
- // {
- //
- // DisplayString( VersusPosnDEFN[v].xposn - (PixelLengthOfString(GetTEXT( VRUS_LBLE ), SMALL_FONT ) /2 ),
- // VersusPosnDEFN[v].yposn,
- // GetTEXT( VRUS_LBLE ),
- // SMALL_FONT, 22, NO_BOX,
- // &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- // }
- //
- // Match++;
- //
- // }
- // }
- //
- //********************************************************************************************************************************
- void EuroReDraw( char MENU, signed char BOX )
- {
- signed char DrawnTeam, venue;
- if ( MENU == EURO_REDRAW )
- {
- DefaultdrawHighlight = ControlOptionHighlight( BOX, DEFAULT_BOX,
- DEFAULTdisp_BOX, DefaultdrawHighlight,
- DefaultHandle, BUTN_LBLS+Default );
- if ( BOX == DEFAULT_BOX && ButtonState != 0 && LogicState == RUN_FRONTEND )
- {
- memcpy( &GroupDrawInfo[0], &GroupDrawDefaultInfo[0], 16 );
- Animation_table[DefaultHandle].AnimationSpeed =
- WhichButton( ButtonState, 0.85);
- ChangeMenu = GROUP_FIXTURES;
- DeBounce = TRUE;
- }
- if ( EuroReDrawCounter <= 0.0 )
- {
- if ( EuroReDrawFlag == 22 )
- {
- if ( BOX == GRP_FIX_BOX && ButtonState == LEFT_BUTTON && LogicState == RUN_FRONTEND )
- {
- Animation_table[GrpFixHandle].AnimationSpeed =
- WhichButton( ButtonState, 0.85);
- ChangeMenu = GROUP_FIXTURES;
- DeBounce = TRUE;
- }
- RedrawdoneHighlight = ControlOptionHighlight( BOX, GRP_FIX_BOX,
- GRP_FIXdisp_BOX, RedrawdoneHighlight,
- GrpFixHandle, BUTN_LBLS+Done );
- }
-
- if ( EuroReDrawFlag == 21 )
- {
- char c;
- for ( char t=0; t < 16 ; t++ )
- {
- c = GroupDrawInfo[t] / 4;
- GroupDrawInfo[t] = (GroupDrawInfo[t] & 3) + (GroupVenues[c]*4);
- }
- EuroReDrawFlag++;
- GrpFixHandle = AddAnimation( 446, 425,
- ( (float)BUTN_WHBL ), ( (float)BUTN_WHBL+11.9 ),
- 0.0, GRP_FIX_BOX, RUN_ONCE );
- Animation_table[GrpFixHandle].Counter = 6.0;
- Animation_table[GrpFixHandle].AnimationSpeed = 0.85;
-
- RedrawdoneHighlight = ControlOptionHighlight( -1, GRP_FIX_BOX,
- GRP_FIXdisp_BOX, -1,
- GrpFixHandle, BUTN_LBLS+Done );
- }
- if ( EuroReDrawFlag > 16 && EuroReDrawFlag < 21 )
- {
- if ( GroupVenues[ (EuroReDrawFlag-17) ] != -1 )
- EuroReDrawFlag++;
- else
- {
- venue = (char)( GetRnd2() & 3 );
- if ( GroupVenues[0] != venue &&
- GroupVenues[1] != venue &&
- GroupVenues[2] != venue &&
- GroupVenues[3] != venue )
- {
- char v = (EuroReDrawFlag-17);
-
- GroupVenues[v] = venue;
- CopyFromBACKtoPSEUDObuffer(
- &FrontendPseudoDEFN, &FrontendBackgroundDEFN,
- ReDrawHeadPosnDEFN[v].xposn-84,
- ReDrawHeadPosnDEFN[v].yposn-5,
- 168, 28 );
-
- DisplayString(
- ReDrawHeadPosnDEFN[v].xposn-
- ((PixelLengthOfString( GetTEXT( VNUE_NMES+(venue*2) ),
- SMALL_FONT )) /2),
- ReDrawHeadPosnDEFN[v].yposn-7,
- GetTEXT( VNUE_NMES+(venue*2) ),
- SMALL_FONT,
- 15,
- NO_BOX,
- &FrontendPseudoDEFN, &FrontendTextureDEFN );
- DisplayString(
- ReDrawHeadPosnDEFN[v].xposn-
- ((PixelLengthOfString( GetTEXT( VNUE_NMES+Birmingham+(venue*2) ),
- SMALL_FONT )) /2),
- ReDrawHeadPosnDEFN[v].yposn+8,
- GetTEXT( VNUE_NMES+Birmingham+(venue*2) ),
- SMALL_FONT,
- 15,
- NO_BOX,
- &FrontendPseudoDEFN, &FrontendTextureDEFN );
-
- AddToDumpList(
- ReDrawHeadPosnDEFN[v].xposn-84,
- ReDrawHeadPosnDEFN[v].yposn-7,
- 168, 32 );
-
- EuroReDrawFlag++;
- EuroReDrawCounter = 25;
- }
- }
- }
- if ( EuroReDrawFlag==16 )
- {
- venue = GroupDrawInfo[England] /4;
- EuroReDrawFlag = 17;
- for ( char v=0; v < 4 ; v++ )
- {GroupVenues[v] = -1;}
- GroupVenues[venue] = 0;
- CopyFromBACKtoPSEUDObuffer(
- &FrontendPseudoDEFN, &FrontendBackgroundDEFN,
- ReDrawHeadPosnDEFN[venue].xposn-84,
- ReDrawHeadPosnDEFN[venue].yposn-5,
- 168, 28 );
- DisplayString(
- ReDrawHeadPosnDEFN[venue].xposn-
- ((PixelLengthOfString( GetTEXT( VNUE_NMES ),
- SMALL_FONT )) /2),
- ReDrawHeadPosnDEFN[venue].yposn-7,
- GetTEXT( VNUE_NMES ),
- SMALL_FONT,
- 15,
- NO_BOX,
- &FrontendPseudoDEFN, &FrontendTextureDEFN );
- DisplayString(
- ReDrawHeadPosnDEFN[venue].xposn-
- ((PixelLengthOfString( GetTEXT( VNUE_NMES+Birmingham ),
- SMALL_FONT )) /2),
- ReDrawHeadPosnDEFN[venue].yposn+8,
- GetTEXT( VNUE_NMES+Birmingham ),
- SMALL_FONT,
- 15,
- NO_BOX,
- &FrontendPseudoDEFN, &FrontendTextureDEFN );
-
- AddToDumpList(
- ReDrawHeadPosnDEFN[venue].xposn-84,
- ReDrawHeadPosnDEFN[venue].yposn-7,
- 168, 32 );
- EuroReDrawCounter = 25;
- }
- if ( EuroReDrawFlag > 11 && EuroReDrawFlag < 16 )
- {
- DrawnTeam = (char)( GetRnd2() & 15);
- if ( (DrawnTeam == England ||
- DrawnTeam == Spain ||
- DrawnTeam == Denmark ||
- DrawnTeam == Germany) &&
- GroupDrawInfo[DrawnTeam] == -1 )
- {
- GroupDrawInfo[DrawnTeam] = GroupDrawCode[EuroReDrawFlag];
- DisplayString(
- ReDrawPosnDEFN[EuroReDrawFlag].xposn-
- ((PixelLengthOfString( GetTEAMname( DrawnTeam, 11 ),
- MEDIUM_FONT )) /2),
- ReDrawPosnDEFN[EuroReDrawFlag].yposn,
- GetTEAMname( DrawnTeam, 11 ),
- MEDIUM_FONT,
- LeagueColourOffsets[DrawnTeam],
- NO_BOX,
- &FrontendPseudoDEFN, &FrontendTextureDEFN );
- DisplayString(
- ReDrawPosnDEFN[EuroReDrawFlag].xposn-
- ((PixelLengthOfString( GetTEAMname( DrawnTeam, 11 ),
- MEDIUM_FONT )) /2),
- ReDrawPosnDEFN[EuroReDrawFlag].yposn,
- GetTEAMname( DrawnTeam, 11 ),
- MEDIUM_FONT,
- LeagueColourOffsets[DrawnTeam],
- NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
-
- AddToDumpList(
- ReDrawPosnDEFN[EuroReDrawFlag].xposn-84,
- ReDrawPosnDEFN[EuroReDrawFlag].yposn,
- 168, 20 );
- EuroReDrawFlag++;
- EuroReDrawCounter = 25;
- }
- }
-
- if ( EuroReDrawFlag > -1 && EuroReDrawFlag < 12 )
- {
- DrawnTeam = (char)( GetRnd2() & 15);
-
- if ( DrawnTeam != England &&
- DrawnTeam != Spain &&
- DrawnTeam != Denmark &&
- DrawnTeam != Germany &&
- GroupDrawInfo[DrawnTeam] == -1 )
- {
- GroupDrawInfo[DrawnTeam] = GroupDrawCode[EuroReDrawFlag];
- DisplayString(
- ReDrawPosnDEFN[EuroReDrawFlag].xposn-
- ((PixelLengthOfString( GetTEAMname( DrawnTeam, 11 ),
- MEDIUM_FONT )) /2),
- ReDrawPosnDEFN[EuroReDrawFlag].yposn,
- GetTEAMname( DrawnTeam, 11 ),
- MEDIUM_FONT,
- LeagueColourOffsets[DrawnTeam],
- NO_BOX,
- &FrontendPseudoDEFN, &FrontendTextureDEFN );
- DisplayString(
- ReDrawPosnDEFN[EuroReDrawFlag].xposn-
- ((PixelLengthOfString( GetTEAMname( DrawnTeam, 11 ),
- MEDIUM_FONT )) /2),
- ReDrawPosnDEFN[EuroReDrawFlag].yposn,
- GetTEAMname( DrawnTeam, 11 ),
- MEDIUM_FONT,
- LeagueColourOffsets[DrawnTeam],
- NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- AddToDumpList(
- ReDrawPosnDEFN[EuroReDrawFlag].xposn-84,
- ReDrawPosnDEFN[EuroReDrawFlag].yposn,
- 168, 20 );
- EuroReDrawFlag++;
- EuroReDrawCounter = 25;
- }
- }
-
- if ( EuroReDrawFlag == -1 )
- {
- for ( char r=0; r < 16 ; r++ )
- {GroupDrawInfo[r] = -1;}
- EuroReDrawFlag = 0;
- EuroReDrawCounter = 25;
- }
- }
- if ( EuroReDrawCounter > 0.0 )
- EuroReDrawCounter-= 1.85;
- }
- }
- //********************************************************************************************************************************
- void DisplayGroupHeadings()
- {
- for ( char h=0; h < 4 ; h++ )
- {
- DisplayString(
- ReDrawHeadPosnDEFN[h].xposn-
- ((PixelLengthOfString( GetTEXT( DRGR_LBLE+h ),
- MEDIUM_FONT )) /2),
- ReDrawHeadPosnDEFN[h].yposn,
- GetTEXT( DRGR_LBLE+h ),
- MEDIUM_FONT,
- 29,
- NO_BOX,
- &FrontendPseudoDEFN, &FrontendTextureDEFN );
- AddToDumpList(
- ReDrawHeadPosnDEFN[h].xposn-84,
- ReDrawHeadPosnDEFN[h].yposn,
- 168, 20 );
- }
- }
- //********************************************************************************************************************************
- void DisplayQualifierGroupHeadings()
- {
- for ( char h=0; h < 4 ; h++ )
- {
- DisplayString(
- QualifierHeadPosnDEFN[h].xposn,
- QualifierHeadPosnDEFN[h].yposn,
- GetTEXT( GRQU_LBLS+h ),
- MEDIUM_FONT,
- 29,
- NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- }
- }
- //********************************************************************************************************************************
- void DisplayQualifyingTeams()
- {
- short team;
- DisplayString( 12, 92,
- GetTEXT (QULY_LBLE),
- LARGE_FONT, 36, NO_BOX, &FrontendBackgroundDEFN, &FrontendTextureDEFN );
-
- for ( char q=0; q < 8 ; q++ )
- {
-
- team = (short)FindTeamInLeague( qualifiers[q].team );
- DisplayString( qualifiers[q].xposn-
- (PixelLengthOfString(GetTEAMname( team, 11), LARGE_FONT ) /2 ),
- qualifiers[q].yposn,
- GetTEAMname( team, 11),
- LARGE_FONT, 43+(7*q), NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- LoadPalette( BIN_TBUL_PAL+( 8*team ),
- &EuroDATfile[0], (44+(7*q)) );
- }
- }
- //********************************************************************************************************************************
- void DoFinalRoundFixtures( char MENU, signed char BOX )
- {
- if ( MENU == QUALIFIERS && LogicState == RUN_FRONTEND )
- {
- if ( BOX == NXT_MTCH_BOX && ButtonState != 0 )
- {
- Animation_table[NextMatchHandle].AnimationSpeed =
- WhichButton( ButtonState, 0.85);
- ChangeMenu = QUARTER_FINALS;
- DeBounce = TRUE;
- }
-
- NextMatchHighlight = ControlOptionHighlight( BOX, NXT_MTCH_BOX, NXT_MTCHdisp_BOX, NextMatchHighlight,
- NextMatchHandle, BUTN_LBLS+NextMatch );
- }
- if ( ( MENU == QUARTER_FINALS || MENU == SEMI_FINALS || MENU == FINAL_MATCH )
- && LogicState == RUN_FRONTEND )
- {
- if ( BOX == NXT_MTCH_BOX && ButtonState != 0 )
- {
- EUROteamA = FindNextFixtureTeam( Fixtures[MatchNumber].HomeTeam );
- EUROteamB = FindNextFixtureTeam( Fixtures[MatchNumber].AwayTeam );
- Animation_table[NextMatchHandle].AnimationSpeed =
- WhichButton( ButtonState, 0.85);
- if ( MatchNumber==28 && MENU==QUARTER_FINALS )
- {
- ChangeMenu = SEMI_FINALS;
- GroupDrawInfo[Results[24].WinningTeam] = TEAM_1q;
- GroupDrawInfo[Results[25].WinningTeam] = TEAM_2q;
- GroupDrawInfo[Results[26].WinningTeam] = TEAM_3q;
- GroupDrawInfo[Results[27].WinningTeam] = TEAM_4q;
- }
- else
- if ( MatchNumber==30 && MENU==SEMI_FINALS)
- {
- ChangeMenu = FINAL_MATCH;
- GroupDrawInfo[Results[28].WinningTeam] = TEAM_1s;
- GroupDrawInfo[Results[29].WinningTeam] = TEAM_2s;
- }
- else
- ChangeMenu = NEXT_MATCH;
- DeBounce = TRUE;
- }
-
- NextMatchHighlight = ControlOptionHighlight( BOX, NXT_MTCH_BOX, NXT_MTCHdisp_BOX, NextMatchHighlight,
- NextMatchHandle, BUTN_LBLS+NextMatch );
- }
- }
- //********************************************************************************************************************************
- void DisplayFinalRoundFixtures( char Match, char MENU )
- {
- char n;
- char ammount[5];
- char NextMtch;
- char *Outcome;
- NextMtch = Match;
-
- if ( MENU == QUARTER_FINALS )
- {
- Match = 24;
- n = 4;
- }
- else
- if ( MENU == SEMI_FINALS )
- {
- Match = 28;
- n = 2;
- }
- else
- n = 1;
- for ( char f=0; f < n ; f++ )
- {
- LoadPalette( BIN_TBUL_PAL+( 8*FindNextFixtureTeam( Fixtures[Match].HomeTeam ) ),
- &EuroDATfile[0], (44+(14*f)) );
- LoadPalette( BIN_TBUL_PAL+( 8*FindNextFixtureTeam( Fixtures[Match].AwayTeam ) ),
- &EuroDATfile[0], (44+7+(14*f)) );
- if ( Match<NextMtch )
- {
-
- char ResText[128];
- strcpy(ResText, GetTEAMname( FindNextFixtureTeam( Fixtures[Match].HomeTeam ), 11) );
- strcat(ResText, " ");
- itoa( (int)Results[Match].HomeScore, EUROammount, 10);
- strcat(ResText, EUROammount);
- DisplayString(
- Fixtures[Match].fixXposn-
- (PixelLengthOfString(
- ResText, LARGE_FONT ) /2 ),
- Fixtures[Match].fixYposn,
- ResText, LARGE_FONT,
- (43+(14*f)), NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- strcpy(ResText, GetTEAMname( FindNextFixtureTeam( Fixtures[Match].AwayTeam ), 11) );
- strcat(ResText, " ");
- itoa( (int)Results[Match].AwayScore, EUROammount, 10);
- strcat(ResText, EUROammount);
- DisplayString(
- (Fixtures[Match].fixXposn+188)-
- (PixelLengthOfString(
- ResText, LARGE_FONT ) /2 ),
- Fixtures[Match].fixYposn,
- ResText, LARGE_FONT,
- (50+(14*f)), NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- Outcome = StringTemplete( RSLT_TEXT+Results[Match].Message, Match );
- DisplayString( 226-(PixelLengthOfString( Outcome, SMALL_FONT ) /2 ),
- Fixtures[Match].fixYposn+39,
- Outcome, SMALL_FONT, 15, NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- }
-
- else
- {
- DisplayString(
- Fixtures[Match].fixXposn-
- (PixelLengthOfString(
- GetTEAMname( FindNextFixtureTeam( Fixtures[Match].HomeTeam ), 11), LARGE_FONT ) /2 ),
- Fixtures[Match].fixYposn,
- GetTEAMname( FindNextFixtureTeam( Fixtures[Match].HomeTeam ), 11), LARGE_FONT,
- (43+(14*f)), NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- DisplayString(
- (Fixtures[Match].fixXposn+188)-
- (PixelLengthOfString(
- GetTEAMname( FindNextFixtureTeam( Fixtures[Match].AwayTeam), 11), LARGE_FONT ) /2 ),
- Fixtures[Match].fixYposn,
- GetTEAMname( FindNextFixtureTeam( Fixtures[Match].AwayTeam), 11), LARGE_FONT,
- (50+(14*f)), NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- // date of match
- DisplayString(
- Fixtures[Match].fixXposn-74,
- Fixtures[Match].fixYposn+39,
- GetTEXT( DATE_LBLS+Match ),
- SMALL_FONT, 15, NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- // venue of match
- DisplayString(
- Fixtures[Match].fixXposn+260-
- (PixelLengthOfString(GetTEXT( VNUE_NMES+MatchVenues[Match] ), SMALL_FONT ) ),
- Fixtures[Match].fixYposn+39,
- GetTEXT( VNUE_NMES+MatchVenues[Match] ),
- SMALL_FONT, 15, NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- // versus symbol
- DisplayString(
- 226-
- (PixelLengthOfString(GetTEXT( VRUS_LBLE ), LARGE_FONT ) /2 ),
- Fixtures[Match].fixYposn,
- GetTEXT( VRUS_LBLE ),
- LARGE_FONT, 22, NO_BOX,
- &FrontendBackgroundDEFN, &FrontendTextureDEFN );
- }
- Match++;
- }
- }
- //********************************************************************************************************************************
|