Daivuk / PureDOOM

Pure DOOM - Single Header Doom Source Port
GNU General Public License v2.0
288 stars 23 forks source link

clean up doom_get_framebuffer code #18

Closed ColleagueRiley closed 7 months ago

ColleagueRiley commented 7 months ago

You repeat code if there are 3 or 4 channels, this can be easily reduced. Also, you don't need the redundant else because it would've returned by then anyway.

Daivuk commented 7 months ago

This needs to be rebased and squashed

ColleagueRiley commented 7 months ago

Sure, I would like to work out the issues first.

ColleagueRiley commented 7 months ago

My bad, it should be doom_memset not memset. Honestly, I don't know why you're using functions for this instead of macros It would be so much easier for everyone.

eg.

ifndef DOOM_MALLOC

define DOOM_MALLOC free

define DOOM_FREE free

endif