Changeset 280


Ignore:
Timestamp:
Jan 24, 2011, 3:35:20 PM (10 years ago)
Author:
sam
Message:

Print error reports before panicking when asset loads fail.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/font.cpp

    r272 r280  
    6262    if (!data->img)
    6363    {
     64#if !FINAL_RELEASE
     65        fprintf(stderr, "ERROR: could not load %s\n", path);
     66#endif
    6467        SDL_Quit();
    6568        exit(1);
  • trunk/src/sample.cpp

    r259 r280  
    1616#include <cmath>
    1717
     18#include <SDL.h>
    1819#include <SDL_mixer.h>
    1920
     
    4243    data->name = strdup(path);
    4344    data->chunk = Mix_LoadWAV(path);
     45    if (!data->chunk)
     46    {
     47#if !FINAL_RELEASE
     48        fprintf(stderr, "ERROR: could not load %s\n", path);
     49#endif
     50        SDL_Quit();
     51        exit(1);
     52    }
    4453}
    4554
  • trunk/src/tileset.cpp

    r269 r280  
    6868    if (!data->img)
    6969    {
     70#if !FINAL_RELEASE
     71        fprintf(stderr, "ERROR: could not load %s\n", path);
     72#endif
    7073        SDL_Quit();
    7174        exit(1);
Note: See TracChangeset for help on using the changeset viewer.