@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
@@ -0,0 +1,52 @@
1
+ import type { Block } from '@lewismoten/gamemaker-sandbox-engine/formats/blocks';
2
+ import { type ReduceScore } from './colorReduce.js';
3
+ /** Color numbers 1-15 hold the engine's own interface colors (an inference from PLAYGAME's Box calls), so a proposed range starts at 16. */
4
+ export declare const FIRST_FREE = 16;
5
+ export declare const LAST_FREE = 254;
6
+ /** A sprite range never grows past this many colors; blocks with more get reduced. */
7
+ export declare const RANGE_CAP = 48;
8
+ export interface RoleDemand {
9
+ role: 'monster' | 'character';
10
+ /** Different colors (by RGB) the role's shown blocks draw. */
11
+ distinct: number;
12
+ /** How many pixels of the role's blocks use each color number, as drawn in their first palette. */
13
+ usage: number[];
14
+ }
15
+ export interface Proposed {
16
+ first: number;
17
+ last: number;
18
+ role: 'monster' | 'character';
19
+ /** Pixels of other blocks that already use a color number in this range (the sync must move or reduce them first). */
20
+ conflicts: number;
21
+ }
22
+ /** Windows for each sprite role, biggest first. `others[i]` counts pixels of other (background) blocks using color i. */
23
+ export declare function planRanges(demands: readonly RoleDemand[], others: readonly number[]): Proposed[];
24
+ export interface SyncFile {
25
+ blocks: Block[];
26
+ /** The block numbers scenes show. */
27
+ shown: ReadonlySet<number>;
28
+ /** Keys of the palettes the file is shown with; the first is its reference. */
29
+ palettes: string[];
30
+ }
31
+ export interface SyncResult {
32
+ ok: true;
33
+ /** Per file, the blocks whose pixels were renumbered. */
34
+ pixels: Map<number, Map<number, Uint8Array>>;
35
+ /** Per palette key, the new 768 bytes (only palettes that changed). */
36
+ palettes: Map<string, Uint8Array>;
37
+ score: ReduceScore;
38
+ /** Blocks (file index, number) whose picture changes, worst first. */
39
+ changed: {
40
+ file: number;
41
+ n: number;
42
+ mean: number;
43
+ }[];
44
+ /** Colors the range holds, and colors that were more than it holds. */
45
+ used: number;
46
+ reduced: number;
47
+ }
48
+ /** Makes `first..last` the same in every palette: the role's colors move in, scored. `blocked` is per palette the color numbers other files draw with. */
49
+ export declare function syncRange(files: readonly SyncFile[], palettes: ReadonlyMap<string, Uint8Array>, first: number, last: number, blocked: ReadonlyMap<string, ReadonlySet<number>>): SyncResult | {
50
+ ok: false;
51
+ why: string;
52
+ };
@@ -0,0 +1,4 @@
1
+ import type { Palette } from '@lewismoten/gamemaker-sandbox-engine/formats/palette';
2
+ export { PALETTE_PRESETS, createPalettePreset, type PalettePreset } from './palettePresets.js';
3
+ /** A fresh copy of the original Library palette (768 VGA bytes, black at index zero). */
4
+ export declare function libraryDefaultPalette(): Palette;
@@ -0,0 +1,3 @@
1
+ import type { DiskDiff } from './diskDiff.js';
2
+ /** Release-note text for a diff, or '' when nothing differs. Sentences: Changed, Added, Removed. */
3
+ export declare function releaseNotes(d: DiskDiff): string;
@@ -0,0 +1,6 @@
1
+ export { Sim, type SimScene } from './kit/sceneSim.js';
2
+ export { GameSim, readDisk, diskSim, TICKS_PER_SECOND } from './kit/gameSim.js';
3
+ export { newCharInfo, type CharInfo } from '@lewismoten/gamemaker-sandbox-engine/engine/world';
4
+ export * from './kit/sceneInit.js';
5
+ export * from './kit/routeChecks.js';
6
+ export { type State as GameSimState } from './kit/gameSim.js';
@@ -1,9 +1,9 @@
1
- import { FONT_CP437 } from '../../../src/gfx/cp437Glyphs.js';
2
- import { toCp437, fromCp437 } from '../../../src/retro/text/cp437.js';
3
- import { Pixels } from '../../../../games/kit/pixels.js';
4
- import { MICRO_GLYPHS } from './microFont.js';
5
- export { FONT_CP437, toCp437, fromCp437, MICRO_GLYPHS };
6
- export type TextFont = 'cp437' | 'micro';
1
+ import { FONT_CP437 } from '@lewismoten/gamemaker-sandbox-engine/gfx/cp437Glyphs';
2
+ import { toCp437, fromCp437 } from '@lewismoten/gamemaker-sandbox-engine/text/cp437';
3
+ import { Pixels } from './kit/pixels.js';
4
+ import { MICRO_GLYPHS, MICRO_SQUARE_GLYPHS } from './microFont.js';
5
+ export { FONT_CP437, toCp437, fromCp437, MICRO_GLYPHS, MICRO_SQUARE_GLYPHS };
6
+ export type TextFont = 'cp437' | 'micro' | 'micro-square';
7
7
  /** Encode Unicode DOS symbols, including box drawing. Unsupported characters throw. */
8
8
  export declare function encodeText(s: string): Uint8Array;
9
9
  /** A fresh copy of a glyph's rows; bit 0 is the leftmost pixel. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lewismoten/gamemaker-sandbox-tools",
3
- "version": "3.1.0",
3
+ "version": "3.4.0",
4
4
  "description": "Development tools for building and checking games in RSD Game-Maker formats",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -15,34 +15,160 @@
15
15
  "files": [
16
16
  "dist",
17
17
  "README.md",
18
+ "CHANGELOG.md",
18
19
  "LICENSE",
19
20
  "NOTICE.md"
20
21
  ],
21
22
  "exports": {
22
- "./formats/*": {
23
- "types": "./dist/types/web/src/formats/*.d.ts",
24
- "browser": null,
25
- "import": "./dist/formats/*.js"
26
- },
27
23
  "./drawing": {
28
- "types": "./dist/types/web/packages/tools/src/drawing.d.ts",
24
+ "types": "./dist/types/drawing.d.ts",
29
25
  "browser": null,
26
+ "gamemaker-source": "./src/drawing.ts",
30
27
  "import": "./dist/drawing.js"
31
28
  },
32
29
  "./audio": {
33
- "types": "./dist/types/web/packages/tools/src/audio.d.ts",
34
- "browser": null,
30
+ "types": "./dist/types/audio.d.ts",
31
+ "gamemaker-source": "./src/audio.ts",
35
32
  "import": "./dist/audio.js"
36
33
  },
37
34
  "./images": {
38
- "types": "./dist/types/web/packages/tools/src/images.d.ts",
39
- "browser": null,
35
+ "types": "./dist/types/images.d.ts",
36
+ "gamemaker-source": "./src/images.ts",
40
37
  "import": "./dist/images.js"
41
38
  },
42
39
  "./simulation": {
43
- "types": "./dist/types/web/packages/tools/src/simulation.d.ts",
40
+ "types": "./dist/types/simulation.d.ts",
44
41
  "browser": null,
42
+ "gamemaker-source": "./src/simulation.ts",
45
43
  "import": "./dist/simulation.js"
44
+ },
45
+ "./formats/*": {
46
+ "types": "./dist/types/formats/*.d.ts",
47
+ "browser": null,
48
+ "gamemaker-source": "./src/formats/*.ts",
49
+ "import": "./dist/formats/*.js"
50
+ },
51
+ "./kit/tar": {
52
+ "types": "./dist/types/kit/tar.d.ts",
53
+ "gamemaker-source": "./src/kit/tar.ts",
54
+ "import": "./dist/kit/tar.js"
55
+ },
56
+ "./kit/fliShrink": {
57
+ "types": "./dist/types/kit/fliShrink.d.ts",
58
+ "gamemaker-source": "./src/kit/fliShrink.ts",
59
+ "import": "./dist/kit/fliShrink.js"
60
+ },
61
+ "./kit/blockRoles": {
62
+ "types": "./dist/types/kit/blockRoles.d.ts",
63
+ "gamemaker-source": "./src/kit/blockRoles.ts",
64
+ "import": "./dist/kit/blockRoles.js"
65
+ },
66
+ "./kit/levelGen": {
67
+ "types": "./dist/types/kit/levelGen/index.d.ts",
68
+ "gamemaker-source": "./src/kit/levelGen/index.ts",
69
+ "import": "./dist/kit/levelGen.js"
70
+ },
71
+ "./kit/*": {
72
+ "types": "./dist/types/kit/*.d.ts",
73
+ "browser": null,
74
+ "gamemaker-source": "./src/kit/*.ts",
75
+ "import": "./dist/kit/*.js"
76
+ },
77
+ "./music/*": {
78
+ "types": "./dist/types/music/*.d.ts",
79
+ "gamemaker-source": "./src/music/*.ts",
80
+ "import": "./dist/music/*.js"
81
+ },
82
+ "./embroidery/*": {
83
+ "types": "./dist/types/embroidery/*.d.ts",
84
+ "gamemaker-source": "./src/embroidery/*.ts",
85
+ "import": "./dist/embroidery/*.js"
86
+ },
87
+ "./mesh/*": {
88
+ "types": "./dist/types/mesh/*.d.ts",
89
+ "gamemaker-source": "./src/mesh/*.ts",
90
+ "import": "./dist/mesh/*.js"
91
+ },
92
+ "./pack/*": {
93
+ "types": "./dist/types/pack/*.d.ts",
94
+ "gamemaker-source": "./src/pack/*.ts",
95
+ "import": "./dist/pack/*.js"
96
+ },
97
+ "./image/*": {
98
+ "types": "./dist/types/image/*.d.ts",
99
+ "gamemaker-source": "./src/image/*.ts",
100
+ "import": "./dist/image/*.js"
101
+ },
102
+ "./audio-files": {
103
+ "types": "./dist/types/audioFiles.d.ts",
104
+ "browser": null,
105
+ "gamemaker-source": "./src/audioFiles.ts",
106
+ "import": "./dist/audio-files.js"
107
+ },
108
+ "./block-merge": {
109
+ "types": "./dist/types/blockMerge.d.ts",
110
+ "gamemaker-source": "./src/blockMerge.ts",
111
+ "import": "./dist/block-merge.js"
112
+ },
113
+ "./look-alike": {
114
+ "types": "./dist/types/lookAlike.d.ts",
115
+ "gamemaker-source": "./src/lookAlike.ts",
116
+ "import": "./dist/look-alike.js"
117
+ },
118
+ "./palette-reserve": {
119
+ "types": "./dist/types/paletteReserve.d.ts",
120
+ "gamemaker-source": "./src/paletteReserve.ts",
121
+ "import": "./dist/palette-reserve.js"
122
+ },
123
+ "./gif-shrink": {
124
+ "types": "./dist/types/gifShrink.d.ts",
125
+ "gamemaker-source": "./src/gifShrink.ts",
126
+ "import": "./dist/gif-shrink.js"
127
+ },
128
+ "./color-reduce": {
129
+ "types": "./dist/types/colorReduce.d.ts",
130
+ "gamemaker-source": "./src/colorReduce.ts",
131
+ "import": "./dist/color-reduce.js"
132
+ },
133
+ "./delta": {
134
+ "types": "./dist/types/delta.d.ts",
135
+ "gamemaker-source": "./src/delta.ts",
136
+ "import": "./dist/delta.js"
137
+ },
138
+ "./disk-diff": {
139
+ "types": "./dist/types/diskDiff.d.ts",
140
+ "gamemaker-source": "./src/diskDiff.ts",
141
+ "import": "./dist/disk-diff.js"
142
+ },
143
+ "./release-notes": {
144
+ "types": "./dist/types/releaseNotes.d.ts",
145
+ "gamemaker-source": "./src/releaseNotes.ts",
146
+ "import": "./dist/release-notes.js"
147
+ },
148
+ "./menu-version": {
149
+ "types": "./dist/types/menuVersionEntry.d.ts",
150
+ "gamemaker-source": "./src/menuVersionEntry.ts",
151
+ "import": "./dist/menu-version.js"
152
+ },
153
+ "./microFont": {
154
+ "types": "./dist/types/microFont.d.ts",
155
+ "gamemaker-source": "./src/microFont.ts",
156
+ "import": "./dist/microFont.js"
157
+ },
158
+ "./colors": {
159
+ "types": "./dist/types/colors.d.ts",
160
+ "gamemaker-source": "./src/colors.ts",
161
+ "import": "./dist/colors.js"
162
+ },
163
+ "./text": {
164
+ "types": "./dist/types/text.d.ts",
165
+ "gamemaker-source": "./src/text.ts",
166
+ "import": "./dist/text.js"
167
+ },
168
+ "./palettes": {
169
+ "types": "./dist/types/palettes.d.ts",
170
+ "gamemaker-source": "./src/palettes.ts",
171
+ "import": "./dist/palettes.js"
46
172
  }
47
173
  },
48
174
  "scripts": {
@@ -56,7 +182,11 @@
56
182
  "vite": "^7.1.0"
57
183
  },
58
184
  "publishConfig": {
59
- "access": "public",
60
- "registry": "https://registry.npmjs.org/"
61
- }
185
+ "registry": "https://npm.pkg.github.com/"
186
+ },
187
+ "dependencies": {
188
+ "@lewismoten/gamemaker-sandbox-engine": "^3.2.0",
189
+ "@lewismoten/gamemaker-sandbox-archives": "^3.2.0"
190
+ },
191
+ "author": "Lewis Moten"
62
192
  }
@@ -1,120 +0,0 @@
1
- const n = new TextDecoder("latin1");
2
- class h {
3
- bytes;
4
- offset;
5
- constructor(t, s = 0) {
6
- this.bytes = t, this.offset = s;
7
- }
8
- get length() {
9
- return this.bytes.length;
10
- }
11
- get eof() {
12
- return this.offset >= this.bytes.length;
13
- }
14
- skip(t) {
15
- return this.offset += t, this;
16
- }
17
- u8() {
18
- const t = this.offset < this.bytes.length ? this.bytes[this.offset] : 0;
19
- return this.offset++, t;
20
- }
21
- i8() {
22
- const t = this.u8();
23
- return t > 127 ? t - 256 : t;
24
- }
25
- u16() {
26
- return this.u8() | this.u8() << 8;
27
- }
28
- i16() {
29
- const t = this.u16();
30
- return t > 32767 ? t - 65536 : t;
31
- }
32
- u32() {
33
- return (this.u16() | this.u16() << 16) >>> 0;
34
- }
35
- i32() {
36
- return this.u16() | this.u16() << 16;
37
- }
38
- /** Copies n bytes (zero padded when the source is short). */
39
- bytesOf(t) {
40
- const s = new Uint8Array(t), e = Math.max(0, Math.min(t, this.bytes.length - this.offset));
41
- return e > 0 && s.set(this.bytes.subarray(this.offset, this.offset + e)), this.offset += t, s;
42
- }
43
- /** Reads a fixed size, NUL terminated string field. */
44
- cstr(t) {
45
- return u(this.bytesOf(t));
46
- }
47
- }
48
- class f {
49
- buf;
50
- offset = 0;
51
- constructor(t = 1024) {
52
- this.buf = new Uint8Array(t);
53
- }
54
- ensure(t) {
55
- if (this.offset + t <= this.buf.length) return;
56
- let s = this.buf.length * 2;
57
- for (; s < this.offset + t; ) s *= 2;
58
- const e = new Uint8Array(s);
59
- e.set(this.buf), this.buf = e;
60
- }
61
- u8(t) {
62
- return this.ensure(1), this.buf[this.offset++] = t & 255, this;
63
- }
64
- // Signed writes store the same two's complement bytes as the unsigned ones.
65
- i8(t) {
66
- return this.u8(t);
67
- }
68
- u16(t) {
69
- return this.u8(t).u8(t >> 8);
70
- }
71
- i16(t) {
72
- return this.u16(t);
73
- }
74
- u32(t) {
75
- return this.u16(t & 65535).u16(t >>> 16 & 65535);
76
- }
77
- i32(t) {
78
- return this.u32(t >>> 0);
79
- }
80
- bytes(t, s = t.length) {
81
- this.ensure(s);
82
- for (let e = 0; e < s; e++) this.buf[this.offset++] = e < t.length ? t[e] & 255 : 0;
83
- return this;
84
- }
85
- /** Writes a string into a fixed size NUL padded field (truncated to leave room for the NUL). */
86
- cstr(t, s) {
87
- const e = new Uint8Array(s);
88
- for (let i = 0; i < Math.min(t.length, s - 1); i++) e[i] = t.charCodeAt(i) & 255;
89
- return this.bytes(e);
90
- }
91
- /**
92
- * Writes a fixed size string field. When the text is unchanged the original raw
93
- * bytes (including any garbage after the NUL) are kept so files round-trip exactly.
94
- */
95
- cstrOver(t, s, e) {
96
- return s && s.length === e && u(s) === t ? this.bytes(s) : this.cstr(t, e);
97
- }
98
- toBytes() {
99
- return this.buf.slice(0, this.offset);
100
- }
101
- }
102
- function u(r) {
103
- const t = r.indexOf(0);
104
- return n.decode(t < 0 ? r : r.subarray(0, t));
105
- }
106
- function o(r) {
107
- return n.decode(r);
108
- }
109
- function c(r) {
110
- const t = new Uint8Array(r.length);
111
- for (let s = 0; s < r.length; s++) t[s] = r.charCodeAt(s) & 255;
112
- return t;
113
- }
114
- export {
115
- h as R,
116
- f as W,
117
- u as c,
118
- o as l,
119
- c as t
120
- };
@@ -1,76 +0,0 @@
1
- class a {
2
- constructor(s, t, h = 0) {
3
- this.w = s, this.h = t, this.px = new Uint8Array(s * t).fill(h);
4
- }
5
- get(s, t) {
6
- return s < 0 || t < 0 || s >= this.w || t >= this.h ? -1 : this.px[t * this.w + s];
7
- }
8
- set(s, t, h) {
9
- return s = Math.round(s), t = Math.round(t), s >= 0 && t >= 0 && s < this.w && t < this.h && (this.px[t * this.w + s] = h), this;
10
- }
11
- rect(s, t, h, e, i) {
12
- for (let r = t; r < t + e; r++) for (let n = s; n < s + h; n++) this.set(n, r, i);
13
- return this;
14
- }
15
- frame(s, t, h, e, i) {
16
- return this.rect(s, t, h, 1, i).rect(s, t + e - 1, h, 1, i), this.rect(s, t, 1, e, i).rect(s + h - 1, t, 1, e, i);
17
- }
18
- line(s, t, h, e, i) {
19
- const r = Math.max(Math.abs(h - s), Math.abs(e - t), 1);
20
- for (let n = 0; n <= r; n++) this.set(s + (h - s) * n / r, t + (e - t) * n / r, i);
21
- return this;
22
- }
23
- disc(s, t, h, e) {
24
- for (let i = Math.floor(t - h); i <= t + h; i++)
25
- for (let r = Math.floor(s - h); r <= s + h; r++) (r - s) ** 2 + (i - t) ** 2 <= h * h && this.set(r, i, e);
26
- return this;
27
- }
28
- ring(s, t, h, e) {
29
- for (let i = 0; i < Math.PI * 2; i += 0.5 / Math.max(1, h)) this.set(s + Math.cos(i) * h, t + Math.sin(i) * h, e);
30
- return this;
31
- }
32
- /** Every pixel through fn(x, y, current) → new color (or the same). */
33
- map(s) {
34
- for (let t = 0; t < this.h; t++) for (let h = 0; h < this.w; h++) this.px[t * this.w + h] = s(h, t, this.px[t * this.w + h]);
35
- return this;
36
- }
37
- /** Copies another picture in, skipping `transparent` pixels. */
38
- blit(s, t, h, e = -1) {
39
- for (let i = 0; i < s.h; i++)
40
- for (let r = 0; r < s.w; r++) {
41
- const n = s.px[i * s.w + r];
42
- n !== e && this.set(t + r, h + i, n);
43
- }
44
- return this;
45
- }
46
- /** A sub-rectangle as a new picture (cutting a 20x20 block out of a big drawing). */
47
- crop(s, t, h, e) {
48
- const i = new a(h, e);
49
- for (let r = 0; r < e; r++) for (let n = 0; n < h; n++) i.px[r * h + n] = this.get(s + n, t + r) & 255;
50
- return i;
51
- }
52
- flipX() {
53
- return new a(this.w, this.h).map((t, h) => this.get(this.w - 1 - t, h));
54
- }
55
- /** ASCII art: each character maps to a color through `key`; others are skipped. */
56
- draw(s, t, h, e) {
57
- return h.forEach((i, r) => [...i].forEach((n, f) => n in e && this.set(s + f, t + r, e[n]))), this;
58
- }
59
- }
60
- function l(o) {
61
- let s = o >>> 0;
62
- return () => {
63
- s = s + 1831565813 >>> 0;
64
- let t = s;
65
- return t = Math.imul(t ^ t >>> 15, t | 1), t ^= t + Math.imul(t ^ t >>> 7, t | 61), ((t ^ t >>> 14) >>> 0) / 4294967296;
66
- };
67
- }
68
- function u(o, s, t) {
69
- const h = [0, 8, 2, 10, 12, 4, 14, 6, 3, 11, 1, 9, 15, 7, 13, 5];
70
- return t * 16 > h[(s & 3) * 4 + (o & 3)];
71
- }
72
- export {
73
- a as P,
74
- u as d,
75
- l as r
76
- };
@@ -1,10 +0,0 @@
1
- import { Pixels } from './pixels.js';
2
- export declare const CLEAR = 255;
3
- /** Copies src over dst, skipping clear pixels. */
4
- export declare function over(dst: Pixels, src: Pixels, x?: number, y?: number): Pixels;
5
- /** Recolors every pixel through a lookup (palette swaps for variants and hurt flashes). */
6
- export declare function recolor(src: Pixels, fn: (c: number) => number): Pixels;
7
- /** Nearest-neighbor scaled copy (for big sprites on screens). */
8
- export declare function scaleBlit(dst: Pixels, src: Pixels, x: number, y: number, s: number, flip?: boolean): void;
9
- /** Adds a 1 pixel outline in `ink` around every opaque pixel. */
10
- export declare function outline(src: Pixels, ink: number): Pixels;
@@ -1 +0,0 @@
1
- export * from '../../web/src/audio/compose.js';
@@ -1,8 +0,0 @@
1
- import { Pixels } from './pixels.js';
2
- /** Text in the PC font; returns the width drawn. */
3
- export declare function text(p: Pixels, x: number, y: number, s: string, col: number, scale?: number): number;
4
- export declare const textWidth: (s: string, scale?: number) => number;
5
- /** Text with an outline (and an optional drop shadow). */
6
- export declare function outlined(p: Pixels, x: number, y: number, s: string, col: number, edge: number, scale?: number, shadow?: number): void;
7
- /** Centered text (outlined when `edge` is given). */
8
- export declare function centered(p: Pixels, y: number, s: string, col: number, scale?: number, edge?: number, cx?: number, shadow?: number): void;
@@ -1,11 +0,0 @@
1
- import { Pixels } from './pixels.js';
2
- /** A shade between ramp[lo] and ramp[hi] for level 0..1, ordered-dithered at (x, y). */
3
- export declare function shadeAt(ramp: number[], lo: number, hi: number, level: number, x: number, y: number): number;
4
- /** A vertical gradient across a rectangle. */
5
- export declare function gradient(p: Pixels, x0: number, y0: number, w: number, h: number, ramp: number[], lo: number, hi: number): Pixels;
6
- /** A lit ellipsoid lump, light from the upper left. */
7
- export declare function blob(p: Pixels, cx: number, cy: number, rx: number, ry: number, ramp: number[], lo: number, hi: number, light?: number): Pixels;
8
- /** A raised box: light top/left edge, dark bottom/right edge. */
9
- export declare function bevel(p: Pixels, x: number, y: number, w: number, h: number, ramp: number[], face: number, depth?: number): Pixels;
10
- /** Fills a rectangle with a speckled texture from ramp[lo..hi]. */
11
- export declare function speckle(p: Pixels, x0: number, y0: number, w: number, h: number, ramp: number[], base: number, spread: number, seed: number, density?: number): Pixels;
@@ -1,3 +0,0 @@
1
- export * from '../../../src/audio/compose.js';
2
- export * from '../../../../games/kit/tune.js';
3
- export * from '../../../../games/kit/sound.js';
@@ -1,10 +0,0 @@
1
- export * from '../../../../games/kit/pixels.js';
2
- export * from '../../../../games/kit/palette.js';
3
- export * from '../../../../games/kit/pcText.js';
4
- export * from '../../../../games/kit/blit.js';
5
- export * from '../../../../games/kit/shading.js';
6
- export * from '../../../../games/kit/textBounds.js';
7
- export * from '../../../../games/kit/reel.js';
8
- export { FONT8X8 } from '../../../src/gfx/font8x8.js';
9
- export * from './text.js';
10
- export * from './colors.js';
@@ -1,2 +0,0 @@
1
- export { encodePng, type IndexedPicture } from '../../../src/assistant/png.js';
2
- export { crc32 } from '../../../src/project/zip.js';
@@ -1 +0,0 @@
1
- export declare const MICRO_GLYPHS: Readonly<Record<string, string>>;
@@ -1,3 +0,0 @@
1
- export { Sim, type SimScene } from '../../../../games/kit/sceneSim.js';
2
- export { GameSim, readDisk, diskSim, TICKS_PER_SECOND } from '../../../../games/kit/gameSim.js';
3
- export { newCharInfo, type CharInfo } from '../../../src/engine/world.js';
@@ -1,103 +0,0 @@
1
- import type { Plugin } from 'vite';
2
- import type { PrintablesFile } from '../src/manual/printables/types.js';
3
- import { type Issue } from '../src/project/health.js';
4
- import { type BoxGame } from '../src/desk/boxes/boxFacts.js';
5
- export interface CdCatalogEntry {
6
- id: string;
7
- title: string;
8
- kind: 'gameware' | 'shareware';
9
- /** Folder of the game's files, relative to the site root. */
10
- path: string;
11
- gam: string | null;
12
- files: string[];
13
- /** Size of each file in `files`, in bytes. */
14
- sizes: number[];
15
- /** Shareware: the author's notice (readme / order form), as text. */
16
- notice?: string;
17
- /** Shareware: CRC-32 of the .gam file, to recognize the game when imported. */
18
- gamCrc?: number;
19
- /** Total size of the game's files in bytes. */
20
- bytes: number;
21
- /** Shareware: the name of its DOS program (listed on the retro PC; never served). */
22
- exe?: string;
23
- /** A few lines from the game's own story or instruction screen. */
24
- blurb?: string;
25
- author?: string;
26
- company?: string;
27
- year?: number;
28
- price?: string;
29
- /** Original games (../games): the disk label, box art and manual, from about.json. */
30
- original?: OriginalExtras;
31
- /** Original games: about.json "series" ("bizarre": The Bard of Bizarre's games, src/project/bizarre.ts). */
32
- series?: string;
33
- /** games/catalog.json: the entry has a games/details/<id>.json (see slimCatalog). */
34
- details?: boolean;
35
- /** Original games: the site path of the game's walkthrough (../games/<id>/walkthrough.json, src/walkthrough). */
36
- walkthrough?: string;
37
- /** Original games: its DOS player look, ../games/<id>/player.json ({ base, patches }: src/dosPlayer/catalogPatches.ts). */
38
- player?: unknown;
39
- /** The build drew its pictures (games/shots/<id>-<cols>x<rows>.png, scripts/gameShots.ts). */
40
- shots?: boolean;
41
- /** …and its hero (games/shots/<id>-hero.png). */
42
- heroShot?: boolean;
43
- /** All its files in one gzipped file in its folder, named by a hash of them (packName, src/project/gamePack.ts). */
44
- pack?: string;
45
- /** Built sites: what the home page's quick check finds in it (src/editor/shell/gameHealth.ts), so the page need not fetch files to know. */
46
- health?: Issue[];
47
- /** Built sites: the size of its pack in bytes (what downloading it for offline use costs, src/offline). */
48
- packBytes?: number;
49
- /** Built sites, games with a box: what the box reads from the .gam (src/desk/boxes/boxFacts.ts). */
50
- boxGame?: BoxGame;
51
- }
52
- /** What ../games/<id>/about.json and manual.json add for an original game. */
53
- export interface OriginalExtras {
54
- /** Printed disk label: background, band and text colors, and a small logo line. */
55
- label?: {
56
- background: string;
57
- band: string;
58
- ink: string;
59
- logo?: string;
60
- };
61
- /** Box art: colors, tagline, back-cover copy, feature bullets and screenshot spots. */
62
- box?: {
63
- background: string;
64
- accent: string;
65
- ink: string;
66
- tagline: string;
67
- back: string;
68
- features: string[];
69
- /** Map views for screenshots: [map file, x, y] in blocks. */
70
- shots?: [string, number, number][];
71
- rating?: string;
72
- };
73
- /** The manual: pages of simple HTML, with <shot map="x.map" x="1" y="2"> screenshots. */
74
- manual?: {
75
- title: string;
76
- pages: {
77
- head: string;
78
- html: string;
79
- }[];
80
- };
81
- /** The paper extras in the box (games/<id>/printables.json, see src/manual/printables). */
82
- printables?: PrintablesFile;
83
- /** 'sb' games use the Sound Blaster; 'speaker' ones only the PC speaker. */
84
- sound?: 'sb' | 'speaker';
85
- }
86
- export interface GmInstallEntry {
87
- name: string;
88
- size: number;
89
- dir: boolean;
90
- }
91
- /**
92
- * The catalog without what only some pages read (games/catalog.json): a shareware notice,
93
- * an original game's manual and printables. Those are in games/details/<id>.json. The play
94
- * page needs only this (and, for shareware, its game's details); games/index.json has it all.
95
- */
96
- export declare function slimCatalog(catalog: CdCatalogEntry[]): CdCatalogEntry[];
97
- /** Every playable game on the CD and in ../games but the secret ones (what games/index.json lists, and every page, sitemap and picture the build makes). */
98
- export declare function cdCatalog(cdRoot: string): CdCatalogEntry[];
99
- /** The secret games (games/extra-<gate>.json): listed only once what reveals each is found. */
100
- export declare function cdSecretCatalog(cdRoot: string): CdCatalogEntry[];
101
- /** Where each game file the site serves (e.g. games/gameware/nebula/nebula.gam) is on disk. */
102
- export declare function cdFiles(cdRoot: string): ReadonlyMap<string, string>;
103
- export declare function cdGames(cdRoot: string): Plugin;