From 5384da6e4e9e78f53ab9075b49d05df391dc74c7 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Sat, 19 Sep 2015 21:39:36 +0200 Subject: [PATCH] =?UTF-8?q?Fixed=20a=20lot=20of=20critical=20bugs=20(affec?= =?UTF-8?q?ting=20IVs,=20etc...),=20especially=20for=20Colosseum.=20Money?= =?UTF-8?q?=20and=20Pok=C3=A9coupons=20are=20now=20limited=20to=209,999,99?= =?UTF-8?q?9.=20Bag=20items=20are=20limited=20again=20to=2099=20in=20Colos?= =?UTF-8?q?seum.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 10 +- .../LibPkmGC/Colosseum/SaveEditing/Save.h | 2 + .../LibPkmGC/Colosseum/SaveEditing/SaveSlot.h | 2 +- LibPkmGC/include/LibPkmGC/Core/Config.h | 2 +- .../LibPkmGC/Core/Detail/StructMacros.h | 8 +- LibPkmGC/src/LibPkmGC/Base/Pokemon.cpp | 2 +- .../LibPkmGC/Colosseum/Common/PlayerData.cpp | 8 +- .../src/LibPkmGC/Colosseum/Common/Pokemon.cpp | 24 +-- .../LibPkmGC/Colosseum/SaveEditing/Save.cpp | 10 +- .../Colosseum/SaveEditing/SaveSlot.cpp | 19 +++ LibPkmGC/src/LibPkmGC/Core/PokemonInfo.cpp | 8 +- LibPkmGC/src/LibPkmGC/GBA/Pokemon.cpp | 6 +- .../src/LibPkmGC/GC/SaveEditing/SaveSlot.cpp | 2 +- .../src/LibPkmGC/XD/Common/PlayerData.cpp | 8 +- LibPkmGC/src/LibPkmGC/XD/Common/Pokemon.cpp | 2 +- PkmGCSaveEditor/src/Core/DataUI.cpp | 1 + PkmGCSaveEditor/src/Core/Globals.h | 4 +- PkmGCSaveEditor/src/Core/ItemPocketEditor.cpp | 5 +- PkmGCSaveEditor/src/GCUIs/PokemonUI.cpp | 20 ++- PkmGCSaveEditor/src/GCUIs/PokemonUI.h | 2 +- PkmGCSaveEditor/src/MainWindow.cpp | 27 +++- PkmGCSaveEditor/src/MainWindow.h | 4 + .../translations/PkmGCSaveEditor_en.ts | 147 ++++++++++-------- .../translations/PkmGCSaveEditor_fr.ts | 147 ++++++++++-------- 24 files changed, 287 insertions(+), 183 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a62b5f7..26a7b16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ +###PkmGCTools v1.1.1: +Fixed a lot of critical bugs (affecting IVs, etc...). Money and Pokécoupons are now limited to 9,999,999. Bag items are limited again to 99 in Pokémon Colosseum. + +To users of previous versions: +* If and only if you have modified a Colosseum save file with that previous version, please load this save file again, +and click "Bugs affecting Pokémon..."(in "Options", "Bug fixes"). Do it only once and only once (for each concerned save file). +* If you have imported or exported a Pokémon in the GBA format, please check its status alteration, its EVs, and its game of origin. + ###PkmGCTools v1.1: * GBA Pokémon are now **fully** supported. -* As a consequence onversion between Colosseum, XD and GBA Pokémon is now **fully** supported. +* As a consequence conversion between Colosseum, XD and GBA Pokémon is now **fully** supported. * It is done (almost) exactly like it is in Colosseum/XD during a GC<->GBA trade (meaning, for example, that the data specific to shadow Pokémon is lost). * Please note that A-Save discards all party-related information (e.g status alteration). The Devil is in the detail... * The maximum number for items has been raised to 999. diff --git a/LibPkmGC/include/LibPkmGC/Colosseum/SaveEditing/Save.h b/LibPkmGC/include/LibPkmGC/Colosseum/SaveEditing/Save.h index 3853016..2e14acc 100644 --- a/LibPkmGC/include/LibPkmGC/Colosseum/SaveEditing/Save.h +++ b/LibPkmGC/include/LibPkmGC/Colosseum/SaveEditing/Save.h @@ -42,6 +42,8 @@ public: void save(void); + void fixBugsAffectingPokemon(void); + protected: void loadFields(void); diff --git a/LibPkmGC/include/LibPkmGC/Colosseum/SaveEditing/SaveSlot.h b/LibPkmGC/include/LibPkmGC/Colosseum/SaveEditing/SaveSlot.h index a352973..cc45421 100644 --- a/LibPkmGC/include/LibPkmGC/Colosseum/SaveEditing/SaveSlot.h +++ b/LibPkmGC/include/LibPkmGC/Colosseum/SaveEditing/SaveSlot.h @@ -83,7 +83,7 @@ public: s32 storyModeSaveCount; u8 checksum[20]; // digest - + void fixBugsAffectingPokemon(void); protected: void loadData(u32 flags = 0); void deleteFields(void); diff --git a/LibPkmGC/include/LibPkmGC/Core/Config.h b/LibPkmGC/include/LibPkmGC/Core/Config.h index 236f12c..6de7e20 100644 --- a/LibPkmGC/include/LibPkmGC/Core/Config.h +++ b/LibPkmGC/include/LibPkmGC/Core/Config.h @@ -22,7 +22,7 @@ #include #include -#define LIBPKMGC_VERSION 1001000 +#define LIBPKMGC_VERSION 1001001 #define LIBPKMGC_VERSION_MAJOR ((LIBPKMGC_VERSION / 1000000) % 1000) #define LIBPKMGC_VERSION_MINOR ((LIBPKMGC_VERSION / 1000) % 1000) #define LIBPKMGC_VERSION_BUILD (LIBPKMGC_VERSION % 1000) diff --git a/LibPkmGC/include/LibPkmGC/Core/Detail/StructMacros.h b/LibPkmGC/include/LibPkmGC/Core/Detail/StructMacros.h index 1158cef..e305ad4 100644 --- a/LibPkmGC/include/LibPkmGC/Core/Detail/StructMacros.h +++ b/LibPkmGC/include/LibPkmGC/Core/Detail/StructMacros.h @@ -59,8 +59,8 @@ using namespace LE; #define LD_ARRAY(type,ar,sz,off) toArrayOfIntegers(ar, BUFFER_NAME+off, BUFFER_NAME+off+(sizeof(type)*sz)) #define LD_ARRAY_MAX(type,ar,sz,off,mx) toArrayOfIntegers(ar, BUFFER_NAME+off, BUFFER_NAME+off+(sizeof(type)*sz));\ for(size_t i__ = 0; i__ < sz; ++i__) ar[i__] = (ar[i__] > mx) ? mx : ar[i__]; -#define LD_ARRAY_CONV(type,ar,sz,off,type2) type ar##_tmp[sz]; toArrayOfIntegers(ar, BUFFER_NAME+off, BUFFER_NAME+off+(sizeof(type)*sz));\ -for(size_t i__ = 0; i__ < sz; ++i__) ar[i__] = (ar##_tmp[i__] > mx) ? mx : ar##_tmp[i__]; +#define LD_ARRAY_CONV(type,ar,sz,off,type2) type ar##_tmp[sz]; toArrayOfIntegers(ar##_tmp, BUFFER_NAME+off, BUFFER_NAME+off+(sizeof(type)*sz));\ +for(size_t i__ = 0; i__ < sz; ++i__) ar[i__] = (type2)((ar##_tmp[i__] > (type2)-1) ? (type2)-1 : ar##_tmp[i__]); #define LD_ARRAY_E(type,ar,sz,off,etype) toArrayOfEnumIntegers(ar, BUFFER_NAME+off, BUFFER_NAME+off+(sizeof(type)*sz)) #define LD_ARRAY_E_MAX(type,ar,sz,off,etype,mx) toArrayOfEnumIntegers(ar, BUFFER_NAME+off, BUFFER_NAME+off+(sizeof(type)*sz));\ for(size_t i__ = 0; i__ < sz; ++i__) ar[i__] = ((u32)ar[i__] > (u32)mx) ? (etype)0 : ar[i__]; @@ -77,8 +77,8 @@ for(size_t i__ = 0; i__ < sz; ++i__) ar[i__] = ((u32)ar[i__] > (u32)mx) ? (etype #define SV_ARRAY(type,ar,sz,off) fromArrayOfIntegers(BUFFER_NAME+off, ar, ar+sz) #define SV_ARRAY_MAX(type,ar,sz,off,mx) for(size_t i__ = 0; i__ < sz; ++i__) ar[i__] = (ar[i__] > mx) ? mx : ar[i__];\ fromArrayOfIntegers(BUFFER_NAME+off, ar, ar+sz) -#define SV_ARRAY_CONV(type,ar,sz,off,type2) type ar##_tmp[sz]; for(size_t i__=0;i__ mx) ? mx : (type) ar[i__];\ -fromArrayOfIntegers(BUFFER_NAME+off, ar, ar+sz) +#define SV_ARRAY_CONV(type,ar,sz,off,type2) type ar##_tmp[sz]; for(size_t i__=0;i__ (type)-1) ? (type)-1 : (type) ar[i__]);\ +fromArrayOfIntegers(BUFFER_NAME+off, ar##_tmp, ar##_tmp+sz) #define SV_ARRAY_E(type,ar,sz,off,etype) fromArrayOfEnumIntegers(BUFFER_NAME+off, ar, ar+sz) #define SV_ARRAY_E_MAX(type,ar,sz,off,etype,mx) for(size_t i__ = 0; i__ < sz; ++i__) ar[i__] = ((u32)ar[i__] > (u32)mx) ? (etype)0 : ar[i__];\ fromArrayOfEnumIntegers(BUFFER_NAME+off, ar, ar+sz) diff --git a/LibPkmGC/src/LibPkmGC/Base/Pokemon.cpp b/LibPkmGC/src/LibPkmGC/Base/Pokemon.cpp index d6c1f4b..e00e918 100644 --- a/LibPkmGC/src/LibPkmGC/Base/Pokemon.cpp +++ b/LibPkmGC/src/LibPkmGC/Base/Pokemon.cpp @@ -37,7 +37,7 @@ u16 Pokemon::calculateStat(size_t statIndex, PokemonSpeciesIndex species, Pokemo // We're applying bonuses now if(i == 0) return ((outStat + 100) * level / 100) + 10; // HP - else return (outStat * level / 100 + 5) * n[(size_t)getNatureStatAffinity(natureIndex, i) ] / 100; + else return (outStat * level / 100 + 5) * n[getNatureStatAffinity(natureIndex, i)] / 100; } diff --git a/LibPkmGC/src/LibPkmGC/Colosseum/Common/PlayerData.cpp b/LibPkmGC/src/LibPkmGC/Colosseum/Common/PlayerData.cpp index f209562..10191e9 100644 --- a/LibPkmGC/src/LibPkmGC/Colosseum/Common/PlayerData.cpp +++ b/LibPkmGC/src/LibPkmGC/Colosseum/Common/PlayerData.cpp @@ -48,8 +48,8 @@ void PlayerData::loadFields(void) { LD_FIELD_E(u8, trainerGender, 0xa80, Gender); if (trainerGender > Female) trainerGender = Male; - LD_FIELD(u32, money, 0xa84); - LD_FIELD(u32, pkCoupons, 0xa88); + LD_FIELD_MAX(u32, money, 0xa84, 9999999); + LD_FIELD_MAX(u32, pkCoupons, 0xa88, 9999999); LD_SUBSTRUCTURE_ARRAY(Pokemon, party, 6, 0x30); LD_SUBSTRUCTURE(BagData, bag, 0x780); @@ -59,8 +59,8 @@ void PlayerData::save(void) { GC::PlayerData::save(); if (trainerGender > Female) trainerGender = Male; SV_FIELD_E(u8, trainerGender, 0xa80, Gender); - SV_FIELD(u32, money, 0xa84); - SV_FIELD(u32, pkCoupons, 0xa88); + SV_FIELD_MAX(u32, money, 0xa84, 9999999); + SV_FIELD_MAX(u32, pkCoupons, 0xa88, 9999999); SV_FIELD(u32, pkCoupons, 0xa8c); SV_SUBSTRUCTURE_ARRAY(Pokemon, party, 6, 0x30); diff --git a/LibPkmGC/src/LibPkmGC/Colosseum/Common/Pokemon.cpp b/LibPkmGC/src/LibPkmGC/Colosseum/Common/Pokemon.cpp index f0730ac..add5f67 100644 --- a/LibPkmGC/src/LibPkmGC/Colosseum/Common/Pokemon.cpp +++ b/LibPkmGC/src/LibPkmGC/Colosseum/Common/Pokemon.cpp @@ -68,6 +68,7 @@ void Pokemon::loadFields(void) { LD_FIELD_E(u16, partyData.status, 0x65, PokemonStatus); LD_FIELD(s8, partyData.turnsOfSleepRemaining, 0x69); LD_FIELD(s8, partyData.turnsOfBadPoison, 0x6b); + u32 st = pokemonStatusToBitField(partyData.status, 0, partyData.turnsOfSleepRemaining); SV_FIELD(u32, st, 0x74); @@ -80,8 +81,9 @@ void Pokemon::loadFields(void) { LD_ARRAY(u16, EVs_tmp, 6, 0x98); for (size_t i = 0; i < 6; ++i) EVs[i] = (u8)((EVs_tmp[i] > 255) ? 255 : EVs_tmp[i]); - LD_ARRAY(u8, IVs, 6, 0xa4); - for (size_t i = 0; i < 6; ++i) IVs[i] = (IVs[i] > 31) ? 31 : IVs[i]; + u16 IVs_tmp[6]; // IVs are internally stored as u16 + LD_ARRAY(u16, IVs_tmp, 6, 0xa4); + for (size_t i = 0; i < 6; ++i) IVs[i] = (u8)((IVs_tmp[i] > 31) ? 31 : IVs_tmp[i]); LD_FIELD_CONV(u16, happiness, 0xb0, u8); @@ -101,8 +103,8 @@ void Pokemon::loadFields(void) { LD_FIELD(u16, unk1, 0xd4); LD_FIELD(u16, shadowPkmID, 0xd8); - SV_FIELD_B(u8, obedient, 0xf8); - SV_FIELD(u8, encounterType, 0xfb); + LD_FIELD_B(u8, obedient, 0xf8); + LD_FIELD(u8, encounterType, 0xfb); markings.load(marksTmp); for (size_t i = 0; i < 4; ++i) moves[i].load(data + 0x78 + 4 * i); @@ -136,8 +138,8 @@ void Pokemon::save(void) { if (partyData.level > 100) partyData.level = 100; SV_FIELD(u8, partyData.level, 0x60); SV_FIELD_E(u16, partyData.status, 0x65, PokemonStatus); - LD_FIELD(s8, partyData.turnsOfSleepRemaining, 0x69); - LD_FIELD(s8, partyData.turnsOfBadPoison, 0x6b); + SV_FIELD(s8, partyData.turnsOfSleepRemaining, 0x69); + SV_FIELD(s8, partyData.turnsOfBadPoison, 0x6b); SV_FIELD_E(u16, heldItem, 0x88, ItemIndex); SV_FIELD_MAX(u16, partyData.currentHP, 0x8a, partyData.stats[0]); @@ -145,8 +147,12 @@ void Pokemon::save(void) { u16 EVs_tmp[6]; for (size_t i = 0; i < 6; ++i) EVs_tmp[i] = (u16)EVs[i]; SV_ARRAY(u16, EVs_tmp, 6, 0x98); - for (size_t i = 0; i < 6; ++i) IVs[i] = (IVs[i] > 31) ? 31 : IVs[i]; - SV_ARRAY(u8, IVs, 6, 0xa4); + u16 IVs_tmp[6]; + for (size_t i = 0; i < 6; ++i) { + IVs[i] = (IVs[i] > 31) ? 31 : IVs[i]; + IVs_tmp[i] = IVs[i]; + } + SV_ARRAY(u16, IVs_tmp, 6, 0xa4); SV_FIELD(u16, (u16)happiness, 0xb0); SV_ARRAY(u8, contestStats, 5, 0xb2); @@ -158,7 +164,7 @@ void Pokemon::save(void) { SV_FIELD(u8, pkrsStatus, 0xca); - LD_ARRAY_B(u8, pkmFlags, 3, 0xcb); + SV_ARRAY_B(u8, pkmFlags, 3, 0xcb); SV_FIELD_MAX(u8, GCUnk, 0xce, 31); SV_FIELD(u8, markings.save(), 0xcf); SV_FIELD_MAX(s8, partyData.pkrsDaysRemaining, 0xd0, 4); diff --git a/LibPkmGC/src/LibPkmGC/Colosseum/SaveEditing/Save.cpp b/LibPkmGC/src/LibPkmGC/Colosseum/SaveEditing/Save.cpp index 491800e..cbd437c 100644 --- a/LibPkmGC/src/LibPkmGC/Colosseum/SaveEditing/Save.cpp +++ b/LibPkmGC/src/LibPkmGC/Colosseum/SaveEditing/Save.cpp @@ -46,12 +46,9 @@ Save* Save::create(void) const { 0x6000: SaveSlot saveSlots[3] */ void Save::loadFields(void) { - // deleteFields(); - saveSlots = new GC::SaveEditing::SaveSlot*[3]; u8* start = data + 0x6000; - /*delete saveSlots[0]; - delete saveSlots[1];*/ + saveSlots[0] = new SaveSlot(start, _is_decrypted); saveSlots[1] = new SaveSlot(start + 0x1e000, _is_decrypted); saveSlots[2] = new SaveSlot(start + 0x1e000*2, _is_decrypted); @@ -62,6 +59,11 @@ void Save::save(void) { SV_SUBSTRUCTURE_ARRAY(SaveSlot, saveSlots, 3, 0x6000); } +void Save::fixBugsAffectingPokemon(void) { + for (size_t i = 0; i < 3; ++i) { + static_cast(saveSlots[i])->fixBugsAffectingPokemon(); + } +} } } diff --git a/LibPkmGC/src/LibPkmGC/Colosseum/SaveEditing/SaveSlot.cpp b/LibPkmGC/src/LibPkmGC/Colosseum/SaveEditing/SaveSlot.cpp index a6540c4..f4edf2c 100644 --- a/LibPkmGC/src/LibPkmGC/Colosseum/SaveEditing/SaveSlot.cpp +++ b/LibPkmGC/src/LibPkmGC/Colosseum/SaveEditing/SaveSlot.cpp @@ -210,6 +210,25 @@ bool SaveSlot::isCorrupt(void) { } +inline void doFixBugsAffectingPokemon(Pokemon* pkm) { + // LibPkmGC <= 1.1.2 : For Pokémon Colosseum, IVs were loaded/saved as u8's where they were actually u16's. obedient was always set to true, and encounterType to a random value. + + std::copy(pkm->data + 0xa4, pkm->data + 0xa4 + 6, pkm->IVs); + pkm->obedient = pkm->species == Mew || pkm->species == Deoxys; + pkm->encounterType = 0; +} +void SaveSlot::fixBugsAffectingPokemon(void) { + for (size_t i = 0; i < 6; ++i) + doFixBugsAffectingPokemon((Pokemon*)player->party[i]); + + for (size_t i = 0; i < 3; ++i) { + for (size_t j = 0; j < 30; ++j) + doFixBugsAffectingPokemon((Pokemon*)PC->boxes[i]->pkm[j]); + } + + doFixBugsAffectingPokemon((Pokemon*)daycare->pkm); +} + void SaveSlot::loadData(u32 flags) { bool decrypted = (flags & 1) == 1; diff --git a/LibPkmGC/src/LibPkmGC/Core/PokemonInfo.cpp b/LibPkmGC/src/LibPkmGC/Core/PokemonInfo.cpp index bc0d3ba..f2afb83 100644 --- a/LibPkmGC/src/LibPkmGC/Core/PokemonInfo.cpp +++ b/LibPkmGC/src/LibPkmGC/Core/PokemonInfo.cpp @@ -14,8 +14,8 @@ void VersionInfo::load(u8 lg, u8 gm) { const LanguageIndex L[] = { NoLanguage, Japanese, English, French, Italian, German, NoLanguage, Spanish }; GameIndex G[16] = { NoGame, Sapphire, Ruby, Emerald, FireRed, LeafGreen }; G[15] = Colosseum_XD; - game = G[(gm > 7) ? 0 : gm]; - language = L[(lg > 15) ? 0 : lg]; + game = G[(gm > 15) ? 0 : gm]; + language = L[(lg > 7) ? 0 : lg]; switch (language){ case Japanese: originalRegion = NTSC_J; break; @@ -29,7 +29,7 @@ void VersionInfo::load(u8 lg, u8 gm) { void VersionInfo::save(u8& lg, u8& gm) { const u8 L[] = { 0, 1, 2, 5, 3, 4, 7 }; - u8 G[12] = { 0, 4, 5, 1, 2, 3 }; G[11] = 15; + u8 G[12] = { 0, 4, 5, 0,0,0,0,0, 1, 2, 3 }; G[11] = 15; game = (game > Colosseum_XD) ? NoGame : game; language = (language > Spanish) ? NoLanguage : language; @@ -98,7 +98,7 @@ PokemonStatus pokemonStatusFromBitField(u16 status, s8 * turnsOfBadPoison, s8 * s8 tobp = 0, tosr = 0; tosr = (s8)(status & 7); tobp = (s8)((status >> 8) & 0xf); - if (tobp != 0) ret = Asleep; + if (tosr != 0) ret = Asleep; status >>= 3; for (size_t i = 0; i < 5 && ret == NoStatus; ++i) { diff --git a/LibPkmGC/src/LibPkmGC/GBA/Pokemon.cpp b/LibPkmGC/src/LibPkmGC/GBA/Pokemon.cpp index 60e4527..6617c1d 100644 --- a/LibPkmGC/src/LibPkmGC/GBA/Pokemon.cpp +++ b/LibPkmGC/src/LibPkmGC/GBA/Pokemon.cpp @@ -214,7 +214,7 @@ void Pokemon::loadFields(void) { LD_FIELD_MAX(u32, experience, 36, getSpeciesExpTable(species)[100]); LD_FIELD(u8, happiness, 41); LD_FIELD(u16, unk2, 42); - for (size_t i = 0; i < 6; ++i) EVs[i] = data[56 + statsOrder[i]]; + for (size_t i = 0; i < 6; ++i) EVs[statsOrder[i]] = data[56 + i]; LD_ARRAY(u8, contestStats, 5, 62); LD_FIELD(u8, contestLuster, 67); @@ -272,7 +272,7 @@ void Pokemon::loadFields(void) { u32 st; LD_FIELD(u32, st, 80); - pokemonStatusFromBitField((u16)st, &(partyData.turnsOfBadPoison), &(partyData.turnsOfSleepRemaining)); + partyData.status = pokemonStatusFromBitField((u16)st, &(partyData.turnsOfBadPoison), &(partyData.turnsOfSleepRemaining)); LD_FIELD_MAX(u8, partyData.level, 84, 100); LD_FIELD_MAX(s8, partyData.pkrsDaysRemaining, 85, 4); @@ -343,8 +343,8 @@ void Pokemon::save(void) { SV_FIELD_MAX(u32, experience, 36, getSpeciesExpTable(species)[100]); SV_FIELD(u8, happiness, 41); SV_FIELD(u16, unk2, 42); - for (size_t i = 0; i < 6; ++i) data[56 + statsOrder[i]] = EVs[i]; + for (size_t i = 0; i < 6; ++i) data[56 + i] = EVs[statsOrder[i]]; SV_ARRAY(u8, contestStats, 5, 62); SV_FIELD(u8, contestLuster, 67); diff --git a/LibPkmGC/src/LibPkmGC/GC/SaveEditing/SaveSlot.cpp b/LibPkmGC/src/LibPkmGC/GC/SaveEditing/SaveSlot.cpp index b58d279..d7355ae 100644 --- a/LibPkmGC/src/LibPkmGC/GC/SaveEditing/SaveSlot.cpp +++ b/LibPkmGC/src/LibPkmGC/GC/SaveEditing/SaveSlot.cpp @@ -110,7 +110,7 @@ SaveSlot& SaveSlot::operator=(SaveSlot const& other) { void SaveSlot::reload(const u8* inData, u32 flags) { if (inData == NULL) Base::DataStruct::reload(NULL, 1); - else Base::DataStruct::reload(inData, 0); + else Base::DataStruct::reload(inData, flags); } diff --git a/LibPkmGC/src/LibPkmGC/XD/Common/PlayerData.cpp b/LibPkmGC/src/LibPkmGC/XD/Common/PlayerData.cpp index 1f939e7..09e9a94 100644 --- a/LibPkmGC/src/LibPkmGC/XD/Common/PlayerData.cpp +++ b/LibPkmGC/src/LibPkmGC/XD/Common/PlayerData.cpp @@ -48,8 +48,8 @@ void PlayerData::loadFields(void) { LD_FIELD_E(u8, trainerGender, 0x8e0, Gender); if (trainerGender > Female) trainerGender = Male; - LD_FIELD(u32, money, 0x8e4); - LD_FIELD(u32, pkCoupons, 0x8e8); + LD_FIELD_MAX(u32, money, 0x8e4, 9999999); + LD_FIELD_MAX(u32, pkCoupons, 0x8e8, 9999999); LD_SUBSTRUCTURE_ARRAY(Pokemon, party, 6, 0x30); LD_SUBSTRUCTURE(BagData, bag, 0x4c8); @@ -60,8 +60,8 @@ void PlayerData::save(void) { if (trainerGender > Female) trainerGender = Male; SV_FIELD_E(u8, trainerGender, 0x8e0, Gender); - SV_FIELD(u32, money, 0x8e4); - SV_FIELD(u32, pkCoupons, 0x8e8); + SV_FIELD_MAX(u32, money, 0x8e4, 9999999); + SV_FIELD_MAX(u32, pkCoupons, 0x8e8, 9999999); SV_FIELD(u32, pkCoupons, 0x8ec); SV_SUBSTRUCTURE_ARRAY(Pokemon, party, 6, 0x30); diff --git a/LibPkmGC/src/LibPkmGC/XD/Common/Pokemon.cpp b/LibPkmGC/src/LibPkmGC/XD/Common/Pokemon.cpp index 0567293..2dc1dfb 100644 --- a/LibPkmGC/src/LibPkmGC/XD/Common/Pokemon.cpp +++ b/LibPkmGC/src/LibPkmGC/XD/Common/Pokemon.cpp @@ -180,7 +180,7 @@ void Pokemon::save(void) { data[0x7d] = (data[0x7d] & 0xf0) | unimplementedRibbons; SV_ARRAY(u16, partyData.stats, 6, 0x90); - u16 EVs_tmp[6]; for (size_t i = 0; i < 6; ++i) EVs_tmp[i] = (u16)EVs[i]; + u16 EVs_tmp[6]; for (size_t i = 0; i < 6; ++i) EVs_tmp[i] = EVs[i]; SV_ARRAY(u16, EVs_tmp, 6, 0x9c); for (size_t i = 0; i < 6; ++i) IVs[i] = (IVs[i] > 31) ? 31 : IVs[i]; SV_ARRAY(u8, IVs, 6, 0xa8); diff --git a/PkmGCSaveEditor/src/Core/DataUI.cpp b/PkmGCSaveEditor/src/Core/DataUI.cpp index 926b7b9..017a93d 100644 --- a/PkmGCSaveEditor/src/Core/DataUI.cpp +++ b/PkmGCSaveEditor/src/Core/DataUI.cpp @@ -20,6 +20,7 @@ DataUI::DataUI(QWidget* parent, Qt::WindowFlags f) : QDialog(parent, f), IDataUI(), mainLayout(new QVBoxLayout), dialogButtonBox(new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel)) { + this->setWindowTitle(appName); connect(dialogButtonBox, SIGNAL(accepted()), this, SLOT(accept())); connect(dialogButtonBox, SIGNAL(rejected()), this, SLOT(reject())); } diff --git a/PkmGCSaveEditor/src/Core/Globals.h b/PkmGCSaveEditor/src/Core/Globals.h index 46a81dd..e3561d2 100644 --- a/PkmGCSaveEditor/src/Core/Globals.h +++ b/PkmGCSaveEditor/src/Core/Globals.h @@ -19,7 +19,7 @@ #ifndef _PKMGCSAVEEDITOR_GLOBALS_H #define _PKMGCSAVEEDITOR_GLOBALS_H -#define PKMGCSAVEEDITOR_VERSION 1001000 +#define PKMGCSAVEEDITOR_VERSION 1001001 #define PKMGCSAVEEDITOR_VERSION_MAJOR ((PKMGCSAVEEDITOR_VERSION / 1000000) % 1000) #define PKMGCSAVEEDITOR_VERSION_MINOR ((PKMGCSAVEEDITOR_VERSION / 1000) % 1000) #define PKMGCSAVEEDITOR_VERSION_BUILD (PKMGCSAVEEDITOR_VERSION % 1000) @@ -32,6 +32,8 @@ #include #include +const QString appName = QString("PkmGCSaveEditor v%1.%2.%3").arg(PKMGCSAVEEDITOR_VERSION_MAJOR).arg(PKMGCSAVEEDITOR_VERSION_MINOR).arg(PKMGCSAVEEDITOR_VERSION_BUILD); + extern const QMap languageCodeToIndexMap; extern QString currentSaveFileName; diff --git a/PkmGCSaveEditor/src/Core/ItemPocketEditor.cpp b/PkmGCSaveEditor/src/Core/ItemPocketEditor.cpp index 39de932..428e5a8 100644 --- a/PkmGCSaveEditor/src/Core/ItemPocketEditor.cpp +++ b/PkmGCSaveEditor/src/Core/ItemPocketEditor.cpp @@ -91,10 +91,11 @@ void ItemPocketEditor::setEditedItem(LibPkmGC::Item const & val){ } void ItemPocketEditor::updateMaxQuantity(void) { - const int maxqty[] = { 0, 999, 999, 999, 999, 1, 999, 1 }; + const int maxqty[] = { 0, 99, 99, 99, 99, 1, 99, 1 }; + const int maxqtyPCOrXD[] = { 0, 999, 999, 999, 999, 1, 999, 1 }; ItemCategoryIndex ctgy = getItemCategory(itemNameFld->currentItemIndex(), isXD); - quantityFld->setRange(0, maxqty[ctgy]); + quantityFld->setRange(0, (isXD || flags == GIVABLE_ITEMS_ALLOWED) ? maxqtyPCOrXD[ctgy] : maxqty[ctgy]); quantityFld->setDisabled(maxqty[ctgy] == 0); } void ItemPocketEditor::displayItem(void) { diff --git a/PkmGCSaveEditor/src/GCUIs/PokemonUI.cpp b/PkmGCSaveEditor/src/GCUIs/PokemonUI.cpp index 7846f80..86a21d6 100644 --- a/PkmGCSaveEditor/src/GCUIs/PokemonUI.cpp +++ b/PkmGCSaveEditor/src/GCUIs/PokemonUI.cpp @@ -421,7 +421,8 @@ void PokemonUI::initWidget(void){ connect(versionFld, SIGNAL(versionChanged()), this, SLOT(versionChangeHandler())); connect(copyInfoFromSaveButton, SIGNAL(clicked()), this, SLOT(copyInfoFromSave())); connect(generateShinyIDsButton, SIGNAL(clicked()), this, SLOT(generateShinyIDs())); - connect(autoUpdateMainStatsCheckBox, SIGNAL(stateChanged(int)), this, SLOT(autoUpdateStatsStateChangeHanler())); + connect(autoUpdateMainStatsCheckBox, SIGNAL(stateChanged(int)), this, SLOT(autoUpdateStatsStateChangeHandler())); + connect(mainStatsFlds[0]->statFld, SIGNAL(valueChanged(int)), this, SLOT(updateMainStats())); connect(contestTypeSelector, SIGNAL(currentIndexChanged(int)), contestAchievementLevelFldsStack, SLOT(setCurrentIndex(int))); } @@ -506,13 +507,14 @@ void PokemonUI::parseData(void){ versionFld->setInfo(pkm->version); connect(versionFld, SIGNAL(versionChanged()), this, SLOT(versionChangeHandler())); - currentHPFld->setUnsignedValue(pkm->partyData.currentHP); for (size_t i = 0; i < 6; ++i) { PokemonStatLayout* l = mainStatsFlds[i]; l->IVFld->setUnsignedValue(pkm->IVs[i]); l->EVFld->setUnsignedValue(pkm->EVs[i]); l->statFld->setUnsignedValue(pkm->partyData.stats[i]); } + currentHPFld->setUnsignedValue(pkm->partyData.currentHP); + for (size_t i = 0; i < 5; ++i) contestAchievementFlds[i]->setCurrentIndex((int)pkm->contestAchievements[i]); @@ -524,6 +526,7 @@ void PokemonUI::parseData(void){ moveLayouts[i]->setMove(pkm->moves[i]); autoUpdateMainStatsCheckBox->setChecked(true); + autoUpdateStatsStateChangeHandler(); versionChangeHandler(); abilityFld->setCurrentIndex((pkm->hasSecondAbility()) ? 1 : 0); @@ -694,9 +697,11 @@ void PokemonUI::updateMainStats(void) { (u8) levelFld->value(), (u8) l->IVFld->value(), (u8) l->EVFld->value()); l->statFld->setUnsignedValue(stat); } - //currentHPFld->setUnsignedMaximum(mainStatsFlds[0]->statFld->value()); currentHPFld->setUnsignedValue(mainStatsFlds[0]->statFld->value()); + } + currentHPFld->setUnsignedMaximum(mainStatsFlds[0]->statFld->value()); + } void PokemonUI::updatePkmAttributes(void) { @@ -744,6 +749,7 @@ void PokemonUI::updateExperienceFromLevel(bool proportionally) { experienceFld->setValue((int)experience); connect(experienceFld, SIGNAL(valueChanged(int)), this, SLOT(updateLevelFromExperience())); } + updateMainStats(); } void PokemonUI::updateLevelFromExperience(void) { @@ -751,14 +757,16 @@ void PokemonUI::updateLevelFromExperience(void) { u8 lvl = Pokemon::calculateLevelFromExp(nameIndexToPkmSpeciesIndex((size_t)speciesFld->currentIndex()), (u32)experienceFld->value()); levelFld->disconnect(SIGNAL(valueChanged(int)), this); - levelFld->setValue((int)lvl); + levelFld->setUnsignedValue(lvl); connect(levelFld, SIGNAL(valueChanged(int)), this, SLOT(updateExperienceFromLevel())); } + updateMainStats(); + } void PokemonUI::speciesChangeHandler(void) { updatePkmAttributes(); - autoUpdateStatsStateChangeHanler(); // update stats etc... + autoUpdateStatsStateChangeHandler(); // update stats etc... updateAbilityList(); u32 maxExperience = Pokemon::calculateExpFromLevel(nameIndexToPkmSpeciesIndex((size_t)speciesFld->currentIndex()), 100); experienceFld->setUnsignedRange(0, maxExperience); @@ -817,7 +825,7 @@ void PokemonUI::flagsStateChangeHandler(void) { updatePkmAttributes(); } -void PokemonUI::autoUpdateStatsStateChangeHanler(void) { +void PokemonUI::autoUpdateStatsStateChangeHandler(void) { bool checked = autoUpdateMainStatsCheckBox->isChecked(); if (checked) updateMainStats(); currentHPFld->setDisabled(checked); diff --git a/PkmGCSaveEditor/src/GCUIs/PokemonUI.h b/PkmGCSaveEditor/src/GCUIs/PokemonUI.h index b99e9ef..7b7d5fc 100644 --- a/PkmGCSaveEditor/src/GCUIs/PokemonUI.h +++ b/PkmGCSaveEditor/src/GCUIs/PokemonUI.h @@ -216,7 +216,7 @@ public slots: void updateFlags(void); void flagsStateChangeHandler(void); - void autoUpdateStatsStateChangeHanler(void); + void autoUpdateStatsStateChangeHandler(void); void versionChangeHandler(void); diff --git a/PkmGCSaveEditor/src/MainWindow.cpp b/PkmGCSaveEditor/src/MainWindow.cpp index de3826f..ea8d6ea 100644 --- a/PkmGCSaveEditor/src/MainWindow.cpp +++ b/PkmGCSaveEditor/src/MainWindow.cpp @@ -10,9 +10,6 @@ #include #include - -const QString appName = QString("PkmGCSaveEditor v%1.%2").arg(PKMGCSAVEEDITOR_VERSION_MAJOR).arg(PKMGCSAVEEDITOR_VERSION_MINOR); - using namespace GCUIs; using namespace XDUIs; using namespace LibPkmGC; @@ -105,7 +102,9 @@ MainWindow::MainWindow() : QMainWindow(), centralWidget(new MWCentralWidget) { ignoreDataCorruptionAction = new QAction(this); ignoreDataCorruptionAction->setCheckable(true); optionsMenu->addAction(ignoreDataCorruptionAction); - + bugFixesSubMenu = optionsMenu->addMenu(tr("&Bug fixes")); + colosseumBugsAffectingPokemonAction = new QAction(this); + bugFixesSubMenu->addAction(colosseumBugsAffectingPokemonAction); setCentralWidget(centralWidget); @@ -121,11 +120,13 @@ MainWindow::MainWindow() : QMainWindow(), centralWidget(new MWCentralWidget) { saveFileAction->setDisabled(true); saveFileAsAction->setDisabled(true); + colosseumBugsAffectingPokemonAction->setDisabled(true); connect(openFileAction, SIGNAL(triggered()), this, SLOT(openSaveFile())); connect(saveFileAction, SIGNAL(triggered()), this, SLOT(saveSaveFile())); connect(saveFileAsAction, SIGNAL(triggered()), this, SLOT(saveSaveFileAs())); connect(exitAction, SIGNAL(triggered()), this, SLOT(close())); + connect(colosseumBugsAffectingPokemonAction, SIGNAL(triggered()), this, SLOT(fixColosseumBugsAffectingPokemon())); connect(ignoreDataCorruptionAction, SIGNAL(triggered()), this, SLOT(changeIgnoreDataCorruptionStatus())); } @@ -216,7 +217,9 @@ void MainWindow::updateText(void) { for (QList::iterator it = actions2.begin() + 1; it != actions2.end(); ++it) (*it)->setText(VersionInfoLayout::languageNames()[(*it)->data().toInt()]); - ignoreDataCorruptionAction->setText(tr("Ignore data corruption")); + bugFixesSubMenu->setTitle(tr("&Bug fixes")); + colosseumBugsAffectingPokemonAction->setText(tr("Bugs affecting &Pok\xc3\xa9mon (Colosseum, PkmGCSaveEditor \xe2\x89\xa4 1.1.0)")); + ignoreDataCorruptionAction->setText(tr("&Ignore data corruption")); } @@ -269,6 +272,11 @@ void MainWindow::changeIgnoreDataCorruptionStatus(void) { ignoreDataCorruption = ignoreDataCorruptionAction->isChecked(); } +void MainWindow::fixColosseumBugsAffectingPokemon(void) { + if (currentSave != NULL) static_cast(currentSave)->fixBugsAffectingPokemon(); + else if(currentSaveSlot != NULL) static_cast(currentSaveSlot)->fixBugsAffectingPokemon(); +} + void MainWindow::changeEvent(QEvent* ev) { if (ev == NULL) return; switch (ev->type()) { @@ -388,11 +396,13 @@ void MainWindow::openSaveFile(void) { this->setWindowTitle(appName); saveFileAction->setDisabled(true); saveFileAsAction->setDisabled(true); + colosseumBugsAffectingPokemonAction->setDisabled(true); } else { this->setWindowTitle(appName + " - " + currentSaveFileName); saveFileAction->setDisabled(false); saveFileAsAction->setDisabled(false); + colosseumBugsAffectingPokemonAction->setDisabled(!LIBPKMGC_IS_COLOSSEUM(SaveEditing::SaveSlot, currentSaveSlot)); } centralWidget->currentSaveSlotChangeHandler(); @@ -467,6 +477,13 @@ void MainWindow::loadSettings(void) { if (interfaceLanguage.isEmpty()) interfaceLanguage = "auto"; if (dumpedNamesLanguage > Spanish) dumpedNamesLanguage = NoLanguage; + if (settings->value("LibPkmGCVersion").toInt() < 1001001 || settings->value("Version").toInt() < 1001001) { + QMessageBox::warning(this, tr("Warning"), tr("You have used a version of PkmGCSaveEditor older than 1.1.1.
Please consider the following points:
    " + "
  • If and only if you have modified a Colosseum save file with that previous version, please load this save file again, and click \"Bugs affecting Pok\xc3\xa9mon...\"" + "(in \"Options\", \"Bug fixes\"). Do it only once and only once (for each concerned save file).
  • " + "
  • If you have imported or exported a Pok\xc3\xa9mon in the GBA format, please check its status alteration, its EVs, and its game of origin.
")); + } + } void MainWindow::saveSettings(void) { diff --git a/PkmGCSaveEditor/src/MainWindow.h b/PkmGCSaveEditor/src/MainWindow.h index 81c3008..78faafe 100644 --- a/PkmGCSaveEditor/src/MainWindow.h +++ b/PkmGCSaveEditor/src/MainWindow.h @@ -75,6 +75,8 @@ public slots: void changeIgnoreDataCorruptionStatus(void); + void fixColosseumBugsAffectingPokemon(void); + protected: void closeEvent(QCloseEvent* ev); @@ -97,6 +99,8 @@ private: QActionGroup *interfaceLangGroup; QMenu* dumpedNamesLangSubMenu; QActionGroup *dumpedNamesLangGroup; + QMenu* bugFixesSubMenu; + QAction* colosseumBugsAffectingPokemonAction; QAction* ignoreDataCorruptionAction; QSettings *settings; diff --git a/PkmGCSaveEditor/translations/PkmGCSaveEditor_en.ts b/PkmGCSaveEditor/translations/PkmGCSaveEditor_en.ts index ae9a24d..1ed435c 100644 --- a/PkmGCSaveEditor/translations/PkmGCSaveEditor_en.ts +++ b/PkmGCSaveEditor/translations/PkmGCSaveEditor_en.ts @@ -757,49 +757,49 @@ Ribbons - + Genderless Genderless - + Unown form: Unown form: - + will evolve into: will evolve into: - - + + Invalid version info Invalid version info - - + + "Invalid Pokémon" flag set "Invalid Pokémon" flag set - + Location caught (see <a href='http://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_index_number_(Generation_III)'>here</a>) Location caught (see <a href='http://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_index_number_(Generation_III)'>here</a>) - + Location caught (see <a href='http://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_index_number_(GCN)'>here</a>) Location caught (see <a href='http://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_index_number_(GCN)'>here</a>) - + Warning Warning - + The version info you specified is invalid. The game will therefore consider this Pokémon invalid. The version info you specified is invalid. The game will therefore consider this Pokémon invalid. @@ -894,32 +894,32 @@ MWCentralWidget - + Game configuration Game configuration - + Trainer info, Party and Bag Trainer info, Party and Bag - + PC PC - + Daycare Daycare - + Strategy memo Strategy memo - + Purifier Purifier @@ -927,147 +927,159 @@ MainWindow - - + + &File &File - - + + &Options &Options - - + + &Interface language &Interface language - - + + &Dumped names language &Dumped names language - + + + &Bug fixes + &Bug fixes + + + &Open... &Open... - + &Save &Save - + Save &as... Save &as... - + &Exit &Exit - + Select &automatically Select &automatically - - Ignore data corruption - Ignore data corruption + + Bugs affecting &Pokémon (Colosseum, PkmGCSaveEditor ≤ 1.1.0) + Bugs affecting &Pokémon (Colosseum, PkmGCSaveEditor ≤ 1.1.0) - - - + + &Ignore data corruption + &Ignore data corruption + + + + + GCI save files (*.gci) GCI save files (*.gci) - - - + + + Raw save files (*.bin) Raw save files (*.bin) - + The save file has been modified. The save file has been modified. - + Do you want to save your changes? Do you want to save your changes? - + Could not open file. Could not open file. - + An error occured while reading the specified save file. An error occured while reading the specified save file. - + Open save file Open save file - + All Files (*) All Files (*) - - - - - - + + + + + + Error Error - + Invalid file size. Invalid file size. - - + + + Warning Warning - + The backup save slot was loaded because the most recent save slot is corrupt. The backup save slot was loaded because the most recent save slot is corrupt. - + The second backup save slot was loaded because the other ones are corrupt. The second backup save slot was loaded because the other ones are corrupt. - + All save slots are corrupt. All save slots are corrupt. - + No save file loaded No save file loaded - + %1, %n save(s) %1, %n save @@ -1075,35 +1087,40 @@ - + Colosseum Colosseum - + XD XD - + Could not write to file. Could not write to file. - + An error occured while writing to the specified save file. An error occured while writing to the specified save file. - + All files (*) All files (*) - + Save save file Save save file + + + You have used a version of PkmGCSaveEditor older than 1.1.1.<br/>Please consider the following points:<ul><li>If and <b>only</b> if you have modified a <b>Colosseum</b> save file with that previous version, please load this save file again, and click "Bugs affecting Pokémon..."(in "Options", "Bug fixes"). <b>Do it only once and only once</b> (for each concerned save file).</li><li>If you have imported or exported a Pokémon in the GBA format, please check its status alteration, its EVs, and its game of origin.</li></ul> + You have used a version of PkmGCSaveEditor older than 1.1.1.<br/>Please consider the following points:<ul><li>If and <b>only</b> if you have modified a <b>Colosseum</b> save file with that previous version, please load this save file again, and click "Bugs affecting Pokémon..."(in "Options", "Bug fixes"). <b>Do it only once and only once</b> (for each concerned save file).</li><li>If you have imported or exported a Pokémon in the GBA format, please check its status alteration, its EVs, and its game of origin.</li></ul> + TrainerInfoLayout diff --git a/PkmGCSaveEditor/translations/PkmGCSaveEditor_fr.ts b/PkmGCSaveEditor/translations/PkmGCSaveEditor_fr.ts index 894249b..8733a54 100644 --- a/PkmGCSaveEditor/translations/PkmGCSaveEditor_fr.ts +++ b/PkmGCSaveEditor/translations/PkmGCSaveEditor_fr.ts @@ -757,49 +757,49 @@ Rubans - + Genderless Asexué - + Unown form: Forme Zarbi : - + will evolve into: évoluera en : - - + + Invalid version info Infos de version invalides - - + + "Invalid Pokémon" flag set Drapeau "Pokémon invalide" activé - + Location caught (see <a href='http://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_index_number_(Generation_III)'>here</a>) Lieu de capture (cf. <a href='http://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_index_number_(Generation_III)'>Bulbapedia</a>) - + Location caught (see <a href='http://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_index_number_(GCN)'>here</a>) Lieu de capture (cf. <a href='http://bulbapedia.bulbagarden.net/wiki/List_of_locations_by_index_number_(GCN)'>Bulbapedia</a>) - + Warning Avertissement - + The version info you specified is invalid. The game will therefore consider this Pokémon invalid. Les informations sur la version du jeu que vous avez entrées sont invalides. Le jeu considérera de ce fait ce Pokémon invalide. @@ -894,32 +894,32 @@ MWCentralWidget - + Game configuration Configuration du jeu - + Trainer info, Party and Bag Infos dresseur, Equipe et Sac - + PC PC - + Daycare Pension - + Strategy memo Mémo - + Purifier Purificateur @@ -927,147 +927,159 @@ MainWindow - - + + &File &Fichier - - + + &Options &Options - - + + &Interface language Langue de l'&interface - - + + &Dumped names language Langue des noms &extraits - + + + &Bug fixes + &Correctifs de bugs + + + &Open... &Ouvrir... - + &Save &Enregistrer - + Save &as... Enregistrer &sous... - + &Exit &Quitter - + Select &automatically Sélectionner &automatiquement - - Ignore data corruption - Ignorer la corruption des données + + Bugs affecting &Pokémon (Colosseum, PkmGCSaveEditor ≤ 1.1.0) + Bugs affectant les &Pokémon (Colosseum, PkmGCSaveEditor ≤ 1.1.0) - - - + + &Ignore data corruption + &Ignorer la corruption des données + + + + + GCI save files (*.gci) Fichiers de sauvegarde GCI (*.gci) - - - + + + Raw save files (*.bin) Fichiers de sauvegarde bruts (*.bin) - + The save file has been modified. Le fichier de sauvegarde a été modifié. - + Do you want to save your changes? Voulez-vous enregistrer vos modifications ? - + Could not open file. Impossible d'ouvrir le fichier. - + An error occured while reading the specified save file. Une erreur s'est produite durant la lecture du fichier de sauvegarde. - + Open save file Ouvrir fichier de sauvegarde - + All Files (*) Tous les fichiers (*) - - - - - - + + + + + + Error Erreur - + Invalid file size. Taille de fichier invalide - - + + + Warning Avertissement - + The backup save slot was loaded because the most recent save slot is corrupt. L'emplacement de sauvegarde de secours a été chargé car l'emplacement le plus récent est corrompu - + The second backup save slot was loaded because the other ones are corrupt. Le deuxième emplacement de sauvegarde de secours a été chargé car l'emplacement le plus récent est corrompu - + All save slots are corrupt. Tous les emplacements de sauvegarde sont corrompus. - + No save file loaded Aucune sauvegarde chargée - + %1, %n save(s) %1, %n sauvegarde @@ -1075,35 +1087,40 @@ - + Colosseum Colosseum - + XD XD - + Could not write to file. Impossible d'écrire dans le fichier. - + An error occured while writing to the specified save file. Une erreur s'est produite pendant l'écriture des données sur le fichier de sauvegarde. - + All files (*) Tous les fichiers (*) - + Save save file Sauvegarder fichier de sauvegarde + + + You have used a version of PkmGCSaveEditor older than 1.1.1.<br/>Please consider the following points:<ul><li>If and <b>only</b> if you have modified a <b>Colosseum</b> save file with that previous version, please load this save file again, and click "Bugs affecting Pokémon..."(in "Options", "Bug fixes"). <b>Do it only once and only once</b> (for each concerned save file).</li><li>If you have imported or exported a Pokémon in the GBA format, please check its status alteration, its EVs, and its game of origin.</li></ul> + Vous avez utilisé une version de PkmGCSaveEditor plus vielle que la version 1.1.1.<br/>Veuillez considérer les points suivants : <ul><li>Si et <b>seulement</b> si vous avez modifié une sauvegarde de <b>Colosseum</b> avec cette version-là, veuillez charger cette sauvegarde à nouveau, et cliquer sur "Bug affectant les Pokémon ..." (dans "Options", "Correctifs de bugs"). <b>Ne le faites qu'une et une seule fois</b> (pour chaque sauvegarde concernée).<</li><li>Si vous avez importé ou exporté un Pokémon au format GBA, veulliez vérifier son altération de statut, ses EVs et son jeu d'origine.</li></ul> + TrainerInfoLayout