Free Hero Mesh

Check-in [52e9907daf]
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:A change in the implementation of ordered objects (currently not in use nor tested)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 52e9907daf2d9d60785b22f2264579b0d208ba24
User & Date: user on 2022-04-21 22:53:06
Other Links: manifest | tags
Context
2022-04-22
03:22
Add the -U switch for experimental/unstable features. check-in: 747db98980 user: user tags: trunk
2022-04-21
22:53
A change in the implementation of ordered objects (currently not in use nor tested) check-in: 52e9907daf user: user tags: trunk
2022-04-20
04:36
Implement -+ switch to load level by ID number instead of by order number. check-in: 33f8d50d24 user: user tags: trunk
Changes

Modified exec.c from [01a454ca8b] to [b0f7b5bc62].

3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
  if(generation_number<=TY_MAXTYPE) return "Too many generations of objects";
  if(firstobj==VOIDLINK) return "Game cannot continue with no objects";
  // Finished
  return 0;
}

const char*init_level(void) {
  Uint32 n;
  if(setjmp(my_env)) return my_error;
  clear_inventory();
  if(main_options['t']) {
    printf("[Level %d restarted]\n",level_id);
    if(!traced_obj.t) {
      const char*s;
      optionquery[1]=Q_traceObject;







|







3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
  if(generation_number<=TY_MAXTYPE) return "Too many generations of objects";
  if(firstobj==VOIDLINK) return "Game cannot continue with no objects";
  // Finished
  return 0;
}

const char*init_level(void) {
  Uint32 n,m;
  if(setjmp(my_env)) return my_error;
  clear_inventory();
  if(main_options['t']) {
    printf("[Level %d restarted]\n",level_id);
    if(!traced_obj.t) {
      const char*s;
      optionquery[1]=Q_traceObject;
3730
3731
3732
3733
3734
3735
3736

3737
3738
3739
3740
3741
3742
3743
  if(control_class) {
    control_obj=objalloc(control_class);
    if(control_obj==VOIDLINK) Throw("Error creating object");
  }
  n=lastobj;
  while(n!=VOIDLINK && !(objects[n]->oflags&OF_ORDERED)) {
    send_message(VOIDLINK,n,MSG_INIT,NVALUE(0),NVALUE(0),NVALUE(0));

    if(classes[objects[n]->class]->order && !(objects[n]->oflags&OF_DESTROYED)) set_order(n);
    n=objects[n]->prev;
  }
  broadcast(VOIDLINK,0,MSG_POSTINIT,NVALUE(0),NVALUE(0),NVALUE(0),0);
  if(gameover) return 0;
  return execute_turn(0);
}







>

|





3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
  if(control_class) {
    control_obj=objalloc(control_class);
    if(control_obj==VOIDLINK) Throw("Error creating object");
  }
  n=lastobj;
  while(n!=VOIDLINK && !(objects[n]->oflags&OF_ORDERED)) {
    send_message(VOIDLINK,n,MSG_INIT,NVALUE(0),NVALUE(0),NVALUE(0));
    m=objects[n]->prev;
    if(classes[objects[n]->class]->order && !(objects[n]->oflags&OF_DESTROYED)) set_order(n);
    n=m;
  }
  broadcast(VOIDLINK,0,MSG_POSTINIT,NVALUE(0),NVALUE(0),NVALUE(0),0);
  if(gameover) return 0;
  return execute_turn(0);
}