@lewismoten/gamemaker-sandbox-tools 3.1.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/NOTICE.md +105 -3
  3. package/README.md +301 -15
  4. package/dist/audio-files.js +82 -0
  5. package/dist/audio.js +23 -138
  6. package/dist/block-merge.js +43 -0
  7. package/dist/color-reduce.js +44 -0
  8. package/dist/colors.js +87 -0
  9. package/dist/delta.js +75 -0
  10. package/dist/disk-diff.js +220 -0
  11. package/dist/drawing.js +83 -869
  12. package/dist/embroidery/compile.js +85 -0
  13. package/dist/embroidery/dst.js +79 -0
  14. package/dist/embroidery/exp.js +26 -0
  15. package/dist/embroidery/fill.js +49 -0
  16. package/dist/embroidery/geom.js +82 -0
  17. package/dist/embroidery/pes.js +79 -0
  18. package/dist/embroidery/satin.js +29 -0
  19. package/dist/embroidery/simulate.js +30 -0
  20. package/dist/embroidery/strokeFont.js +253 -0
  21. package/dist/embroidery/svg.js +24 -0
  22. package/dist/embroidery/types.js +13 -0
  23. package/dist/embroidery/units.js +26 -0
  24. package/dist/embroidery/validate.js +15 -0
  25. package/dist/formats/blocks.js +1 -103
  26. package/dist/formats/character.js +1 -83
  27. package/dist/formats/cmf.js +1 -37
  28. package/dist/formats/fli.js +1 -296
  29. package/dist/formats/fliLimits.js +1 -54
  30. package/dist/formats/game.js +1 -193
  31. package/dist/formats/gif.js +1 -125
  32. package/dist/formats/graphicScripts.js +1 -44
  33. package/dist/formats/map.js +1 -38
  34. package/dist/formats/monster.js +1 -69
  35. package/dist/formats/palette.js +1 -58
  36. package/dist/formats/recording.js +1 -17
  37. package/dist/formats/sound.js +1 -44
  38. package/dist/formats/voc.js +1 -303
  39. package/dist/gif-shrink.js +56 -0
  40. package/dist/image/png.js +42 -0
  41. package/dist/images.js +81 -43
  42. package/dist/kit/actors.js +19 -0
  43. package/dist/kit/align.js +204 -0
  44. package/dist/kit/blit.js +45 -0
  45. package/dist/kit/blockRoles.js +97 -0
  46. package/dist/kit/clips.js +40 -0
  47. package/dist/kit/coverPaint.js +18 -0
  48. package/dist/kit/disk.js +76 -0
  49. package/dist/kit/fadeOut.js +13 -0
  50. package/dist/kit/fliClips.js +133 -0
  51. package/dist/kit/fliShrink.js +277 -0
  52. package/dist/kit/gameSim.js +235 -0
  53. package/dist/kit/hopBot.js +142 -0
  54. package/dist/kit/levelGen.js +1423 -0
  55. package/dist/kit/levelGrid.js +33 -0
  56. package/dist/kit/levelPicture.js +27 -0
  57. package/dist/kit/menuVersion.js +19 -0
  58. package/dist/kit/microText.js +35 -0
  59. package/dist/kit/mumble.js +74 -0
  60. package/dist/kit/music.js +8 -0
  61. package/dist/kit/palRamps.js +32 -0
  62. package/dist/kit/palette.js +49 -0
  63. package/dist/kit/pcText.js +72 -0
  64. package/dist/kit/photo.js +150 -0
  65. package/dist/kit/pixels.js +79 -0
  66. package/dist/kit/png.js +40 -0
  67. package/dist/kit/quantize.js +72 -0
  68. package/dist/kit/raytrace.js +379 -0
  69. package/dist/kit/recordedDemo.js +10 -0
  70. package/dist/kit/reel.js +77 -0
  71. package/dist/kit/road3d.js +67 -0
  72. package/dist/kit/routeChecks.js +8 -0
  73. package/dist/kit/saveSlots.js +11 -0
  74. package/dist/kit/sceneInit.js +13 -0
  75. package/dist/kit/sceneSim.js +112 -0
  76. package/dist/kit/screenText.js +15 -0
  77. package/dist/kit/sdftext.js +237 -0
  78. package/dist/kit/shading.js +69 -0
  79. package/dist/kit/song.js +251 -0
  80. package/dist/kit/songFx.js +179 -0
  81. package/dist/kit/sound.js +52 -0
  82. package/dist/kit/synthParts.js +20 -0
  83. package/dist/kit/tar.js +53 -0
  84. package/dist/kit/textBounds.js +84 -0
  85. package/dist/kit/textfit.js +246 -0
  86. package/dist/kit/transforms.js +57 -0
  87. package/dist/kit/tune.js +21 -0
  88. package/dist/look-alike.js +50 -0
  89. package/dist/menu-version.js +4 -0
  90. package/dist/mesh/colorBodies.js +137 -0
  91. package/dist/mesh/decimate.js +207 -0
  92. package/dist/mesh/meshCheck.js +51 -0
  93. package/dist/mesh/overhang.js +41 -0
  94. package/dist/mesh/sampledField.js +12 -0
  95. package/dist/mesh/stl.js +36 -0
  96. package/dist/mesh/surfaceNets.js +79 -0
  97. package/dist/mesh/tetraMesh.js +62 -0
  98. package/dist/mesh/threeMf.js +58 -0
  99. package/dist/mesh/zipFile.js +52 -0
  100. package/dist/microFont.js +101 -0
  101. package/dist/music/compose.js +72 -0
  102. package/dist/pack/meshPack.js +198 -0
  103. package/dist/pack/threeMfPack.js +92 -0
  104. package/dist/palette-reserve.js +116 -0
  105. package/dist/palettes.js +138 -0
  106. package/dist/release-notes.js +40 -0
  107. package/dist/simulation.js +16 -2774
  108. package/dist/text.js +74 -0
  109. package/dist/types/audio.d.ts +4 -0
  110. package/dist/types/audioFiles.d.ts +22 -0
  111. package/dist/types/audioWav.d.ts +4 -0
  112. package/dist/types/blockMerge.d.ts +24 -0
  113. package/dist/types/colorReduce.d.ts +23 -0
  114. package/dist/types/{web/packages/tools/src/colors.d.ts → colors.d.ts} +6 -0
  115. package/dist/types/delta.d.ts +32 -0
  116. package/dist/types/diskDiff.d.ts +47 -0
  117. package/dist/types/drawing.d.ts +15 -0
  118. package/dist/types/embroidery/compile.d.ts +3 -0
  119. package/dist/types/embroidery/dst.d.ts +13 -0
  120. package/dist/types/embroidery/exp.d.ts +8 -0
  121. package/dist/types/embroidery/fill.d.ts +6 -0
  122. package/dist/types/embroidery/geom.d.ts +19 -0
  123. package/dist/types/embroidery/pes.d.ts +10 -0
  124. package/dist/types/embroidery/satin.d.ts +11 -0
  125. package/dist/types/embroidery/simulate.d.ts +19 -0
  126. package/dist/types/embroidery/strokeFont.d.ts +20 -0
  127. package/dist/types/embroidery/svg.d.ts +3 -0
  128. package/dist/types/embroidery/types.d.ts +70 -0
  129. package/dist/types/embroidery/units.d.ts +10 -0
  130. package/dist/types/embroidery/validate.d.ts +22 -0
  131. package/dist/types/formats/blocks.d.ts +1 -0
  132. package/dist/types/formats/character.d.ts +1 -0
  133. package/dist/types/formats/cmf.d.ts +1 -0
  134. package/dist/types/formats/fli.d.ts +1 -0
  135. package/dist/types/formats/fliLimits.d.ts +1 -0
  136. package/dist/types/formats/game.d.ts +1 -0
  137. package/dist/types/formats/gif.d.ts +1 -0
  138. package/dist/types/formats/graphicScripts.d.ts +1 -0
  139. package/dist/types/formats/map.d.ts +1 -0
  140. package/dist/types/formats/monster.d.ts +1 -0
  141. package/dist/types/formats/palette.d.ts +1 -0
  142. package/dist/types/formats/recording.d.ts +1 -0
  143. package/dist/types/formats/sound.d.ts +1 -0
  144. package/dist/types/formats/voc.d.ts +1 -0
  145. package/dist/types/gifShrink.d.ts +8 -0
  146. package/dist/types/image/animatedGif.d.ts +9 -0
  147. package/dist/types/image/surface.d.ts +26 -0
  148. package/dist/types/images.d.ts +13 -0
  149. package/dist/types/kit/actors.d.ts +7 -0
  150. package/dist/types/kit/align.d.ts +93 -0
  151. package/dist/types/kit/audioEvents.d.ts +26 -0
  152. package/dist/types/kit/blit.d.ts +20 -0
  153. package/dist/types/kit/blockRoles.d.ts +243 -0
  154. package/dist/types/{games/kit → kit}/clips.d.ts +1 -1
  155. package/dist/types/kit/coverPaint.d.ts +7 -0
  156. package/dist/types/kit/disk.d.ts +15 -0
  157. package/dist/types/kit/fadeOut.d.ts +12 -0
  158. package/dist/types/kit/fliClips.d.ts +32 -0
  159. package/dist/types/kit/fliShrink.d.ts +149 -0
  160. package/dist/types/{games/kit → kit}/gameSim.d.ts +9 -5
  161. package/dist/types/kit/hopBot.d.ts +72 -0
  162. package/dist/types/kit/laserClearance.d.ts +16 -0
  163. package/dist/types/kit/laserJoints.d.ts +39 -0
  164. package/dist/types/kit/laserLayout.d.ts +54 -0
  165. package/dist/types/kit/laserPixels.d.ts +52 -0
  166. package/dist/types/kit/laserPreview.d.ts +9 -0
  167. package/dist/types/kit/laserSvg.d.ts +35 -0
  168. package/dist/types/kit/levelGen/castle.d.ts +17 -0
  169. package/dist/types/kit/levelGen/dungeon.d.ts +11 -0
  170. package/dist/types/kit/levelGen/forest.d.ts +17 -0
  171. package/dist/types/kit/levelGen/furnish.d.ts +31 -0
  172. package/dist/types/kit/levelGen/grid.d.ts +46 -0
  173. package/dist/types/kit/levelGen/index.d.ts +138 -0
  174. package/dist/types/kit/levelGen/interior.d.ts +18 -0
  175. package/dist/types/kit/levelGen/jumpModel.d.ts +78 -0
  176. package/dist/types/kit/levelGen/needs.d.ts +44 -0
  177. package/dist/types/kit/levelGen/overworld.d.ts +21 -0
  178. package/dist/types/kit/levelGen/platform.d.ts +59 -0
  179. package/dist/types/kit/levelGen/platformCap.d.ts +13 -0
  180. package/dist/types/kit/levelGen/platformReach.d.ts +37 -0
  181. package/dist/types/kit/levelGen/props.d.ts +37 -0
  182. package/dist/types/kit/levelGen/town.d.ts +24 -0
  183. package/dist/types/kit/levelGrid.d.ts +16 -0
  184. package/dist/types/kit/levelPicture.d.ts +9 -0
  185. package/dist/types/kit/menuVersion.d.ts +7 -0
  186. package/dist/types/kit/microText.d.ts +18 -0
  187. package/dist/types/kit/mumble.d.ts +41 -0
  188. package/dist/types/kit/music.d.ts +1 -0
  189. package/dist/types/kit/palMerge.d.ts +10 -0
  190. package/dist/types/kit/palRamps.d.ts +28 -0
  191. package/dist/types/kit/pcText.d.ts +19 -0
  192. package/dist/types/kit/photo.d.ts +69 -0
  193. package/dist/types/kit/png.d.ts +7 -0
  194. package/dist/types/kit/quantize.d.ts +20 -0
  195. package/dist/types/kit/raytrace.d.ts +169 -0
  196. package/dist/types/kit/recordedDemo.d.ts +1 -0
  197. package/dist/types/kit/road3d.d.ts +71 -0
  198. package/dist/types/kit/routeChecks.d.ts +6 -0
  199. package/dist/types/kit/saveSlots.d.ts +17 -0
  200. package/dist/types/kit/sceneInit.d.ts +11 -0
  201. package/dist/types/{games/kit → kit}/sceneSim.d.ts +5 -5
  202. package/dist/types/kit/screenText.d.ts +3 -0
  203. package/dist/types/kit/sdftext.d.ts +34 -0
  204. package/dist/types/kit/shading.d.ts +23 -0
  205. package/dist/types/kit/shareBlocks.d.ts +20 -0
  206. package/dist/types/kit/song.d.ts +89 -0
  207. package/dist/types/kit/songFx.d.ts +99 -0
  208. package/dist/types/kit/synthParts.d.ts +7 -0
  209. package/dist/types/kit/tar.d.ts +13 -0
  210. package/dist/types/kit/textfit.d.ts +74 -0
  211. package/dist/types/kit/transforms.d.ts +8 -0
  212. package/dist/types/lookAlike.d.ts +31 -0
  213. package/dist/types/menuVersionEntry.d.ts +1 -0
  214. package/dist/types/mesh/colorBodies.d.ts +18 -0
  215. package/dist/types/mesh/decimate.d.ts +10 -0
  216. package/dist/types/mesh/fieldTrinket.d.ts +40 -0
  217. package/dist/types/mesh/figureShapes.d.ts +24 -0
  218. package/dist/types/mesh/mesh.d.ts +9 -0
  219. package/dist/types/mesh/meshCheck.d.ts +22 -0
  220. package/dist/types/mesh/overhang.d.ts +24 -0
  221. package/dist/types/mesh/pixelFigure.d.ts +41 -0
  222. package/dist/types/mesh/sampledField.d.ts +3 -0
  223. package/dist/types/mesh/sdfShapes.d.ts +20 -0
  224. package/dist/types/mesh/stl.d.ts +9 -0
  225. package/dist/types/mesh/strokeText.d.ts +8 -0
  226. package/dist/types/mesh/surfaceNets.d.ts +14 -0
  227. package/dist/types/mesh/tetraMesh.d.ts +4 -0
  228. package/dist/types/mesh/threeMf.d.ts +12 -0
  229. package/dist/types/mesh/trinketKinds.d.ts +72 -0
  230. package/dist/types/mesh/trinketTool.d.ts +26 -0
  231. package/dist/types/mesh/voxel.d.ts +10 -0
  232. package/dist/types/mesh/zipFile.d.ts +13 -0
  233. package/dist/types/microFont.d.ts +6 -0
  234. package/dist/types/pack/meshPack.d.ts +26 -0
  235. package/dist/types/pack/threeMfPack.d.ts +11 -0
  236. package/dist/types/palettePresetData.d.ts +4 -0
  237. package/dist/types/palettePresets.d.ts +12 -0
  238. package/dist/types/paletteReserve.d.ts +52 -0
  239. package/dist/types/palettes.d.ts +4 -0
  240. package/dist/types/releaseNotes.d.ts +3 -0
  241. package/dist/types/simulation.d.ts +6 -0
  242. package/dist/types/{web/packages/tools/src/text.d.ts → text.d.ts} +6 -6
  243. package/package.json +145 -15
  244. package/dist/binary-D7wuaC5g.js +0 -120
  245. package/dist/pixels-DzfIIUOl.js +0 -76
  246. package/dist/types/games/kit/blit.d.ts +0 -10
  247. package/dist/types/games/kit/music.d.ts +0 -1
  248. package/dist/types/games/kit/pcText.d.ts +0 -8
  249. package/dist/types/games/kit/shading.d.ts +0 -11
  250. package/dist/types/web/packages/tools/src/audio.d.ts +0 -3
  251. package/dist/types/web/packages/tools/src/drawing.d.ts +0 -10
  252. package/dist/types/web/packages/tools/src/images.d.ts +0 -2
  253. package/dist/types/web/packages/tools/src/microFont.d.ts +0 -1
  254. package/dist/types/web/packages/tools/src/simulation.d.ts +0 -3
  255. package/dist/types/web/scripts/cdGames.d.ts +0 -103
  256. package/dist/types/web/scripts/gameShots.d.ts +0 -12
  257. package/dist/types/web/scripts/ogImage.d.ts +0 -21
  258. package/dist/types/web/src/audio/cmfLoad.d.ts +0 -7
  259. package/dist/types/web/src/audio/cmfPlayer.d.ts +0 -69
  260. package/dist/types/web/src/audio/context.d.ts +0 -12
  261. package/dist/types/web/src/audio/engine.d.ts +0 -39
  262. package/dist/types/web/src/audio/music.worklet.d.ts +0 -14
  263. package/dist/types/web/src/audio/opl.d.ts +0 -37
  264. package/dist/types/web/src/audio/output.d.ts +0 -13
  265. package/dist/types/web/src/desk/boxes/boxFacts.d.ts +0 -85
  266. package/dist/types/web/src/dosPlayer/fileExtensions.d.ts +0 -44
  267. package/dist/types/web/src/dosPlayer/patchRules.d.ts +0 -24
  268. package/dist/types/web/src/dosPlayer/patchTable.d.ts +0 -80
  269. package/dist/types/web/src/edition.d.ts +0 -6
  270. package/dist/types/web/src/eggs/eggState.d.ts +0 -26
  271. package/dist/types/web/src/eggs/eggs.d.ts +0 -31
  272. package/dist/types/web/src/engine/character.d.ts +0 -30
  273. package/dist/types/web/src/engine/funcKeys.d.ts +0 -33
  274. package/dist/types/web/src/engine/game.d.ts +0 -52
  275. package/dist/types/web/src/engine/keys.d.ts +0 -17
  276. package/dist/types/web/src/engine/machine.d.ts +0 -99
  277. package/dist/types/web/src/engine/menus.d.ts +0 -46
  278. package/dist/types/web/src/engine/monsters.d.ts +0 -19
  279. package/dist/types/web/src/engine/playGain.d.ts +0 -11
  280. package/dist/types/web/src/engine/playerLook.d.ts +0 -26
  281. package/dist/types/web/src/engine/recorder.d.ts +0 -60
  282. package/dist/types/web/src/engine/render.d.ts +0 -8
  283. package/dist/types/web/src/engine/scene.d.ts +0 -156
  284. package/dist/types/web/src/engine/scroll.d.ts +0 -16
  285. package/dist/types/web/src/engine/showGraphic.d.ts +0 -39
  286. package/dist/types/web/src/engine/slowPc.d.ts +0 -62
  287. package/dist/types/web/src/engine/touch.d.ts +0 -33
  288. package/dist/types/web/src/engine/world.d.ts +0 -215
  289. package/dist/types/web/src/export/gameAbout.d.ts +0 -15
  290. package/dist/types/web/src/formats/binary.d.ts +0 -44
  291. package/dist/types/web/src/formats/blocks.d.ts +0 -52
  292. package/dist/types/web/src/formats/character.d.ts +0 -65
  293. package/dist/types/web/src/formats/cmf.d.ts +0 -33
  294. package/dist/types/web/src/formats/fli.d.ts +0 -45
  295. package/dist/types/web/src/formats/fliLimits.d.ts +0 -13
  296. package/dist/types/web/src/formats/game.d.ts +0 -72
  297. package/dist/types/web/src/formats/gif.d.ts +0 -15
  298. package/dist/types/web/src/formats/graphicScripts.d.ts +0 -18
  299. package/dist/types/web/src/formats/highscore.d.ts +0 -10
  300. package/dist/types/web/src/formats/map.d.ts +0 -24
  301. package/dist/types/web/src/formats/monster.d.ts +0 -48
  302. package/dist/types/web/src/formats/palette.d.ts +0 -15
  303. package/dist/types/web/src/formats/recording.d.ts +0 -7
  304. package/dist/types/web/src/formats/sound.d.ts +0 -13
  305. package/dist/types/web/src/formats/voc.d.ts +0 -13
  306. package/dist/types/web/src/gfx/cp437Glyphs.d.ts +0 -2
  307. package/dist/types/web/src/gfx/font8x8.d.ts +0 -2
  308. package/dist/types/web/src/gfx/levelPicture.d.ts +0 -81
  309. package/dist/types/web/src/gfx/screen.d.ts +0 -46
  310. package/dist/types/web/src/gfx/titlePicture.d.ts +0 -21
  311. package/dist/types/web/src/input/chords.d.ts +0 -22
  312. package/dist/types/web/src/input/deskMouse.d.ts +0 -14
  313. package/dist/types/web/src/input/keyboard.d.ts +0 -39
  314. package/dist/types/web/src/input/scancodes.d.ts +0 -3
  315. package/dist/types/web/src/manual/printables/types.d.ts +0 -277
  316. package/dist/types/web/src/project/bizarre.d.ts +0 -28
  317. package/dist/types/web/src/project/companion.d.ts +0 -35
  318. package/dist/types/web/src/project/diskFacts.d.ts +0 -30
  319. package/dist/types/web/src/project/files.d.ts +0 -124
  320. package/dist/types/web/src/project/gameFiles.d.ts +0 -49
  321. package/dist/types/web/src/project/gamePack.d.ts +0 -17
  322. package/dist/types/web/src/project/health.d.ts +0 -30
  323. package/dist/types/web/src/project/secretGames.d.ts +0 -19
  324. package/dist/types/web/src/project/storage.d.ts +0 -46
  325. package/dist/types/web/src/project/streamGame.d.ts +0 -38
  326. package/dist/types/web/src/project/zip.d.ts +0 -33
  327. package/dist/types/web/src/retro/dos/disks.d.ts +0 -33
  328. package/dist/types/web/src/retro/text/cp437.d.ts +0 -4
  329. package/dist/types/web/src/seededRandom.d.ts +0 -6
  330. package/dist/types/web/src/tinHearts/deskHearts.d.ts +0 -33
  331. package/dist/types/web/src/tinHearts/manifest.d.ts +0 -30
  332. package/dist/types/web/src/tinHearts/tinHearts.d.ts +0 -84
  333. package/dist/types/web/src/walkthrough/format.d.ts +0 -92
  334. package/dist/types/web/src/walkthrough/madeUpScores.d.ts +0 -6
  335. package/dist/types/web/src/walkthrough/runtime.d.ts +0 -134
  336. /package/dist/types/{web/src/assistant → image}/png.d.ts +0 -0
  337. /package/dist/types/{games/kit → kit}/palette.d.ts +0 -0
  338. /package/dist/types/{games/kit → kit}/pixels.d.ts +0 -0
  339. /package/dist/types/{games/kit → kit}/reel.d.ts +0 -0
  340. /package/dist/types/{games/kit → kit}/sound.d.ts +0 -0
  341. /package/dist/types/{games/kit → kit}/textBounds.d.ts +0 -0
  342. /package/dist/types/{games/kit → kit}/tune.d.ts +0 -0
  343. /package/dist/types/{web/src/audio → music}/compose.d.ts +0 -0
@@ -1,92 +0,0 @@
1
- import type { RecordedKey } from '../formats/recording.js';
2
- export declare const WALKTHROUGH_FPS = 60;
3
- export interface WalkSegment {
4
- /** The scene this segment starts in. */
5
- scene: number;
6
- /** Key events (scan code, bit 7 = released) and the game ticks before each: encodeKeys(). */
7
- keys: string;
8
- }
9
- export interface WalkChapterMark {
10
- /** A chapter starts the first time play enters this scene. */
11
- scene: number;
12
- title: string;
13
- }
14
- interface WalkChapter {
15
- title: string;
16
- /** The video frame (at WALKTHROUGH_FPS) where it starts. */
17
- frame: number;
18
- }
19
- export interface Walkthrough {
20
- version: 1;
21
- /** The game's id (games/<id>). */
22
- game: string;
23
- /** Monster random numbers: the seed and whether each scene starts it over, as the bot's simulator does. */
24
- rand: {
25
- seed: number;
26
- per: 'game' | 'scene';
27
- };
28
- /** Seconds a "hit any key" screen stays up before the walkthrough goes on (shorter waits run out by themselves). */
29
- hold?: number;
30
- /** Read the storyline from the menu first (default true). */
31
- story?: boolean;
32
- segments: WalkSegment[];
33
- chapters: WalkChapterMark[];
34
- /** Made by the editor's walkthrough bot (not the game's own), for any Game-Maker game. */
35
- bot?: boolean;
36
- /** The bot got only partway: play stops at timeline.frames, where it got to. */
37
- partial?: boolean;
38
- /** A partial walkthrough's closing card: where the bot stopped and why ("It found no way through Cave."). */
39
- ending?: string;
40
- /** Some scenes are a person's own play (the editor's Play and record), the rest the bot's. */
41
- byHand?: boolean;
42
- /** Written by the tool from a run through the real engine. */
43
- timeline: {
44
- fps: number;
45
- frames: number;
46
- chapters: WalkChapter[];
47
- };
48
- }
49
- export declare const DEFAULT_HOLD = 8;
50
- /** Key events as base64: each is the tick delta as an unsigned LEB128 number, then the scan code byte. */
51
- export declare function encodeKeys(keys: RecordedKey[]): string;
52
- export declare function decodeKeys(text: string): RecordedKey[];
53
- /** Key events that come at absolute ticks (t = ticks since the segment began), as deltas. */
54
- export declare function keysAt(events: {
55
- tick: number;
56
- key: number;
57
- }[]): RecordedKey[];
58
- /** m:ss or h:mm:ss, as YouTube writes chapter times. */
59
- export declare function clock(seconds: number): string;
60
- /**
61
- * Chapters YouTube will take: the first at 0:00, each at least 10 s long, at least three.
62
- * Shorter chapters are folded into the one before (the first keeps 0:00). Returns them
63
- * with their start in seconds; fewer than three means the video gets no chapter list.
64
- */
65
- export declare function youtubeChapters(chapters: WalkChapter[], fps: number, totalFrames: number): {
66
- title: string;
67
- start: number;
68
- }[];
69
- interface YoutubeText {
70
- title: string;
71
- description: string;
72
- }
73
- interface YoutubeInfo {
74
- gameTitle: string;
75
- year?: number;
76
- company?: string;
77
- blurb?: string;
78
- /** The web app's address for this game. */
79
- url: string;
80
- chapters: WalkChapter[];
81
- fps: number;
82
- frames: number;
83
- /** Made by the walkthrough bot for a game that isn't a Sandbox game: no Sandbox credits. */
84
- bot?: boolean;
85
- /** The bot got only partway (and where it stopped, the closing card's words). */
86
- partial?: boolean;
87
- ending?: string;
88
- /** Some scenes were played by a person. */
89
- byHand?: boolean;
90
- }
91
- export declare function youtubeText(o: YoutubeInfo): YoutubeText;
92
- export {};
@@ -1,6 +0,0 @@
1
- import type { HighScore } from '../formats/highscore.js';
2
- /**
3
- * The table with its blank places filled: scores from a little above `score` (the
4
- * walkthrough's own) down to about a sixth of it, sorted best first with the real ones.
5
- */
6
- export declare function fillBlankScores(table: HighScore[], score: number, seed: number): HighScore[];
@@ -1,134 +0,0 @@
1
- import { Machine } from '../engine/machine.js';
2
- import { Recorder } from '../engine/recorder.js';
3
- import { type Session } from '../engine/scene.js';
4
- import type { PlayerPatches } from '../dosPlayer/patchRules.js';
5
- import { AudioEngine } from '../audio/engine.js';
6
- import type { GameFiles } from '../project/files.js';
7
- import { type Walkthrough } from './format.js';
8
- /** The walkthroughs' generator (Mulberry32), by the name the games' tools use for it. */
9
- export { mulberry32 as seeded } from '../seededRandom.js';
10
- export type AudioEvent = {
11
- t: number;
12
- kind: 'song';
13
- bytes?: Uint8Array;
14
- } | {
15
- t: number;
16
- kind: 'stopSong';
17
- } | {
18
- t: number;
19
- kind: 'pause';
20
- paused: boolean;
21
- } | {
22
- t: number;
23
- kind: 'speaker';
24
- freqs: ArrayLike<number>;
25
- } | {
26
- t: number;
27
- kind: 'stopSpeaker';
28
- } | {
29
- t: number;
30
- kind: 'voc';
31
- bytes?: Uint8Array;
32
- } | {
33
- t: number;
34
- kind: 'stopVoc';
35
- };
36
- /**
37
- * The game's sound, also written down with the walkthrough clock's time (for the video's
38
- * soundtrack, audioRender.ts). It plays out loud only once resume() has been called.
39
- */
40
- export declare class WalkAudio extends AudioEngine {
41
- readonly events: AudioEvent[];
42
- /** Keep the events (a video being made); a player that only listens leaves this off. */
43
- logging: boolean;
44
- now: () => number;
45
- private song?;
46
- private muted;
47
- /** False: a PC without a Sound Blaster (PLAYGAME's SoundCard() found none): no songs, every effect on the speaker. */
48
- card: boolean;
49
- private log;
50
- playSong(bytes: Uint8Array | undefined): Promise<boolean>;
51
- stopSong(): void;
52
- pauseMusic(paused: boolean): void;
53
- playSpeaker(freqs: ArrayLike<number>): void;
54
- stopSpeaker(): void;
55
- playVoc(bytes: Uint8Array | undefined): boolean;
56
- stopVoc(): void;
57
- /** Starts the sound (from a click): the song playing now starts over, as it can't be joined midway. */
58
- start(): Promise<void>;
59
- /** Takes the Sound Blaster out or puts it back while the game plays (`session` is the game's, for its speakerOnly). */
60
- setCard(on: boolean, session?: Session): void;
61
- /** Silences the music and effects (the music waits where it is). */
62
- setMuted(muted: boolean): void;
63
- }
64
- /** The PC the walkthrough plays on: its own clock, no live input, "hit any key" screens held `hold` seconds. */
65
- declare class WalkMachine extends Machine {
66
- readonly hold: number;
67
- time: number;
68
- /** Called when the game asks for the next frame (it is idle until then). */
69
- asked?: () => void;
70
- private keys;
71
- constructor(canvas: HTMLCanvasElement, files: GameFiles, audio: AudioEngine, hold: number);
72
- now(): number;
73
- frame(): Promise<void>;
74
- pauseTimeKey(seconds?: number): Promise<import("../input/keyboard.js").TypedKey | undefined>;
75
- /** Presses (and lets go of) a key `ms` from now, as someone at the menu would. */
76
- pressIn(ms: number, scan: number): void;
77
- /** Sends the keys whose time has come. */
78
- typeDue(): void;
79
- }
80
- /** Plays each segment's keys from the tick its scene is entered (format.ts). */
81
- export declare class SegmentRecorder extends Recorder {
82
- private segments;
83
- private nextSegment;
84
- private segKeys;
85
- private segIndex;
86
- private segTicks;
87
- private segLast;
88
- constructor(walk: Walkthrough);
89
- /** Play starts: a demo playing (no high score is asked for). */
90
- begin(): void;
91
- enterScene(scene: number): void;
92
- /** Keys still to come in all (0 once the walkthrough has played every key). */
93
- get keysLeft(): number;
94
- doPlayback(): number[];
95
- }
96
- /**
97
- * Steps a walkthrough frame by frame. Each step moves the clock one frame (1/60 s, or more
98
- * for a fast skip ahead) and lets the game run until it waits for the next frame.
99
- */
100
- export declare class WalkRun {
101
- readonly gam: string;
102
- readonly walk: Walkthrough;
103
- readonly m: WalkMachine;
104
- readonly audio: WalkAudio;
105
- frame: number;
106
- done: boolean;
107
- error?: unknown;
108
- session?: Session;
109
- /** Chapters reached so far, with the frame each began on. */
110
- readonly chapters: {
111
- title: string;
112
- frame: number;
113
- }[];
114
- onChapter?: (title: string, index: number) => void;
115
- private ended;
116
- private started?;
117
- constructor(canvas: HTMLCanvasElement, files: GameFiles, gam: string, walk: Walkthrough, audio?: WalkAudio,
118
- /** The project's DOS player patches (dosPlayer/): the menu's words and the player's screens as its .EXE shows them. */
119
- player?: PlayerPatches);
120
- private run;
121
- /** Waits until the game asks for a frame (or ends). */
122
- private idle;
123
- /** Starts the game; resolves once it waits for its first frame. */
124
- start(): Promise<void>;
125
- /** One frame: `ms` of game time (1000/60 by default); `show` paints the screen's canvas. */
126
- step(show?: boolean, ms?: number): Promise<boolean>;
127
- /** The time the game has played, in ms. */
128
- get time(): number;
129
- stop(): void;
130
- }
131
- /** One frame of the screen as RGBA (for the video). */
132
- export declare function screenRgba(m: Machine, out?: Uint8ClampedArray<ArrayBuffer>): Uint8ClampedArray;
133
- /** A stand-in canvas for running without a page (Node checks): the screen only needs a 2D context to put pixels in. */
134
- export declare function headlessCanvas(): HTMLCanvasElement;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes