Free Hero Mesh

Check-in [d0f39b05fa]
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:Fix a bug in game.c causing it to use the wrong replay data when switching between the game and editor.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d0f39b05fa3ee91c953425d4e5809854212aac63
User & Date: user on 2021-03-23 05:06:47
Other Links: manifest | tags
Context
2021-03-23
05:18
Implement %R substitution for roman numbers, and do not throw a type mismatch error during string substitution check-in: ca9c200f64 user: user tags: trunk
05:06
Fix a bug in game.c causing it to use the wrong replay data when switching between the game and editor. check-in: d0f39b05fa user: user tags: trunk
05:00
Implement the possibility to add new levels into the puzzle set. check-in: bbdc443497 user: user tags: trunk
Changes

Modified game.c from [9b17d3be8b] to [be2f426be6].

790
791
792
793
794
795
796

797
798
799
800
801
802
803
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804







+







  }
}

void run_game(void) {
  int i;
  SDL_Event ev;
  set_caption();
  replay_count=0;
  if(side_mode==255) setup_game();
  begin_level(level_id);
  redraw_game();
  timerflag=0;
  SDL_SetTimer(10,timer_callback);
  while(SDL_WaitEvent(&ev)) {
    switch(ev.type) {
834
835
836
837
838
839
840

841
842
843
844
845
846
847
848
849
850
851
852
853
854

855
856
857
858
859
860
861
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864







+














+







      case SDL_KEYDOWN:
        i=exec_key_binding(&ev,0,0,0,game_command,0);
      command:
        if(i==-1) goto quit;
        if(i==-2) {
          main_options['e']=1;
          SDL_SetTimer(0,0);
          save_replay();
          return;
        }
      replay:
        if(inputs_count) {
          for(i=0;i<inputs_count && !gameover;i++) if(inputs[i]) input_move(inputs[i]);
          inputs_count=0;
          no_dead_anim=0;
        }
        redraw_game();
        timerflag=0; // ensure we have not missed a timer event
        break;
    }
  }
  quit:
  SDL_SetTimer(0,0);
  save_replay();
  exit(0);
}

void run_auto_test(void) {
  Uint8 rc=0;
  int lvl,pro,i,n;