void GRMapCanvas::zoomFullExtent() { previousExtent = currentExtent; currentExtent = fullExtent; clear(); render2(); }
void GRMapCanvas::layerStateChange() { if ( !frozen ) { clear(); render2(); } }
void gameFrame(void) { int lala; switch(currentBuffer) { case false: #ifdef DEBUG_GAME iprintf("\x1b[0;0H"); iprintf("%d FPS \n", FPS); iprintf("%d (debug) \n", debugVal); iprintf("%d (free ram) \n", getMemFree()/1024); iprintf("%p (portal) \n", portal1.displayList); iprintf("%p (portal) \n", portal2.displayList); #endif cpuEndSlice(); postProcess1(); // iprintf("postproc : %d \n",cpuEndSlice()); render1(); // if(keysDown()&KEY_SELECT)testStepByStep^=1; //TEMP #ifdef DEBUG_GAME iprintf("full : %d (%d) \n",cpuEndTiming(),testStepByStep); #endif swiWaitForVBlank(); cpuStartTiming(0); prevTiming=0; if(previousPortal)dmaCopy(VRAM_C, previousPortal->viewPoint, 256*192*2); setRegCapture(true, 0, 15, 2, 0, 3, 1, 0); frmCNT++; break; case true: // cpuStartTiming(0); postProcess2(); // iprintf("frm 2 : %d \n",cpuGetTiming()); render2(); listenPI9(); updateOBBs(); // iprintf("frm 2 : %d \n",cpuEndTiming()); #ifdef DEBUG_GAME iprintf("fake frame : %d \n",cpuEndTiming()); #endif swiWaitForVBlank(); cpuStartTiming(0); prevTiming=0; dmaCopy(VRAM_C, mainScreen, 256*192*2); setRegCapture(true, 0, 15, 2, 0, 3, 1, 0); break; } // if(testStepByStep){int i=0;while(!(keysUp()&KEY_TOUCH)){scanKeys();listenPI9();swiWaitForVBlank();}NOGBA("WAITED");scanKeys();scanKeys();if(keysHeld()&KEY_SELECT)testStepByStep=false;} // else if(keysDown()&KEY_SELECT)testStepByStep=true; currentBuffer^=1; }
void GRMapCanvas::zoomPreviousExtent() { if ( previousExtent.width() > 0 ) { GRRect tempRect = currentExtent; currentExtent = previousExtent; previousExtent = tempRect; clear(); render2(); } }
int loop_hook(void *v) { // t_env *e = static_cast<t_env>(v); (void)v; write(1, "dsad\n", 5); sleep(1); // bzero(e.addr, e.h * e.sizel + e.l * e.bpp / 8); preparator(e); render2(e); // bzero(e.addr, strlen(e.addr)); // mlx_put_image_to_window(e.mlx, e.win, e.img, 0, 0); // mlx_do_sync(e.mlx); return (0); }
void GRMapCanvas::paintEvent( QPaintEvent *pe ) { if ( !dirty ) { //bitBlt( this, pe->rect().topLeft(), pmCanvas, pe->rect() ); } else { if ( !drawing ) { render2(); } } }
void GRMapCanvas::refresh() { dirty = true; render2(); }
i++ ) { \ /*distance vector*/ \ r.x = result->apix.x * i + result->origin.x - pos.x; \ r.y = result->apix.y * i + result->origin.y - pos.y; \ r.z = result->apix.z * i + result->origin.z - pos.z; \ /*radius*/ \ lenr = r.x * r.x + r.y * r.y + r.z * r.z; \ lenr = lenr * isqrt_(lenr); \ \ /*value*/ \ density = kernel(lenr,type[atom],sigma); \ density *= mass; \ \ /*add density to map and get next gridpoint */ \ result->data[idx++] += density; \ } \ } \ } \ } \ return result; PDen_t * pDenRenderPeng2(PDen_t * result, real width, real sigma, size_t n, int * type, real * coords, real * cfactor, real *dfactor) { render2(pDenPengKernel) } PDen_t * pDenRenderGauss2(PDen_t * result, real width, real sigma, size_t n, int * type, real * coords, real * cfactor, real *dfactor) { render2(pDenGaussKernel) }