NetBSD Source Changes · @netbsdsrc
24 followers · 4823 posts · Server mstdn.social
Tom Forsyth · @TomF
3369 followers · 5064 posts · Server mastodon.gamedev.place

@JoshJers You can do 95% of this with a header file per API and a bunch of . The last 5% is always tricky of course - you always seem to end up with some HLSL sections - honestly that's probably the sweet spot anyway. To "fix" those, you start basically writing your own shader compiler for your own custom language, and that's a lot of work.

#defines #ifdef

Last updated 1 year ago

NetBSD Source Changes · @netbsdsrc
24 followers · 4714 posts · Server mstdn.social

sys/arch/amiga/dev: afsc.c

andvar: remove empty DEBUG block.

cvsweb.netbsd.org/bsdweb.cgi/s

#ifdef

Last updated 1 year ago

NetBSD Source Changes · @netbsdsrc
24 followers · 4687 posts · Server mstdn.social

sys/dev/pci: if_wm.c

msaitoh: Fix WM_DEBUG code in wm_gmii_i82544_{read,write}reg_locked.

cvsweb.netbsd.org/bsdweb.cgi/s

#ifdef

Last updated 1 year ago

although, I suppose with careful engine design (and probably a ton of 's), the same game could use Allegro 4 on DOS and Allegro 5 on modern platforms

#ifdef

Last updated 1 year ago

蟻玉葱 · @ant_onion
357 followers · 50573 posts · Server mstdn.jp

@AnamesonCraft ソースが冒頭のコメント化された設定と の嵐でその辺をちょちょっといじってコンパイルすれば…

#ifdef

Last updated 1 year ago

Larry (Mr. Prototype) · @fast_code_r_us
330 followers · 938 posts · Server floss.social

@Unixbigot RAM usage is mostly up to you; the framebuffer is always optional. The code size has grown pretty large with the inclusion of e-paper support. I've been thinking about ways of breaking it into optional parts to cut down on the size. I will work on that in the near future so that an can be used to disable code that you're not using. Part of the bulk is the inclusion of the Print class from Arduino. It's nice to have, but quite bulky.

#ifdef

Last updated 1 year ago

Wolf480pl · @wolf480pl
1098 followers · 35871 posts · Server mstdn.io

@nytpu how about sth like this once in some header

_WINDLL
DLLEXPORT __declspec(dllexport)

DLLEXPORT

And then you just

DLLEXPORT
int
eventHandler(...)

#ifdef #define #else #endif

Last updated 1 year ago

Koakuma · @koakuma
292 followers · 32793 posts · Server uwu.social

__cplusplus
"pls no cplusplus i want fast compiles ;_;"

#endif #error #ifdef

Last updated 1 year ago

David Mankins · @lain_7
118 followers · 1320 posts · Server tldr.nettime.org

@rifkin @jef

I used to start quickie C programs with:

----------------------------
notdef
gcc $0 -o $(basename $0 .c)
exit $?

int main....

---------------------------

Then I could compile by saying "sh foo.c"

This was especially useful if the compile line was complicated (e.g., the C program required linking with special libraries or something).

(Actually I used back-quotes instead of $(....), but this phone doesn't have back-quote on this keyboard.)

#ifdef #endif

Last updated 1 year ago

Alecu Ștefan-Iulian :verified: · @alecui
184 followers · 1798 posts · Server qoto.org

@netbsd your hardening measures are different from OpenBSD or FreeBSD or Linux’s measures. Don’t I need to have guards everywhere essentially for code that directly interfaces with the OS? Unless there’s something I’m misunderstanding

#ifdef

Last updated 1 year ago

NetBSD Foundation 🚩 · @netbsd
1207 followers · 225 posts · Server mastodon.sdf.org

@alecui There are some good general software engineering practies to follow!

- Use a build system that supports feature detection, and use it frequently. Minimal use of in code. Remember, there's more than just BSD and Linux too.

- General good portability practices: you would be surprised how much software uses -Werror by default :(

#ifdef #illumos

Last updated 1 year ago

Giles Goat · @gilesgoat
257 followers · 1342 posts · Server toot.wales

@psychicparrot42 Well it does involve quite some BANANA as a matter of isolating/having alternative bits of code .. it also sometime involve to intentionally do something "wrong" to see if the code reacts "properly" to a "wrong" and/or crashes terribly ( via BANANA ). It's a method where you start "simplifying to the bone" some complex code re-activating bits going from less to more complex until you understood how all works at least the point you need to make it work ( CONT )

#ifdef

Last updated 1 year ago

NetBSD Source Changes · @netbsdsrc
23 followers · 3480 posts · Server mstdn.social

sys/arch/hp300/include: intr.h

riastradh: hp300/intr.h: Put most of this under _KERNEL.

cvsweb.netbsd.org/bsdweb.cgi/s

#ifdef

Last updated 1 year ago

Foone🏳️‍⚧️ · @foone
28376 followers · 4316 posts · Server digipres.club

you can just smell the

#ifdef

Last updated 1 year ago

Travis Gockel · @tgockel
81 followers · 62 posts · Server hachyderm.io

Everyone is okay with ` MACRO`, but nobody likes ` defined MACRO`, they all want ` defined(MACRO)`.

#ifdef #if

Last updated 1 year ago

Foone🏳️‍⚧️ · @foone
27442 followers · 3682 posts · Server digipres.club

I love finding a function in a game that is literally just
void func(const char*){
}

No body. But it's called from 440 different places in the exe.

you can just smell the DEBUGMODE in the binary

#ifdef

Last updated 1 year ago

SASANO Takayoshi · @uaa
61 followers · 1615 posts · Server social.mikutter.hachune.net

CONFIG_MACH_SUN50I_H616
SUNXI_DRAM_COM_BASE 0x047FA000
SUNXI_DRAM_CTL0_BASE 0x047FB000
SUNXI_DRAM_PHY0_BASE 0x04800000

#ifdef #define #endif

Last updated 1 year ago

tatmius(タミアス) · @tatmius
90 followers · 2925 posts · Server social.vivaldi.net

Cpythonの_io modulesのfileio.c、` MS_WINDOWS`ってあるけど、そもそも_iomodules.cの中で同じ条件で処理分けてるから、そのブロック実行されんくない....?ってなってる。わからん。

#ifdef

Last updated 1 year ago

Foone🏳️‍⚧️ · @foone
27204 followers · 3126 posts · Server digipres.club

sometimes you can just see the shadow of the that wasn't defined.
Every frame, Wheel of Fortune (and Jeopardy) checks to see if PackageAppInterface->bScreenCapRequested is set to true.
and if it is, a function is called, which turns it back off. And does nothing else.

#ifdef

Last updated 1 year ago