<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>byte | Learn C Games Programming Blog</title>
	<atom:link href="https://learncgames.com/tag/byte/feed/" rel="self" type="application/rss+xml" />
	<link>https://learncgames.com</link>
	<description>A blog about C, programming games and my ebook(s).</description>
	<lastBuildDate>Sun, 29 Mar 2020 12:27:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://learncgames.com/wp-content/uploads/2020/03/cropped-favicon-32x32.png</url>
	<title>byte | Learn C Games Programming Blog</title>
	<link>https://learncgames.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">181446779</site>	<item>
		<title>Another Windows vs Linux Difference</title>
		<link>https://learncgames.com/another-windows-vs-linux-difference/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=another-windows-vs-linux-difference</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Sun, 05 Apr 2020 23:00:34 +0000</pubDate>
				<category><![CDATA[Source code]]></category>
		<category><![CDATA[syntax]]></category>
		<category><![CDATA[byte]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=315</guid>

					<description><![CDATA[<p>Once I reached the masks section in chapter 38, I found my C code that I&#8217;d copied from Windows failed because of the type byte. MSVC is a little bit more forgiving over somethings and one of those is the byte type which it accepts.  In the Windows code, I had declared the mask arrays [&#8230;]</p>
The post <a href="https://learncgames.com/another-windows-vs-linux-difference/">Another Windows vs Linux Difference</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<figure id="attachment_317" aria-describedby="caption-attachment-317" style="width: 300px" class="wp-caption alignleft"><img decoding="async" class="size-medium wp-image-317" src="https://learncgames.com/wp-content/uploads/2020/03/Byte45flip-300x129.png" alt="Bytes" width="300" height="129" srcset="https://learncgames.com/wp-content/uploads/2020/03/Byte45flip-300x129.png 300w, https://learncgames.com/wp-content/uploads/2020/03/Byte45flip.png 454w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-317" class="wp-caption-text">Image From Wikimedia Commons</figcaption></figure>
<p>Once I reached the masks section in chapter 38, I found my C code that I&#8217;d copied from Windows failed because of the type byte. MSVC is a little bit more forgiving over somethings and one of those is the byte type which it accepts.  In the Windows code, I had declared the mask arrays like this:</p>
<pre><code class="language-c" data-line="">byte bulletmask[1][3][3];
byte plmask[24][64][64];
byte a1mask[24][280][280];
byte a2mask[24][140][140]; 
byte a3mask[24][70][70];
byte a4mask[24][35][35];
</code></pre>
<p>But Clang in its wisdom barfed at that, not recognising the type byte. A simple fix was replace byte with char and all was well.</p>
<p>Looking into it, I loaded one of the Windows asteroids projects, built it and then did a ctrl-click on the <em>byte</em> type. It led me to a file called rpcndr.h in a Windows SDK folder and this line (191) of code.</p>
<pre><code class="language-c" data-line="">typedef unsigned char byte;</code></pre>
<p>It just shows!  My er bad&#8230;</p>The post <a href="https://learncgames.com/another-windows-vs-linux-difference/">Another Windows vs Linux Difference</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">315</post-id>	</item>
	</channel>
</rss>
