Overview
Comment: | Correct and complete the implementation of arrays in the converter |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
33593e7ab7fce6e2af31979a4a62f7da |
User & Date: | user on 2021-02-25 05:36:38 |
Other Links: | manifest | tags |
Context
2021-02-25
| ||
07:04 | Correct the array dimensions and complete the implementation of arrays. Some levels of FALLING still don't work, but at least some of these (such as level 9) are not due to arrays. check-in: e7e0e8408f user: user tags: trunk | |
05:36 | Correct and complete the implementation of arrays in the converter check-in: 33593e7ab7 user: user tags: trunk | |
03:28 | Implement the {append} macro; also start to implement arrays in the conversion check-in: c4bb0e3270 user: user tags: trunk | |
Changes
Modified mbtofhm.c from [86b6c496cf] to [3feb2569bb].
︙ | |||
42 43 44 45 46 47 48 49 50 51 52 53 54 55 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | + | unsigned short nmsgs; unsigned char**msgscode; short defpic; } ClassInfo; static int nusermsg; static char**usermsg; static ClassInfo*class[512]; static char has_array; // Levels static int nlevels; static unsigned short*levelid; // Sounds static int nsounds; |
︙ | |||
584 585 586 587 588 589 590 | 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 | - - + | case 51: fprintf(fp," 0x%02X",*op); break; case 52: fprintf(fp," 0x%X",op[1]|(op[2]<<8)|(op[3]<<16)|(op[4]<<24)); len+=4; break; case 53: |
︙ | |||
737 738 739 740 741 742 743 | 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 | - + - + + + + + + - - + + + - + | case 111: fprintf(fp," ,JumpTo ."); st=0; break; case 112: case 113: fprintf(fp," Sound"); st=0; break; case 114: |
︙ | |||
799 800 801 802 803 804 805 | 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 | - + + + | static inline void out_classes(void) { FILE*fp; ClassInfo*c; int i,j,n,o; sprintf(nam,"%s.class",basename); fp=fopen(nam,"w"); if(!fp) fatal("Cannot open file '%s' for writing\n",nam); |
︙ | |||
926 927 928 929 930 931 932 933 934 935 936 937 938 939 | 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 | + | else fprintf(fp,"#???%d",j); class_codes(fp,c->msgscode[i]+4,o,c->msgslbl,c->nmsgslbl,c->subslbl,c->nsubslbl,c->vars,c->name); o+=(c->msgscode[i][2]<<1)|(c->msgscode[i][3]<<9); fprintf(fp,"\n )\n"); } fprintf(fp,")\n"); } if(has_array) fprintf(fp,"\n{array_defs}\n"); fclose(fp); } static void one_level(FILE*fp,int ord) { unsigned char buf[16]; unsigned char mru[32]; int i,j,x,y,n,q,r; |
︙ |