Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I have written a patch to the FIXME , changing the background to a trophy image in the hall of fame in tuxmath..
- firstly , save that image in the trunk say /images/backgrounds/
- 1. I simple added the enum entry for the new image.
- *********************i have added that entry as IMG_BAT********************
- this is the patch for this file:
- PATCH:
- akash@akash-laptop:~/tuxmath/
- trunk/src$ diff -u fileops.h nfileops.h
- --- fileops.h 2009-03-26 06:10:01.000000000 +0530
- +++ nfileops.h 2009-03-26 06:08:03.000000000 +0530
- @@ -27,7 +27,7 @@
- /* Names for images (formerly in images.h) */
- enum {
- -
- + IMG_BAT,
- IMG_STANDBY,
- IMG_MENU_BKG,
- IMG_MENU_TITLE,
- 2. then i added the data prefix to the images array.
- then i added it's data prefix in fileops_media.c , say if my image is icon.png.....then i ll write /images/backgrounds/icon.png
- PATCH:
- akash@akash-laptop:~/tuxmath/trunk/src$ diff -u fileops_media.c nfileops_media.c--- fileops_media.c 2009-03-26 06:11:15.000000000 +0530
- +++ nfileops_media.c 2009-03-26 06:07:17.000000000 +0530
- @@ -22,7 +22,7 @@
- int i;
- static char* image_filenames[NUM_IMAGES] = {
- -
- + DATA_PREFIX "/images/backgrounds/icon.png",
- DATA_PREFIX "/images/status/standby.png",
- DATA_PREFIX "/images/title/menu_bkg.jpg",
- DATA_PREFIX "/images/title/title1.png",
- 3.the final step was to try it anywhere ( i was just testing if it works, only then proceed with the rt material)
- then i just blit(block image transfer )that image on the background....
- PATCH:
- akash@akash-laptop:~/tuxmath/trunk/src$ diff -u highscore.c nhighscore.c--- highscore.c 2009-03-26 06:12:50.000000000 +0530
- +++ nhighscore.c 2009-03-26 06:08:23.000000000 +0530
- @@ -176,6 +176,9 @@
- SDL_BlitSurface( current_bkg(), NULL, screen, NULL );
- /* FIXME maybe add image of trophy or similar pic */
- /* Draw Tux: */
- + if(images[IMG_BAT])
- + SDL_BlitSurface(images[IMG_BAT], NULL, screen, NULL);
- +
- if (Tux && Tux->frame[0]) /* make sure sprite has at least one frame */
- SDL_BlitSurface(Tux->frame[0], NULL, screen, &TuxRect);
- /* Draw controls: */
- this way it is possible to change the background image the hall of fame....
- So, here i completed my first FIXME ,
- ll try to FIX more like those..
- regards
- akash gangil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement