Commit graph

255 commits

Author SHA1 Message Date
Kurt
0de335d52b Misc reorg 2018-07-29 14:04:16 -07:00
Kurt
b16015e8e5 Split InventoryPouch to inheriting classes 2018-07-29 13:55:07 -07:00
Kurt
d916be1020 Style updates 2018-07-29 13:27:48 -07:00
Kurt
c8563a3737 Respacening
Style guidelines, handle a bunch of files
no functional change
2018-07-26 19:34:27 -07:00
Kurt
9551d4e707 Relocate logic to core
probable/possible lgpe uses similar dex stuff, so best I totally
understand it (assuming quirks will be present)
2018-07-26 18:01:16 -07:00
Kurt
e8644280a1 Update sav4 block detect logic
#2070
desmume inits a savefile to FFFFFF... others instead init to 00's.
check both init states, add IsRangeAll method

5f39118b8a

Thanks @Filo97 !
2018-07-25 16:00:52 -07:00
Kurt
64284eafef Add pk1/pk2 direct import checks
dragdrop: check
import files from folder: check
no other paths convert afaik

Closes #2074
2018-07-24 15:49:00 -07:00
Kurt
da839988af Simplify RBY checksum calc
utilize unchecked byte overflow
remove unnecessary zeroing -- t's immediately after the checksummed
region. even if it was included, chk += 0 is still 0.
2018-07-21 19:24:09 -07:00
Kurt
0c5c9bc33c Misc clean / xmldoc updates
remove unused label in QR (use window Font)
escape & -> & for xmldoc proper style
2018-07-21 19:20:11 -07:00
Kurt
1c49b0681d Extract dex logic 2018-07-21 11:46:38 -07:00
Kurt
63b9b72a49 Relocate save detection to core
Environment.GetLogicalDrives is not present in net standard 1.3;
relocate code and add it as a parameter
2018-07-21 10:23:15 -07:00
Kurt
0c632604d2 Move files
Saves now has a similar folder structure to PKM
2018-07-20 21:33:55 -07:00
Kurt
c7175fbdb4 Misc reorg
bye bye SAVUtil and PKMUtil
2018-07-20 21:32:33 -07:00
Kurt
f27f11bfc8 Clean up pk7/sav6/sav7 simple methods
extract GetFormDuration to method, remove unused GetIsCompatible
specialized variant (there's a generalized version in SAVUtil.cs,
IsPKMCompatible -- might do another round of WinForms->Core absorption
2018-07-20 20:25:28 -07:00
Kurt
99c790a4b0 Update File name/path/folder fields
original file path is not saved with the two listed properties, add
FileFolder and relcoate existing FilePath functions to that field

move some GetVariantSAV usages to the string method instead of byte[]
2018-07-16 21:00:43 -07:00
Kurt
a81c28f114 Upgrade FolderList to show recent/backups
sortable grid like the ReportGrid for pkm, can open/browse individual
files
2018-07-15 17:48:31 -07:00
Kurt
99673706a0 Rework recent savefile detection
return a reference to the savefile rather than the path, since a
SaveFile has a FilePath property.
2018-07-15 13:35:58 -07:00
Kurt
ebed1026cd Update national dex magic setting
bulbapedia is wrong, first 4 bytes are info values:

0x0 = dex order (alphabetical, numerical), unused in frlg
0x1 = mode (unused in frlg), regional vs national
0x2 = national magic rse (always set in frlg)
0x3 = national magic frlg (never set in rse)

refer to disassembly (pokefirered isn't too helpful, less developed.
just compare save files & edit ram!)
the other 2 values being set are the eventflag & event const, could use
the abstraction for those rather than direct ofs writes
2018-07-12 23:23:36 -07:00
Kurt
d42cc7cacd Add spinda/unown PID properties 2018-07-12 22:07:44 -07:00
Kurt
97701787a6 Add sav2 daycare view
tfw they store full egg data there too -- show that in the sidebar

Tested on C & GS (english), assumedly works fine for other languages
(based on the disassembly?)
2018-07-08 15:46:37 -07:00
Kurt
3bcda0eb33 Add frlg other daycare slot view
guess that was easy?
2018-07-08 11:06:39 -07:00
Kurt
1e8dd3c823 Add gen3 daycare offsets
idc about frlg single mon daycare
2018-07-08 11:00:50 -07:00
Kurt
373b4ffcbb Add block offset fetch util
according to the disassembly it all makes more sense; a small block and
a large block are stored in RAM

util calc helps convert between contiguous section offset to a chunked
offset

eg: emerald daycare starts at large 0x3030, which converts to
chunk4@0x1B0
2018-07-08 09:56:01 -07:00
Kurt
f04bc214ec Use OT class calc (mod 5)
remove setter as it's derived from TID's low byte
2018-07-08 09:54:17 -07:00
Kurt
f592be75d1 Add gen3 secret base classes
don't plan on using them at this time, just an implementation if anyone
wants to play with it
2018-07-08 00:26:31 -07:00
Kurt
b745d59552 Rearranging
group gen3 structures to their own folder
2018-07-07 21:47:29 -07:00
Kurt
0b1ae2ec67 Add pokeblock3 interaction
no gui but can use core with a rse save file
2018-07-07 21:31:41 -07:00
Kurt
4dcac24f34 Add roamer3 active/level editing 2018-07-07 21:31:07 -07:00
Kurt
ae04218c5f Update eventflagmax for e/frlg
globals.h defines as 288 bytes for RS, and 300 for E & FR respectively

verified event const vals for Emerald making sense
2018-07-07 18:03:52 -07:00
Kurt
d4c1093dd9 Add RS badge flags
make logic generic
2018-07-07 17:01:47 -07:00
Kurt
990eb73f8a Misc simplifications
recordmax is simplified
2018-07-07 15:38:11 -07:00
Kurt
e46aed4b0b Relocate bean logic to core 2018-07-07 15:37:47 -07:00
Kurt
e915cd170b Extract trainer stat to interface / usercontrol 2018-07-07 11:48:03 -07:00
Kurt
2e02ec9719 Refactoring
Move some logic out of saveditor/subs
2018-07-07 11:20:05 -07:00
Alexander Hoischen
517441a982 Implement IsDaycareOccupied for SAV1 (#2036)
This commit implements IsDaycareOccupied for generation 1 saves. The
byte which tracks if the daycare is occupied should normally only be
0x01 or 0x00, so I decided that all other values mean that the daycare
is probably corrupted and thus not occupied. SetDaycareOccupied is not
implemented, since I am not sure what other flags the game normally sets
in this scenario and daycare is read-only anyway.

The GUI displays the Pokemon's index to the right for some reason, but I
don't have saves to test this for other generations, so it might be
unrelated to this change.
2018-06-29 16:18:42 -07:00
Kurt
d15acea6b4 Flag KOR on Battle Revolution savefiles
Closes #2013
2018-06-17 09:27:14 -07:00
Kurt
3a7a257a01 Add export current box to showdown pastes
Rework box fetch in SaveFile to be a little more flexible, can now fetch
a single box

Hold control to... export all boxes :)

I wonder if there's a decorator that showdown skips when importing lines
that can help differentiate the boxes since there's the potential for
hundreds output (ie comments in a showdown set?) doubt it.
2018-06-16 21:56:16 -07:00
Kurt
cb5e1239ae Refactoring
Extract game value limits
Rearrange GameVersion util logic extensions
add better gameversion fetch for generator (equivalent to pkmeditor)
2018-06-15 16:00:28 -07:00
Kurt
4778c9c758 Fix RSBOX checksum
Closes #1995
clean up variable names
2018-06-11 09:12:41 -07:00
Kurt
c6765fd26b Remove ORAS arg
...
2018-06-10 14:07:36 -07:00
Kurt
19cb2cda2e Remove MAX giveRegular for ORAS
level 3 is the legitimate max
2018-06-10 12:27:53 -07:00
Kurt
75f4318335 Split S/MAX from base 1-3 levels
ORAS can unlock MAX & Full Recovery flags, add special handling for that
2018-06-10 11:28:20 -07:00
Kurt
29c610870e Rename opower6
match type
2018-06-10 11:03:14 -07:00
Kurt
26f45d44d0 Rework OPower editor
https://projectpokemon.org/home/forums/topic/45683-pkhex-made-odd-number-of-zygarde-cells-usm/?do=findComment&comment=232476

Thanks @sora10pls for documenting what each flag does
2018-06-09 21:04:34 -07:00
Kurt
79f0b3665f Differentiate C/XD cologne IDs
https://projectpokemon.org/home/forums/topic/45685-pokémon-xd-and-scent-bag/
Thanks Asia81!
2018-06-09 12:44:30 -07:00
Kurt
cb4761403a Relocate oras setopower data to sav6 2018-06-09 12:32:55 -07:00
Kurt
5475da05c3 entree forest updates
clamp species list based on savefile
fix form control index set
remove slot from list (avoid duplicates, there's 530 slots and both
games have more than that available).

Closes #1974
2018-05-28 12:49:41 -07:00
Kurt
4b8cb9b8fb Add entree forest editor & randomizer
ezpz

(clear trailing spaces from entree forest comments)
2018-05-28 08:26:52 -07:00
Kurt
730709b33b Add entree forest abstractions
make cryptarray public
2018-05-27 14:19:19 -07:00
Kurt
700ce00d8e Add setting of batrev boxname
unused in gui, no wallpapers
2018-05-23 16:30:22 -07:00