Commit graph

193 commits

Author SHA1 Message Date
Kurt
2eef523475 Misc clean
meh
2019-02-02 15:20:08 -08:00
Kurt
f481404503 Misc clean 2019-02-02 10:19:41 -08:00
Kurt
a7323ef484 Misc updates
Reuse some code in netutil for fetching stream (provide useragent for
all uses)
make sav4ranch use dynamicly read offsets to handle both variants
(quicker) #2248
2019-01-25 16:51:58 -08:00
Kurt
9fd6d86b1d Merge game selection alert & prompt to 1 popup
https://projectpokemon.org/home/forums/topic/49080-multiple-exceptions-when-selecting-gen-3-blank-saves/

ty BlackShark :)
2019-01-15 22:26:45 -08:00
Kurt
9a4f12c279 Misc updates
rearrange pkm version groups for clear break between
twins/siblings/family
clear pokelist for sav7b on non-exportable saves (prevents b1s1 from
showing markings)
rename horohoro (pgo) to non romaji lol, hide daycare/party tabs on
nonexportable save
remove some unnecessary operations
rewrite getallcontrolsoftype to remove ToList() and make generic
2019-01-05 15:40:25 -08:00
Kurt
1b50e97934 Remove cgse fixed path
can restore behavior by adding it as a custom user path; cgse isn't very
prevalent nowadays

now the only registry key checks are for checking net framework version
2019-01-02 18:18:24 -08:00
Kurt
b5f82f6535 Update translations with latest 2019-01-01 20:27:00 -08:00
Kurt
6140c973ae Account for wr7 deviance from gen7 format extension 2018-12-29 22:10:33 -08:00
Kurt
fb10a1f983 add size rating indications when viewing pkm data 2018-12-13 21:10:38 -08:00
Evan Dixon
34f4fb176c Use assembly version as the current version (#2164)
* Put assembly version in window title
* Treat version.txt as a Version
* Cache current version
* Don't use resources anymore for version
* Re-add version.txt, for backwards compatibility
* Set old version.txt's build action to None
* Use GitHub API for version checking
2018-12-10 20:36:18 -08:00
Kurt
efb9b7eba2 Misc cleanup
removes clickonce logic/reference
2018-12-10 20:32:08 -08:00
Kurt
8a0b9cd88c Add indication for party/starter slots 2018-12-09 23:18:37 -08:00
Kurt
71fab815bf Provide more slot information
remove lockedslots, store & save all teamslots for sav7
differentiate locked slots from overwrite protected slots by emitting an
enum containing info about the slot

locked = can't be replaced, period.
starter/battleteam = can't be pasted over by bulk-pastes

can eventually show more specific sprite layers to denote party
indexes/team#/starter
2018-12-04 22:59:28 -08:00
Kurt
359a529870 Misc updates
Move some logic around, fix style warnings
2018-10-27 08:53:09 -07:00
Kurt
66f082e4a0 Add shadow lugia sprite
Closes #2145
2018-10-20 23:05:15 -05:00
Kurt
9f1d850273 Show shadow aura for colo/xd shadow mons
differentiate unpurified vs purified while in cxd, muh value added
2018-10-13 20:41:58 -07:00
Kurt
f7f5d78beb Misc perf tweaks
hopefully resolves the image corruption issue (dont use unsafe?)
remove some linq
2018-10-13 08:02:55 -07:00
Kurt
c8d874462c Clamp scroll value set
Mono (Linux Mint) specific behavior; I guess 'NewValue' can be outside
the range?
Closes #2140
2018-10-11 15:44:36 -07:00
Kurt
16dcef13a6 Show old egg sprite if egg holds item
Accurately show the item
2018-10-10 22:59:00 -07:00
Kurt
f5b09c2bea Add key item sprite for mysterygift display
closes #2110
2018-09-03 14:23:27 -07:00
Kurt
47e61e9393 Directly reference manaphy egg sprite 2018-09-03 12:36:46 -07:00
Kurt
42deb0ad12 Add extra backup locations for savedetect
Closes #2109
Program boots -> load extra locations rather than constantly fetching.
These files won't change location or presence (not an external drive).

just store the locations instead of constantly fetching, we already call
detect once when loading the form anyway.
2018-09-03 10:40:40 -07:00
Kurt
53216333e6 Misc updates
extract final pkm manipulation logic from pkm editor
add xmldoc to boxmanipulator, add utility class for enum->manip fetching
fix xmldoc referencing removed enum member
relocate boxmanip overview logic to utility class
move SAVPaths file pointer to Main for reuse #2109 , will add to
autodetect in a later commit
open/save dialog with extra extensions: ignore ones already present
2018-09-03 10:30:35 -07:00
Kurt
efb895385b don't sort messagestring file 2018-09-01 14:43:26 -07:00
Kurt
7e03d1203d Remove unused legality strings 2018-09-01 14:37:58 -07:00
Kurt
b4400216dc Flag invalid party slots
lol oops
pkmeditor pkm does not get illegal flag in the sprite, it's off to the
side. remove early return which masked the underlying issue
2018-08-31 21:35:53 -07:00
Kurt
6abeec507f Catch gdi exception & ignore
#2072
2018-08-28 18:21:46 -07:00
Kurt
af0b8b2a37 Add egg sprite alternate display + setting
egg sprites can be a little difficult to see what's underneath (glance
value)
make the new egg sprite method the new default; adds setting to revert
to old behavior

adds translation text for the mega rayq control from #2098
2018-08-19 16:45:20 -07:00
Kurt
e366f9a93d Misc tweaks
only have one empty forme array object
rename method for clarity
show version ID for hidden savefile program window titles
2018-08-15 21:15:06 -07:00
Kurt
10f050eb18 Update translations with new hide savdetail setting 2018-08-13 19:40:00 -07:00
Kurt
70a6cd9421 Remove untranslatable content
sav6 recently added trainer appearance editor, prior commits removed pt
translation (only official ingame translations)
2018-08-13 19:24:49 -07:00
Kurt
c3136187de Style updates 2018-08-04 10:06:06 -07:00
Kurt
3fd21db51e Style & function extracting 2018-07-29 16:39:15 -07:00
Kurt
2e88da9d3c Make BitmapAnimator usage single-object
Don't unlock/lock the GlowBase bitmap repeatedly; store the bytes
separately for frame generating. Fixes any memory access exceptions
(unlock->unlock due to program lag).
Do more preprocessing of egg glow sprites for cleaner appearance (now
glow inside sprite)

extract glow method for easier reuse
2018-07-27 19:59:14 -07:00
Kurt
c8563a3737 Respacening
Style guidelines, handle a bunch of files
no functional change
2018-07-26 19:34:27 -07:00
Kurt
c7e7011116 Fix qr crash
order of operations idk
2018-07-24 17:18:19 -07:00
Kurt
3c4ba0d52b Misc cleanup 2018-07-22 17:26:19 -07:00
Kurt
b97e967304 Misc cleanup 2018-07-22 17:14:22 -07:00
Kurt
e1365c837c Glow sprite edges
Continue using the hover frost effect on the edges too
doesn't really play well with the colorized slot image since it's 1px,
whatever.
2018-07-21 21:55:37 -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
3510d72fef Fix legal/illegal qr image sizing 2018-07-21 10:42:23 -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
c7175fbdb4 Misc reorg
bye bye SAVUtil and PKMUtil
2018-07-20 21:32:33 -07:00
Kurt
33637836f2 Ignore detected saves when displaying backups 2018-07-18 21:26:18 -07:00
Kurt
e5d95bf178 Display autodetected path location better
Autodetect location not stored in a button path will show up as "???";
check the typical homebrew autodetect paths, then display the parent
folder

eg, Path.Combine(root, "3ds", "Checkpoint", "saves");
shave off "saves" to return X:\3ds\Checkpoint

add range checks to label translation
2018-07-18 19:32:57 -07:00
Kurt
01c4ca348f Allow FolderList to be translated 2018-07-17 21:02:01 -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
cce7f34f05 Re-add 'unused' qr pattern methods
simplify out the floor operations while we're at it

should have been a func array in the base lib but whatever ;)
2018-07-15 10:57:37 -07:00
Kurt
8d89776ae9 Remove unused portions of lib 2018-07-14 21:55:26 -07:00
Kurt
fae36e2086 Add layerimage overload
transparency=1 is no opacity change
remove Rectangle use, just provide coordinates (looks to be simpler in
the .net src too)
2018-07-14 18:43:46 -07:00
Kurt
6c8374f26f Extract inner sprite building to class
any romhack maker can replace the behavior with their own builder
2018-07-14 17:53:37 -07:00
Kurt
4d73fa70d8 Simplify binding to ComboItem logic
could probably look into better binding but meh
2018-07-14 16:00:28 -07:00
Kurt
8c2b74c149 Refactoring
max IVs use flawless method directly with 6 IVs specified
move color blend/stat calc to ImageUtil
move potential string to commonedits
expose color properties for pkmeditor
don't constantly create/dispose brushes for drawing legal moves
2018-07-14 15:08:14 -07:00
Kurt
d724dffcc3 Update translations
Add secret debug hotkey to trigger update of translation files
2018-05-31 22:40:55 -07:00
Kurt
3b635be77f Flag nonparsed
removed parsedvalid/invalid, unnecessary I guess
2018-05-22 18:57:39 -07:00
Kurt
6949cf103e Add custom savefile extension support
savexts.txt if you wanna update it without recompiling

Keep in mind these are just aliases for raw data. No conversion is done,
it only allows the file to be filtered to.

Closes #1955
#1856
#1455
2018-05-21 19:12:02 -07:00
Kurt
400774595e 0 indexed -> 1 indexed
fixes regression from 2 days ago

e216c38151 (diff-37bd5b548e2b340e5c38fd0961a3eb04L165)

Thanks @ReignOfComputer for pointing this out:
https://github.com/kwsch/PKHeX/pull/1956

(also, update GetSprite since slot is 1-30; box is now -1(and below) if
not originating from a box. Now matches the legality check side
2018-05-21 18:28:54 -07:00
ReignOfComputer
a81b43cd4f Fixed Off By One Error in Single Box Dump (#1956)
Huh, how long has this been here :O
2018-05-21 18:24:29 -07:00
Kurt
05e3b3c8c3 Add switch save detection & folder browser link
use checkpoint's path
hide cgse paths if they don't exist

( ͡° ͜ʖ ͡°)
2018-05-21 18:20:08 -07:00
Kurt
0e6db90de2 more minor tweaks
add 2 overloads for encounter generator
more simplifications
2018-05-12 18:11:47 -07:00
Kurt
99005d8fc0 Refactoring
more discards & simplifications
2018-05-12 12:28:48 -07:00
Kurt
e2f11edc43 Refactoring
discards, Array.Find over FirstOrDefault
2018-05-12 08:41:29 -07:00
Kurt
5a3c8f4147 Remove trailing whitespace 2018-05-12 08:41:29 -07:00
Kurt
232427d002 Rework slot interactivity a little
decentralize some logic, individual view providers now provide the
details rather than detecting from a huge array.

#1925
2018-05-05 08:07:22 -07:00
Kurt
9fd0432c41 Reference check translatable object string
Closes #1921 by only setting the string if it is updated.
2018-05-01 18:42:56 -07:00
Kurt
cee43a3c4b Fix translating non-translatables
addnew adds a key when not found in original translation, which results
in translating to the old value when flipping back to that language. can
result in invalid values if the control is used as any data display (ie
Gender label)

https://projectpokemon.org/home/forums/topic/44926-when-i-changed-the-language-a-bug-about-gender-occurred/
2018-04-19 15:36:43 -07:00
Kurt
6ac8ed0098 Update translations
all supported langs now have all 3 translatable resources; translate
away!
2018-04-08 09:19:19 -07:00
Kurt
2acef4eaf7 Add messagestring dumper
untested, will monkey with later
2018-04-06 22:51:10 -07:00
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