function BUF() {
  this.pal4color = new Uint16Array([0x0000,0xFFFF,0x7BEF,0xAFE5],0,2);   // b,w,grey,greenyellow
  this.pal4red = new Uint16Array([0x0000,0xFFFF,0xF800,0xAFE5],0,2);   // b,w,red,greenyellow
  this.buf = Graphics.createArrayBuffer(120,120,2,{msb:true});
}
/*****************************************************************************

Screen Buffer Object that can be shared between faces

Making into a Class like this means we allocate the memory once
and avoid fragmenting the memory when we switch in and out of faces

******************************************************************************/
Screen Buffer Object that can be shared between faces
Making into a Class like this means we allocate the memory once
and avoid fragmenting the memory when we switch in and out of faces
Screen Buffer Object that can be shared between faces Making into a Class like this means we allocate the memory once and avoid fragmenting the memory when we switch in and out of faces
function BUF() {
  this.pal4color = new Uint16Array([0x0000,0xFFFF,0x7BEF,0xAFE5],0,2);   
  this.pal4red = new Uint16Array([0x0000,0xFFFF,0xF800,0xAFE5],0,2);   
  this.buf = Graphics.createArrayBuffer(120,120,2,{msb:true});
}
function BUF ( ) { this . pal4color = new Uint16Array ( [ 0x0000 , 0xFFFF , 0x7BEF , 0xAFE5 ] , 0 , 2 ) ; this . pal4red = new Uint16Array ( [ 0x0000 , 0xFFFF , 0xF800 , 0xAFE5 ] , 0 , 2 ) ; this . buf = Graphics . createArrayBuffer ( 120 , 120 , 2 , { msb : true } ) ; }
Screen Buffer Object that can be shared between faces
Making into a Class like this means we allocate the memory once
and avoid fragmenting the memory when we switch in and out of faces
Screen Buffer Object that can be shared between faces Making into a Class like this means we allocate the memory once and avoid fragmenting the memory when we switch in and out of faces
// b,w,grey,greenyellow // b,w,red,greenyellow