Free Hero Mesh

Check-in [c0bb41bad2]
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:Reserve two more of the HIT/HITBY bits for future
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c0bb41bad286138fab2b33741572436b9ecc50af
User & Date: user on 2021-02-27 00:49:12
Other Links: manifest | tags
Context
2021-03-02
23:07
Fix another mistake in saving levels check-in: 5a0f5f4cb4 user: user tags: trunk
2021-02-27
00:49
Reserve two more of the HIT/HITBY bits for future check-in: c0bb41bad2 user: user tags: trunk
2021-02-26
23:31
Add documentation about arrays. check-in: b5b8006733 user: user tags: trunk
Changes

Modified class.doc from [f254d4e148] to [20b90f2037].

1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
  be set, and bit7 must be clear.

bit27 *
  Allows hitting to the right regardless of Shape, Volume, etc. In order
  to actually move when sliding to the right, both bit25 and bit27 must
  be set, and bit7 must be clear.

bit28
  Available for your own use.

bit29
  Available for your own use.

bit30
  Available for your own use.

bit31
  Available for your own use.








|
|

|
|







1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
  be set, and bit7 must be clear.

bit27 *
  Allows hitting to the right regardless of Shape, Volume, etc. In order
  to actually move when sliding to the right, both bit25 and bit27 must
  be set, and bit7 must be clear.

bit28 *
  Reserved for future.

bit29 *
  Reserved for future.

bit30
  Available for your own use.

bit31
  Available for your own use.

Modified exec.c from [51942ec4c2] to [17ab5f4c5c].

775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
      while(objE!=VOIDLINK) {
        if(o->oflags&(OF_DESTROYED|OF_VISUALONLY)) break;
        oE=objects[objE];
        if(oE->height>0) {
          hit&=0xFC287000;
          v=send_message(objE,obj,MSG_HIT,NVALUE(oE->x),NVALUE(oE->y),NVALUE(hit));
          if(v.t) Throw("Type mismatch in HIT/HITBY");
          hit|=v.u&(classes[o->class]->cflags&CF_COMPATIBLE?0xF0098F7F:-1);
          if(hit&8) goto fail;
          if(!(hit&0x11)) {
            v=send_message(obj,objE,MSG_HITBY,NVALUE(o->x),NVALUE(o->y),NVALUE(hit));
            if(v.t) Throw("Type mismatch in HIT/HITBY");
            hit|=v.u&(classes[oE->class]->cflags&CF_COMPATIBLE?0xF0098F7F:-1);
            if(hit&8) goto fail;
          }
        }
        objE=obj_below(objE);
      }
      if((hit&0x200000) && !(hit&0x402008)) {
        if(hit&0x20000) goto success;







|




|







775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
      while(objE!=VOIDLINK) {
        if(o->oflags&(OF_DESTROYED|OF_VISUALONLY)) break;
        oE=objects[objE];
        if(oE->height>0) {
          hit&=0xFC287000;
          v=send_message(objE,obj,MSG_HIT,NVALUE(oE->x),NVALUE(oE->y),NVALUE(hit));
          if(v.t) Throw("Type mismatch in HIT/HITBY");
          hit|=v.u&(classes[o->class]->cflags&CF_COMPATIBLE?0xC0098F7F:-1);
          if(hit&8) goto fail;
          if(!(hit&0x11)) {
            v=send_message(obj,objE,MSG_HITBY,NVALUE(o->x),NVALUE(o->y),NVALUE(hit));
            if(v.t) Throw("Type mismatch in HIT/HITBY");
            hit|=v.u&(classes[oE->class]->cflags&CF_COMPATIBLE?0xC0098F7F:-1);
            if(hit&8) goto fail;
          }
        }
        objE=obj_below(objE);
      }
      if((hit&0x200000) && !(hit&0x402008)) {
        if(hit&0x20000) goto success;
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
      if(o->oflags&(OF_DESTROYED|OF_VISUALONLY)) break;
      oE=objects[objE];
      if(oE->height>0) {
        hit&=~7;
        // HIT/HITBY messages
        v=send_message(objE,obj,MSG_HIT,NVALUE(oE->x),NVALUE(oE->y),NVALUE(hit));
        if(v.t) Throw("Type mismatch in HIT/HITBY");
        hit|=v.u&(classes[o->class]->cflags&CF_COMPATIBLE?0xF0098F7F:-1);
        if(hit&8) goto fail;
        if(!(hit&0x11)) {
          v=send_message(obj,objE,MSG_HITBY,NVALUE(o->x),NVALUE(o->y),NVALUE(hit));
          if(v.t) Throw("Type mismatch in HIT/HITBY");
          hit|=v.u&(classes[oE->class]->cflags&CF_COMPATIBLE?0xF0098F7F:-1);
        }
        if(hit&0x108) goto fail;
        // Hardness/sharpness
        if(!(hit&0x22)) {
          if(o->sharp[dir>>1]>oE->hard[(dir^4)>>1] && !v_bool(destroy(obj,objE,2))) hit|=0x8004;
          if(oE->sharp[(dir^4)>>1]>o->hard[dir>>1] && !v_bool(destroy(objE,obj,1))) hit|=0x4C;
        }







|




|







842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
      if(o->oflags&(OF_DESTROYED|OF_VISUALONLY)) break;
      oE=objects[objE];
      if(oE->height>0) {
        hit&=~7;
        // HIT/HITBY messages
        v=send_message(objE,obj,MSG_HIT,NVALUE(oE->x),NVALUE(oE->y),NVALUE(hit));
        if(v.t) Throw("Type mismatch in HIT/HITBY");
        hit|=v.u&(classes[o->class]->cflags&CF_COMPATIBLE?0xC0098F7F:-1);
        if(hit&8) goto fail;
        if(!(hit&0x11)) {
          v=send_message(obj,objE,MSG_HITBY,NVALUE(o->x),NVALUE(o->y),NVALUE(hit));
          if(v.t) Throw("Type mismatch in HIT/HITBY");
          hit|=v.u&(classes[oE->class]->cflags&CF_COMPATIBLE?0xC0098F7F:-1);
        }
        if(hit&0x108) goto fail;
        // Hardness/sharpness
        if(!(hit&0x22)) {
          if(o->sharp[dir>>1]>oE->hard[(dir^4)>>1] && !v_bool(destroy(obj,objE,2))) hit|=0x8004;
          if(oE->sharp[(dir^4)>>1]>o->hard[dir>>1] && !v_bool(destroy(objE,obj,1))) hit|=0x4C;
        }
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
        if(o->oflags&(OF_DESTROYED|OF_VISUALONLY)) break;
        oE=objects[objE];
        if(oE->height>0) {
          hit&=~7;
          // HIT/HITBY messages
          v=send_message(objE,obj,MSG_HIT,NVALUE(oE->x),NVALUE(oE->y),NVALUE(hit));
          if(v.t) Throw("Type mismatch in HIT/HITBY");
          hit|=v.u&(classes[o->class]->cflags&CF_COMPATIBLE?0xF0098F7F:-1);
          if(hit&8) goto otherside;
          if(!(hit&0x11)) {
            v=send_message(obj,objE,MSG_HITBY,NVALUE(o->x),NVALUE(o->y),NVALUE(hit));
            if(v.t) Throw("Type mismatch in HIT/HITBY");
            hit|=v.u&(classes[oE->class]->cflags&CF_COMPATIBLE?0xF0098F7F:-1);
          }
          if(hit&0x108) goto otherside;
          // Hardness/sharpness
          if(!(hit&0x22)) {
            if(o->sharp[dir>>1]>oE->hard[(dir^4)>>1] && !v_bool(destroy(obj,objE,2))) hit|=0x8004;
            if(oE->sharp[(dir^4)>>1]>o->hard[dir>>1] && !v_bool(destroy(objE,obj,1))) hit|=0x4C;
          }







|




|







888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
        if(o->oflags&(OF_DESTROYED|OF_VISUALONLY)) break;
        oE=objects[objE];
        if(oE->height>0) {
          hit&=~7;
          // HIT/HITBY messages
          v=send_message(objE,obj,MSG_HIT,NVALUE(oE->x),NVALUE(oE->y),NVALUE(hit));
          if(v.t) Throw("Type mismatch in HIT/HITBY");
          hit|=v.u&(classes[o->class]->cflags&CF_COMPATIBLE?0xC0098F7F:-1);
          if(hit&8) goto otherside;
          if(!(hit&0x11)) {
            v=send_message(obj,objE,MSG_HITBY,NVALUE(o->x),NVALUE(o->y),NVALUE(hit));
            if(v.t) Throw("Type mismatch in HIT/HITBY");
            hit|=v.u&(classes[oE->class]->cflags&CF_COMPATIBLE?0xC0098F7F:-1);
          }
          if(hit&0x108) goto otherside;
          // Hardness/sharpness
          if(!(hit&0x22)) {
            if(o->sharp[dir>>1]>oE->hard[(dir^4)>>1] && !v_bool(destroy(obj,objE,2))) hit|=0x8004;
            if(oE->sharp[(dir^4)>>1]>o->hard[dir>>1] && !v_bool(destroy(objE,obj,1))) hit|=0x4C;
          }
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
        if(o->oflags&(OF_DESTROYED|OF_VISUALONLY)) break;
        oE=objects[objE];
        if(oE->height>0) {
          hit&=~7;
          // HIT/HITBY messages
          v=send_message(objE,obj,MSG_HIT,NVALUE(oE->x),NVALUE(oE->y),NVALUE(hit));
          if(v.t) Throw("Type mismatch in HIT/HITBY");
          hit|=v.u&(classes[o->class]->cflags&CF_COMPATIBLE?0xF0098F7F:-1);
          if(hit&8) goto fail;
          if(!(hit&0x11)) {
            v=send_message(obj,objE,MSG_HITBY,NVALUE(o->x),NVALUE(o->y),NVALUE(hit));
            if(v.t) Throw("Type mismatch in HIT/HITBY");
            hit|=v.u&(classes[oE->class]->cflags&CF_COMPATIBLE?0xF0098F7F:-1);
          }
          if(hit&0x108) goto fail;
          // Hardness/sharpness
          if(!(hit&0x22)) {
            if(o->sharp[dir>>1]>oE->hard[(dir^4)>>1] && !v_bool(destroy(obj,objE,2))) hit|=0x8004;
            if(oE->sharp[(dir^4)>>1]>o->hard[dir>>1] && !v_bool(destroy(objE,obj,1))) hit|=0x4C;
          }







|




|







923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
        if(o->oflags&(OF_DESTROYED|OF_VISUALONLY)) break;
        oE=objects[objE];
        if(oE->height>0) {
          hit&=~7;
          // HIT/HITBY messages
          v=send_message(objE,obj,MSG_HIT,NVALUE(oE->x),NVALUE(oE->y),NVALUE(hit));
          if(v.t) Throw("Type mismatch in HIT/HITBY");
          hit|=v.u&(classes[o->class]->cflags&CF_COMPATIBLE?0xC0098F7F:-1);
          if(hit&8) goto fail;
          if(!(hit&0x11)) {
            v=send_message(obj,objE,MSG_HITBY,NVALUE(o->x),NVALUE(o->y),NVALUE(hit));
            if(v.t) Throw("Type mismatch in HIT/HITBY");
            hit|=v.u&(classes[oE->class]->cflags&CF_COMPATIBLE?0xC0098F7F:-1);
          }
          if(hit&0x108) goto fail;
          // Hardness/sharpness
          if(!(hit&0x22)) {
            if(o->sharp[dir>>1]>oE->hard[(dir^4)>>1] && !v_bool(destroy(obj,objE,2))) hit|=0x8004;
            if(oE->sharp[(dir^4)>>1]>o->hard[dir>>1] && !v_bool(destroy(objE,obj,1))) hit|=0x4C;
          }