matt-hayward / olcPGEX_AnimatedSprite

Easily use animated sprites in the OLC Pixel Game Engine
22 stars 4 forks source link

README.md example usage of olc::Renderable won't compile #25

Open Moros1138 opened 3 years ago

Moros1138 commented 3 years ago

README.md gives code example that won't compile

The Following:

    olc::Renderable spritesheet = new olc::Renderable();
    spritesheet.Load("spritesheet.png");

Should be:

    olc::Renderable* spritesheet = new olc::Renderable();
    spritesheet->Load("spritesheet.png");

To Reproduce Steps to reproduce the behavior:

  1. View README.md
  2. Attempt to use the example code regarding olc::Renderable
  3. Attempt to compile.
  4. Watch fail.

Expected behavior Compile without error.

Screenshots Screenshot not required.

Desktop (please complete the following information):

Additional context If Sal were here, he'd be displeased.

matt-hayward commented 3 years ago

Thanks for the heads up - I'll get it updated in the next few days; alternatively, feel free to make a PR ;)