blackfur.png file from empire campaign is malformed, made me think there was a bug in png loading.
}
+extern bool cmdline(const char *cmd);
+
void Game::InitGame()
{
#if PLATFORM_MACOSX
#if PLATFORM_LINUX
int output = -1;
- extern bool cmdline(const char *cmd);
unsigned char rc = 0;
output = OPENAL_OUTPUT_ALSA; // Try alsa first...
if (cmdline("forceoss")) // ...but let user override that.
}
}
+extern SDL_Rect **resolutions;
+
void MenuTick(){
//menu buttons
selected=Menu::getSelected(mousecoordh*640/screenwidth,480-mousecoordv*480/screenheight);
bool isCustomResolution,found;
switch(selected){
case 0:
- extern SDL_Rect **resolutions;
isCustomResolution = true;
found = false;
for(int i = 0; (!found) && (resolutions[i]); i++) {
int Menu::getSelected(int mousex, int mousey){
for(vector<MenuItem>::iterator it=items.begin();it!=items.end();it++)
- if(it->type==MenuItem::BUTTON || it->type==MenuItem::IMAGEBUTTON || it->type==MenuItem::MAPMARKER){
+ if(it->type==MenuItem::BUTTON || it->type==MenuItem::IMAGEBUTTON || it->type==MenuItem::MAPMARKER) {
int mx=mousex;
int my=mousey;
if(it->type==MenuItem::MAPMARKER){
png_byte **row_pointers = NULL;
FILE *fp = fopen(file_name, "rb");
- if (fp == NULL)
+ if (fp == NULL) {
+ cerr << file_name << " not found" << endl;
return(NULL);
+ }
png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
if (png_ptr == NULL)
tex.sizeY = height;
tex.bpp = 32;
retval = true;
-
+
png_done:
+ if(!retval) {
+ cerr << "There was a problem loading " << file_name << endl;
+ }
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
if (fp)
fclose(fp);