Overview
Comment: | More corrections, and more work on implementation, of custom level table definitions. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
702847e4701bfe25ba300ad2cb9b3384 |
User & Date: | user on 2021-12-27 20:33:50 |
Other Links: | manifest | tags |
Context
2021-12-29
| ||
00:04 | Add a entry to the Frequently Asked Questions section about use of Free Hero Mesh with gdb. check-in: b3b7b53f2b user: user tags: trunk | |
2021-12-27
| ||
20:33 | More corrections, and more work on implementation, of custom level table definitions. check-in: 702847e470 user: user tags: trunk | |
2021-12-25
| ||
06:33 | Some corrections of custom level table, including initializing the schema properly; start a few more parts of its implementation too. check-in: 66cf1d39ad user: user tags: trunk | |
Changes
Modified class.c from [64b3d009e0] to [7cb8ff67cc].
︙ | |||
2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 | 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 | + | case OP_LABEL: i=look_hash(hash,LOCAL_HASH_SIZE,0x100,0x13F,ll_ndata+0x100,"data columns")?:(ll_ndata++)+0x100; i-=0x100; if(datac[i].name) ParseError("Duplicate definition\n"); datac[i].name=strdup(tokenstr); if(!datac[i].name) fatal("Allocation failed\n"); datac[i].ptr=ptr; if(Tokenf(TF_COMMA)) datac[i].sgn=1; ptr=level_table_code(ptr,hash); break; case OP_STRING: if(last) ParseError("Extra columns after fill column\n"); for(i=0;tokenstr[i];i++) if(!(tokenstr[i]&~31)) ParseError("Improper column heading\n"); strcpy(buf,tokenstr); // Data |
︙ | |||
2368 2369 2370 2371 2372 2373 2374 | 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 | - - - - + + + | i=look_hash(hash,LOCAL_HASH_SIZE,0x200,0x23F,ll_naggregate+0x200,"aggregates")?:(ll_naggregate++)+0x200; i-=0x200; if(aggrc[i].ag) ParseError("Duplicate definition\n"); nxttok(); if(!Tokenf(TF_NAME)) ParseError("Improper aggregate\n"); switch(tokenv) { case OP_ADD: aggrc[i].ag=1; break; |
︙ |
Modified class.doc from [9f8228ce84] to [e3fcdbff9c].
︙ | |||
2583 2584 2585 2586 2587 2588 2589 | 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 | - + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + | === Level table definition === The following blocks are allowed in a level table definition: (<label> <code...>) Define a data column. The SQL name of the data column will be that of the label name, preceded by a underscore, and some characters will be |
Modified game.c from [d6b8ec0435] to [b19cf21fe8].
︙ | |||
696 697 698 699 700 701 702 | 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 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 780 781 782 | - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | if(i&~0xFFFF) return; if(replay_size<i) replay_list=realloc(replay_list,replay_size=i); if(!replay_list) fatal("Allocation failed"); replay_count=i; if(i) memcpy(replay_list,sqlite3_column_blob(st,1),i); } |
︙ | |||
784 785 786 787 788 789 790 | 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 | + + + + + + + + - - - - - - + + + + + + + | draw_text(2*8,y,"\x10",b=0xF8,0xFE); } else { draw_text(2*8,y,"\xB3",b=0x02,0xF8); } snprintf(buf,6,"%5u",mo&2?sqlite3_column_int(st,0):i); draw_text(3*8,y,buf,b,sqlite3_column_int(st,6)?0xFA:0xFC); draw_text(8*8,y,"\xB3",b,b^0xFA); if(ll_ndisp) { x=9*8; for(i=0;i<ll_ndisp && x<screen->w;i++) { levels_column(x,y,i,b,st,buf); x+=ll_disp[i].width*8+8; if(x<screen->w && !(ll_disp[i].flag&1)) draw_text(x-8,y,"\xB3",b,b^0xFA); } } else { |
︙ |
Modified heromesh.h from [39284f6f26] to [641a517ed3].
︙ | |||
192 193 194 195 196 197 198 199 200 201 202 203 204 205 | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | + | typedef struct { union { char*name; // free when loading table Uint8 ag; // aggregate type }; Uint16 ptr; Uint8 sgn; // 0=unsigned, 1=signed } DataColumn; extern char*ll_head; extern DisplayColumn*ll_disp; extern Uint8 ll_ndisp; extern DataColumn*ll_data; extern Uint8 ll_ndata; |
︙ |