haxegon / zeedonk

Haxegon + Puzzlescript = Zeedonk!
http://www.zeedonk.net
12 stars 2 forks source link

getpixel broken? #225

Closed increpare closed 9 years ago

increpare commented 9 years ago
function update(){
  Gfx.fillbox(0,0,10,10,Col.RED);
  var c = Gfx.getpixel(5,5);
//Debug.log(c); //returns -16777216
  Gfx.fillbox(10,10,10,10,c);
}
TerryCavanagh commented 9 years ago

This one's pretty weird. For me it actually returns -4315597, but it's drawing the red squares just fine. Will look into it.

increpare commented 9 years ago

Oh, it's working for me now as well now, visually. But the value is still weird. possibly rgba rather than rgb or something like that? Spooky!

TerryCavanagh commented 9 years ago

Ah, that was it exactly. Thanks! (The only reason to want a getpixelARGB function that I can think of is to find transparent pixels, but there's probably a better way to handle that. Maybe a new function.)