Difference between revisions of "CCLights2"

From ComputerCraft Wiki
Jump to: navigation, search
m ({{Crafting Grid}} template needs custom link parameters even on |Cell rows.)
(Changing int to number. Why the hell so many damned links to int????)
Line 98: Line 98:
  
 
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
 
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.fill({{Type|int}} red, {{Type|int}} green, {{Type|int}} blue)</td>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.fill({{type|number}} red, {{type|number}} green, {{type|number}} blue)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Fills the binded texture with the color specified by <var>red</var>, <var>green</var>, and <var>blue</var></td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Fills the binded texture with the color specified by <var>red</var>, <var>green</var>, and <var>blue</var></td></tr>
  
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{Type|int}} textureid</td>
+
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{type|number}} textureid</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.createTexture({{Type|int}} width, {{Type|int}} height)</td>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.createTexture({{type|number}} width, {{type|number}} height)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Creates a new texture and returns it.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Creates a new texture and returns it.</td></tr>
  
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{Type|int}} freeMemory</td>
+
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{type|number}} freeMemory</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.getFreeMemory()</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.getFreeMemory()</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the amount of free memory the GPU has available.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the amount of free memory the GPU has available.</td></tr>
  
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{Type|int}} totalMemory</td>
+
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{type|number}} totalMemory</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.getTotalMemory()</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.getTotalMemory()</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the amount of total memory. This is the equivalent of gpu.getFreeMemory()+gpu.getUsedMemory()</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the amount of total memory. This is the equivalent of gpu.getFreeMemory()+gpu.getUsedMemory()</td></tr>
  
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{Type|int}} usedMemory</td>
+
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{type|number}} usedMemory</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.getUsedMemory()</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.getUsedMemory()</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the amount of memory the GPU has already used.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the amount of memory the GPU has already used.</td></tr>
  
 
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
 
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.bindTexture({{Type|int}} textureid)</td>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.bindTexture({{type|number}} textureid)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Binds the texture <var>textureid</var> for drawing. A <var>textureid</var> of 0 will rebind the screen texture.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Binds the texture <var>textureid</var> for drawing. A <var>textureid</var> of 0 will rebind the screen texture.</td></tr>
  
 
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
 
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">(Depreciated: Use gpu.plot instead) gpu.setColorRGB({{Type|int}} x, {{Type|int}} y, {{Type|int}} red, {{Type|int}} green, {{Type|int}} blue)</td>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">(Depreciated: Use gpu.plot instead) gpu.setColorRGB({{type|number}} x, {{type|number}} y, {{type|number}} red, {{type|number}} green, {{type|number}} blue)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Plots the color <var>red</var>, <var>green</var>, and <var>blue</var> at the location <var>x</var>, <var>y</var>.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Plots the color <var>red</var>, <var>green</var>, and <var>blue</var> at the location <var>x</var>, <var>y</var>.</td></tr>
  
 
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
 
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.plot({{Type|int}} x, {{Type|int}} y, {{Type|int}} red, {{Type|int}} green, {{Type|int}} blue)</td>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.plot({{type|number}} x, {{type|number}} y, {{type|number}} red, {{type|number}} green, {{type|number}} blue)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Plots the color <var>red</var>, <var>green</var>, and <var>blue</var> at the location <var>x</var>, <var>y</var>.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Plots the color <var>red</var>, <var>green</var>, and <var>blue</var> at the location <var>x</var>, <var>y</var>.</td></tr>
  
 
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
 
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.drawTexture({{Type|int}} textureid, {{Type|int}} x, {{Type|int}} y[, {{Type|int}} startX, {{Type|int}} startY, {{Type|int}} width, {{Type|int}} height[, {{Type|int}} red, {{Type|int}} green, {{Type|int}} blue] ])</td>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.drawTexture({{type|number}} textureid, {{type|number}} x, {{type|number}} y[, {{type|number}} startX, {{type|number}} startY, {{type|number}} width, {{type|number}} height[, {{type|number}} red, {{type|number}} green, {{type|number}} blue] ])</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Draws the texture <var>textureid</var> at position <var>x</var>,<var>y</var> starting at <var>startX</var>,<var>startY</var> (Default: 0, 0) with the size of <var>width</var>,<var>height</var> (Default: Texture size) with the color <var>red</var>, <var>green</var>, and <var>blue</var> (Default: 255,255,255).</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Draws the texture <var>textureid</var> at position <var>x</var>,<var>y</var> starting at <var>startX</var>,<var>startY</var> (Default: 0, 0) with the size of <var>width</var>,<var>height</var> (Default: Texture size) with the color <var>red</var>, <var>green</var>, and <var>blue</var> (Default: 255,255,255).</td></tr>
  
 
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
 
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.freeTexture({{Type|int}} textureid)</td>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.freeTexture({{type|number}} textureid)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Removes the texture <var>textureid</var> from the GPU's memory.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Removes the texture <var>textureid</var> from the GPU's memory.</td></tr>
  
 
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
 
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.line({{Type|int}} red, {{Type|int}} green, {{Type|int}} blue, {{Type|int}} x0, {{Type|int}} y0, {{Type|int}} x1, {{Type|int}} y1)</td>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.line({{type|number}} red, {{type|number}} green, {{type|number}} blue, {{type|number}} x0, {{type|number}} y0, {{type|number}} x1, {{type|number}} y1)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the amount of free memory the GPU has available.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the amount of free memory the GPU has available.</td></tr>
  
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{Type|int}} width, {{Type|int}} height</td>
+
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{type|number}} width, {{type|number}} height</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.getTextureSize()</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.getTextureSize()</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the size of the currently binded texture.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the size of the currently binded texture.</td></tr>
  
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{Type|int}} width, {{Type|int}} height</td>
+
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{type|number}} width, {{type|number}} height</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.getSize()</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.getSize()</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Does the same as above.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Does the same as above.</td></tr>
  
 
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
 
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.setTransparent({{Type|int}} textureid, {{Type|boolean}} transparent)</td>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.setTransparent({{type|number}} textureid, {{Type|boolean}} transparent)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Sets the texture <var>textureid</var> as transparent</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Sets the texture <var>textureid</var> as transparent</td></tr>
  
 
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
 
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.setTransparencyColor({{Type|int}} textureid, {{Type|int}} red, {{Type|int}} green, {{Type|int}} blue)</td>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.setTransparencyColor({{type|number}} textureid, {{type|number}} red, {{type|number}} green, {{type|number}} blue)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Sets the texture <var>textureid</var>'s transparency color to <var>red</var>, <var>green</var>, and <var>blue</var>. NOTE: This will not make that color transparent on a monitor. Sorry.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Sets the texture <var>textureid</var>'s transparency color to <var>red</var>, <var>green</var>, and <var>blue</var>. NOTE: This will not make that color transparent on a monitor. Sorry.</td></tr>
  
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{Type|int}} red, {{Type|int}} green, {{Type|int}} blue</td>
+
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{type|number}} red, {{type|number}} green, {{type|number}} blue</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">(Depreciated: Use gpu.getPixel instead) gpu.getColorRGB({{Type|int}} x, {{Type|int}} y)</td>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">(Depreciated: Use gpu.getPixel instead) gpu.getColorRGB({{type|number}} x, {{type|number}} y)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the colors at the location <var>x</var>, <var>y</var>.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the colors at the location <var>x</var>, <var>y</var>.</td></tr>
  
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{Type|int}} red, {{Type|int}} green, {{Type|int}} blue</td>
+
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{type|number}} red, {{type|number}} green, {{type|number}} blue</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.getPixel({{Type|int}} x, {{Type|int}} y)</td>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.getPixel({{type|number}} x, {{type|number}} y)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the colors at the location <var>x</var>, <var>y</var>.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the colors at the location <var>x</var>, <var>y</var>.</td></tr>
  
 
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
 
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.rectangle({{Type|int}} red, {{Type|int}} green, {{Type|int}} blue, {{Type|int}} x, {{Type|int}} y, {{Type|int}} width, {{Type|int}} height)</td>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.rectangle({{type|number}} red, {{type|number}} green, {{type|number}} blue, {{type|number}} x, {{type|number}} y, {{type|number}} width, {{type|number}} height)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Draws an outlined rectangle with the color <var>red</var>, <var>green</var>, and <var>blue</var> at the location <var>x</var>, <var>y</var> with the size <var>width</var>, <var>height</var>.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Draws an outlined rectangle with the color <var>red</var>, <var>green</var>, and <var>blue</var> at the location <var>x</var>, <var>y</var> with the size <var>width</var>, <var>height</var>.</td></tr>
  
 
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
 
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.filledRectangle({{Type|int}} red, {{Type|int}} green, {{Type|int}} blue, {{Type|int}} x, {{Type|int}} y, {{Type|int}} width, {{Type|int}} height)</td>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.filledRectangle({{type|number}} red, {{type|number}} green, {{type|number}} blue, {{type|number}} x, {{type|number}} y, {{type|number}} width, {{type|number}} height)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Draws a filled rectangle with the color <var>red</var>, <var>green</var>, and <var>blue</var> at the location <var>x</var>, <var>y</var> with the size <var>width</var>, <var>height</var>.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Draws a filled rectangle with the color <var>red</var>, <var>green</var>, and <var>blue</var> at the location <var>x</var>, <var>y</var> with the size <var>width</var>, <var>height</var>.</td></tr>
  
Line 177: Line 177:
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Sets the Bits Per Pixel for the GPU. This directly effects memory usage. When called, all textures will go black.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Sets the Bits Per Pixel for the GPU. This directly effects memory usage. When called, all textures will go black.</td></tr>
  
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{Type|int}} bindedTextureid</td>
+
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{type|number}} bindedTextureid</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.getBindedTexture()</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.getBindedTexture()</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the Binded Texture.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the Binded Texture.</td></tr>
  
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{Type|int}} BPP</td>
+
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">{{type|number}} BPP</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.getBPP()</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.getBPP()</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the Bits Per Pixel.</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the Bits Per Pixel.</td></tr>
  
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">({{Type|int}} nativePixelColor)*Bits Per Pixel</td>
+
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">({{type|number}} nativePixelColor)*Bits Per Pixel</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.getNativePixel({{Type|int}} x, {{Type|int}} y)</td>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">gpu.getNativePixel({{type|number}} x, {{type|number}} y)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the native pixel data for the location <var>x</var>, <var>y</var>. The BPP will be the number of values returned</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the native pixel data for the location <var>x</var>, <var>y</var>. The BPP will be the number of values returned</td></tr>
  
 
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
 
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">(BETA) gpu.setPixels({{Type|int}} w, {{Type|int}} h, {{Type|int}} x, {{Type|int}} y[, {{Type|int}} red, {{Type|int}} green, {{Type|int}} blue]...)</td>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">(BETA) gpu.setPixels({{type|number}} w, {{type|number}} h, {{type|number}} x, {{type|number}} y[, {{type|number}} red, {{type|number}} green, {{type|number}} blue]...)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Sets the pixels in the area of <var>w</var> and <var>h</var> starting at <var>x</var>,<var>y</var> using the rest of the given pixeldata. NOTE: This function is a BETA function. Do not expect it to work 100%!</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Sets the pixels in the area of <var>w</var> and <var>h</var> starting at <var>x</var>,<var>y</var> using the rest of the given pixeldata. NOTE: This function is a BETA function. Do not expect it to work 100%!</td></tr>
  
 
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
 
<tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">(BETA) gpu.setPixelsYX({{Type|int}} w, {{Type|int}} h, {{Type|int}} x, {{Type|int}} y[, {{Type|int}} red, {{Type|int}} green, {{Type|int}} blue]...)</td>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">(BETA) gpu.setPixelsYX({{type|number}} w, {{type|number}} h, {{type|number}} x, {{type|number}} y[, {{type|number}} red, {{type|number}} green, {{type|number}} blue]...)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Sets the pixels in the area of <var>w</var> and <var>h</var> starting at <var>x</var>,<var>y</var> using the rest of the given pixeldata in the order of Y,X instead of X,Y. NOTE: This function is a BETA function. Do not expect it to work 100%!</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Sets the pixels in the area of <var>w</var> and <var>h</var> starting at <var>x</var>,<var>y</var> using the rest of the given pixeldata in the order of Y,X instead of X,Y. NOTE: This function is a BETA function. Do not expect it to work 100%!</td></tr>
  
 
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
 
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">nil</td>
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">(BETA) gpu.flipTextureV({{Type|int}} textureid)</td>
+
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">(BETA) gpu.flipTextureV({{type|number}} textureid)</td>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Flips the texture <var>textureid</var> verticaly. NOTE: This function is a BETA function. Do not expect it to work 100%!</td></tr>
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Flips the texture <var>textureid</var> verticaly. NOTE: This function is a BETA function. Do not expect it to work 100%!</td></tr>
  
 
</table>
 
</table>
 
[[Category:User Created Peripherals]]
 
[[Category:User Created Peripherals]]

Revision as of 13:38, 18 July 2013

CCLights2 is an Open Source Minecraft mod that adds a GPU peripheral, and monitors to suit your need. Unlike CCGPU, this mod does not use OpenGL, but it is Multiplayer Compatible.

Grid disk.png   CCLights2 Peripherals

NameDescription
GPU Peripheral

The GPU Peripheral needs to be placed next to a computer. It will autoconnect with the first monitor that connects with it, and will auto disconnect when the monitor detaches.




Grid disk.png   CCLights2 Monitors

NameDescription
Normal Monitor

The basic Monitor. It sports an elegant resolution of 256x144.


iron ingot

Redstone

Gold Ingot

iron ingot

glass pane

Gold Ingot

iron ingot

Redstone

Gold Ingot

CCLights2 Monitor



External Monitor

An external Monitor. It suports a resolution up to 512x288.


glass pane

glass pane

glass pane

glass pane

CCLights2 Monitor

glass pane

glass pane

glass pane

glass pane

CCLights2 External Monitor



RAM

Yep. You can craft more Ram.


iron ingot

Redstone

Gold Ingot

iron ingot

Gold Ingot

iron ingot

Redstone

Gold Ingot

CCLights2 Ram



Tablet

Hold it in your hand! Go caving! Watch your life leech away as you stare into this tablet! NOTE: Watch out for Creepers.


Gold Ingot

Redstone

Gold Ingot

iron ingot

CCLights2 External Monitor

iron ingot

Gold Ingot

Redstone

Gold Ingot

CCLights2 Tablet



Grid disk.png   GPU Methods

ReturnsMethod NameDescription
nil gpu.fill(number red, number green, number blue) Fills the binded texture with the color specified by red, green, and blue
number textureid gpu.createTexture(number width, number height) Creates a new texture and returns it.
number freeMemory gpu.getFreeMemory() Returns the amount of free memory the GPU has available.
number totalMemory gpu.getTotalMemory() Returns the amount of total memory. This is the equivalent of gpu.getFreeMemory()+gpu.getUsedMemory()
number usedMemory gpu.getUsedMemory() Returns the amount of memory the GPU has already used.
nil gpu.bindTexture(number textureid) Binds the texture textureid for drawing. A textureid of 0 will rebind the screen texture.
nil (Depreciated: Use gpu.plot instead) gpu.setColorRGB(number x, number y, number red, number green, number blue) Plots the color red, green, and blue at the location x, y.
nil gpu.plot(number x, number y, number red, number green, number blue) Plots the color red, green, and blue at the location x, y.
nil gpu.drawTexture(number textureid, number x, number y[, number startX, number startY, number width, number height[, number red, number green, number blue] ]) Draws the texture textureid at position x,y starting at startX,startY (Default: 0, 0) with the size of width,height (Default: Texture size) with the color red, green, and blue (Default: 255,255,255).
nil gpu.freeTexture(number textureid) Removes the texture textureid from the GPU's memory.
nil gpu.line(number red, number green, number blue, number x0, number y0, number x1, number y1) Returns the amount of free memory the GPU has available.
number width, number height gpu.getTextureSize() Returns the size of the currently binded texture.
number width, number height gpu.getSize() Does the same as above.
nil gpu.setTransparent(number textureid, boolean transparent) Sets the texture textureid as transparent
nil gpu.setTransparencyColor(number textureid, number red, number green, number blue) Sets the texture textureid's transparency color to red, green, and blue. NOTE: This will not make that color transparent on a monitor. Sorry.
number red, number green, number blue (Depreciated: Use gpu.getPixel instead) gpu.getColorRGB(number x, number y) Returns the colors at the location x, y.
number red, number green, number blue gpu.getPixel(number x, number y) Returns the colors at the location x, y.
nil gpu.rectangle(number red, number green, number blue, number x, number y, number width, number height) Draws an outlined rectangle with the color red, green, and blue at the location x, y with the size width, height.
nil gpu.filledRectangle(number red, number green, number blue, number x, number y, number width, number height) Draws a filled rectangle with the color red, green, and blue at the location x, y with the size width, height.
nil gpu.setBPP((1,2 or 4)) Sets the Bits Per Pixel for the GPU. This directly effects memory usage. When called, all textures will go black.
number bindedTextureid gpu.getBindedTexture() Returns the Binded Texture.
number BPP gpu.getBPP() Returns the Bits Per Pixel.
(number nativePixelColor)*Bits Per Pixel gpu.getNativePixel(number x, number y) Returns the native pixel data for the location x, y. The BPP will be the number of values returned
nil (BETA) gpu.setPixels(number w, number h, number x, number y[, number red, number green, number blue]...) Sets the pixels in the area of w and h starting at x,y using the rest of the given pixeldata. NOTE: This function is a BETA function. Do not expect it to work 100%!
nil (BETA) gpu.setPixelsYX(number w, number h, number x, number y[, number red, number green, number blue]...) Sets the pixels in the area of w and h starting at x,y using the rest of the given pixeldata in the order of Y,X instead of X,Y. NOTE: This function is a BETA function. Do not expect it to work 100%!
nil (BETA) gpu.flipTextureV(number textureid) Flips the texture textureid verticaly. NOTE: This function is a BETA function. Do not expect it to work 100%!