skoperst / deadly-dave Goto Github PK
View Code? Open in Web Editor NEWAn open source remake of Dangerous Dave, A 1988 DOS game.
License: GNU General Public License v3.0
An open source remake of Dangerous Dave, A 1988 DOS game.
License: GNU General Public License v3.0
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.