From fa139cbcf8a9afacdcd56be2468dd9a0ff6f0b76 Mon Sep 17 00:00:00 2001
From: nattthebear <goyuken@gmail.com>
Date: Thu, 21 May 2020 19:24:50 -0400
Subject: [PATCH] lynx and wonderswan compile

At least one of these is in need of upstream updates, so maybe we waterbox them, maybe we don't
---
 waterbox/nyma/Interfaces.cpp | 13 +++++++++++++
 waterbox/nyma/common/zlib.h  |  4 ++++
 waterbox/nyma/lynx.mak       |  6 ++++++
 waterbox/nyma/wswan.mak      |  6 ++++++
 4 files changed, 29 insertions(+)
 create mode 100644 waterbox/nyma/common/zlib.h
 create mode 100644 waterbox/nyma/lynx.mak
 create mode 100644 waterbox/nyma/wswan.mak

diff --git a/waterbox/nyma/Interfaces.cpp b/waterbox/nyma/Interfaces.cpp
index 21aaf82fbc..cccbd49b14 100644
--- a/waterbox/nyma/Interfaces.cpp
+++ b/waterbox/nyma/Interfaces.cpp
@@ -4,6 +4,7 @@
 #include "mednafen/src/settings.h"
 #include "mednafen/src/mempatcher.h"
 #include "mednafen/src/mednafen-driver.h"
+#include "mednafen/src/player.h"
 
 namespace Mednafen
 {
@@ -85,4 +86,16 @@ namespace Mednafen
 	{
 		return nullptr;
 	}
+
+	// player.h
+	void Player_Init(int tsongs, const std::string &album, const std::string &artist, const std::string &copyright, const std::vector<std::string> &snames, bool override_gi)
+	{}
+	void Player_Draw(MDFN_Surface *surface, MDFN_Rect *dr, int CurrentSong, int16 *samples, int32 sampcount)
+	{}
+}
+
+// zlib.h
+uint32_t crc32(uint32_t crc, unsigned const char *buf, size_t len)
+{
+	return 0;
 }
diff --git a/waterbox/nyma/common/zlib.h b/waterbox/nyma/common/zlib.h
new file mode 100644
index 0000000000..3cdaf2bd48
--- /dev/null
+++ b/waterbox/nyma/common/zlib.h
@@ -0,0 +1,4 @@
+#pragma once
+
+// TODO: See how much zlib anything actually needs
+uint32_t crc32(uint32_t crc, unsigned const char *buf, size_t len);
diff --git a/waterbox/nyma/lynx.mak b/waterbox/nyma/lynx.mak
new file mode 100644
index 0000000000..c3e93935c9
--- /dev/null
+++ b/waterbox/nyma/lynx.mak
@@ -0,0 +1,6 @@
+include common.mak
+
+SRCS += \
+	$(call cppdir,lynx)
+
+include ../common.mak
diff --git a/waterbox/nyma/wswan.mak b/waterbox/nyma/wswan.mak
new file mode 100644
index 0000000000..cf8f10e93d
--- /dev/null
+++ b/waterbox/nyma/wswan.mak
@@ -0,0 +1,6 @@
+include common.mak
+
+SRCS += \
+	$(filter-out %debug.cpp,$(call cppdir,wswan))
+
+include ../common.mak