Coder Social home page Coder Social logo

deadly-dave's People

Contributors

moon3point14 avatar skoperst avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

deadly-dave's Issues

Thank you for making this

I was looking for a perfect clone of Dave to make a meme with the inter-level "Good Luck! Only X more to go!" message. Building with SDL2 on Windows was bit difficult, but now I know how to do that.

Basically it showed an error

game.c: In function 'start_gameloop':
game.c:792:59: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=]
             snprintf(level_path, 4096, "res/levels/level%ld.ddt", game->level);

which I fixed by typecasting game->level to (long)game->level

and also

C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x2e): undefined reference to 'WinMain'
collect2.exe: error: ld returned 1 exit status
mingw32-make: *** [Makefile:14: all] Error 1

This one was a bit tricky. I had to change the main() to remove the command line arguments, but that would not match the prototype declared in SDL_main().

I had to fix it by adding #define SDL_MAIN_HANDLED before #include<SDL.h>

Also I found a bug in the game:

When finishing a level, it literally says "Good Luck! Only X more to go!" instead of the number of levels remaining. Please fix that.
Thanks again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.