Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.2:Update
trackballs
trackballs-1.1.4-codecleanup.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File trackballs-1.1.4-codecleanup.diff of Package trackballs
--- ../trackballs-1.1.1.orig/src/font.cc 2005-11-17 15:18:37.518019849 +0100 +++ ./src/font.cc 2005-11-17 15:25:04.108830070 +0100 @@ -207,6 +207,7 @@ this->char_sizes[5*CHAR_WNB+2]=0; this->char_sizes[4*CHAR_WNB+14]=0; */ + return 1; } int Font::addText(int font, const char *text, int x, int y, float sx, float sy, double delay, @@ -806,6 +807,7 @@ glEnd(); Leave2DMode(); + return 0; } int Font::l_drawRightSimpleText(const char *text, int x, int y, float sx, float sy, float r, float g, float b, float a) { @@ -849,6 +851,7 @@ } glEnd(); + return 0; } diff -u -r ../trackballs-1.1.1.orig/src/glHelp.cc ./src/glHelp.cc --- ../trackballs-1.1.1.orig/src/glHelp.cc 2005-11-17 15:18:37.356048034 +0100 +++ ./src/glHelp.cc 2005-11-17 15:32:52.026862572 +0100 @@ -279,7 +279,7 @@ /* allocate buffer */ if ((buffer = (unsigned char*)malloc(sizeof(unsigned char)*screenWidth*screenHeight*3)) == NULL) { - fprintf(stderr, _("Warning: cannot allocate %d bytes for snapshot. Aborting.\n"), sizeof(unsigned char)*screenWidth*screenHeight*3); + fprintf(stderr, _("Warning: cannot allocate %lu bytes for snapshot. Aborting.\n"), sizeof(unsigned char)*screenWidth*screenHeight*3); return(0); } @@ -333,6 +333,7 @@ /* freed everything */ fclose(f); free(buffer); + return 0; } --- ../trackballs-1.1.1.orig/src/guile.cc 2005-11-17 15:18:37.636999145 +0100 +++ ./src/guile.cc 2005-11-17 15:18:52.901342971 +0100 @@ -880,11 +880,11 @@ /*********** use-grid ************/ SCM_DEFINE (use_grid, "use-grid", 1, 0, 0, (SCM v), "Turns the grid on/off") -{ Game::current->useGrid=SCM_FALSEP(v)?0:1; } +{ Game::current->useGrid=SCM_FALSEP(v)?0:1; return 0; } /*********** map-is-transparent ************/ SCM_DEFINE (map_is_transparent, "map-is-transparent", 1, 0, 0, (SCM v), "Turns on/off transparency rendering of map.") -{ Game::current->map->isTransparent=SCM_FALSEP(v)?0:1; } +{ Game::current->map->isTransparent=SCM_FALSEP(v)?0:1; return 0; } /*********** jump ************/ SCM_DEFINE (jump, "jump", 1, 0, 0, (SCM v), "Scales maximum jump height of player.") @@ -893,6 +893,7 @@ SCM_ASSERT(SCM_NUMBERP(v),v,SCM_ARG1,FUNC_NAME); if(Game::current) Game::current->jumpFactor=scm_num2dbl(v,FUNC_NAME); + return 0; } #undef FUNC_NAME @@ -903,6 +904,7 @@ SCM_ASSERT(SCM_NUMBERP(v),v,SCM_ARG1,FUNC_NAME); if(Game::current) Game::current->oxygenFactor=scm_num2dbl(v,FUNC_NAME); + return 0; } #undef FUNC_NAME @@ -1188,6 +1190,7 @@ SCM_ASSERT(SCM_NUMBERP(z),z,SCM_ARG2,FUNC_NAME); ((MainMode*)GameMode::current)->wantedXYAngle = scm_num2dbl(xy,FUNC_NAME); ((MainMode*)GameMode::current)->wantedZAngle = scm_num2dbl(z,FUNC_NAME); + return 0; } #undef FUNC_NAME @@ -1197,6 +1200,7 @@ { SCM_ASSERT(SCM_NUMBERP(t),t,SCM_ARG1,FUNC_NAME); Game::current->player1->timeOnDeath=scm_num2dbl(t,FUNC_NAME); + return 0; } #undef FUNC_NAME diff -u -r ../trackballs-1.1.1.orig/src/image.cc ./src/image.cc --- ../trackballs-1.1.1.orig/src/image.cc 2005-11-17 15:18:37.605004713 +0100 +++ ./src/image.cc 2005-11-17 15:18:52.912341057 +0100 @@ -59,7 +59,7 @@ image = (Image *) malloc(sizeof(Image)); if(image == NULL) { - fprintf(stderr, "Cannot allocate '%d' bytes.\n", sizeof(Image)); + fprintf(stderr, "Cannot allocate '%z' bytes.\n", sizeof(Image)); return(NULL); } if((image->file = fopen(fileName, "rb")) == NULL) @@ -230,7 +230,7 @@ final = (IMAGE *) malloc(sizeof(IMAGE)); if(final == NULL) { - fprintf(stderr, "Cannot allocate '%d' bytes.\n", sizeof(IMAGE)); + fprintf(stderr, "Cannot allocate '%z' bytes.\n", sizeof(IMAGE)); ImageClose(image); return(NULL); } @@ -253,7 +253,7 @@ { ImageClose(image); free(final); - fprintf(stderr, "Cannot allocate '%d' bytes.\n", sx * image->sizeY * sizeof(unsigned int)); + fprintf(stderr, "Cannot allocate '%z' bytes.\n", sx * image->sizeY * sizeof(unsigned int)); return(NULL); } @@ -283,7 +283,7 @@ *rbuffer = (unsigned char*)malloc(sizeof(unsigned char)*base_image->sizeX*base_image->sizeY*4); if (*rbuffer == NULL) { - fprintf(stderr, "Cannot allocate '%d' bytes for image '%s'\n", sizeof(unsigned char)*base_image->sizeX*base_image->sizeY*4, image); + fprintf(stderr, "Cannot allocate '%z' bytes for image '%s'\n", sizeof(unsigned char)*base_image->sizeX*base_image->sizeY*4, image); /* Free the image */ free(base_image->data); free(base_image); diff -u -r ../trackballs-1.1.1.orig/src/player.cc ./src/player.cc --- ../trackballs-1.1.1.orig/src/player.cc 2005-11-17 15:18:37.402040031 +0100 +++ ./src/player.cc 2005-11-17 15:18:52.919339839 +0100 @@ -71,7 +71,7 @@ Ball::draw(); } void Player::tick(Real t) { - double dx,dy; + double dx = 0.0,dy = 0.0; int superAccelerate=0; static time_t lastTick=0; @@ -341,4 +341,5 @@ double espeed=modTimeLeft[MOD_GLASS] ? (1.5*speed) / crashTolerance : speed / crashTolerance; setHealth(1.0-espeed); this->Ball::crash(speed); + return true; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor