The server tree of https://code.moenext.com/nanahira/ygopro.git, branch server, commit 52c868ce071ea0f2fcb0cf39bf2fb4151d12b90c, stock: gframe/, premake5.lua, .ci/, LICENSE, and gframe/ygopro.rc + .ico (upstream keeps them in resource/ and copies them in before building). No game assets, no scripts, no ocgcore submodule: the core is ../core. The third-party sources upstream's Windows CI downloads are vendored here at the positions its premake expects, each with its premake fragment from upstream's premake/ folder inside it: lua 5.4.8, sqlite 3.53.3, libevent 2.1.13-stable (tests, samples and autotools helpers left out; the files its Windows prebuild copies into include/ left out), zlib 1.3.2 (contrib and examples left out), xz 5.8.3 (src/liblzma + src/common only), and irrlicht 1.9 from mycard at 20f86d25: include/ plus the source/Irrlicht headers and the 11 .cpp files the server's zip reader project compiles. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
120 lines
2.7 KiB
C++
120 lines
2.7 KiB
C++
#ifndef DECK_CON_H
|
|
#define DECK_CON_H
|
|
|
|
#include <string>
|
|
#include <unordered_map>
|
|
#include <vector>
|
|
#include <random>
|
|
#include <irrlicht.h>
|
|
|
|
namespace ygo {
|
|
|
|
struct DeckLayout {
|
|
float mul{1.0f};
|
|
float cw{44.0f}, ch{64.0f};
|
|
// Main deck
|
|
float dy{68.0f};
|
|
float dx{0.0f};
|
|
int lx{10};
|
|
int rows{4};
|
|
float left{0.0f}, top{0.0f};
|
|
// Pack mode
|
|
bool pack_scroll{false};
|
|
int pack_scroll_pos{0};
|
|
// Extra deck
|
|
float ex_dx{0.0f}, ex_left{0.0f}, ex_top{0.0f}, ex_bot{0.0f};
|
|
int ex_lx{0};
|
|
// Side deck
|
|
float sd_dx{0.0f}, sd_left{0.0f}, sd_top{0.0f}, sd_bot{0.0f};
|
|
int sd_lx{0};
|
|
// Search panel
|
|
float sr_row_h{66.0f};
|
|
float sr_top_px{165.0f};
|
|
};
|
|
|
|
struct CardDataC;
|
|
struct LFList;
|
|
|
|
class DeckBuilder: public irr::IEventReceiver {
|
|
public:
|
|
DeckBuilder();
|
|
bool OnEvent(const irr::SEvent& event) override;
|
|
void Initialize();
|
|
void Terminate();
|
|
void GetHoveredCard();
|
|
void FilterCards();
|
|
int GetSearchResultMaxVisible() const;
|
|
void StartFilter();
|
|
void ClearFilter();
|
|
void InstantSearch();
|
|
void ClearSearch();
|
|
void SortList();
|
|
|
|
void RefreshDeckList();
|
|
void RefreshReadonly(int catesel);
|
|
void RefreshPackListScroll();
|
|
void ChangeCategory(int catesel);
|
|
void ShowDeckManage();
|
|
void ShowBigCard(int code, float zoom);
|
|
void ZoomBigCard(irr::s32 centerx = -1, irr::s32 centery = -1);
|
|
void CloseBigCard();
|
|
|
|
bool push_main(const CardDataC* pointer, int seq = -1);
|
|
bool push_extra(const CardDataC* pointer, int seq = -1);
|
|
bool push_side(const CardDataC* pointer, int seq = -1);
|
|
void pop_main(int seq);
|
|
void pop_extra(int seq);
|
|
void pop_side(int seq);
|
|
bool check_limit(const CardDataC* pointer);
|
|
|
|
unsigned long long filter_effect{};
|
|
unsigned int filter_type{};
|
|
unsigned int filter_type2{};
|
|
unsigned int filter_attrib{};
|
|
unsigned int filter_race{};
|
|
unsigned int filter_atktype{};
|
|
int filter_atk{};
|
|
unsigned int filter_deftype{};
|
|
int filter_def{};
|
|
unsigned int filter_lvtype{};
|
|
unsigned int filter_lv{};
|
|
unsigned int filter_scltype{};
|
|
unsigned int filter_scl{};
|
|
unsigned int filter_marks{};
|
|
int filter_lm{};
|
|
irr::core::vector2di mouse_pos;
|
|
int hovered_code{};
|
|
int hovered_pos{};
|
|
int hovered_seq{ -1 };
|
|
int is_lastcard{};
|
|
int click_pos{};
|
|
bool is_draging{};
|
|
bool is_starting_dragging{};
|
|
int dragx{};
|
|
int dragy{};
|
|
int bigcard_code{};
|
|
float bigcard_zoom{};
|
|
size_t pre_mainc{};
|
|
size_t pre_extrac{};
|
|
size_t pre_sidec{};
|
|
const CardDataC* draging_pointer{};
|
|
int prev_category{};
|
|
int prev_deck{};
|
|
irr::s32 prev_operation{};
|
|
int prev_sel{ -1 };
|
|
bool is_modified{};
|
|
bool readonly{};
|
|
bool showing_pack{};
|
|
DeckLayout layout{};
|
|
std::mt19937 rnd;
|
|
|
|
const LFList* filterList{};
|
|
std::vector<const CardDataC*> results;
|
|
wchar_t result_string[8]{};
|
|
std::vector<std::wstring> expansionPacks;
|
|
};
|
|
|
|
}
|
|
|
|
#endif //DECK_CON_H
|