doc/classes/C64GeoPaintPic.src/M000414.html in ripxplore-0.11.0 vs doc/classes/C64GeoPaintPic.src/M000414.html in ripxplore-0.12.0
- old
+ new
@@ -3,64 +3,16 @@
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title>unpacked_picture_bytes (C64GeoPaintPic)</title>
+ <title>picture_format (C64GeoPaintPic)</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/C64GeoPaintPic.rb, line 27</span>
-<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unpacked_picture_bytes</span>
- <span class="ruby-identifier">bitmap_lines</span>=[]
- <span class="ruby-identifier">colour_map</span>=[]
- (<span class="ruby-identifier">record_nos</span><span class="ruby-operator">-</span>[<span class="ruby-value">0</span>]).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">record_no</span><span class="ruby-operator">|</span>
-<span class="ruby-comment cmt"># puts "record #{record_no}"
</span>
- <span class="ruby-identifier">record</span>=<span class="ruby-ivar">@contents</span>[<span class="ruby-identifier">record_no</span>]
- <span class="ruby-identifier">line</span>=<span class="ruby-value str">""</span>
- <span class="ruby-identifier">p</span>=<span class="ruby-value">0</span>
- <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">p</span><span class="ruby-operator"><</span><span class="ruby-identifier">record</span>.<span class="ruby-identifier">length</span> <span class="ruby-keyword kw">do</span>
- <span class="ruby-identifier">b</span>=<span class="ruby-identifier">record</span>[<span class="ruby-identifier">p</span>]
-<span class="ruby-comment cmt"># puts "byte %02x code %02x" % [p,b]
</span>
- <span class="ruby-identifier">p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>
- <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">b</span>
- <span class="ruby-keyword kw">when</span> (<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">0x3</span><span class="ruby-constant">F</span>) <span class="ruby-keyword kw">then</span>
-<span class="ruby-comment cmt"># puts "copy $#{"%02x" % b} bytes"
</span>
- <span class="ruby-identifier">b</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span>
- <span class="ruby-identifier">line</span><span class="ruby-operator"><<</span><span class="ruby-identifier">record</span>[<span class="ruby-identifier">p</span>].<span class="ruby-identifier">chr</span>
- <span class="ruby-identifier">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">0x40</span><span class="ruby-operator">..</span><span class="ruby-value">0x7</span><span class="ruby-constant">F</span>) <span class="ruby-keyword kw">then</span>
- <span class="ruby-identifier">pattern</span>=<span class="ruby-identifier">record</span>[<span class="ruby-identifier">p</span>,<span class="ruby-value">8</span>]
- <span class="ruby-identifier">rep_count</span>=<span class="ruby-identifier">b</span> <span class="ruby-operator">%</span> <span class="ruby-value">0x40</span>
-<span class="ruby-comment cmt"># puts "pattern rep count $#{"%02x" % rep_count}"
</span>
- <span class="ruby-identifier">p</span><span class="ruby-operator">+=</span><span class="ruby-value">8</span>
- <span class="ruby-identifier">line</span><span class="ruby-operator"><<</span><span class="ruby-identifier">pattern</span><span class="ruby-operator">*</span><span class="ruby-identifier">rep_count</span>
- <span class="ruby-keyword kw">when</span> (<span class="ruby-value">0x80</span><span class="ruby-operator">..</span><span class="ruby-value">0xff</span>) <span class="ruby-keyword kw">then</span>
- <span class="ruby-identifier">rep_count</span>=<span class="ruby-identifier">b</span> <span class="ruby-operator">-</span> <span class="ruby-value">0x80</span>
-<span class="ruby-comment cmt"># puts "copy $#{"%02x" % rep_count} bytes"
</span>
- <span class="ruby-identifier">b</span>=<span class="ruby-identifier">record</span>[<span class="ruby-identifier">p</span>]
- <span class="ruby-identifier">b</span> = <span class="ruby-value">0</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">nil?</span>
- <span class="ruby-identifier">rep_count</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span>
- <span class="ruby-identifier">line</span><span class="ruby-operator"><<</span><span class="ruby-identifier">b</span>.<span class="ruby-identifier">chr</span>
- <span class="ruby-keyword kw">end</span>
- <span class="ruby-identifier">p</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>
- <span class="ruby-keyword kw">else</span>
- <span class="ruby-identifier">raise</span> <span class="ruby-node">"invalid code byte #{b}"</span>
- <span class="ruby-keyword kw">end</span>
- <span class="ruby-keyword kw">end</span>
- <span class="ruby-identifier">raise</span> <span class="ruby-node">"malformed line (length was #{line.length}) at record ##{record_no}"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">>=</span><span class="ruby-value">1448</span>
-
-<span class="ruby-comment cmt"># puts "line length was #{line.length}) at record ##{record_no}"
</span>
-
- <span class="ruby-identifier">bitmap_lines</span>[(<span class="ruby-identifier">record_no</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>)<span class="ruby-operator">*</span><span class="ruby-value">2</span>]=<span class="ruby-identifier">line</span>[<span class="ruby-value">0</span>,<span class="ruby-value">640</span>]
- <span class="ruby-identifier">bitmap_lines</span>[<span class="ruby-value">1</span><span class="ruby-operator">+</span>(<span class="ruby-identifier">record_no</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>)<span class="ruby-operator">*</span><span class="ruby-value">2</span>]=<span class="ruby-identifier">line</span>[<span class="ruby-value">640</span>,<span class="ruby-value">640</span>]
-
- <span class="ruby-identifier">colour_map</span>[(<span class="ruby-identifier">record_no</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>)<span class="ruby-operator">*</span><span class="ruby-value">2</span>]=<span class="ruby-identifier">line</span>[<span class="ruby-value">1288</span>,<span class="ruby-value">80</span>]
- <span class="ruby-identifier">colour_map</span>[(<span class="ruby-identifier">record_no</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>)<span class="ruby-operator">*</span><span class="ruby-value">2</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>]=<span class="ruby-identifier">line</span>[<span class="ruby-value">1368</span>,<span class="ruby-value">80</span>]
-
- <span class="ruby-keyword kw">end</span>
- [<span class="ruby-identifier">bitmap_lines</span>,<span class="ruby-identifier">colour_map</span>]
+ <pre><span class="ruby-comment cmt"># File lib/native_file_types/c64/C64GeoPaintPic.rb, line 22</span>
+<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">picture_format</span>
+ <span class="ruby-identifier">:png</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>
\ No newline at end of file