Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212)

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
This commit is contained in:
BruebachL 2025-10-09 07:36:12 +02:00 committed by GitHub
parent be1403c920
commit 1ef07309d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
605 changed files with 3812 additions and 3408 deletions

View file

@ -1,9 +1,6 @@
#include "abstract_card_item.h"
#include "../../database/card_database.h"
#include "../../database/card_database_manager.h"
#include "../../picture_loader/picture_loader.h"
#include "../../settings/cache_settings.h"
#include "../../interface/card_picture_loader/card_picture_loader.h"
#include "../game_scene.h"
#include <QCursor>
@ -11,6 +8,9 @@
#include <QGraphicsSceneMouseEvent>
#include <QPainter>
#include <algorithm>
#include <libcockatrice/card/card_database/card_database.h>
#include <libcockatrice/card/card_database/card_database_manager.h>
#include <libcockatrice/settings/cache_settings.h>
AbstractCardItem::AbstractCardItem(QGraphicsItem *parent, const CardRef &cardRef, Player *_owner, int _id)
: ArrowTarget(_owner, parent), id(_id), cardRef(cardRef), tapped(false), facedown(false), tapAngle(0),
@ -119,11 +119,11 @@ void AbstractCardItem::paintPicture(QPainter *painter, const QSizeF &translatedS
if (facedown || cardRef.name.isEmpty()) {
// never reveal card color, always paint the card back
PictureLoader::getCardBackPixmap(translatedPixmap, translatedSize.toSize());
CardPictureLoader::getCardBackPixmap(translatedPixmap, translatedSize.toSize());
} else {
// don't even spend time trying to load the picture if our size is too small
if (translatedSize.width() > 10) {
PictureLoader::getPixmap(translatedPixmap, exactCard, translatedSize.toSize());
CardPictureLoader::getPixmap(translatedPixmap, exactCard, translatedSize.toSize());
if (translatedPixmap.isNull())
paintImage = false;
} else {