doc/classes/C64PhotoScrap.src/M000230.html in ripxplore-0.16.1 vs doc/classes/C64PhotoScrap.src/M000230.html in ripxplore-0.17.0

- old
+ new

@@ -3,16 +3,51 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> - <title>picture_height (C64PhotoScrap)</title> + <title>unpacked_bytes (C64PhotoScrap)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> - <pre><span class="ruby-comment cmt"># File lib/native_file_types/c64/C64PhotoScrap.rb, line 53</span> - <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">picture_height</span> - (<span class="ruby-identifier">contents</span>[<span class="ruby-value">1</span>]<span class="ruby-operator">+</span>(<span class="ruby-identifier">contents</span>[<span class="ruby-value">2</span>]<span class="ruby-operator">*</span><span class="ruby-value">0x100</span>)) - <span class="ruby-keyword kw">end</span></pre> + <pre><span class="ruby-comment cmt"># File lib/native_file_types/c64/C64PhotoScrap.rb, line 60</span> +<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unpacked_bytes</span> + <span class="ruby-identifier">bitmap_length</span>=(<span class="ruby-identifier">picture_width</span><span class="ruby-operator">/</span><span class="ruby-value">8</span>)<span class="ruby-operator">*</span><span class="ruby-identifier">picture_height</span> + <span class="ruby-identifier">colour_length</span>=(<span class="ruby-identifier">bitmap_length</span>)<span class="ruby-operator">/</span><span class="ruby-value">8</span> + + <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@unpacked_bytes</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">then</span> + <span class="ruby-ivar">@unpacked_bytes</span>=<span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">bitmap_length</span><span class="ruby-operator">+</span><span class="ruby-identifier">colour_length</span>) + <span class="ruby-identifier">in_p</span>=<span class="ruby-value">3</span> + <span class="ruby-identifier">out_p</span>=<span class="ruby-value">0</span> + <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">in_p</span><span class="ruby-operator">&lt;</span><span class="ruby-identifier">contents</span>.<span class="ruby-identifier">length</span>) <span class="ruby-keyword kw">do</span> + <span class="ruby-identifier">count</span>=<span class="ruby-identifier">contents</span>[<span class="ruby-identifier">in_p</span>] + <span class="ruby-identifier">in_p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span> + <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">count</span> + <span class="ruby-keyword kw">when</span> <span class="ruby-value">00</span><span class="ruby-operator">..</span><span class="ruby-value">127</span> <span class="ruby-keyword kw">then</span> + <span class="ruby-identifier">repeat</span>=<span class="ruby-identifier">count</span> + <span class="ruby-identifier">b</span>=<span class="ruby-identifier">contents</span>[<span class="ruby-identifier">in_p</span>] + <span class="ruby-identifier">in_p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span> + <span class="ruby-identifier">repeat</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> + <span class="ruby-ivar">@unpacked_bytes</span>[<span class="ruby-identifier">out_p</span>]=<span class="ruby-identifier">b</span> + <span class="ruby-identifier">out_p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span> + <span class="ruby-keyword kw">end</span> + <span class="ruby-keyword kw">when</span> <span class="ruby-value">128</span><span class="ruby-operator">..</span><span class="ruby-value">220</span> <span class="ruby-keyword kw">then</span> + <span class="ruby-identifier">repeat</span>=<span class="ruby-identifier">count</span><span class="ruby-operator">-</span><span class="ruby-value">128</span> + <span class="ruby-identifier">repeat</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> + <span class="ruby-identifier">b</span>=<span class="ruby-identifier">contents</span>[<span class="ruby-identifier">in_p</span>] + <span class="ruby-identifier">in_p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span> + <span class="ruby-ivar">@unpacked_bytes</span>[<span class="ruby-identifier">out_p</span>]=<span class="ruby-identifier">b</span> + <span class="ruby-identifier">out_p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span> + <span class="ruby-keyword kw">end</span> + <span class="ruby-keyword kw">when</span> <span class="ruby-value">221</span><span class="ruby-operator">..</span><span class="ruby-value">225</span> <span class="ruby-keyword kw">then</span> + <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;BIGCOUNT not implemented yet&quot;</span> + <span class="ruby-keyword kw">end</span> + <span class="ruby-keyword kw">end</span> +<span class="ruby-comment cmt"># puts &quot;#{filename} #{in_p} #{out_p} of #{bitmap_length} #{count} #{picture_width}x#{picture_height}&quot;</span> + + <span class="ruby-keyword kw">end</span> + <span class="ruby-keyword kw">return</span> [<span class="ruby-ivar">@unpacked_bytes</span>[<span class="ruby-value">0</span>,<span class="ruby-identifier">bitmap_length</span>],<span class="ruby-ivar">@unpacked_bytes</span>[<span class="ruby-identifier">bitmap_length</span>,<span class="ruby-identifier">colour_length</span>]] + +<span class="ruby-keyword kw">end</span></pre> </body> </html> \ No newline at end of file