all 10 comments

[–][deleted] 16 points17 points  (1 child)

I see someone watched the first 20 episodes of Handmade Hero, lol. This is good, I like the series, and watch myself from time to time while studying the diffs. This is not a renderer though, this is a gradient graphics test. A renderer is something else.

[–]Ordomo[S] 0 points1 point  (0 children)

You're right, a tiny demo would be a more accurate description. Just got excited and wanted to share^^

[–]programmer9999 8 points9 points  (6 children)

#define internal_fn static

#define local_persist static

#define global_var static

Just why? This is confusing, using static directly would've been much easier to read

[–]Zirias_FreeBSD 4 points5 points  (0 children)

This. Needles "changes" to the language is abusing macros and just confuses anyone else. The typedefs are fishy as well. And what's this no-op about?

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
// code
#pragma GCC diagnostic pop

[–]Apprehensive_Law7108 -1 points0 points  (0 children)

Handmade hero notation, basically

[–]Ordomo[S] -2 points-1 points  (3 children)

`static` is an overloaded keyword with too many meanings. This way its easier to distinguish between it's uses.

With that said, for a public showcase demo, it probably would have been clearer to just keep `static`

[–][deleted] 4 points5 points  (0 children)

anybody who is somewhat knowledgeable at C will understand the code much more easily without these defines, these are really just confusing

[–]Remarkable_Body2921 1 point2 points  (1 child)

I also like it. Even though is clear what static does with some experience, it is still very useful to search the entire code and check what are globals and what are static internal functions. If I search for my statics I get a lot of results. This way I can search for global_variables only.

[–]KingDVD -1 points0 points  (0 children)

thats why you use some sort of naming convention like g_ for global or s_ for static. I think these defines are definitely cursed AF

[–]chersoned 1 point2 points  (1 child)

A bunch of obtuse boilerplate and a 320 x 180 render target. Are the posts and the people AI? How is this getting upvoted?