1 | /* |
1 | /* |
2 | CrossFire, A Multiplayer game for X-windows |
2 | CrossFire, A Multiplayer game for X-windows |
3 | |
3 | |
|
|
4 | Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team |
4 | Copyright (C) 2003-2005 Mark Wedel & Crossfire Development Team |
5 | Copyright (C) 2003-2005 Mark Wedel & Crossfire Development Team |
5 | Copyright (C) 1992 Frank Tore Johansen |
6 | Copyright (C) 1992 Frank Tore Johansen |
6 | |
7 | |
7 | This program is free software; you can redistribute it and/or modify |
8 | This program is free software; you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by |
9 | it under the terms of the GNU General Public License as published by |
… | |
… | |
579 | #define FLAG_BERSERK 99 /* monster will attack closest living |
580 | #define FLAG_BERSERK 99 /* monster will attack closest living |
580 | object */ |
581 | object */ |
581 | #define FLAG_NEUTRAL 100 /* monster is from type neutral */ |
582 | #define FLAG_NEUTRAL 100 /* monster is from type neutral */ |
582 | #define FLAG_NO_ATTACK 101 /* monster don't attack */ |
583 | #define FLAG_NO_ATTACK 101 /* monster don't attack */ |
583 | #define FLAG_NO_DAMAGE 102 /* monster can't be damaged */ |
584 | #define FLAG_NO_DAMAGE 102 /* monster can't be damaged */ |
584 | |
|
|
585 | //TODO schmorp: removed in rewrite, not yet readded |
|
|
586 | #define FLAG_OBJ_ORIGINAL 103 /* NEVER SET THIS. Item was loaded by |
585 | #define FLAG_OBJ_ORIGINAL 103 /* NEVER SET THIS. Item was loaded by |
587 | * load_original_map() */ |
586 | * load_original_map() */ |
588 | #define FLAG_OBJ_SAVE_ON_OVL 104 /* this object should be saved on |
587 | #define FLAG_OBJ_SAVE_ON_OVL 104 /* this object should be saved on |
589 | * the overlay, and is not subject to |
588 | * the overlay, and is not subject to |
590 | * decay. */ |
589 | * decay. */ |
591 | #define FLAG_ACTIVATE_ON_PUSH 105 /* connected object is activated when 'pushed' */ |
590 | #define FLAG_ACTIVATE_ON_PUSH 105 /* connected object is activated when 'pushed' */ |
592 | #define FLAG_ACTIVATE_ON_RELEASE 106 /* connected object is activated when 'released' */ |
591 | #define FLAG_ACTIVATE_ON_RELEASE 106 /* connected object is activated when 'released' */ |
593 | #define FLAG_IS_WATER 107 |
592 | #define FLAG_IS_WATER 107 |
594 | #define FLAG_CONTENT_ON_GEN 108 |
593 | #define FLAG_CONTENT_ON_GEN 108 |
595 | #define FLAG_IS_A_TEMPLATE 109 /* Object has no ingame life until instanciated */ |
594 | #define FLAG_IS_A_TEMPLATE 109 /* Object has no ingame life until instanciated */ |
596 | #define FLAG_IS_BUILDABLE 110 /* Can build on item */ |
595 | #define FLAG_IS_BUILDABLE 110 /* Can build on item */ |
|
|
596 | #define FLAG_DESTROY_ON_DEATH 111 /* Object will be destroyed when env dies */ |
|
|
597 | #define FLAG_NO_SAVE 112 // item doesn't get saved with map |
597 | |
598 | |
598 | #define NUM_FLAGS 111 /* Should always be equal to the last |
599 | #define NUM_FLAGS 113 /* Should always be equal to the last |
599 | * defined flag + 1. If you change this, |
600 | * defined flag + 1. If you change this, |
600 | * make sure you update the flag_links |
601 | * make sure you update the flag_links |
601 | * in common/loader.l |
602 | * in common/loader.l |
602 | */ |
603 | */ |
603 | |
604 | |
604 | /* Values can go up to 127 before the size of the flags array in the |
605 | /* Values can go up to 127 before the size of the flags array in the |
605 | * object structure needs to be enlarged. |
606 | * object structure needs to be enlarged. |
606 | * So there are 18 available flags slots |
607 | * So there are 18 available flags slots |
607 | */ |
608 | */ |
… | |
… | |
659 | * Add check - if type is 0, don't stop anything from moving |
660 | * Add check - if type is 0, don't stop anything from moving |
660 | * onto it. |
661 | * onto it. |
661 | * |
662 | * |
662 | */ |
663 | */ |
663 | #define OB_TYPE_MOVE_BLOCK(ob1, type) \ |
664 | #define OB_TYPE_MOVE_BLOCK(ob1, type) \ |
664 | ( (type != 0) && (ob1->move_type & type) == ob1->move_type) |
665 | ((type) && (ob1->move_type & type) == ob1->move_type) |
665 | |
666 | |
666 | |
667 | |
667 | #define SET_GENERATE_TYPE(xyz,va) (xyz)->stats.sp=(va) |
668 | #define SET_GENERATE_TYPE(xyz,va) (xyz)->stats.sp=(va) |
668 | #define GENERATE_TYPE(xyz) ((xyz)->stats.sp) |
669 | #define GENERATE_TYPE(xyz) ((xyz)->stats.sp) |
669 | #define GENERATE_SPEED(xyz) ((xyz)->stats.maxsp) /* if(!RANDOM()%<speed>) */ |
670 | #define GENERATE_SPEED(xyz) ((xyz)->stats.maxsp) /* if(!RANDOM()%<speed>) */ |
… | |
… | |
811 | /* changing directions */ |
812 | /* changing directions */ |
812 | /* this is VERTICAL movement */ |
813 | /* this is VERTICAL movement */ |
813 | #define LO4 15 /* bitmasks for upper and lower 4 bits from 8 bit fields */ |
814 | #define LO4 15 /* bitmasks for upper and lower 4 bits from 8 bit fields */ |
814 | #define HI4 240 |
815 | #define HI4 240 |
815 | |
816 | |
816 | #define BLANK_FACE_NAME "blank.111" |
817 | #define BLANK_FACE_NAME "blank.x11" |
817 | #define EMPTY_FACE_NAME "empty.111" |
818 | #define EMPTY_FACE_NAME "empty.x11" |
818 | #define DARK_FACE1_NAME "dark1.111" |
819 | #define DARK_FACE1_NAME "dark1.x11" |
819 | #define DARK_FACE2_NAME "dark2.111" |
820 | #define DARK_FACE2_NAME "dark2.x11" |
820 | #define DARK_FACE3_NAME "dark3.111" |
821 | #define DARK_FACE3_NAME "dark3.x11" |
821 | #define SMOOTH_FACE_NAME "default_smoothed.111" |
822 | #define SMOOTH_FACE_NAME "default_smoothed.111" |
822 | |
823 | |
823 | /* |
824 | /* |
824 | * Defines for the luck/random functions to make things more readable |
825 | * Defines for the luck/random functions to make things more readable |
825 | */ |
826 | */ |