Free Hero Mesh

Diff
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

Differences From Artifact [437c5a9174]:

To Artifact [012a2779dc]:


545
546
547
548
549
550
551
552

553
554
555
556
557
558
559
560
561
562
563

564
565
566
567
568
569
570
571
572
573
574

575
576
577
578
579
580
581
545
546
547
548
549
550
551

552
553
554
555
556
557
558
559
560
561
562

563
564
565
566
567
568
569
570
571
572
573

574
575
576
577
578
579
580
581







-
+










-
+










-
+







      goto redraw;
    case SDL_QUIT:
      exit(0);
      break;
  }
}

static void list_objects_at(int xy) {
static void list_objects_at(int xy,Uint32*pf,const char*s) {
  static const char*const dirs[8]={"E ","NE","N ","NW","W ","SW","S ","SE"};
  SDL_Event ev;
  SDL_Rect r;
  char buf[256];
  int scroll=0;
  int count=0;
  Uint32 n,t;
  Object*o;
  int i,j;
  if(xy<0 || xy>=64*64) return;
  n=playfield[xy];
  n=pf[xy];
  if(n==VOIDLINK) return;
  while(n!=VOIDLINK) t=n,count++,n=objects[n]->up;
  redraw:
  r.x=r.y=0;
  r.w=screen->w;
  r.h=screen->h;
  SDL_FillRect(screen,&r,0xF1);
  r.y=8;
  r.h-=8;
  scrollbar(&scroll,r.h/8,count,0,&r);
  snprintf(buf,255," %d objects at (%d,%d): ",count,(xy&63)+1,(xy/64)+1);
  snprintf(buf,255," %d %sobjects at (%d,%d): ",count,s,(xy&63)+1,(xy/64)+1);
  SDL_LockSurface(screen);
  draw_text(0,0,buf,0xF7,0xF0);
  n=t;
  for(i=0;i<scroll && n!=VOIDLINK;i++) n=objects[n]->down;
  for(i=0;i<screen->h/8 && n!=VOIDLINK;i++) {
    o=objects[n];
    snprintf(buf,255," %8d: %-14.14s %3d %s",n,classes[o->class]->name,o->image,classes[o->class]->cflags&CF_QUIZ?"":dirs[o->dir&7]);
747
748
749
750
751
752
753



754
755

756
757
758
759
760
761
762
747
748
749
750
751
752
753
754
755
756
757

758
759
760
761
762
763
764
765







+
+
+

-
+







      return prev;
    case '^d': // Describe object
      describe_at(number-65);
      return prev;
    case '^g': // Display global variables
      global_examine();
      return prev;
    case '^n': // List objects (bizarro)
      list_objects_at(number-65,bizplayfield,"bizarro ");
      return prev;
    case '^o': // List objects
      list_objects_at(number-65);
      list_objects_at(number-65,playfield,"");
      return prev;
    case '^p': // Slow replay
      replay_time=replay_time?0:1;
      return 0;
    case '^s': // Toggle solution replay
      if(replay_count) save_replay();
      solution_replay^=1;