Skip to content

Commit

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

void DumpThePlayer();

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

Expand Down
2 changes: 1 addition & 1 deletion source/common/objects/dobjgc.h
Original file line number Diff line number Diff line change
Expand Up @@ -322,4 +322,4 @@ namespace GC

#define Printmark(p) Printf("%s %d %p\n", __FILE__, __LINE__, p); Printf("---> %s\n", p ? p->GetClass()->TypeName.GetChars() : "");

void DumpThePlayer();
void DumpThePlayer(int i = 7);
4 changes: 2 additions & 2 deletions source/core/mainloop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ static uint64_t stabilitystarttime = 0;

DCorePlayer* PlayerArray[MAXPLAYERS];

void DumpThePlayer()
void DumpThePlayer(int pl)
{
auto p = PlayerArray[7];
auto p = PlayerArray[pl];
Printf("%p\n", p);
if (!p) return;
auto l = p->GetClass()->Size;
Expand Down
7 changes: 6 additions & 1 deletion source/games/duke/src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,13 @@ void GameInterface::app_init()
// Initialise player array.
for (unsigned i = 0; i < MAXPLAYERS; i++)
{
PlayerArray[i] = Create<DDukePlayer>(i);
auto pl = Create<DDukePlayer>(i);
PlayerArray[i] = pl;
Printf("Player %d\n", i);
DumpThePlayer(i);
GC::WriteBarrier(PlayerArray[i]);
Printf("Player %d b\n", i);
DumpThePlayer(i);
}
DumpThePlayer();

Expand Down

0 comments on commit 6c94f72

Please sign in to comment.