Commit graph

223 commits

Author SHA1 Message Date
Kurt
41653490c1 add better legality string file updater
may want to make the export location smarter so that they dump back to
the compiled resource location, meh

assume that english is already loaded; restore english before next so
that new languages use english as the base language for untranslated
strings
2018-04-06 22:06:15 -07:00
Kurt
1d4e815689 Extract more mesage strings
all common strings in forms used by multiple generations

would rather rework the individual generation strings to be unnecessary
with better interaction instead (if possible), as translating hundreds
of limited exposure strings is a drag.
2018-04-06 21:23:09 -07:00
wwwwwwzx
8710c7a517 Translations update (#1887)
* Update Chinese translation file - 2

* Fix up base stats label translations
2018-04-04 22:45:14 -07:00
Kurt
48cf658abd Update translations
#1885
removes content not present, moves dev code to separate debug-only class
2018-04-03 18:46:32 -07:00
Kurt
1777a09bde Update translation files with all translatables
Closes #1883

Some controls could be manually pruned (like Gender labels), but nah
2018-04-02 20:55:10 -07:00
Kurt
aedc0092b4 Rework translations
instead of:
controls on form->dict of names, look up line to find control
now:
dict of names->look up control to find name

faster overall, simpler, and updates the dictionary with new control
entries. browse thru forms that call translateinterface with one
language (english), then updateall(en) and dump to get the updated
translation files.

#1864
2018-03-20 22:34:44 -07:00
Kurt
26cc266dd1 Move type sprite fetch remapping to pkmutil
I still don't like it 100%
2018-03-18 11:25:57 -07:00
Kurt
f9002c6cc9 Add trashbyte copy for OT import on gen1/2
Closes #1849
NAME_LENGTH is 11 for both gens and the offsets don't vary between
languages, so it's a simple fetch.
2018-02-22 22:42:50 -08:00
Kurt
8e0ec17e9f Misc refactoring
no functional changes
2018-02-21 20:35:07 -08:00
Kurt
fabb64705b Split folder->import to multiple overloads
path, paths, gifts, pkms
removed conversion counter because meh
#1804
2018-01-31 23:37:01 -08:00
Kurt
0ee36a655a Simplify bitmap generation
stride is bpp*width + padding bytes; 0x20 worked for the old code since
8*4=0x20 (width of tile).
2018-01-21 17:22:31 -08:00
Kurt
4fb3c22b1c Remove usages of System.Drawing.Color
Eventually need to remove usages of bitmap
2018-01-13 19:09:43 -08:00
Kurt
4f489a720f Refactoring
move logic back to cgearbackground, initialize the bg regardless of
psk/cgb input format
cache background data to return psk (potentially unintended side effects
if importing bw psk to b2w2, will have to fix cgb->psk first then undo
this tempfix)
#1699
2018-01-09 23:30:44 -08:00
Kurt
1417a6d576 Add shiny sprite fetch & fallback
pseudo future proofing in the event new species sprites are added and
recolored variants are not
Closes #1735 , thanks @trainboy2019 !
(reimplemented alterations with GUI-saved settings)
2018-01-02 17:17:30 -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
f25b4fea9c Add forme range check method to personalinfo
relocates logic to better location
2017-11-21 18:32:27 -08:00
Kurt
486e5dc4fe Move forme check after species check
compatibility message of 803-807 dex pkm on S/M needs to say species
first rather than checking forme first
Closes #1643
2017-11-21 15:22:33 -08:00
Kurt
6394dac19f Rework mysterygift pkm sprite generation
don't bother converting to pkm then generating the sprite off that; use
the overload with int/bool

removes sav/pkm dependency for generating gift descriptions, and
standardizes the names a little. maybe a PKMBase interface would be
useful...
2017-11-18 11:34:23 -08:00
Kurt
f7e20a3c43 Misc tweaks
fix roamer3 not setting IVs
fix usum z items rightmost pixel getting chopped off
use Gen* instead of GenNumber for specific cases (faster)
add WasGiftEgg location case for Gen7
remove some unnecessary array allocations
2017-11-17 22:19:23 -08:00
Kurt
025b8da52c Flag invalid forms on sav compatibility check
closes #1615
2017-11-16 14:30:18 -08:00
Kurt
b99ae92b47 handle mimikyu totem forme edge case
run totem form code regardless of sprite
2017-11-09 22:00:36 -08:00
Kurt
b3436cb791 Add totem forms selection/spritemod and req changes 2017-11-09 21:52:11 -08:00
Kurt
24121553b4 Add savegame sensitive pkm legality checking
uses the forme count of the savefile (rather than a futureproofed
same-gen forme count)
Closes #1559
2017-11-06 19:31:24 -08:00
Kamron Batman
83e06b4436 Adds WC4 support. 2017-11-06 16:26:34 -08:00
Matt
f136c2b67c Add Checkpoint save detection
Adds support for Checkpoint save manager. Supports NDS and 3DS save data!
2017-10-05 12:40:41 -04:00
Kurt
b23658dee1 Misc tweaks
allow cute charm static encounters
ignore user-entry control types
2017-10-01 21:25:23 -07:00
Kurt
c28575aad7 Refactor/rewrite form translation
1. faster control retrieval (fetch all once rather than search for each)
1. smaller methods & added comments (ez understanding)
3. easier to dump control list (ez translation file updates, future)
2017-10-01 10:50:00 -07:00
Kurt
44c0b53852 Provide map for Z Crystals KeyItem->HeldItem
allows for loading sprites for the key items (they're smaller than the
key item but better than missingno sprite)
Closes #1504
2017-09-30 20:57:32 -07:00
Kurt
1e377c2963 interpolation++
no functional change (assumed)
2017-09-29 22:58:25 -07:00
Kurt
ed1b934374 Misc refactoring
expose some useful IEnumerable methods (sorting / bin->pkm / copy) to
simplify some common operations
change some explicit arrays to IList for flexibility
remove old memecrypto bool (no longer necessary as XP is not supported)
rename some methods for more clarity
2017-09-28 22:20:27 -07:00
Kurt
d8c2cdb8e3 Use EnumerateFiles over GetFiles in some cases
https://msdn.microsoft.com/en-us/library/07wt70x2.aspx

iterating as an ienumerable (ie not consuming the whole collection) can
be more efficient by not waiting for the whole collection
2017-09-23 17:02:28 -07:00
Kurt
7efd771bf4 Misc refactoring
add docs, move some data fetching to more appropriate class
remove old XP memecrypto support handling, was previously removed due to
net standard/core split
refactor memecrypto to handle multiple save sizes (USUM won't be the
same size save file); placeholder -1 for USUM size
2017-09-16 11:38:58 -07:00
sercho80
5813ba7f44 Add JKSM backup path
For those using Rosalina and JKSM :)
2017-09-15 07:34:22 +02:00
sora10pls
4f28e5cabc Add GodMode9 3DS backup path 2017-09-14 16:41:35 -04:00
Kurt
9864d84704 Misc fixes/improvements
Reduce memory usage for evo method banlist (static banlist references)
Fix gen6 mega evo flag truncation
simplify QR encode/decode logic a little
Don't apply transparency if transparency is already 100% (skip the loop)
Add gen5 wild pid/tid-sid correlation check
Fix validation value reset (loading gen3-4 pkm without looking at met
tab causes the met location to get reset); fixed by prematurely
validating before setting the value
Fix gen3 pkm with gen4 contest ribbons in gen4/5 getting flagged
incorrectly
2017-08-13 00:21:42 -07:00
Kurt
249c08b062 Add gen-sensitive deoxys sprite fetching
Closes #1327
2017-07-16 14:05:29 -07:00
Kurt
4e9b6be8e5 Convert console output to debug output
output messages are now no longer in release builds, as they are only
visible when debugging in an IDE.
2017-07-01 19:43:51 -07:00
Kurt
f59782a479 Add remove all held items of boxdata
part of the winforms api, unused by pkhex
closes #1264
no need putting held items in inventory as the inventory can be edited
outright
2017-06-22 18:51:46 -07:00
Kurt
8cc3a36708 Add manaphy egg sprite
Closes #1256
2017-06-20 22:19:04 -07:00
Evan Dixon
2636e7ded8 Fixed another potential blank error message
I also added comments where appropriate, because it took far too long to understand what was going on when reviewing the commit that fixed the original bug.
2017-06-20 20:38:33 -05:00
Kurt
da6f880c16 Add Shiny Leaf editing
Closes #1236
pk4/bk4 only, obviously

side note, using static events is no-no, designer auto-removed them.
just manually reapply (as well to others that used it)
2017-06-17 21:49:14 -07:00
Kurt
3f38b123a3 Refactoring
mostly renaming things, includes a little bit of added sugar and
splitting methods to simplify the codebase.

all methods are now PascalCase
2017-06-17 18:37:19 -07:00
Kurt
11b2dc35d7 Refactor main form into smaller pieces
pkm editor, sav editor, menus, and a manager to glue the storage slots
together
decouples the pkm/sav editors from a static savefile reference.

improves dragdrop/click view/set/delete indication, hides unavailable
contextmenuitems, and fixes a few incorrect references. Box Subviewer
slots now have all the indication/events that the main save editor slots
have.

pls report behavior bugs 👍
2017-05-22 21:55:12 -07:00
Kurt
46c0f4f30c Add exporting pkm/mg from mgdb
Closes #1151 by extending functionality instead of limiting it :)

Users can now export Mystery Gifts from the database in either
MysteryGift files or converted PKM form regardless of current generation
2017-05-18 18:10:58 -07:00
Kurt
da3d8c99be Misc refactoring
move some open/save file dialog events out of the main form
update main form logic to reflect newly flagged pkm cases
2017-05-17 22:00:06 -07:00
Kurt
1659405dc4 Add quick folder open menu item
Closes #1137
allows loading of tab separated value text file "savpaths.txt" which can
also be used to 'favorite' locations (ie, the program checks for
duplicate paths and only adds the first).
folder availability checked on form creation

shortcut: press ctrl-F on main window

Thanks @sora10pls !
2017-05-16 16:27:43 -07:00
Kurt
5ec3521d48 More c#7 shorthand
outs & pattern matching, other simplifications
2017-05-13 10:20:25 -07:00
Kurt
5461cdaa4b Fix language translation fetch by name
wrong method was called, specify file by exact name
Closes #1127
2017-05-12 20:44:12 -07:00
Kurt
aeb90d262c Cleanup 2017-05-12 09:33:12 -07:00
Evan Dixon
52c4fbbe97 Converted PKHeX.Core to .Net Standard
Refactored and rearranged things as needed to allow the change
2017-05-11 23:34:18 -05:00
Kurt
dc911351fe Import pk2pk functionality
Exposes reflective conversion capability and sanity checking methods for
use in the class library.
2017-04-23 20:33:17 -07:00
Kurt
6ea7293ff3 Fix party only battle form legality check
Only set box value if in box
Only check party-only if <= gen6
Closes #1060 , thanks @White-Canary !
2017-04-14 17:49:13 -07:00
Tsunamical
0f3b316baa Fix Typo in NetUtil 2017-03-23 01:37:59 -04:00
ReignOfComputer
6f7c8e73a0 Dump Single Box (#962)
* Dump Single Box

Probably can be better optimized or something. The code works, the thing
is I can't seem to edit the Menu Items to add this in as it causes the
view to go haywire. VS can be silly sometimes. For your consideration :)

Related:
https://projectpokemon.org/forums/forums/topic/40358-how-to-export-all-pokemon-in-boxes-as-pk7/

* Manual Design Edit of Main
2017-03-21 00:21:03 -07:00
Kaphotics
a3e62f6344 Merge pull request #938 from pokecal/pokecal-patch-4
tip for stats,value about Refresh,small fix.
2017-03-13 09:01:20 -07:00
ReignOfComputer
b7a5a861bc Fix Dump Boxes Naming (#937)
Off-by-one error.
2017-03-13 09:00:41 -07:00
pokecal
5cf36df360 Fix inBox
include 0
2017-03-13 17:20:48 +09:00
ReignOfComputer
ad8f661863 Add PanelScroll Value Check (#931)
Prevents ArgumentOutOfRangeException.
2017-03-08 23:32:52 -08:00
Kurt
e9ea53ef8c Move wallpaper red check to BoxWallpaper
Add gen3-5 wallpaper checks
Rearrange and simplify general sprite layering logic to reduce some
comparisons
2017-03-08 21:50:34 -08:00
pokecal
6da4b3d41c Fix, stop using alt-ShinyIcon outside the box (#929)
with no filter for slot value, the alt-icon will be used for PKM-QR icon, team, and others.
2017-03-08 14:59:07 -08:00
pokecal
57c9b78108 replace RareIcon when wallpaper is red (#928)
* use alt-redstar when wall is red

* add rare_icon_alt

* add rare_icon_alt

* Add files via upload
2017-03-08 08:46:25 -08:00
Kurt
7e23d13a78 Simplify egg sprite fetch
Call ChangeOpacity directly instead of layering with partial
transparency.
2017-02-04 23:42:55 -08:00
Kurt
5d3e167496 Box slot legality r3
Closes #814 thanks @JortonMV !
Closes #818 thanks @egzonqj !
(both were instrumental in regards to this commit, much appreciated)

Refactors to move the slot image generation per the save file to an
extension method, instead of having 4 methods (2 in main, getQuickFiller
& getSlotFiller, and 2 in box viewer, same names).

Uses the legality marker unscaled in the bottom left corner of the
sprite.
Fielded a few ideas in IRC (a commented-out line that tinted the sprite
red remains in the src), but the folks in IRC preferred the indicator.

When toggling the legality indicator, the box viewer has to be updated
as well as the main box slots.
2017-02-04 20:39:42 -08:00
Kaphotics
23c4f1e700 Merge pull request #802 from Tsunamical/class-fixes
Class consistency fixes
2017-02-04 14:59:24 -08:00
Kurt
c930b7eb7e Relocate box load/dump/verify to extensions
now with shiny new documentation
2017-02-04 14:58:30 -08:00
Tsunamical
66e669a42b Change NetUtil to a static class
NetUtil simply can be static, which brings it inline with the other
NetUtil.
2017-02-04 11:18:48 -05:00
Kurt
40456702a9 Misc tweaks
Fixes marking set #798
sleep deprivation ftw
2017-01-31 19:35:18 -08:00
Kurt
30ec9011c8 Misc updates
Remove safari hidden ability check for gen7 origin pkm
load template data on any save load, causes the legality triangle to
appear on supported games
2017-01-29 00:02:32 -08:00
Kurt
f4797e06a0 More refactoring
More extension methods for other types of images
2017-01-11 22:28:35 -08:00
Kurt
db5e084ef9 Further refactoring
Move System.Drawing usage out of Core to WinForms, as System.Drawing is
not in .NET Core/Standard. Simple methods to return resource name
strings have been added instead.
2017-01-11 17:55:42 -08:00
Kurt
c9e721fc5b Update settings load
bad settings files cause exceptions, silently delete them
move language init out of loadconfig (want it to happen regardless of
config errors, so load config value instead)
2017-01-09 19:15:46 -08:00
Kurt
7da6f1ab1d Cleanup 2017-01-08 00:14:34 -08:00
Kurt
595c7eb4c5 Split winforms to separate project
resources still are associated with winforms, eh
program still runs fine and I've replicated the mono build options. lmk
if this breaks stuff
2017-01-07 23:54:09 -08:00