Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

some patches from CD




I made the patches with  diff -c crossfire.cd crossfire   which
makes diff on all files in these directories.
This is the wrong order for the new and old directory.
But 

	patch -p -R < cd.patch.1

works if your current dir is crossfire/.. .

Tony

diff -c crossfire.cd/crossfire.man crossfire/crossfire.man
*** crossfire.cd/crossfire.man	Fri Jul 10 17:52:58 1992
--- crossfire/crossfire.man	Sat Jul  4 01:48:55 1992
***************
*** 47,53 ****
  Specifies which name your character will start with in Crossfire.
  You have to choose a name, either this way or with the "name" command, if
  you want to enter the highscore list.
- .TP
  .B peaceful
  You can turn this mode on or off with the strings "on"/"off".  Default
  is off.  If the mode is turned on, you will push other players instead of
--- 47,52 ----
diff -c crossfire.cd/edit.c crossfire/edit.c
*** crossfire.cd/edit.c	Fri Jul 10 21:20:05 1992
--- crossfire/edit.c	Sat Jul  4 01:49:00 1992
***************
*** 249,256 ****
    XSetBackground(pl->gdisp,pl->gc_game,pl->gbackground);
    if(mx>=0&&mx<pl->emx&&my>=0&&my<pl->emy) {
      object *op;
-     object *opa;
- 
      if(start_flag) {
        int dx=pl->edx,dy=pl->edy;
        pl->emap->startx=mx+pl->edx,pl->emap->starty=my+pl->edy;
--- 249,254 ----
***************
*** 260,266 ****
        start_flag=0;
        return;
      }
- 
      if(button==2) {
  #if 0
        fprintf(stderr,"Background: %d\n",
--- 258,263 ----
***************
*** 268,312 ****
  #endif
        if(moved) return;
        if((pl->e_ob=get_map_ob(pl->emap,mx+pl->edx,my+pl->edy))!=NULL) {
- #if 0
          if(pl->e_ob->above)
            fprintf(stderr,"Error, more than one object present.\n");
- #endif
          dump_object(pl->e_ob);
          fprintf(stderr,"%s\n",errmsg);
- 	while (pl->e_ob->above) {	/* edit the top object */
- 	  pl->e_ob = pl->e_ob->above;
- 	  dump_object(pl->e_ob);
- 	  fprintf(stderr,"%s\n",errmsg);
- 	}
        }
        redraw_edit_item(pl);
        return;
      }
- 
      if(button==3||(button==1&&pl->eselect!=0)) {
!       /* button 1  does replace of all objects
! 	 button 3  adds one object above the others or removes one object
! 	           if background selected if no object lefts add background
! 	 */
!       char f = pl->eselect!=0 ? pl->eselect : G_BLANK;
! 
!       if((button==1 || pl->earchselect==NULL) &&
! 	 (op=get_map_ob(pl->emap,mx+pl->edx,my+pl->edy))!=NULL) {
! 	while (op) {
! 	  opa = op->above;
! 	  if (button == 1 || !opa) {
! 	    remove_ob(op);
! 	    free_object(op);
! 	  } else {
! 	    f = op->face;
! 	  }
! 	  op = opa;
! 	}
        }
        set_omap(pl->emap,mx+pl->edx,my+pl->edy,f);
! 
!       if(pl->earchselect!=NULL) {
          op=arch_to_object(pl->earchselect);
          f=op->face,op->x=mx+pl->edx,op->y=my+pl->edy;
          insert_ob_in_map(op,pl->emap);
--- 265,286 ----
  #endif
        if(moved) return;
        if((pl->e_ob=get_map_ob(pl->emap,mx+pl->edx,my+pl->edy))!=NULL) {
          if(pl->e_ob->above)
            fprintf(stderr,"Error, more than one object present.\n");
          dump_object(pl->e_ob);
          fprintf(stderr,"%s\n",errmsg);
        }
        redraw_edit_item(pl);
        return;
      }
      if(button==3||(button==1&&pl->eselect!=0)) {
!       char f=(button==1?pl->eselect:G_BLANK);
!       if((op=get_map_ob(pl->emap,mx+pl->edx,my+pl->edy))!=NULL) {
!         remove_ob(op);
!         free_object(op);
        }
        set_omap(pl->emap,mx+pl->edx,my+pl->edy,f);
!       if(pl->earchselect!=NULL&&button==1) {
          op=arch_to_object(pl->earchselect);
          f=op->face,op->x=mx+pl->edx,op->y=my+pl->edy;
          insert_ob_in_map(op,pl->emap);
***************
*** 326,334 ****
          update_walls(pl,mx+pl->edx,my+pl->edy,4+mx*24,28+24*my);
          return;
        }
- 
        set_map(pl->emap,mx+pl->edx,my+pl->edy,f);
- 
        if (pl->iscolor){
          biff = f;
          XSetForeground(pl->gdisp,pl->gc_game,
--- 300,306 ----
diff -c crossfire.cd/edit.h crossfire/edit.h
*** crossfire.cd/edit.h	Fri Jul 10 20:05:15 1992
--- crossfire/edit.h	Sat Jul  4 01:48:57 1992
***************
*** 31,41 ****
  /* The maximum width of the edit-window */
  int edit_width=24,edit_height=20;
  
! #define BG_SIZE 19
  
  static char bg_icons[BG_SIZE]={
!   'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p',
!   '\037',G_BLANK,'\0'
  };
  
  static char walls[16]= {
--- 31,40 ----
  /* The maximum width of the edit-window */
  int edit_width=24,edit_height=20;
  
! #define BG_SIZE 18
  
  static char bg_icons[BG_SIZE]={
!   'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','\037','\0'
  };
  
  static char walls[16]= {
diff -c crossfire.cd/global.h crossfire/global.h
*** crossfire.cd/global.h	Wed Jul  8 18:37:46 1992
--- crossfire/global.h	Sat Jul  4 01:48:57 1992
***************
*** 59,65 ****
    float speed_left;             /* How much speed is left to spend this round */
    unsigned short count;         /* Which nr. of object created this is. */
    unsigned short nrof;
!   char face;
    signed char dirx,diry;        /* Means the object is moving that way. */
    unsigned char type;           /* PLAYER, BULLET, etc */
    unsigned char immune;         /* Attacks the object is immune against */
--- 59,65 ----
    float speed_left;             /* How much speed is left to spend this round */
    unsigned short count;         /* Which nr. of object created this is. */
    unsigned short nrof;
!   signed char face;
    signed char dirx,diry;        /* Means the object is moving that way. */
    unsigned char type;           /* PLAYER, BULLET, etc */
    unsigned char immune;         /* Attacks the object is immune against */
diff -c crossfire.cd/living.c crossfire/living.c
*** crossfire.cd/living.c	Wed Jul  8 18:51:37 1992
--- crossfire/living.c	Sat Jul  4 01:49:01 1992
***************
*** 76,82 ****
  
  void remove_statbonus(object *op) {
    int i;
!   char *p;
    for(i=0,p= (char *) &op->stats;i<6;i++,p++)
      *p-=classbonus[op->contr->face][i];
  }
--- 76,82 ----
  
  void remove_statbonus(object *op) {
    int i;
!   signed char *p;
    for(i=0,p= (char *) &op->stats;i<6;i++,p++)
      *p-=classbonus[op->contr->face][i];
  }
***************
*** 83,89 ****
  
  void add_statbonus(object *op) {
    int i;
!   char *p;
    for(i=0,p= (char *) &op->stats;i<6;i++,p++)
      *p+=classbonus[op->contr->face][i];
  }
--- 83,89 ----
  
  void add_statbonus(object *op) {
    int i;
!   signed char *p;
    for(i=0,p= (char *) &op->stats;i<6;i++,p++)
      *p+=classbonus[op->contr->face][i];
  }
***************
*** 146,152 ****
  
  int allowed_class(object *op) {
    int i;
!   char *p;
    for(i=0,p= (char *) &op->stats;i<6;i++,p++)
      if(*p<0) return 0;
    return 1;
--- 146,152 ----
  
  int allowed_class(object *op) {
    int i;
!   signed char *p;
    for(i=0,p= (char *) &op->stats;i<6;i++,p++)
      if(*p<0) return 0;
    return 1;
diff -c crossfire.cd/main.c crossfire/main.c
*** crossfire.cd/main.c	Thu Jul  9 21:43:23 1992
--- crossfire/main.c	Sat Jul  4 01:49:03 1992
***************
*** 1408,1417 ****
    if(!op->state&&--op->last_heal<0) {
      if(op->stats.hp<op->stats.maxhp)
        op->stats.hp++,op->stats.food--;
!     op->last_heal=500/(op->stats.maxhp>66 && op->stats.hp >= op->stats.maxhp ?
! 		       70  : 
! 		       op->stats.maxhp+4);
!     op->stats.food--;
    }
    if(!op->state&&op->contr->golem==NULL&&--op->last_sp<0) {
      if(op->stats.sp<op->stats.maxsp)
--- 1408,1414 ----
    if(!op->state&&--op->last_heal<0) {
      if(op->stats.hp<op->stats.maxhp)
        op->stats.hp++,op->stats.food--;
!     op->last_heal=500/op->stats.maxhp+4, op->stats.food--;
    }
    if(!op->state&&op->contr->golem==NULL&&--op->last_sp<0) {
      if(op->stats.sp<op->stats.maxsp)
diff -c crossfire.cd/shop.c crossfire/shop.c
*** crossfire.cd/shop.c	Fri Jul 10 01:53:38 1992
--- crossfire/shop.c	Sat Jul  4 01:49:04 1992
***************
*** 79,89 ****
        if(tmp!=NULL)
          free_object(tmp);
        return 1;
!     } else if (silver_ob->nrof >= i%10) {
!       paid= i%10 + ((silver_ob->nrof - i%10)/10)*10;
!       tmp=get_split_ob(silver_ob, paid);
!       if(tmp!=NULL)
!         free_object(tmp);
      }
    }
    if(gold_ob==NULL) {
--- 79,88 ----
        if(tmp!=NULL)
          free_object(tmp);
        return 1;
!     } else {
!       paid=silver_ob->nrof;
!       remove_ob(silver_ob);
!       free_object(silver_ob);
      }
    }
    if(gold_ob==NULL) {
***************
*** 90,96 ****
      fprintf(stderr,"Bug, should have gold coins.\n");
      return 0;
    }
!   tmp=get_split_ob(gold_ob,(i-paid+9)/10);
    if(tmp!=NULL) {
      paid+=tmp->nrof*10;
      free_object(tmp);
--- 89,95 ----
      fprintf(stderr,"Bug, should have gold coins.\n");
      return 0;
    }
!   tmp=get_split_ob(gold_ob,i/10);
    if(tmp!=NULL) {
      paid+=tmp->nrof*10;
      free_object(tmp);