fragglet / sdl-sopwith

Classic bi-plane shoot-'em up
https://fragglet.github.io/sdl-sopwith
GNU General Public License v2.0
66 stars 13 forks source link

Port to SDL2 #1

Closed fragglet closed 1 year ago

fragglet commented 2 years ago

The codebase still depends on SDL 1.2, which is long obsolete. Transitioning to SDL2 should allow several nice enhancements, such as arbitrary window scaling using hardware acceleration.

fragglet commented 2 years ago

Now done, although there are some improvements that can still be made

slicer69 commented 1 year ago

On this topic, I found the new version of Sopwith (2.0.0) doesn't compile for me anymore on Debian 11, due to a missing linker flag (-lm) in the src/Makefile.

There are a few ways to fix this. I did a quick and dirty edit of src/Makefile.am and changed the line:

 sopwith_LDADD = sdl/libsdlsopwith.a @SDL_LIBS@ sdl/libsdlsopmain.a

to this:

  sopwith_LDADD = sdl/libsdlsopwith.a @SDL_LIBS@ sdl/libsdlsopmain.a -lm

Which added "-lm" to the linker flags and allowed Sopwith to build. There is probably a more elegant way to insert this flag, but this was my quick hack to get 2.0.0 compiling.