Ignore:
Timestamp:
Apr 26, 2006, 12:04:02 PM (15 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Updated C++ bindings, should be coding-style-correction-proof, or at least a bit better than before. Not tested at all.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/cpp/cpptest.cpp

    r827 r892  
    5454    try {
    5555        qq = new Cucul();
    56     } 
     56    }
    5757    catch (int e) {
    5858        cerr << "Error while initializing cucul (" << e << ")" << endl;
    5959        return -1;
    6060    }
    61    
     61
    6262    try {
    6363        kk = new Caca(qq);
     
    7171
    7272    while(!kk->get_event(ev.CACA_EVENT_KEY_PRESS, &ev, 0)) {
    73        
     73
    7474        /* Draw pig */
    75         qq->set_color(CUCUL_COLOR_LIGHTMAGENTA, CUCUL_COLOR_BLACK);
    76        
     75        qq->setColor(CUCUL_COLOR_LIGHTMAGENTA, CUCUL_COLOR_BLACK);
     76
    7777        for(int i = 0; pig[i]; i++)
    78             qq->putstr(x, y+i, (char*)pig[i]);
    79        
     78            qq->putStr(x, y+i, (char*)pig[i]);
     79
    8080        /* printf works */
    81         qq->set_color(CUCUL_COLOR_LIGHTBLUE, CUCUL_COLOR_BLACK); 
    82         qq->printf(30,15, "Powered by libcaca %s", VERSION);
    83        
     81        qq->setColor(CUCUL_COLOR_LIGHTBLUE, CUCUL_COLOR_BLACK);
     82        qq->Printf(30,15, "Powered by libcaca %s", VERSION);
     83
    8484        /* Blit */
    8585        kk->display();
     
    8888        y+=iy;
    8989
    90         if(x>=(qq->get_width()-35)  || x<0 )
     90        if(x>=(qq->getWidth()-35)  || x<0 )
    9191            ix=-ix;
    92         if(y>=(qq->get_height()-15)   || y<0 )
     92        if(y>=(qq->getHeight()-15)   || y<0 )
    9393            iy=-iy;
    9494
Note: See TracChangeset for help on using the changeset viewer.