Commit Graph

365 Commits

Author SHA1 Message Date
Mercury233 488e66c5a4 fix face-down MSG_SPSUMMONING (#2896) 2025-08-15 17:06:47 +08:00
Mercury233 6181208392 minor typos (#2890) 2025-07-30 09:47:25 +08:00
salix5 42a427a4fa use function template BufferIO::Read (#2835) 2025-07-06 13:18:46 +08:00
Nanahira 632dd98ce9 add CTOS_EXTERNAL_ADDRESS (#2832) 2025-06-29 17:41:05 +08:00
Mercury233 e7ebb75fa0 update forced in MSG_SELECT_CHAIN (#2797) 2025-06-29 17:40:43 +08:00
Mercury233 f4db575058 update MSG_CONFIRM_CARDS, add skip_panel (#2470) 2025-06-29 17:39:57 +08:00
Nanahira 4922ba5738 display side deck count in "banished zone" before duel start (#2790) 2025-06-19 14:36:41 +08:00
salix5 b3482765e4 fix: seeding std::mt19937 with only 1 uint32_t (#2820) 2025-06-18 15:47:55 +08:00
salix5 456f27564e fix STOC_CHAT, CTOS_CHAT handling (#2836) 2025-06-14 16:39:00 +08:00
salix5 56b65a1e69 change RNG except shuffle in duel to std::mt19937 (#2827) 2025-06-14 15:26:15 +08:00
Nanahira bfcb4afcdb add miniaudio (#2727) 2025-05-09 13:34:36 +08:00
yybbwc 4da80f72f9 fix prev button for replay of puzzle mode (#2716) 2025-05-01 08:21:36 +08:00
Mercury233 5d5e7f9c4f update grave_act and so on to support opponent (#2712) 2025-03-17 17:39:59 +08:00
salix5 b5bf7990e9 replace irr::s32, irr::u32 2025-03-14 19:10:07 +08:00
salix5 bb72c00f56 replace irr::core::vector3df 2025-03-14 19:10:07 +08:00
salix5 006d973d19 replace irr::core::rect<s32> 2025-03-14 19:10:07 +08:00
salix5 194608f8f0 replace irr::core::recti 2025-03-14 19:10:07 +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 dc5a305301 use <ctime> header (#2668) 2025-02-12 16:26:38 +08:00
Nanahira 937c214bf3 client MSG_SELECT_SUM: cancellable & better display (#2643)
* client MSG_SELECT_SUM: cancellable & better display

* fix
2025-02-08 16:12:47 +08:00
salix5 ad9a70691e fix DeckManager::CheckDeck (#2656)
* fix DeckManager::CheckDeck

* use MAX_CARD_ID
2025-01-31 17:09:58 +08:00
salix5 53d951c7d1 update signature of ClientCard::SetCode (#2655)
* update signature of ClientCard::SetCode

* ClientField: fix AddCard, RemoveCard

* minor fix

* use int counter variable
2025-01-28 05:35:26 +08:00
salix5 8682f411e0 Revert "use std array in NetServer::ServerEchoRead (#2648)" (#2653)
This reverts commit d7cf1187df.
2025-01-24 09:13:30 +08:00
salix5 d376ed0e65 use <cwchar> function (#2651) 2025-01-17 19:50:59 +08:00
salix5 d7cf1187df use std array in NetServer::ServerEchoRead (#2648) 2025-01-13 19:52:00 +08:00
salix5 18a801c059 update DuelClient::ClientAnalyze (#2645)
* update ClientAnalyze

* move STOC_GAME_MSG header to network.h
2025-01-12 17:41:55 +08:00
salix5 56247c6d71 tweak ServerEchoRead, ClientRead (#2636)
* tweak ServerEchoRead, ClientRead

* fix warning
2024-12-17 23:13:12 +08:00
salix5 fb4580f93d Patch1 (#2635)
* update include in network.h

* format
2024-12-15 15:15:24 +08:00
salix5 4ef45c84ec update DuelClient (#2634) 2024-12-14 19:29:20 +08:00
salix5 1e1b0da828 DuelClient: move protected members to private (#2630)
* DuelClient: move protected members to private

* use intptr_t
2024-12-07 20:39:47 +08:00
salix5 7721bfe017 remove NULL (#2626) 2024-12-04 23:19:51 +08:00
salix5 7e1c4b7560 check second_code in is_declarable() (#2625) 2024-12-03 21:07:01 +08:00
salix5 51929625b3 BufferIO: add CopyCharArray (#2616)
array length is determined by reference to array
2024-11-16 11:51:18 +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 ec69bb11eb update buffer size (#2586) 2024-08-31 17:36:30 +08:00
salix5 2dd2263c44 use <cstring> functions (#2580) 2024-08-18 03:14:02 +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 bb82764e0b Use local variable in ServerEchoRead, ClientRead (#2562)
* use local var in ServerEchoRead, ClientRead

* zero init in GetResponse
2024-06-18 16:54:48 +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
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
Mercury233 0a7a4745f7 add STOC_TEAMMATE_SURRENDER (#2548) 2024-05-21 15:17:32 +08:00
Mercury233 b7dcae4ef1 change side chat drawing (#2545)
* fix CGUITTFont lineBreak

* change side chat drawing

* fix

* fix

* update normal chat

* less changement

* fix
2024-05-11 09:55:47 +08:00
Nanahira 1b1fb66437 fix chat player name display (#2542)
* fix after change side chat reverse

* fix

* fix

* fix

* Update replay_mode.cpp

* fix tag

* simplify

* fix
2024-05-07 16:13:39 +08:00
salix5 b290125977 Use BufferIO::ReadUInt8 (#2537)
* change code, location, position to unsigned

* change code, location, postion to unsigned

* use ReadUInt8() for 1-byte data

* Game::LocalPlayer() returns 0, 1

* wrong matching

* change card code to unsigned
2024-05-02 21:59:41 +08:00
salix5 31bd9394da remove warning 4267 (#2529) 2024-04-21 20:46:54 +08:00
salix5 4315ef4657 remove type BOOL 2024-03-21 17:26:45 +08:00
salix5 2491768e8d add boundary check to network buffer (#2517)
* fix warning

* add boundary check to network buffer

* update submodule
2024-03-12 02:52:18 +08:00
salix5 e3155746c5 fix: check response size before writing (#2514)
* update DuelClient::response_buf[]

* fix: check response size before writing
2024-02-14 04:03:07 +08:00
salix5 203011d5cb fix DuelInfo.Clear() 2023-12-20 23:40:41 +08:00
salix5 e082f6e0f3 add DuelInfo.Clear() 2023-12-19 16:36:52 +08:00