Free Hero Mesh

Check-in [34ca97ebc2]
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.
Overview
Comment:Correct the picture loading to load all pictures instead of missing one
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 34ca97ebc265b692517dddcb0eda755c67deb62b
User & Date: user on 2021-05-28 04:40:20
Other Links: manifest | tags
Context
2021-06-02
04:35
Improvement to documentation and FAQ check-in: c0239a6664 user: user tags: trunk
2021-05-28
04:40
Correct the picture loading to load all pictures instead of missing one check-in: 34ca97ebc2 user: user tags: trunk
2021-05-27
22:35
Some improvements to documentation. (No code changes.) check-in: a62361241e user: user tags: trunk
Changes

Modified picture.c from [67c348a827] to [6e4f43abc3].

721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
  picture_size=decide_picture_size(nwantsize,wantsize,havesize,n);
  if(main_options['x']) goto done;
  if(sqlite3_prepare_v2(userdb,"SELECT `ID`, `OFFSET` FROM `PICTURES` WHERE NOT `DEPENDENT`;",-1,&st,0))
   fatal("Unable to prepare SQL statement while loading pictures: %s\n",sqlite3_errmsg(userdb));
  optionquery[1]=Q_screenFlags;
  v=xrm_get_resource(resourcedb,optionquery,optionquery,2);
  i=v&&strchr(v,'h');
  picts=SDL_CreateRGBSurface((i?SDL_HWSURFACE:SDL_SWSURFACE)|SDL_SRCCOLORKEY,picture_size<<4,picture_size*((n+15)>>4),8,0,0,0,0);
  if(!picts) fatal("Error allocating surface for pictures: %s\n",SDL_GetError());
  init_palette();
  for(i=0;i<n;i++) {
    if((j=sqlite3_step(st))!=SQLITE_ROW) {
      if(j==SQLITE_DONE) break;
      fatal("SQL error (%d): %s\n",j,sqlite3_errmsg(userdb));
    }







|







721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
  picture_size=decide_picture_size(nwantsize,wantsize,havesize,n);
  if(main_options['x']) goto done;
  if(sqlite3_prepare_v2(userdb,"SELECT `ID`, `OFFSET` FROM `PICTURES` WHERE NOT `DEPENDENT`;",-1,&st,0))
   fatal("Unable to prepare SQL statement while loading pictures: %s\n",sqlite3_errmsg(userdb));
  optionquery[1]=Q_screenFlags;
  v=xrm_get_resource(resourcedb,optionquery,optionquery,2);
  i=v&&strchr(v,'h');
  picts=SDL_CreateRGBSurface((i?SDL_HWSURFACE:SDL_SWSURFACE)|SDL_SRCCOLORKEY,picture_size<<4,picture_size*((n+16)>>4),8,0,0,0,0);
  if(!picts) fatal("Error allocating surface for pictures: %s\n",SDL_GetError());
  init_palette();
  for(i=0;i<n;i++) {
    if((j=sqlite3_step(st))!=SQLITE_ROW) {
      if(j==SQLITE_DONE) break;
      fatal("SQL error (%d): %s\n",j,sqlite3_errmsg(userdb));
    }