rtoss

Subversion Repositories:
Compare Path: Rev
With Path: Rev
/ @ 344  →  / @ 345
/PokemonHackSourceCode/PokemonRomViewer/PokemonRomViewer.cpp
@@ -10,6 +10,8 @@
#define new DEBUG_NEW
#endif
 
DWORD g_dwExtraBreeds = 0;
 
StringEntry * GetEncNameEntry(WORD wAreaId)
{
static DWORD dwPreIndex = 0;
@@ -268,6 +270,7 @@
#define VAL_ROM_PATH _T("Rom Path")
#define VAL_UI_LANG _T("UI Language")
#define VAL_UI_COUNT _T("UI Count")
#define VAL_EXTRABREEDS _T("ExtraBreeds")
 
// CPokemonRomViewerApp ³õʼ»¯
BOOL CPokemonRomViewerApp::InitInstance()
@@ -659,6 +662,7 @@
cfg.szRomPath = GetProfileString(SECTION_NAME, VAL_ROM_PATH, NULL);
cfg.dwCount = GetProfileInt(SECTION_NAME, VAL_UI_COUNT, ui_count_none);
cfg.dwLang = GetProfileInt(SECTION_NAME, VAL_UI_LANG, ui_lang_jp);
g_dwExtraBreeds = GetProfileInt(SECTION_NAME, VAL_EXTRABREEDS, 0);
}
 
VOID CPokemonRomViewerApp::WriteConfig()
/PokemonHackSourceCode/PokemonRomViewer/EncFishPage.cpp
@@ -71,7 +71,13 @@
szText = szIndex + cfg.pBreedNameList[wBreed].rgszText[cfg.dwLang];
m_ctrlBrdList[dwIndex].AddString(szText);
}
if(wCurBreed < BREED_COUNT)
for(wBreed = BREED_COUNT; wBreed < BREED_COUNT+g_dwExtraBreeds; ++wBreed)
{
szIndex.Format(szFmt33[cfg.dwCount], wBreed);
szText = szIndex + _T("?");
m_ctrlBrdList[dwIndex].AddString(szText);
}
if(wCurBreed < BREED_COUNT+g_dwExtraBreeds)
m_ctrlBrdList[dwIndex].SetCurSel(wCurBreed);
}
 
@@ -158,7 +164,7 @@
{
pEntry = &(m_pFishList->rgEntry[dwIndex]);
wBreed = m_ctrlBrdList[dwIndex].GetCurSel();
if(wBreed < BREED_COUNT && wBreed != pEntry->wBreed)
if(wBreed < BREED_COUNT+g_dwExtraBreeds && wBreed != pEntry->wBreed)
{
pEntry->wBreed = wBreed;
SetBrdImage(dwIndex);
@@ -170,7 +176,7 @@
{
if( m_pFishList &&
dwIndex < ENC_FISH_ENTRY_COUNT &&
theApp.m_dlgBreed.m_wCurBreed < BREED_COUNT)
theApp.m_dlgBreed.m_wCurBreed < BREED_COUNT+g_dwExtraBreeds)
{
m_pFishList->rgEntry[dwIndex].wBreed = theApp.m_dlgBreed.m_wCurBreed;
m_ctrlBrdList[dwIndex].SetCurSel(theApp.m_dlgBreed.m_wCurBreed);
/PokemonHackSourceCode/PokemonRomViewer/EncLandPage.cpp
@@ -71,7 +71,13 @@
szText = szIndex + cfg.pBreedNameList[wBreed].rgszText[cfg.dwLang];
m_ctrlBrdList[dwIndex].AddString(szText);
}
if(wCurBreed < BREED_COUNT)
for(wBreed = BREED_COUNT; wBreed < BREED_COUNT+g_dwExtraBreeds; ++wBreed)
{
szIndex.Format(szFmt33[cfg.dwCount], wBreed);
szText = szIndex + _T("?");
m_ctrlBrdList[dwIndex].AddString(szText);
}
if(wCurBreed < BREED_COUNT+g_dwExtraBreeds)
m_ctrlBrdList[dwIndex].SetCurSel(wCurBreed);
}
 
@@ -186,7 +192,7 @@
else
{
wBreed = m_ctrlBrdList[dwIndex].GetCurSel();
if(wBreed < BREED_COUNT && wBreed != pEntry->wBreed)
if(wBreed < BREED_COUNT+g_dwExtraBreeds && wBreed != pEntry->wBreed)
{
pEntry->wBreed = wBreed;
SetBrdImage(dwIndex);
@@ -199,7 +205,7 @@
{
if( m_pLandList &&
dwIndex < ENC_LAND_ENTRY_COUNT &&
theApp.m_dlgBreed.m_wCurBreed < BREED_COUNT)
theApp.m_dlgBreed.m_wCurBreed < BREED_COUNT+g_dwExtraBreeds)
{
m_pLandList->rgEntry[dwIndex].wBreed = theApp.m_dlgBreed.m_wCurBreed;
m_ctrlBrdList[dwIndex].SetCurSel(theApp.m_dlgBreed.m_wCurBreed);
/PokemonHackSourceCode/PokemonRomViewer/EncWaterPage.cpp
@@ -73,7 +73,13 @@
szText = szIndex + cfg.pBreedNameList[wBreed].rgszText[cfg.dwLang];
m_ctrlBrdList[dwIndex].AddString(szText);
}
if(wCurBreed < BREED_COUNT)
for(wBreed = BREED_COUNT; wBreed < BREED_COUNT+g_dwExtraBreeds; ++wBreed)
{
szIndex.Format(szFmt33[cfg.dwCount], wBreed);
szText = szIndex + _T("?");
m_ctrlBrdList[dwIndex].AddString(szText);
}
if(wCurBreed < BREED_COUNT+g_dwExtraBreeds)
m_ctrlBrdList[dwIndex].SetCurSel(wCurBreed);
}
 
@@ -160,7 +166,7 @@
{
pEntry = &(m_pWaterList->rgEntry[dwIndex]);
wBreed = m_ctrlBrdList[dwIndex].GetCurSel();
if(wBreed < BREED_COUNT && wBreed != pEntry->wBreed)
if(wBreed < BREED_COUNT+g_dwExtraBreeds && wBreed != pEntry->wBreed)
{
pEntry->wBreed = wBreed;
SetBrdImage(dwIndex);
@@ -172,7 +178,7 @@
{
if( m_pWaterList &&
dwIndex < ENC_WATER_ENTRY_COUNT &&
theApp.m_dlgBreed.m_wCurBreed < BREED_COUNT)
theApp.m_dlgBreed.m_wCurBreed < BREED_COUNT+g_dwExtraBreeds)
{
m_pWaterList->rgEntry[dwIndex].wBreed = theApp.m_dlgBreed.m_wCurBreed;
m_ctrlBrdList[dwIndex].SetCurSel(theApp.m_dlgBreed.m_wCurBreed);
/PokemonHackSourceCode/PokemonRomViewer/EncStonePage.cpp
@@ -74,7 +74,13 @@
szText = szIndex + cfg.pBreedNameList[wBreed].rgszText[cfg.dwLang];
m_ctrlBrdList[dwIndex].AddString(szText);
}
if(wCurBreed < BREED_COUNT)
for(wBreed = BREED_COUNT; wBreed < BREED_COUNT+g_dwExtraBreeds; ++wBreed)
{
szIndex.Format(szFmt33[cfg.dwCount], wBreed);
szText = szIndex + _T("?");
m_ctrlBrdList[dwIndex].AddString(szText);
}
if(wCurBreed < BREED_COUNT+g_dwExtraBreeds)
m_ctrlBrdList[dwIndex].SetCurSel(wCurBreed);
}
 
@@ -161,7 +167,7 @@
{
pEntry = &(m_pStoneList->rgEntry[dwIndex]);
wBreed = m_ctrlBrdList[dwIndex].GetCurSel();
if(wBreed < BREED_COUNT && wBreed != pEntry->wBreed)
if(wBreed < BREED_COUNT+g_dwExtraBreeds && wBreed != pEntry->wBreed)
{
pEntry->wBreed = wBreed;
SetBrdImage(dwIndex);
@@ -173,7 +179,7 @@
{
if( m_pStoneList &&
dwIndex < ENC_STONE_ENTRY_COUNT &&
theApp.m_dlgBreed.m_wCurBreed < BREED_COUNT)
theApp.m_dlgBreed.m_wCurBreed < BREED_COUNT+g_dwExtraBreeds)
{
m_pStoneList->rgEntry[dwIndex].wBreed = theApp.m_dlgBreed.m_wCurBreed;
m_ctrlBrdList[dwIndex].SetCurSel(theApp.m_dlgBreed.m_wCurBreed);
/PokemonHackSourceCode/PokemonRomViewer/PokemonRomViewer.h
@@ -112,3 +112,4 @@
extern CPokemonRomViewerApp theApp;
extern ConfigStruct cfg;
extern CPokemonRom rom;
extern DWORD g_dwExtraBreeds;