rapiz1 / DungeonRush

👾🐍 A opensource game inspired by Snake, written in pure C with SDL
GNU General Public License v3.0
2k stars 294 forks source link

add debian os support, and convert to 16 bit that my linux could sup… #2

Closed zjsxwc closed 4 years ago

zjsxwc commented 4 years ago

改了下代码能让我在deepin下编译后运行, 以及把win.wav音频编码转换成16位音频,貌似我sdl不能支持24位的wav音频

rapiz1 commented 4 years ago

I think the failure of compilation is caused by the difference of the default standard used by different gcc. I'd like to change Makefile rather than hardcode the constants. Could you please try compile with -std=c99? Change the line in your Makefile to this:

CFLAGS = -g -Wall -std=c99
zjsxwc commented 4 years ago

I think the failure of compilation is caused by the difference of the default standard used by different gcc. I'd like to change Makefile rather than hardcode the constants. Could you please try compile with -std=c99? Change the line in your Makefile to this:

CFLAGS = -g -Wall -std=c99

l get the same error as before, when i compile with -std=c99 option.

rapiz1 commented 4 years ago

I can compile it without errors on Arch Linux. At a later time, I will test it on Ubuntu and consider how we handle the constants.

zjsxwc commented 4 years ago

I can compile it without errors on Arch Linux. At a later time, I will test it on Ubuntu and consider how we handle the constants.

I removed the code in my new commit. It seems that the constants SCREEN_FPS and SCREEN_TICKS_PER_FRAME are not used in the project.

And maybe your compiler is smart enough to auto remove the unused code, so you could compile it without errors.

rapiz1 commented 4 years ago

I can compile it without errors on Arch Linux. At a later time, I will test it on Ubuntu and consider how we handle the constants.

I removed the code in my new commit. It seems that the constants SCREEN_FPS and SCREEN_TICKS_PER_FRAME are not used in the project.

And maybe your compiler is smart enough to auto remove the unused code, so you could compile it without errors.

😲 You're right. In the late stage of the development, I use SDL2 flag SDL_RENDERER_PRESENTVSYNC to capture the FPS so they are no longer needed. Thanks for your contribution.