Hello all I have this code it works fine on both my computers but my when my friend trys to run my game it has a problem and would crash if not for the try catch code. This is the code that my log file is pointing to being the problem although I am not sure if it is that or something else. Any ideas on what might be going wrong would be appreciated.
taken from source.cpp function ini()
To see for yourself you can download the program and support files at ftp://24.0.62.164/Code:try { for(int z=0;z<256;z++) { int alpha = z; for(int y=0;y<256;y++) { for(int x=0;x<256;x++) { MyLightMap[x][y][z] = ((x*alpha)+((y*(255-alpha))))/256; } } if(z%3 == 0) //some graphics for the loading process { count++; int ncount = count*1.171875; char LOADTEXT[16] = "LOADING... ###%";// using 11 12 13 LOADTEXT[11] = '0' + ncount/100; LOADTEXT[12] = '0' + (ncount%100)/10; LOADTEXT[13] = '0' + ncount%10; blit(LAYOUT,BUFFER,0,0,0,0,scrx,scry); try //in case font didnt load properly { textout(BUFFER,big_font,LOADTEXT,scrx/2,scry/2,makecol(z,z,z)); } catch(...) { textout(BUFFER,font,LOADTEXT,scrx/2,scry/2,makecol(z,z,z)); } blit(BUFFER,screen,0,0,0,0,scrx,scry); } } if(DEBUGMODE)DEBUG<<"Blend Mode Enabled OK"<<endl; } catch(...) { if(DEBUGMODE)DEBUG<<"Blend Mode Encountered a problem and was unable to initalize."<<endl; DRAW_LIGHTS = false; }
Also keep in mind that it does work on my computers but not on his.
Use at your own risk etc etc. It is about 5 megs so it might take a little while.
edit: the game crashes later on still on his comp but I think if I can see what is wrong here I can fix it in the other spots.



LinkBack URL
About LinkBacks


