From fa44284eab3a5f5bf4675a2e991320e9a875785c Mon Sep 17 00:00:00 2001 From: pionere Date: Sun, 26 Nov 2023 12:19:41 +0100 Subject: [PATCH] fix debug build --- Source/debug.cpp | 7 ++++--- Source/scrollrt.cpp | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Source/debug.cpp b/Source/debug.cpp index fafec33ca4c..5b1433d52d2 100644 --- a/Source/debug.cpp +++ b/Source/debug.cpp @@ -122,7 +122,8 @@ void ValidateData() cookie_t cookie = 123456; const BYTE dynData[16] = "lwkejfwip"; const BYTE (&addr)[16] = dynData; - SNetGameData gameData; + const BYTE (&addrs)[16] = dynData; + SNetGameData gameData; pkt = pktfty.make_out_packet(plr_self, net::PLR_BROADCAST, dynData, sizeof(dynData)); if (!pkt->validate()) { app_fatal("PT_MESSAGE is invalid"); @@ -138,12 +139,12 @@ void ValidateData() app_fatal("PT_JOIN_REQUEST is invalid"); } delete pkt; - pkt = pktfty.make_out_packet(net::PLR_MASTER, net::PLR_BROADCAST, cookie, plr_other, (const BYTE*)&gameData, plr_mask); + pkt = pktfty.make_out_packet(net::PLR_MASTER, net::PLR_BROADCAST, cookie, plr_other, (const BYTE*)&gameData, plr_mask, turn, addrs, sizeof(addrs)); if (!pkt->validate()) { app_fatal("PT_JOIN_ACCEPT is invalid"); } delete pkt; - pkt = pktfty.make_out_packet(plr_self, net::PLR_BROADCAST, net::PLR_MASTER, addr, sizeof(addr)); + pkt = pktfty.make_out_packet(plr_self, net::PLR_BROADCAST, net::PLR_MASTER, turn, addr, sizeof(addr)); if (!pkt->validate()) { app_fatal("PT_CONNECT is invalid"); } diff --git a/Source/scrollrt.cpp b/Source/scrollrt.cpp index f389e0cab9a..95c4391d777 100644 --- a/Source/scrollrt.cpp +++ b/Source/scrollrt.cpp @@ -583,7 +583,7 @@ static void DrawObject(int oi, int x, int y, int ox, int oy) nCel = os->_oAnimFrame; #if DEBUG_MODE - int frames = pCelBuff->ciFrameCnt; + int frames = ((CelImageBuf*)pCelBuff)->ciFrameCnt; if (nCel < 1 || frames > 50 || nCel > frames) { dev_fatal("Draw Object: frame %d of %d, type %d", nCel, frames, os->_otype); } @@ -1027,7 +1027,7 @@ static void DrawItem(int ii, int sx, int sy) } nCel = is->_iAnimFrame; #if DEBUG_MODE - int frames = pCelBuff->ciFrameCnt; + int frames = ((CelImageBuf*)pCelBuff)->ciFrameCnt; if (nCel < 1 || frames > 50 || nCel > frames) { dev_fatal("Draw Item \"%s\": frame %d of %d, type %d", is->_iName, nCel, frames, is->_itype); }