feat: c++ pragma 방식 => protocol buffer로 직렬화 수정 및 클라이언트 python gui 앱으로 변경
This commit is contained in:
parent
a88b22b177
commit
cd192d4ec4
14 changed files with 305 additions and 371 deletions
|
|
@ -46,45 +46,3 @@ namespace GameConfig {
|
|||
const uint32_t MAX_SWORD_LEVEL = 20;
|
||||
const uint64_t INITIAL_GOLD = 10000;
|
||||
} // namespace GameConfig
|
||||
|
||||
// 고정 크기 데이터 전송을 위한 구조체 정의
|
||||
#pragma pack(push, 1)
|
||||
struct PKT_CS_Login {
|
||||
// 유저 닉네임 (최대 32자)
|
||||
char nickname[32];
|
||||
};
|
||||
|
||||
struct PKT_SC_LoginResult {
|
||||
// 0: 이미 접속 중, 1: 성공
|
||||
uint8_t result;
|
||||
};
|
||||
|
||||
struct PKT_SC_UpgradeResult {
|
||||
// 0: 파괴, 1: 성공, 2: 실패
|
||||
uint8_t result;
|
||||
// 현재 강화 레벨
|
||||
uint32_t currentLevel;
|
||||
// 현재 보유 골드
|
||||
uint64_t currentGold;
|
||||
};
|
||||
|
||||
struct PKT_SC_SellResult {
|
||||
// 판매 후 획득 골드
|
||||
uint64_t earnedGold;
|
||||
// 현재 총 골드
|
||||
uint64_t totalGold;
|
||||
};
|
||||
|
||||
struct RankingEntry {
|
||||
// 유저 이름 (최대 32자)
|
||||
char username[32];
|
||||
// 검 레벨
|
||||
uint32_t swordLevel;
|
||||
};
|
||||
|
||||
struct PKT_SC_RankingList {
|
||||
// 랭킹 리스트 개수
|
||||
uint32_t count;
|
||||
// 이후 RankingEntry[count] 만큼 데이터가 따라옴
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue