Mercury233
b9e1089f8e
add import/export deck code ( #2577 )
2025-06-18 14:58:05 +08:00
salix5
471c2134a3
Read player names, deck & check script path on OpenReplay ( #2776 )
2025-05-17 08:53:06 +08:00
salix5
50d5877f9f
fix DeckManager::SaveDeck ( #2775 )
2025-05-04 16:43:10 +08:00
Mercury233
9350f5d693
add myfopen, fix setlocale ( #2713 )
2025-04-21 10:08:00 +08:00
Mercury233
ccf3398d15
add FileSystem::RemoveFile ( #2760 )
2025-04-21 10:06:27 +08:00
salix5
fd189e5c8c
DeckManager: use uint32_t code ( #2739 )
...
* fix LoadLFListSingle
* update LoadDeck, LoadSide
* rename to LoadDeckFromStream
* update CTOS_DeckData
* static member function
2025-03-29 10:44:21 +08:00
salix5
56f5fd4ba9
use unsigned hash in CheckDeck ( #2736 )
2025-03-19 09:55:35 +08:00
salix5
b2a50ac0a9
fix namespace irr::io
2025-03-14 19:10:07 +08:00
salix5
6c53d02a2b
use <cstdlib> functions ( #2720 )
...
* replace exit
* replace malloc, calloc
* replace strtol
* #include <cstdlib>
2025-03-13 17:26:44 +08:00
salix5
d06a9096fd
rename: GetLFListContent -> GetLFList ( #2715 )
...
* update DeckManager::GetLFListContent
* change DeckBuilder::filterList into const LFList*
* update Game::DrawThumb
* rename: GetLFListContent -> GetLFList
* update the signature of DeckManager::GetLFListName
* change code to unsigned
2025-03-08 15:22:53 +08:00
salix5
118f951bc1
set errno before strtol ( #2705 )
2025-02-28 22:17:34 +08:00
salix5
9d4496f79c
DeckManager: fix LoadLFListSingle, LoadDeck (std::istringstream) ( #2699 )
...
* fix DeckManager::LoadLFListSingle
* fix DeckManager::LoadDeck (std::istringstream)
* typos
* fix conversion
* workaround
2025-02-28 17:52:34 +08:00
salix5
6d6213ae7f
fix DeckManager::LoadDeck(Deck& deck, ( #2697 )
...
* use default constructor
* fix DeckManager::LoadDeck(Deck& deck,
2025-02-23 11:07:58 +08:00
salix5
148c76806e
DeckManager: update GetDeckFile LoadCurrentDeck ( #2694 )
...
* update DeckManager::GetDeckFile
* update reference
* update DeckManager::LoadCurrentDeck
* update reference
* clean header in deck_manager.h
2025-02-22 14:21:02 +08:00
Mercury233
6bcc96d222
rename myfopen to mywfopen ( #2691 )
...
* use fopen in DataManager::ReadScriptFromFile
* rename myfopen to mywfopen
* use std namespace
---------
Co-authored-by: salix5 <salix5566@gmail.com >
2025-02-22 10:54:31 +08:00
salix5
cfe114f4e5
replace fprintf
2025-02-22 10:37:38 +08:00
salix5
c675547122
replace snprintf, sscanf
2025-02-22 10:37:38 +08:00
salix5
f5955f854f
replace fopen, fclose, fgets
2025-02-22 10:37:38 +08:00
salix5
f82fd91216
fix bounds checking in DeckManager::LoadLFListSingle ( #2685 )
2025-02-21 15:02:15 +08:00
salix5
ad9a70691e
fix DeckManager::CheckDeck ( #2656 )
...
* fix DeckManager::CheckDeck
* use MAX_CARD_ID
2025-01-31 17:09:58 +08:00
salix5
b57b331b65
move struct CardDataC, deck sort functions to data_manager.h ( #2647 )
...
* move struct CardDataC to data_manager.h
* update struct CardDataC
* move deck sort functions to DataManager
* update DeckBuilder::filter_effect
2025-01-14 13:25:16 +08:00
salix5
bb6ef1e1e6
static member DataManager::FileSystem ( #2644 )
2025-01-11 20:32:03 +08:00
salix5
aaa1d3cf9d
fix ScriptReader ( #2642 )
...
* fix ScriptReader
* increase scriptBuffer
* fix DeckManager::LoadCurrentDeck
2025-01-04 19:34:48 +08:00
salix5
f2278ae751
use vector rbegin ( #2628 )
...
* use vector rbegin
* const reference
* use vector assign
* minor update
* init
2024-12-06 23:50:39 +08:00
salix5
7721bfe017
remove NULL ( #2626 )
2024-12-04 23:19:51 +08:00
salix5
48d53cda9f
use wchar_t name in myfopen
2024-11-30 13:22:13 +08:00
salix5
b22ff21ace
use macro _WIN32
2024-11-16 15:50:01 +08:00
salix5
48b01b838c
remove wcscpy, wcscat ( #2602 )
...
* use wcsncpy
* fix FileSystem::TraversalDir
* avoid wcscat
* remove wcscat
* add BufferIO::CopyWideString
* struct Config: path string changed to wchar_t[256]
* Revert "use wcsncpy"
This reverts commit b05e0c96a3 .
* check lastcategory, lastdeck
* fix Game::LoadConfig
max length of filename should be determined by file system
* remove wcscpy
* use BufferIO::CopyWideString
* fix UpdateDeck
* myfilesystem: use std functions
* DataManager: fix GetNumString (#2603 )
* DataManager: fix FormatAttribute, FormatRace
* update FormatAttribute, FormatRace
* DataManager: fix FormatType
* update FormatType
* DataManager: fix FormatSetName
* DataManager: fix FormatLinkMarker
* merge
* DataManager: fix GetNumString
* rebuild class ustring16 from edopro version
* add stringw conversion
core::stringw in current version does not have data()
* add CGUITTFont::drawUstring
* use drawUstring
* update DrawShadowText
* fix Game::lpcstring
* fix DuelInfo::vic_string
* add PACK_MAX_SIZE
* add IsExtension (#2604 )
* CGUITTFont: use override
* ustring16: only accept basic_string
2024-11-06 08:34:12 +08:00
salix5
a8ccdbb107
add wrapper function myfopen ( #2582 )
...
* add wrapper function myfopen
* open file with myfopen
2024-09-08 21:52:57 +08:00
salix5
2dd2263c44
use <cstring> functions ( #2580 )
2024-08-18 03:14:02 +08:00
salix5
848348ca9c
deckManager: add LoadCurrentDeck, SaveDeckBuffer ( #2571 )
...
* update LoadDeck from int array
* update LoadDeck from std::istringstream
* reorder
* rename to LoadCurrentDeck
* akways clear current_deck in LoadCurrentDeck
* reorder
* change LoadDeck from std::istringstream
* set errorcode for TYPE_TOKEN
* use LoadDeck in export deck
* update LoadSide
* fix CheckDeck
* fix LoadLFListSingle
* minor fix
* add SaveDeckBuffer
* fix LoadSide
* update LoadDeck(Deck&, std::istringstream&
2024-08-11 05:06:08 +08:00
salix5
080d7781f0
clean config.h ( #2568 )
...
* move header files to game.h
* include mutex when necessary
* include myfilesystem.h when necessary
* include thread when necessary
* include string
* include GL when necessary
* remove #pragma once
* rename guard macro to YGOPRO_CONFIG_H
* fix warning C4456, C4458
* move GL to game.h
* use <cstring> functions
* include <wchar.h>
2024-08-11 05:05:20 +08:00
salix5
790252e650
check sizeof deckBuffer in LoadDeck ( #2564 )
...
* Revert "fix"
This reverts commit 51aa89407b .
* check sizeof deckBuffer in LoadDeck
* clear current_deck when selecting a wrong file
2024-06-18 16:54:59 +08:00
salix5
cc91dc81ee
verify the source of BufferIO::CopyWStr ( #2558 )
...
* verify the source of BufferIO::CopyWStr
* add BufferIO::NullTerminate
* use MAX_STRING_ID
* use constant
* use constant
2024-06-09 11:00:08 +08:00
Nanahira
05cf9c9832
allow 9-digit code for lflist ( #2556 )
...
This is very popular in custom card or rush duel communities. So we have to change it back.
2024-06-02 14:34:19 +08:00
salix5
e209e77502
disconnect when the packet is too large ( #2551 )
...
* use memcpy in DuelClient, NetServer
* NetServer: discard too large packet
* DuelClient: discard too large packet
* replace memcpy with std::memcpy
* disconnect when the packet is too large
* check packet_len
* check len in HandleCTOSPacket()
* check len in HandleSTOCPacketLan()
* remove bool type in HostInfo
* check len in packet handling
* add boundary check to STOC_CHAT packet
* use memcpy in DuelMode::JoinGame
* add DECK_MAX_SIZE, DECK_MIN_SIZE
* fix DuelMode::UpdateDeck()
* fix
* fix Manager::OpenDeckFile()
* update DuelMode init
* update DuelMode::JoinGame
* update DuelMode::GetResponse
* Revert "check len in packet handling"
This reverts commit 2b5c12f360 .
* use memcpy in GetPosition
* check struct size by static_assert
* update DuelMode::UpdateDeck
* check if the struct is trivially copyable
* replace unsigned short to uint16_t
* replace unsigned int to uint32_t
* add padding member to STOC_HS_PlayerEnter
* workaround: use STOC_HS_PlayerEnter_size
2024-05-31 21:52:06 +08:00
salix5
0761407162
use std::memcpy in class Replay ( #2549 )
...
* use std::memcpy in class Replay
* remove pointer casting
2024-05-21 15:34:10 +08:00
salix5
7de2a00db6
check return value of sscanf() ( #2532 )
...
* check return value of sscanf()
* enable_log: default value 0x3
* replace atoi() with strtol()
* update LoadLFListSingle()
* set enable_log to unsigned bit field
2024-05-07 03:50:21 +08:00
salix5
b719d306c1
zero initialize ( #2534 )
...
* DeckBuilder zero initialize
* DeckManager zero initialize
2024-04-23 18:00:43 +08:00
salix5
4297cb3ef6
DataManager: change _datas to private
2024-01-10 16:42:07 +08:00
Mercury233
fed41b69c3
update showing pack lists ( #2434 )
2022-09-22 10:45:51 +08:00
Mercury233
c0bb37190a
update Simplified Chinese ot rule ( #2368 )
2021-09-02 15:56:33 +08:00
Mercury233
f934b83a79
Deck category and deck manage ( #2187 )
2021-03-21 11:24:47 +00:00
DailyShana
949f8d2379
fix client_card_sort
...
to satisfy strict weak ordering
2020-01-16 19:21:35 +08:00
Nanahira
ec70129b8d
fix incorrect side deck check
2020-01-06 13:56:26 +08:00
DailyShana
d0abf5580f
update struct LFList
...
use std::wstring and std::unordered_map directly
2019-07-28 12:48:57 +08:00
DailyShana
9238d44ea8
add a file system wrapper
...
modified from ygopro2 branch
2018-11-04 17:02:04 +08:00
purerosefallen
8f435ab421
sort loading lflist
2018-11-03 06:33:36 +08:00
DailyShana
9d5e8b8489
fix
2018-11-02 10:02:50 +08:00
purerosefallen
70589a8f2e
add expansions lflist support
2018-04-12 19:07:01 +08:00