42
40
int main(int argc, char *argv[])
48
45
int x = 0, y = 0, ix = 1, iy = 1;
54
51
cerr << "Error while initializing cucul (" << e << ")" << endl;
77
kk->setDisplayTime(20000);
79
while(!kk->getEvent(ev.CACA_EVENT_KEY_PRESS, &ev, 0)) {
74
dp->setDisplayTime(20000);
76
while(!dp->getEvent(Event::CACA_EVENT_KEY_PRESS, NULL, 0))
82
79
/* In case of resize ...*/
83
if((x + pig->getWidth())-1 >= qq->getWidth() || x < 0 )
80
if((x + pig->getWidth())-1 >= cv->getWidth() || x < 0 )
85
if((y + pig->getHeight())-1 >= qq->getHeight() || y < 0 )
82
if((y + pig->getHeight())-1 >= cv->getHeight() || y < 0 )
94
qq->Blit(x, y, pig, NULL);
88
cv->Blit(x, y, pig, NULL);
97
qq->setColorANSI(CUCUL_LIGHTBLUE, CUCUL_BLACK);
98
qq->Printf(qq->getWidth() / 2 - 10, qq->getHeight() / 2,
99
"Powered by libcaca %s", VERSION);
91
cv->setColorANSI(CUCUL_LIGHTBLUE, CUCUL_BLACK);
92
cv->Printf(cv->getWidth() / 2 - 10, cv->getHeight() / 2,
93
"Powered by libcaca %s", dp->getVersion());
107
if(x + pig->getWidth() >= qq->getWidth() || x < 0 )
101
if(x + pig->getWidth() >= cv->getWidth() || x < 0 )
109
if(y + pig->getHeight() >= qq->getHeight() || y < 0 )
103
if(y + pig->getHeight() >= cv->getHeight() || y < 0 )