Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Nov 11, 2023
1 parent c854190 commit bf14764
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/common/objects/dobjgc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@
// Cost of destroying an object
#define GCDESTROYCOST 15

void DumpThePlayer();

// TYPES -------------------------------------------------------------------

class FAveragizer
Expand Down Expand Up @@ -465,6 +467,7 @@ static void SweepDone()

static size_t SingleStep()
{
DumpThePlayer();
switch (State)
{
case GCS_Pause:
Expand Down
14 changes: 14 additions & 0 deletions source/core/mainloop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,20 @@ static uint64_t stabilitystarttime = 0;

DCorePlayer* PlayerArray[MAXPLAYERS];

void DumpThePlayer()
{
auto p = PlayerArray[7];
if (!p) return;
auto l = p->GetClass()->Size;
uint8_t* bp = (uint8_t*)p;
for (unsigned i = 0; i < l; i++)
{
Printf("%02x ", bp[i]);
if (i % 16 == 15) Printf("\n");
}
}


IMPLEMENT_CLASS(DCorePlayer, true, true)
IMPLEMENT_POINTERS_START(DCorePlayer)
IMPLEMENT_POINTER(actor)
Expand Down
12 changes: 12 additions & 0 deletions source/games/duke/src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ IMPLEMENT_POINTER(dummyplayersprite)
IMPLEMENT_POINTER(newOwner)
IMPLEMENT_POINTERS_END

CCMD(argh)
{
Printf("actorsqu = %d", (int)myoffsetof(DDukePlayer, actorsqu));
Printf("wackedbyactor = %d", (int)myoffsetof(DDukePlayer, wackedbyactor));
Printf("on_crane = %d", (int)myoffsetof(DDukePlayer, on_crane));
Printf("holoduke_on = %d", (int)myoffsetof(DDukePlayer, holoduke_on));
Printf("somethingonplayer = %d", (int)myoffsetof(DDukePlayer, somethingonplayer));
Printf("access_spritenum = %d", (int)myoffsetof(DDukePlayer, access_spritenum));
Printf("dummyplayersprite = %d", (int)myoffsetof(DDukePlayer, dummyplayersprite));
Printf("newOwner = %d", (int)myoffsetof(DDukePlayer, newOwner));
}

size_t DDukePlayer::PropagateMark()
{
for (auto& var : uservars)
Expand Down

0 comments on commit bf14764

Please sign in to comment.