shithub: cstory

Download patch

ref: 676b0f5894a183254eae96f03d05f811305ee36b
parent: a26f4b4bce273d36825a3bcf201e0c6cd904de80
author: Clownacy <Clownacy@users.noreply.github.com>
date: Mon Jan 28 09:08:41 EST 2019

Misc Linux fixes

--- a/src/PixTone.cpp
+++ b/src/PixTone.cpp
@@ -152,7 +152,7 @@
 		const int v2 = (int)(uint64_t)pitchOffset % 256;
 
 		//Input data
-		data[i] = envelopeTable[(unsigned __int64)((long double)(i << 8) / pxtData[1])]
+		data[i] = envelopeTable[(uint64_t)((long double)(i << 8) / pxtData[1])]
 			* (pxtData[4]
 				* gWaveModelTable[(size_t)pxtData[2]][a]
 				/ 0x40
@@ -167,7 +167,7 @@
 		long double newMainOffset;
 		if (gWaveModelTable[(size_t)pxtData[6]][v2] >= 0)
 			newMainOffset = (mainFreq * 2)
-			* (long double)gWaveModelTable[(size_t)pxtData[6]][(signed int)(unsigned __int64)pitchOffset % 256]
+			* (long double)gWaveModelTable[(size_t)pxtData[6]][(signed int)(uint64_t)pitchOffset % 256]
 			* pxtData[8]
 			/ 64.0
 			/ 64.0
--- a/src/Sound.h
+++ b/src/Sound.h
@@ -1,4 +1,5 @@
 #pragma once
+#include <stddef.h>
 #include <stdint.h>
 
 class SOUNDBUFFER
--