<?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>transform | Learn C Games Programming Blog</title>
	<atom:link href="https://learncgames.com/tag/transform/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>Thu, 16 Apr 2020 12:07:15 +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>transform | 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>Two bugs on Raspi &#8211; one fixed</title>
		<link>https://learncgames.com/two-bugs-on-raspi-one-fixed/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=two-bugs-on-raspi-one-fixed</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Wed, 22 Apr 2020 23:00:59 +0000</pubDate>
				<category><![CDATA[bugs]]></category>
		<category><![CDATA[raspberry-pi]]></category>
		<category><![CDATA[Techniques]]></category>
		<category><![CDATA[transform]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=441</guid>

					<description><![CDATA[<p>As always bugs are the fault of the creator and mea culpa (my bad!). I can trace this back to my conversion from the Windows source to the Ubuntu version. This line in LoadMask int numread = fread_s(mask, sizeofmask, sizeofmask, 1, fmask); Became this line in the Ubuntu version. int numread = fread(mask, sizeofmask, sizeofmask, [&#8230;]</p>
The post <a href="https://learncgames.com/two-bugs-on-raspi-one-fixed/">Two bugs on Raspi – one fixed</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<p><img fetchpriority="high" decoding="async" class="alignleft size-medium wp-image-445" src="https://learncgames.com/wp-content/uploads/2020/04/asteroids-300x280.png" alt="asteroids screenshot" width="300" height="280" srcset="https://learncgames.com/wp-content/uploads/2020/04/asteroids-300x280.png 300w, https://learncgames.com/wp-content/uploads/2020/04/asteroids.png 363w" sizes="(max-width: 300px) 100vw, 300px" />As always bugs are the fault of the creator and mea culpa (my bad!). I can trace this back to my conversion from the Windows source to the Ubuntu version. This line in LoadMask</p>
<pre><code class="language-cpp" data-line="">int numread = fread_s(mask, sizeofmask, sizeofmask, 1, fmask);</code></pre>
<p>Became this line in the Ubuntu version.</p>
<pre><code class="language-cpp" data-line="">int numread = fread(mask, sizeofmask, sizeofmask, fmask);</code></pre>
<p>But should have been this instead.</p>
<pre><code class="language-c" data-line="">int numread = fread(mask, sizeofmask, 1, fmask);</code></pre>
<p>It affected numread and failed just on the masks/am2.msk load.<br />
The other bug only applies on Raspberry Pi 4 and is a limitation of the implementation of SDL2 texture size.<br />
One of the asteroids graphics is 6720 x 280 and the error it returns is <em>Textures can&#8217;t be bigger than 4096&#215;4096</em>.</p>
<p>What is odd that it works on a Raspberry Pi 3B+ but not on the 4 which has 4 GB of RAM. Anyway I&#8217;m writing a program to transform the graphics from 24 x 1 shapes to 12 x 2. So the 280 x 280 shape file will be 3360 x 560. This will affect the player ship and all asteroids and need a slight change to the DrawPlayerShip() and DrawAsteroids() functions.</p>The post <a href="https://learncgames.com/two-bugs-on-raspi-one-fixed/">Two bugs on Raspi – one fixed</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">441</post-id>	</item>
	</channel>
</rss>
