rtoss

Subversion Repositories:
Compare Path: Rev
With Path: Rev
/ @ 342  →  / @ 343
/PokemonHackSourceCode/PokemonMemHack/PokemonMemHack.cpp
@@ -63,6 +63,7 @@
};
DWORD g_dwForeClrCount = sizeof(g_rgForeClrTable) / sizeof(g_rgForeClrTable[0]);
 
DWORD g_dwExtraBreeds = 0;
// CPokemonMemHackApp
 
BEGIN_MESSAGE_MAP(CPokemonMemHackApp, CWinApp)
@@ -122,6 +123,7 @@
{
CPokemonMemHackDlg dlg;
m_pMainWnd = &dlg;
ReadINI();
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
@@ -286,3 +288,13 @@
}
}
 
VOID CPokemonMemHackApp::ReadINI()
{
CString iniFile;
 
GetModuleFileName(NULL, iniFile.GetBufferSetLength(MAX_PATH), MAX_PATH);
iniFile = iniFile.Left(iniFile.ReverseFind(_T('.'))+1) + _T("ini");
 
g_dwExtraBreeds = GetPrivateProfileInt(_T("PokemonMemHack"),_T("ExtraBreeds"),0,iniFile.GetBuffer());
 
}
/PokemonHackSourceCode/PokemonMemHack/MemPmBasicPage.cpp
@@ -160,6 +160,21 @@
{
m_ctrlBreedList.DeleteItem(BREED_COUNT);
}
/* HACK */
dwCount = m_ctrlBreedList.GetCount();
for(dwIndex = BREED_COUNT; dwIndex < BREED_COUNT+g_dwExtraBreeds; ++dwIndex)
{
cbei.iItem = dwIndex;
szText.Format(szFmt3[cfg.dwCount], dwIndex);
szText += _T("?");
cbei.pszText = szText.GetBuffer();
if(dwIndex < dwCount)
m_ctrlBreedList.SetItem(&cbei);
else if(dwIndex < BREED_COUNT+g_dwExtraBreeds)
m_ctrlBreedList.InsertItem(&cbei);
szText.ReleaseBuffer();
}
/* /HACK */
m_ctrlBreedList.SetCurSel(dwCurSel);
 
////////////////////////////////////////////////
/PokemonHackSourceCode/PokemonMemHack/PokemonMemHack.h
@@ -60,6 +60,7 @@
 
BOOL ReadStringLists();
VOID DestroyStringLists();
VOID ReadINI();
 
// ʵÏÖ
 
@@ -75,3 +76,4 @@
extern COLORREF g_rgForeClrTable[];
extern DWORD g_dwBackClrCount;
extern DWORD g_dwForeClrCount;
extern DWORD g_dwExtraBreeds;