Overview
Comment: | Implement the Sound instruction. (There are still a few problems such as clicks at the end of some sound effects, and a few problems with the sound test menu. However, it mostly works, now.) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
d15195a921f6ff832bdb135bfb43a272 |
User & Date: | user on 2022-01-29 05:55:37 |
Other Links: | manifest | tags |
Context
2022-02-04
| ||
06:56 | Correct parsing instruction names beginning with a plus and minus sign. check-in: 547bf4ed86 user: user tags: trunk | |
2022-01-29
| ||
05:55 | Implement the Sound instruction. (There are still a few problems such as clicks at the end of some sound effects, and a few problems with the sound test menu. However, it mostly works, now.) check-in: d15195a921 user: user tags: trunk | |
2022-01-25
| ||
06:31 | Implement (attribute userflags) syntax, in order to access bit patterns of user flags directly in class codes (e.g. so that they can be passed to subroutines, etc). check-in: a724f44255 user: user tags: trunk | |
Changes
Modified TODO from [c921c09e17] to [a63cc0af2f].
1 | 1 2 3 4 5 6 7 8 9 | - - - - + - | * Sound effects |
︙ |
Modified bindings.doc from [09ad0658cd] to [ba75b7ef57].
︙ | |||
229 230 231 232 233 234 235 236 237 238 239 240 241 242 | 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | + + + | '^P' Switch to the game play. '^Q' Quit. '^Y' Sound test. (Does nothing if sound is not configured.) 'go' <level> Go to the specified level. If the level number is negative, then it is a level order number, otherwise it is a level ID number. === Mode-independent commands === |
︙ |
Modified class.c from [633629bcf7] to [5513be6ecd].
︙ | |||
524 525 526 527 528 529 530 | 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 | - - + | break; case '$': if(fl) ParseError("Invalid use of , and = in token\n"); tokent=TF_NAME; tokenv=look_class_name()+0x4000; break; case '!': |
︙ | |||
1073 1074 1075 1076 1077 1078 1079 | 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 | - - + + | if(tokent==TF_INT) { return NVALUE(tokenv); } else if(Tokenf(TF_NAME)) { switch(tokenv) { case 0x0000 ... 0x00FF: return NVALUE(tokenv); case 0x0100 ... 0x01FF: return NVALUE(tokenv-0x0200); case 0x0200 ... 0x02FF: return MVALUE(tokenv&255); |
︙ |
Modified default.heromeshrc from [7f0656bbc7] to [eab9494892].
︙ | |||
182 183 184 185 186 187 188 189 190 191 | 182 183 184 185 186 187 188 189 190 191 192 | + | ?.?.kp_plus: select 'go',-(level()+1) where level()<max_level(); ?.?.shift.kp_minus: select 'go',-1; ?.?.shift.kp_plus: select 'go',-max_level(); ?.?.ctrl.G: select 'go',-:Go_To_Level where :Go_To_Level=cast(:Go_To_Level as int) and cast(:Go_To_Level as int)>0; ?.?.ctrl.Q: ^Q ?.?.ctrl.S: ^S ?.?.ctrl.T: ^T ?.?.ctrl.Y: ^Y ?.?.shift.ctrl.M: select ':s'; ?.?.f10: select ':x'; |
Modified edit.c from [13e928d083] to [cc13f87281].
︙ | |||
1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 | 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 | + + + | return -1; case '^S': // Save level save_level(); return 1; case '^T': // Level title edit_string(&level_title); return 0; case '^Y': // Sound test sound_test(); return prev; case '^Z': // Cancel rectangle editrect.x0=editrect.y0=editrect.x1=editrect.y1=0; return prev; case '^<': // First corner if((number&63?:64)>pfwidth || (number/64?:64)>pfheight) return prev; editrect.x0=number&63?:64; editrect.y0=number/64?:64; |
︙ |
Modified edit.doc from [a922353611] to [5f662b4d3a].
︙ | |||
223 224 225 226 227 228 229 230 231 232 233 234 235 236 | 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | + | CTRL+I Level index editor CTRL+N Add new level (after last one) CTRL+P Switch to play game (won't auto save) CTRL+Q Quit (won't auto save) CTRL+S Save level CTRL+T Edit level title CTRL+X Clear level (delete all objects) CTRL+Y Sound test C Set level code number E Edit level strings F Fill grid with current MRU R Clear and resize level W Exchange main/bizarro worlds F1 Import level (replacing current level) F2 Export level |
︙ |
Modified exec.c from [d3751950c5] to [a961423181].
︙ | |||
2733 2734 2735 2736 2737 2738 2739 | 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 | - + | case OP_STRENGTH: StackReq(0,1); Push(NVALUE(o->strength)); break; case OP_STRENGTH_C: StackReq(1,1); Push(GetVariableOrAttributeOf(strength,NVALUE)); break; case OP_STRENGTH_E: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); o->strength=t1.u; break; case OP_STRENGTH_E16: NoIgnore(); StackReq(1,0); t1=Pop(); Numeric(t1); o->strength=t1.u&0xFFFF; break; case OP_STRENGTH_EC: NoIgnore(); StackReq(2,0); t1=Pop(); Numeric(t1); i=v_object(Pop()); if(i!=VOIDLINK) objects[i]->strength=t1.u; break; case OP_STRENGTH_EC16: NoIgnore(); StackReq(2,0); t1=Pop(); Numeric(t1); i=v_object(Pop()); if(i!=VOIDLINK) objects[i]->strength=t1.u&0xFFFF; break; case OP_STRING: StackReq(0,1); Push(UVALUE(code[ptr++],TY_STRING)); break; |
︙ |
Modified game.c from [e517a0c994] to [73bec037e1].
︙ | |||
1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 | 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 | + + + | case '^Q': // Quit return -1; case '^S': // Save solution if(gameover==1) record_solution(); return 1; case '^T': // Show title modal_draw_popup(level_title); return prev; case '^Y': // Sound test sound_test(); return prev; case '^d': // Describe object describe_at(number-65); return prev; case '^g': // Display global variables global_examine(); return prev; |
︙ |
Modified game.doc from [7328cb695b] to [fefbd2794f].
︙ | |||
139 140 141 142 143 144 145 146 147 148 149 150 151 152 | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | + | CTRL+G Go to level CTRL+I Import move list CTRL+L List of levels CTRL+Q Quit CTRL+S Save solution CTRL+T Display level title CTRL+X Export move list CTRL+Y Sound test F1 Replay 1 move F2 Replay 10 moves F3 Replay 100 moves F4 Replay 1000 moves SHIFT+F1 Rewind 1 move SHIFT+F2 Rewind 10 moves SHIFT+F3 Rewind 100 moves |
︙ |
Modified sound.c from [8e65d6bcfc] to [cf457c80d7].
︙ | |||
193 194 195 196 197 198 199 | 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | - + | i--; j=fgetc(fp)<<16; j|=fgetc(fp)<<24; j|=fgetc(fp)<<0; j|=fgetc(fp)<<8; l_offset=ftell(fp); l_size=j; if(i>4 && nam[i-4]=='.' && nam[i-3]=='W' && nam[i-1]=='V' && (nam[i-2]=='A' || nam[i-2]=='Z')) { j=nam[i-2]; nam[i-4]=0; if(is_user) { |
︙ | |||
406 407 408 409 410 411 412 | 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | - + | Value v; char buf[256]; if(main_options['T'] && main_options['v']) { if(mmltuning) printf("mmltempo=%d; mmlvolume=%d; mmltuning[96]=%d\n",(int)mmltempo,(int)mmlvolume,(int)mmltuning[96]); for(i=0;i<nusersounds;i++) printf("%d: %s (ptr=%p, len=%d bytes)\n",i,user_sound_names[i],usersounds[i].data,usersounds[i].len); fflush(stdout); } |
︙ |