From 29e4ec4ef180163aaa0c54fcd5333cf319a70c7d Mon Sep 17 00:00:00 2001 From: obligaron Date: Sun, 12 Jun 2022 23:21:55 +0200 Subject: [PATCH] Move delta structs to msg.cpp --- Source/msg.cpp | 45 +++++++++++++++++++++++++++++++++++++++++++++ Source/msg.h | 43 ------------------------------------------- 2 files changed, 45 insertions(+), 43 deletions(-) diff --git a/Source/msg.cpp b/Source/msg.cpp index 2fc0ae500..fa8d0dff1 100644 --- a/Source/msg.cpp +++ b/Source/msg.cpp @@ -54,6 +54,51 @@ struct TMegaPkt { } }; +#pragma pack(push, 1) +struct DMonsterStr { + uint8_t _mx; + uint8_t _my; + Direction _mdir; + uint8_t _menemy; + uint8_t _mactive; + int32_t _mhitpoints; + int8_t mWhoHit; +}; + +struct DObjectStr { + _cmd_id bCmd; +}; + +struct DLevel { + TCmdPItem item[MAXITEMS]; + DObjectStr object[MAXOBJECTS]; + DMonsterStr monster[MAXMONSTERS]; +}; + +struct LocalLevel { + uint8_t automapsv[DMAXX][DMAXY]; +}; + +struct DPortal { + uint8_t x; + uint8_t y; + uint8_t level; + uint8_t ltype; + uint8_t setlvl; +}; + +struct MultiQuests { + quest_state qstate; + uint8_t qlog; + uint8_t qvar1; +}; + +struct DJunk { + DPortal portal[MAXPORTAL]; + MultiQuests quests[MAXMULTIQUESTS]; +}; +#pragma pack(pop) + #define MAX_CHUNKS (NUMLEVELS + 4) uint32_t sgdwOwnerWait; diff --git a/Source/msg.h b/Source/msg.h index 1d07bd27b..4a341862b 100644 --- a/Source/msg.h +++ b/Source/msg.h @@ -728,49 +728,6 @@ struct TPkt { TPktHdr hdr; byte body[493]; }; - -struct DMonsterStr { - uint8_t _mx; - uint8_t _my; - Direction _mdir; - uint8_t _menemy; - uint8_t _mactive; - int32_t _mhitpoints; - int8_t mWhoHit; -}; - -struct DObjectStr { - _cmd_id bCmd; -}; - -struct DLevel { - TCmdPItem item[MAXITEMS]; - DObjectStr object[MAXOBJECTS]; - DMonsterStr monster[MAXMONSTERS]; -}; - -struct LocalLevel { - uint8_t automapsv[DMAXX][DMAXY]; -}; - -struct DPortal { - uint8_t x; - uint8_t y; - uint8_t level; - uint8_t ltype; - uint8_t setlvl; -}; - -struct MultiQuests { - quest_state qstate; - uint8_t qlog; - uint8_t qvar1; -}; - -struct DJunk { - DPortal portal[MAXPORTAL]; - MultiQuests quests[MAXMULTIQUESTS]; -}; #pragma pack(pop) struct TBuffer {