shithub: zelda3

Download patch

ref: d3ab969a0be5e37fe46887d3f0830fb12fb1a14a
parent: afc7f9b313f2399acd82aef69af3a06b9cbc4c94
author: Stefan Sperling <stspdotname@users.noreply.github.com>
date: Sun Mar 5 18:09:00 EST 2023

skip definition of inline swap16() function in case a macro already exists (#175)

Fixes the build on OpenBSD.

--- a/types.h
+++ b/types.h
@@ -63,7 +63,9 @@
 #define DWORD(x) (*(uint32*)&(x))
 #define XY(x, y) ((y)*64+(x))
 
+#ifndef swap16
 static inline uint16 swap16(uint16 v) { return (v << 8) | (v >> 8); }
+#endif
 
 typedef struct Point16U {
   uint16 x, y;