int32_t interpret() { struct timeval tv; uint32_t *display = core_->MemAlloc(200*200*4); gettimeofday(&tv, NULL); time_t start = (tv.tv_sec * 1000 * 1000) + tv.tv_usec; sprintf(buffer, "start: %ld\n", (long int)start); strcat(status, buffer); while(1) { struct timeval tv2; gettimeofday(&tv2, NULL); time_t now = (tv.tv_sec * 1000 * 1000) + tv.tv_usec; count += now; if ((count%0x20000) == 0) { unsigned char r, g = 0, b; uint32_t i, j; r = (unsigned char)(mouseX); b = (unsigned char)(mouseY); for (j = 0; j < 200; j++) { g = j; for (i = 0; i < 200; i++) { uint32_t c = (((r+i)&0xFF) << 24) + ((g&0xFF) << 16) + (((b+j)&0xFF) << 8) + 0xFF; display[j*200+i] = c; } } ioShowDisplay(display, 200, 200, 32, 0, 200, 0, 200); } } return 0; }
int32_t interpret() { uint32_t *display = core_->MemAlloc(200*200*4); Log(display ? "display alloc'ed" : "display alloc failed"); while(1) { count++; if (count > 0) { /*if ((now - lastTime) > 0.5) { */ unsigned char r, g = 0, b; uint32_t i, j; r = (unsigned char)(count + mouseX); b = (unsigned char)(count + mouseY); for (j = 0; j < 200; j++) { g = j; for (i = 0; i < 200; i++) { uint32_t c = (((r+i)&0xFF) << 24) + ((g&0xFF) << 16) + ((b&0xFF) << 8) + 0xFF; display[j*200+i] = c; } } if (!flush_pending) { Log("display\n"); ioShowDisplay(display, 200, 200, 32, 0, 200, 0, 200); } } } return 0; }
int32_t interpret() { uint32_t *display = core_->MemAlloc(200*200*4); while(1) { count++; if ((count%0x1000000) == 0) { unsigned char r, g = 0, b; uint32_t i, j; r = (unsigned char)(mouseX); b = (unsigned char)(mouseY); for (j = 0; j < 200; j++) { g = j; for (i = 0; i < 200; i++) { uint32_t c = (((r+i)&0xFF) << 24) + ((g&0xFF) << 16) + (((b+j)&0xFF) << 8) + 0xFF; display[j*200+i] = c; } } ioShowDisplay(display, 200, 200, 32, 0, 200, 0, 200); } } return 0; }