Commit graph

122 commits

Author SHA1 Message Date
Fabio Bas
881cea27f4 Rework the way sets selection/importing works; fix #539 (rebased) 2015-04-18 18:47:09 +02:00
Fabio Bas
eb6d067a21 Speed up deck editor filtering
* card: cache simpleName for each card
 * deck editor: remove double comparation of searched term with card
name when sorting
2015-04-15 23:21:44 +02:00
Fabio Bas
0a366d7564 Fix #67
Workaround the two remaining issues, mostly fixing the “load deck”
screen in tab_game:
 * Only preload up to the first 300 cards of a deck;
 * don’t even bother trying to load card images if they’ll be shown
with width <= 10

Trying a 17k cards deck like the one proposed in #67 is still a no go,
mostly due to the cpu time used to create all the objects. Anyway, i
tested decks up to 8k cards and they works fine now (if you like to
wait while trice is loading them)..
2015-04-04 14:03:22 +02:00
Fabio Bas
b5b7ad8958 Startup: fix resetting card database to default
The check was inverted. LoadStatus::Ok = 0, so only when
db->loadCardDatabase() returns 0 we know the card database path is
correct
2015-03-30 12:28:13 +02:00
Fabio Bas
70b047adcb Fix #745 2015-02-16 21:25:56 +01:00
Gavin Bises
7893ab086f Fix broken cmc parsing from cards.xml
I don't know why this even compiled
2015-01-29 13:32:17 -05:00
Gavin Bises
e2fe25735b Parse cmc from json and store in cards.xml 2015-01-28 20:28:38 -05:00
Fabio Bas
2101ed7096 Merge remote-tracking branch 'upstream/master' into pixmap_memory_2nd_attempt
Conflicts:
	cockatrice/src/dlg_settings.cpp
	cockatrice/src/dlg_settings.h
2015-01-05 22:46:12 +01:00
Michael Callahan
3a0c86938c Clean up a small pile of compiler warnings. 2014-12-30 15:54:38 -07:00
Fabio Bas
f88621fd97 Use QPixmapCache for card images
Drop CardInfo’s own pixmap caches; use QPixmapCache instead.
Use QPixmap references instead of pointers.
Being stored in QPixmapCache, all card images are now subjected to
QPixmapCache’s size limit
2014-12-24 16:18:55 +01:00
Fabio Bas
2704523c73 Merge branch 'master' into set_extinfo 2014-11-26 11:45:51 +01:00
Mitchell Rosen
93ab9f9691 Add 'Start time' column to game list 2014-11-22 00:06:13 -08:00
Fabio Bas
ac43fa23b9 Better handle the TK set used for tokens
Let oracle add a basic TK set in cards.xml
Unify all the code previously using the string literal “TK”
2014-11-19 19:44:54 +01:00
Fabio Bas
cb37073828 Oracle: fetch release date and set type
and save them in cards.xml
2014-11-10 16:22:46 +01:00
Fabio Bas
fc1d06e13b Add fallback urls for cards without a muId set
We only have a good HQ source for them; any idea on a low-quality
source?
2014-11-10 00:23:41 +01:00
Fabio Bas
4b8ac99370 Corrected spacing 2014-11-08 15:52:04 +01:00
Fabio Bas
8ca0b96d10 Rework the picture download behavior
Should fix #412
2014-11-08 15:08:49 +01:00
Gavin Bisesi
a26d4078cc Revert "Find cards by prefix" 2014-10-14 11:28:30 -04:00
Gavin Bisesi
6810ae46d6 Merge pull request #260 from Mawu3n4/master
Find cards by prefix
2014-10-09 11:29:02 -04:00
Gavin Bisesi
006451f402 Merge pull request #238 from arxanas/no-overwrite-tokens-xml
Fix #231: tokens.xml no longer overwritten by cards.xml.
2014-10-06 11:34:58 -04:00
Peng Liu
a83e6cdf48 Removed unused variable, bool stripped, from classes and functions. 2014-08-11 13:47:47 -04:00
Peng Liu
781460d6ac Cockatrice can now load images both with and without .full. Will need to clean-up bool stripped (used to determine .full suffix inclusion). 2014-08-11 04:37:00 -04:00
Mawu3n4
d55f6fdec1 fix: show card only found once by prefix 2014-08-08 14:24:29 +02:00
Daenyth
765e865aa2 Continue downloading card images after failing url on one.
I should probably bust this out to a method.
2014-08-08 09:33:38 +02:00
Daenyth
42f1c6938f Merged: First draft of better pic url error handling
Cherry-picked b9cb61abd05f83c67740aafa5e1e6939143547e4
2014-08-08 09:33:35 +02:00
Fabio Bas
bba8184d37 Fix off by one 2014-08-07 23:14:57 +02:00
Fabio Bas
88dfea8ece Don't save card pictures if we don't have a proper set name for it 2014-08-07 23:14:50 +02:00
Fabio Bas
3bce98e3a9 Fix crashes trying to load the picture of a card with no <set> 2014-08-07 23:14:41 +02:00
Waleed Khan
ffc5b59fec Fix #258: Dashes to spaces. 2014-08-07 12:29:20 -04:00
Mawu3n4
10ab53c4ac fix: find by prefix if card not found only 2014-08-07 17:43:14 +02:00
Waleed Khan
c0d4669088 Merge remote-tracking branch 'upstream/master' into no-overwrite-tokens-xml
Conflicts:
	cockatrice/src/carddatabase.cpp
2014-08-07 11:06:41 -04:00
Dibe Zackaria
9092f2298b fix: remove auto 2014-08-06 20:27:04 +02:00
Dibe Zackaria
e8abd6eb63 fix: typo 2014-08-06 20:13:59 +02:00
Mawu3n4
7d190ddaf7 fix: pushed old version 2014-08-06 18:01:47 +02:00
Mawu3n4
621a47de9c add: find token cards by prefix 2014-08-06 17:54:47 +02:00
Fabio Bas
6502a182e8 Support loading of files with wrong extension
Like M15’s .png that cockatrice wrongly saved as .jpg
Additionally, move the QImageReader declaration outside of the inner
loop
2014-08-06 09:31:22 +02:00
Peng Liu
4bb1d28ae7 Removed the QLists for determining image format. Instead, using QImageReader, both when downloading/saving and when loading, to determine the correct format (Cockatrice now supports all QImageReader-supported formats).
Image loading still uses one for loop to iterate through the QList of paths to folders in which to search for images.
2014-08-05 14:54:40 -04:00
Peng Liu
8587b8c349 Refactored the magic bytes into two QLists: one containing a list of QStrings representing the supported extensions, the other containing a list of QByteArrays representing the magic bytes in hex.
Refactored the image loading loop to be two nested for loops: the outer loop iterating through the QList of paths to folders in which to search for images and the inner loop iterating through the QList of supported extensions.
2014-08-05 03:48:30 -04:00
Peng Liu
75122c3c9d Switched back to using QFile instead of QImage for saving as QImage's save function adds overhead to the file size, leaving me unsure whether the original image is affected. 2014-08-04 17:01:58 -04:00
Peng Liu
387086cb4c Added support for PNG images (both for downloading/saving and loading). 2014-08-04 16:43:57 -04:00
Gavin Bisesi
ffed0e00fe Merge pull request #214 from pliu037/master
Added better support for custom card images
2014-07-31 13:42:57 -04:00
Waleed Khan
9ba5d7968e Stop clobbering tokens.xml tokens; don't let Oracle read tokens into cards.xml. 2014-07-29 23:46:04 -04:00
Waleed Khan
8df7e9f164 Fix #231: tokens.xml no longer overwritten by cards.xml. 2014-07-27 20:55:47 -04:00
Fabio Bas
9e12c5b2d4 Use custom picUrl if picUrlHq is not defined 2014-07-27 22:06:35 +02:00
pliu037
c3a68fcbd3 Cleaned up some lines of code 2014-07-27 12:47:05 -04:00
Fabio Bas
aa225f8df7 Add back support for custom picture urls in cards.xml 2014-07-26 23:36:51 +02:00
Gavin Bisesi
a50e7ba936 Merge pull request #156 from arxanas/master
Fix #45: don't send tokens to deckstats.
2014-07-23 08:41:15 -04:00
Waleed Khan
40e97140d6 Merge remote-tracking branch 'upstream/master'
Conflicts:
	cockatrice/src/carddatabase.cpp
2014-07-23 00:49:13 -04:00
Waleed Khan
2a5aa06881 Æ now actually works with the case-insensitive tags. 2014-07-22 20:58:38 -04:00
Waleed Khan
aff32e0f56 Ignore diacritics as well.
So [card]jotun grunt[/card] works as well as [card]Jötun Grunt[/card].
Also I removed some debugging information I accidentally left in.
2014-07-20 21:20:50 -04:00