update to work with series 60 and 80 SDKs on linux

This commit is contained in:
ehouse 2005-02-08 06:59:06 +00:00
parent bd46dba736
commit c23332e0b6
2 changed files with 21 additions and 5 deletions

View file

@ -19,12 +19,16 @@
#include <eikedwin.h> #include <eikedwin.h>
#include <eikmfne.h> #include <eikmfne.h>
#include <eikchlst.h> #if defined SERIES_60
# include "xwords_60.rsg"
#elif defined SERIES_80
# include <eikchlst.h>
# include "xwords_80.rsg"
#endif
#include "symgamdl.h" #include "symgamdl.h"
#include "symutil.h" #include "symutil.h"
#include "xwords.hrh" #include "xwords.hrh"
#include "xwords.rsg"
/*************************************************************************** /***************************************************************************
* TGameInfoBuf * TGameInfoBuf
@ -106,6 +110,7 @@ CXWGameInfoDlg::~CXWGameInfoDlg()
void void
CXWGameInfoDlg::PreLayoutDynInitL() CXWGameInfoDlg::PreLayoutDynInitL()
{ {
#if defined SERIES_80
XP_U16 i; XP_U16 i;
CEikChoiceList* list; CEikChoiceList* list;
@ -158,12 +163,14 @@ CXWGameInfoDlg::PreLayoutDynInitL()
hostPort->DrawDeferred(); hostPort->DrawDeferred();
HideAndShow(); HideAndShow();
#endif #endif
#endif
} /* PreLayoutDynInitL */ } /* PreLayoutDynInitL */
void void
CXWGameInfoDlg::HideAndShow() CXWGameInfoDlg::HideAndShow()
{ {
#if defined SERIES_80
CEikChoiceList* list; CEikChoiceList* list;
/* if it's standalone, hide all else. Then if it's not IP, hide all /* if it's standalone, hide all else. Then if it's not IP, hide all
below. */ below. */
@ -183,11 +190,13 @@ CXWGameInfoDlg::HideAndShow()
MakeLineVisible( ERelayName, showIP ); MakeLineVisible( ERelayName, showIP );
MakeLineVisible( ERelayPort, showIP ); MakeLineVisible( ERelayPort, showIP );
#endif #endif
#endif
} /* HideAndShow */ } /* HideAndShow */
void void
CXWGameInfoDlg::HandleControlStateChangeL( TInt aControlId ) CXWGameInfoDlg::HandleControlStateChangeL( TInt aControlId )
{ {
#if defined SERIES_80
XP_LOGF( "HandleControlStateChangeL got %d", aControlId ); XP_LOGF( "HandleControlStateChangeL got %d", aControlId );
CEikChoiceList* list; CEikChoiceList* list;
CEikChoiceList* whichList; CEikChoiceList* whichList;
@ -244,11 +253,13 @@ CXWGameInfoDlg::HandleControlStateChangeL( TInt aControlId )
default: default:
break; break;
} }
#endif
} }
TBool TBool
CXWGameInfoDlg::OkToExitL( TInt /*aKeyCode*/ ) CXWGameInfoDlg::OkToExitL( TInt /*aKeyCode*/ )
{ {
#if defined SERIES_80
CEikChoiceList* list; CEikChoiceList* list;
/* Dictionary */ /* Dictionary */
@ -261,6 +272,7 @@ CXWGameInfoDlg::OkToExitL( TInt /*aKeyCode*/ )
/* number of players */ /* number of players */
list = static_cast<CEikChoiceList*>(Control(ENPlayersList)); list = static_cast<CEikChoiceList*>(Control(ENPlayersList));
iGib->iNPlayers = list->CurrentItem() + 1; iGib->iNPlayers = list->CurrentItem() + 1;
#endif
#ifndef XWFEATURE_STANDALONE_ONLY #ifndef XWFEATURE_STANDALONE_ONLY
list = static_cast<CEikChoiceList*>(Control(EConnectionRole)); list = static_cast<CEikChoiceList*>(Control(EConnectionRole));
@ -308,6 +320,7 @@ CXWGameInfoDlg::LoadPlayerInfo( TInt aWhich )
XP_LOGF( "done setting name" ); XP_LOGF( "done setting name" );
#if defined SERIES_80
/* species */ /* species */
CEikChoiceList* list = static_cast<CEikChoiceList*> CEikChoiceList* list = static_cast<CEikChoiceList*>
(Control(EPlayerSpeciesChoice )); (Control(EPlayerSpeciesChoice ));
@ -317,6 +330,7 @@ CXWGameInfoDlg::LoadPlayerInfo( TInt aWhich )
list->SetCurrentItem( newVal ); list->SetCurrentItem( newVal );
list->DrawDeferred(); list->DrawDeferred();
} }
#endif
/* password */ /* password */
} }
@ -330,9 +344,11 @@ CXWGameInfoDlg::SavePlayerInfo( TInt aWhich )
nameEditor->GetText( iGib->iPlayerNames[aWhich] ); nameEditor->GetText( iGib->iPlayerNames[aWhich] );
/* species */ /* species */
#if defined SERIES_80
CEikChoiceList* list = static_cast<CEikChoiceList*> CEikChoiceList* list = static_cast<CEikChoiceList*>
(Control(EPlayerSpeciesChoice )); (Control(EPlayerSpeciesChoice ));
iGib->iIsRobot[aWhich] = (list->CurrentItem() == 1); iGib->iIsRobot[aWhich] = (list->CurrentItem() == 1);
#endif
} }
void void

View file

@ -22,19 +22,19 @@
#if defined SERIES_60 #if defined SERIES_60
# include <w32std.h> # include <w32std.h>
# include <eikinfo.h> # include <eikinfo.h>
# include "xwords_60.rsg"
#elif defined SERIES_80 #elif defined SERIES_80
# include <cknenv.h> # include <cknenv.h>
# include <ckninfo.h> # include <ckninfo.h>
# include <eikcfdlg.h> # include <eikcfdlg.h>
# include <eikfile.rsg> # include <eikfile.rsg>
# include "xwords_80.rsg"
#endif #endif
#include <stringloader.h> #include <stringloader.h>
#include <stdlib.h> // for srand #include <stdlib.h> // for srand
#include <s32file.h> #include <s32file.h>
#include "xwords.rsg"
#include "xwappview.h" #include "xwappview.h"
#include "xwappui.h" #include "xwappui.h"
#include "xwords.hrh" #include "xwords.hrh"