Commit graph

152 commits

Author SHA1 Message Date
Kurt
06733d6e34 Refactoring
Split up c-gear skin bitmap, move generic handling to core
2018-01-13 21:31:02 -08:00
Kurt
6caefef181 Add cgb->psk & misc clarifications
Closes #1699
tested on black2 & white, skin isn't corrupt on game boot and appears
correctly

still don't like setpixel/System.Drawing reliance (maybe split logic to
CGearSkin & CGearSkinVisualizer) for PKHeX.Core compat
2018-01-13 16:32:57 -08:00
Kurt
659f2098a9 Fix sav4 coin read
#1746
2018-01-06 21:36:44 -08:00
Kurt
218c20d804 Add sav4 coin edits to misc4
closes #1746
2018-01-06 14:02:55 -08:00
Kurt
34188f275a misc perf improvements
reduce linq usage / reduce obj creation in tight loops
speed++
2017-12-29 10:40:00 -08:00
Kurt
a1f2f8708a Refactoring
pass identifier on cloning pkm
remove unnecessary ref for passing Data (not modifying array reference)
const some magic numbers
2017-12-27 16:36:24 -08:00
Kurt
61b65198f2 Allow box name editing on gen2 2017-12-27 15:52:29 -08:00
Kurt
1e388fb85a Add first unown seen on dex set
immediately after unown dex:

c2a7216d9b/wram.asm (L2714-L2722)

per discussion on forums:

https://projectpokemon.org/home/forums/topic/43179-bug-unown-sprite-glitched-in-pokédex-in-gen2/?tab=comments#comment-225342

expose some useful properties for the pkhex.core api (unlock all, unlock
individual, define which unown shows up)
2017-12-27 09:56:04 -08:00
Kurt
3445b46526 Remove unnecessary array cloning
new objects would always clone the input array; only clone on object
cloning (keep the original array reference on initial creation from
bytes)
2017-12-26 21:38:19 -08:00
Kurt
9e2bd8f64a fix pokewalker course flag set
07FF_FFFF
not
7FFF_FFFF
2017-12-21 14:28:19 -08:00
Kurt
9263856845 Add apricorn pouch editing 2017-12-18 09:36:53 -08:00
Kurt
47eee3aa98 Add roto powers as held items
not gonna add sprites because these are useless, anyone can submit via
pr (image might need downscaling to <15x15)
Closes #1703

remove useless null checks (throws the exact same exception it would if
it were not there, except without detail)
2017-12-16 19:52:06 -08:00
Kurt
2dbdb35955 Misc tweaks
possibly fix UI not-1x scaling screwing up drawn pkm images with
items/shiny/illegal.
simplify some logic -> speed improvements (wow so noticable /s)
2017-12-16 18:29:10 -08:00
Kurt
06ea6d94a2 Allow box layout / wallpaper editing for sav5
was temporarily disabled during sav5 implementation 2y ago, now noticed.
Closes #1702
2017-12-16 14:15:09 -08:00
Kurt
278f7cad25 Add pwt record get/set
thanks @sora10pls
2017-12-14 12:34:03 -08:00
Kurt
816ebf6b0e Refactoring
no functional change
2017-12-11 16:01:24 -08:00
Kurt
0588135b60 sync missing change
g already used
2017-12-11 11:01:57 -08:00
Kurt
f1cabdfa25 Handle setting decrypted pgt pkm gift data 2017-12-11 10:13:08 -08:00
Kurt
5bc2e6da88 Refactoring
de-linq some areas where direct accessing is possible (list/array)
2017-12-04 20:16:54 -08:00
Kurt
3d7b2a2b29 Misc tweaks
RNG frame mismatch -> fishy (for now)
fix xmldoc copypaste
clean up some resharper warnings
2017-12-04 16:26:26 -08:00
Kurt
5a69f1d596 Rework gen3 crc32 to not require a new obj for byte[]
removes toarray in favor of iterating over the source array
maybe with the next c# (span)...
2017-12-04 16:13:18 -08:00
Kurt
a5dbdf91bd Misc tweaks
detect antishiny cxd
remove unused using
don't set caught for seenAll (gen7 dex)
2017-12-04 13:18:28 -08:00
Kurt
792910a485
Merge pull request #1689 from pokecal/master
fix MailBoxEditor
2017-12-03 07:14:49 -08:00
Kurt
09a41f66ba Fix z coordinate writeback 2017-12-03 07:12:52 -08:00
pokecal
0f52f94222 fix MailBoxEditor
add Mail5, almost same as Mail4.
2017-12-04 00:00:14 +09:00
Kurt
bdc9d7edce fix plaza get set
closes #1684
2017-12-02 21:37:46 -08:00
Kurt
2d3203fc1a Refactoring
extract out Mail classes to core
2017-12-02 19:12:04 -08:00
Kurt
fdc52e2c19 Add pkm league starter EC for gen7
Closes #1671
2017-11-29 20:04:01 -08:00
Kurt
4a898b0829 Leave empty item slots for gen7+
game depends on an existing value to check for if the item is truly
"New"
Closes #1670

Don't clear count=0 slots for gen7+
For sorting, put all the count=0 at the near top (any feedback on how
this actually works?)
2017-11-29 19:47:27 -08:00
Kurt
f13cc289a7 Move eventflag offset fetch to SAV2Offsets obj 2017-11-27 16:46:14 -08:00
pokecal
e86b8c670f add Crystal GS EventFlags
have checked with US ver.
2017-11-28 03:35:55 +09:00
Kurt
b30cc933e5 Extract festafacility from gui code
move to core project as a structure/class
2017-11-26 08:47:25 -08:00
Kurt
61ca9232e2 fix sav3 dexflag get/set
incorrectly added bit offset twice
Closes #1660
switch /8 to >>3 for consistency with gets
2017-11-26 08:37:08 -08:00
Kurt
6534ef1919 Refactoring
Reworks festa facility into a get/set object, simplify some operations
naming convention (PascalCase) for methods/properties
closes #1635
2017-11-19 21:25:46 -08:00
Kurt
70ec1fda5e cleanup
wasn't able to view the designer layout so I removed & readded to
project -- works fine now.
uppercase method names
2017-11-19 16:16:44 -08:00
pokecal
3c85b0ead3 add G7 FestivalPlaza Editor
There are too many phrases,
I have no plan to complete all list of phrases.
But I think user can edit phrases of each facility
 by using their phrase settings.
2017-11-20 06:50:39 +09:00
Kurt
469587bbbd Add Rotom OT name
"nah lets just store the OT in the save file twice"

add a double check if OT != RotOT to remind the user
2017-11-18 22:26:57 -08:00
Kurt
3e60bcd5dc fix minior dex set clamp
[0],[cores), ignore all other meteor forms
thanks @sora10pls
2017-11-14 21:55:52 -08:00
Kurt
dbf10d1c29 Add surf score editing
trainer7 Ultra tab
Closes #1605
2017-11-14 21:35:28 -08:00
Kurt
c4f8dabd26 rework dex getting
changes iteration to be per-species rather than per list.
uses the internal 'should i set a bitflag' code rather than a banlist.
2017-11-14 19:14:02 -08:00
Kurt
953f6939a5 Fix double save export memecrypto issue
Closes #1600 , memecrypto is applied on first export but not cleared
prior to second export, thus resulting in a checksum over garbage data
that is permanently lost when the new memecrypto sig is applied.

Solve this by keeping track of memecrypto application status.
2017-11-13 19:34:50 -08:00
Kurt
dbabcb9ef0 Misc updates
fix hall of fame fixed offset
fix ball throw type unlock/learned flags using fixed offset
fix current throw type defaulting to -1 when Nihilist (new USUM style)
by adding in for USUM

add fused slot offset fetching
convert event flag combined byte fetch to use Get/SetEventFlag with
event flag references.

add ZRingUnlocked sav properties & checkbox for toggling

set AlolaTime only if the combobox is enabled (only disabled if not yet
set by game)

Closes #1595
2017-11-12 21:28:34 -08:00
Kurt
fbab1cfbe6 Update usum eventflag max
now these event flags are making sense
2017-11-11 18:58:57 -08:00
Kurt
6127dd7a08 split record maxes
slightly different in USUM, any difference increased the cap:
070  999999->999999999
071  999999->999999999
072  999999->999999999
073  999999->999999999
074  999999->999999999
192  9999->65535
193  9999->65535
194  9999->65535
197  9999->65535

Worth noting that these were undocumented record IDs and likely unused
in Sun/Moon; don't really need to split these tables but good for
documentation purposes.

Trainer7 grabs maxes from the save without specifying version, so add an
overload to default to USUM (even though the unused records will have
bad caps, they're unused in SM so whatever).
2017-11-10 17:37:04 -08:00
Kurt
8ab39cae7b Update dex form handling 2017-11-10 17:08:47 -08:00
Kurt
6057780b4b Fix blank saves array accessing
old blanks modeled sm saves with fixed offsets; since the conversion to
dynamic block offsets, a few offsets need to be manually defined.
2017-11-09 19:26:31 -08:00
Kurt
da5dd5ccb3 remove usum early return for dex bit setting
I highly doubt this is causing save corruption; looked through the
disassembly and the offset ptrs are the same relative to sun/moon.
Implementation is flexible for both as gamefreak allocated enough space
in each bit array.

pokedex editor recognizes bools correctly (including for formes).
2017-11-08 19:34:07 -08:00
Kurt
800ba6cf90 encounter additions
add ingame trade data
add placeholder SOS data containers
add refs to all wild encounters (pelago is same as sm)
unmark some todo's
2017-11-08 15:07:04 -08:00
Kurt
97dcd1a845 Add pokedex forme flag correlation table 2017-11-08 13:29:06 -08:00
Michael Scire
78acb8e13b Fix save resigning for USUM, add resources for new pokemon 2017-11-08 11:31:09 -08:00