Skip to content

Commit

Permalink
Extra logging
Browse files Browse the repository at this point in the history
  • Loading branch information
cxong committed Apr 19, 2015
1 parent 9ae5e10 commit f47c79d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/cdogs/map_archive.c
Expand Up @@ -66,6 +66,7 @@ static void LoadArchivePics(
PicManager *pm, const char *archive, const char *dirname);
int MapNewLoadArchive(const char *filename, CampaignSetting *c)
{
debug(D_NORMAL, "Loading archive map %s\n", filename);
int err = 0;
json_t *root = ReadPhysFSJSON(filename, "campaign.json");
if (root == NULL)
Expand Down Expand Up @@ -175,6 +176,8 @@ static json_t *ReadPhysFSJSON(const char *archive, const char *filename)
PHYSFS_File *f = NULL;
char *buf = NULL;

debug(D_VERBOSE, "Loading physFS json %s %s\n", archive, filename);

if (!PHYSFS_addToSearchPath(archive, 0))
{
printf("Failed to add to search path. reason: %s.\n",
Expand Down Expand Up @@ -235,7 +238,7 @@ static void LoadArchiveSounds(
rc = PHYSFS_enumerateFiles(dirname);
if (rc == NULL)
{
return;
goto bail;
}

for (char **i = rc; *i != NULL; i++)
Expand Down Expand Up @@ -307,7 +310,7 @@ static void LoadArchivePics(
rc = PHYSFS_enumerateFiles(dirname);
if (rc == NULL)
{
return;
goto bail;
}

for (char **i = rc; *i != NULL; i++)
Expand Down
2 changes: 2 additions & 0 deletions src/cdogs/map_new.c
Expand Up @@ -112,6 +112,8 @@ int MapNewLoad(const char *filename, CampaignSetting *c)
{
int err = 0;

debug(D_NORMAL, "Loading map %s\n", filename);

if (IsCampaignOldFile(filename))
{
CampaignSettingOld cOld;
Expand Down
2 changes: 2 additions & 0 deletions src/mainmenu.c
Expand Up @@ -172,6 +172,8 @@ static void StartGameMode(menu_t *menu, void *data)
UNUSED(menu);
StartGameModeData *mData = data;
gCampaign.Entry.Mode = mData->GameMode;
debug(D_NORMAL, "Starting game mode %s %d\n",
mData->Entry->Path, (int)mData->GameMode);
if (!CampaignLoad(&gCampaign, mData->Entry))
{
// Failed to load
Expand Down

0 comments on commit f47c79d

Please sign in to comment.