Skip to content

Main character keep falling down at game start #24

@musuruan

Description

@musuruan

A bit of time has passed since the last time I tried hcl. Therefore I decided to have another go. I pulled the new sources from this repo and I tried to compile it under F33/x86_64. gcc version is 10.3.1 20210422.

I had to make @zenorogue's workaround in #21 to compile successfully.

But this was not enough. When starting the game, the character kept falling down with no screen drawn. The error "Map file was not found" was constantly printed in the terminal window.

Upon further inspection with gdb, "000a.map" and "000.map" map files couldn't be open.

This is because the stage array is not initialized.

I had to change
#include "stagedata.h"
to
#include "stagedata.c"
in src/game.c to get the correct behaviour.

I'm not sure this is the correct solution -my C days are long gone - but I wonder how it could have worked before.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions