Milestone: IT IS NOW OUTPUTTING TO THE SCREEN!!!!

This commit is contained in:
Ralph Caraveo committed 2014-04-28 10:28:11 -07:00
1 parent daf89fb720
commit 1e6954930a
2 files changed
+19 -19

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 661 B

After

Width:  |  Height:  |  Size: 2.9 KiB

@@ -105,7 +105,7 @@ func main() {
fmt.Println("File Length: ", len(cdg_file_data)) fmt.Println("File Length: ", len(cdg_file_data))
//loop through some bytes //loop through some bytes
for i := 0; i < 250000; i++ { for i := 0; i < 1000; i++ {
decode_packs(cdg_file_data, i) decode_packs(cdg_file_data, i)
redrawCanvas() redrawCanvas()
} }
@@ -156,8 +156,8 @@ func putImageData(imageData []byte, x, y, dirtyX, dirtyY, dirtyWidth, dirtyHeigh
func redrawCanvas() { func redrawCanvas() {
if internal_border_dirty || internal_screen_dirty { if internal_screen_dirty {
// render_screen_to_rgb() render_screen_to_rgb()
internal_screen_dirty = false internal_screen_dirty = false
clearDirtyBlocks() clearDirtyBlocks()
// internal_rgba_context.putImageData(internal_rgba_imagedata, 0, 0) // internal_rgba_context.putImageData(internal_rgba_imagedata, 0, 0)
@@ -176,24 +176,24 @@ func redrawCanvas() {
for x_blk := 1; x_blk <= 48; x_blk++ { for x_blk := 1; x_blk <= 48; x_blk++ {
if internal_dirty_blocks[blk] != 0 { //this dirty logic not quite working!!!
//if internal_dirty_blocks[blk] != 0 {
render_block_to_rgb(x_blk, y_blk)
render_block_to_rgb(x_blk, y_blk) if internal_usedirtyrect {
//api call looks like this
if internal_usedirtyrect { //context.putImageData(imgData,x,y,dirtyX,dirtyY,dirtyWidth,dirtyHeight);
//api call looks like this // local_context.putImageData(local_rgba_imagedata, 0, 0,
//context.putImageData(imgData,x,y,dirtyX,dirtyY,dirtyWidth,dirtyHeight); // (x_blk-1)*FONT_WIDTH,
// local_context.putImageData(local_rgba_imagedata, 0, 0, // (y_blk-1)*FONT_HEIGHT,
// (x_blk-1)*FONT_WIDTH, // FONT_WIDTH,
// (y_blk-1)*FONT_HEIGHT, // FONT_HEIGHT)
// FONT_WIDTH, } else {
// FONT_HEIGHT) update_needed = true
} else {
update_needed = true
}
internal_dirty_blocks[blk] = 0x00
} }
internal_dirty_blocks[blk] = 0x00
//}
//Note: test the post-increment //Note: test the post-increment
blk++ blk++
} }