@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.
- package/CHANGELOG.md +44 -0
- package/NOTICE.md +105 -3
- package/README.md +301 -15
- package/dist/audio-files.js +82 -0
- package/dist/audio.js +23 -138
- package/dist/block-merge.js +43 -0
- package/dist/color-reduce.js +44 -0
- package/dist/colors.js +87 -0
- package/dist/delta.js +75 -0
- package/dist/disk-diff.js +220 -0
- package/dist/drawing.js +83 -869
- package/dist/embroidery/compile.js +85 -0
- package/dist/embroidery/dst.js +79 -0
- package/dist/embroidery/exp.js +26 -0
- package/dist/embroidery/fill.js +49 -0
- package/dist/embroidery/geom.js +82 -0
- package/dist/embroidery/pes.js +79 -0
- package/dist/embroidery/satin.js +29 -0
- package/dist/embroidery/simulate.js +30 -0
- package/dist/embroidery/strokeFont.js +253 -0
- package/dist/embroidery/svg.js +24 -0
- package/dist/embroidery/types.js +13 -0
- package/dist/embroidery/units.js +26 -0
- package/dist/embroidery/validate.js +15 -0
- package/dist/formats/blocks.js +1 -103
- package/dist/formats/character.js +1 -83
- package/dist/formats/cmf.js +1 -37
- package/dist/formats/fli.js +1 -296
- package/dist/formats/fliLimits.js +1 -54
- package/dist/formats/game.js +1 -193
- package/dist/formats/gif.js +1 -125
- package/dist/formats/graphicScripts.js +1 -44
- package/dist/formats/map.js +1 -38
- package/dist/formats/monster.js +1 -69
- package/dist/formats/palette.js +1 -58
- package/dist/formats/recording.js +1 -17
- package/dist/formats/sound.js +1 -44
- package/dist/formats/voc.js +1 -303
- package/dist/gif-shrink.js +56 -0
- package/dist/image/png.js +42 -0
- package/dist/images.js +81 -43
- package/dist/kit/actors.js +19 -0
- package/dist/kit/align.js +204 -0
- package/dist/kit/blit.js +45 -0
- package/dist/kit/blockRoles.js +97 -0
- package/dist/kit/clips.js +40 -0
- package/dist/kit/coverPaint.js +18 -0
- package/dist/kit/disk.js +76 -0
- package/dist/kit/fadeOut.js +13 -0
- package/dist/kit/fliClips.js +133 -0
- package/dist/kit/fliShrink.js +277 -0
- package/dist/kit/gameSim.js +235 -0
- package/dist/kit/hopBot.js +142 -0
- package/dist/kit/levelGen.js +1423 -0
- package/dist/kit/levelGrid.js +33 -0
- package/dist/kit/levelPicture.js +27 -0
- package/dist/kit/menuVersion.js +19 -0
- package/dist/kit/microText.js +35 -0
- package/dist/kit/mumble.js +74 -0
- package/dist/kit/music.js +8 -0
- package/dist/kit/palRamps.js +32 -0
- package/dist/kit/palette.js +49 -0
- package/dist/kit/pcText.js +72 -0
- package/dist/kit/photo.js +150 -0
- package/dist/kit/pixels.js +79 -0
- package/dist/kit/png.js +40 -0
- package/dist/kit/quantize.js +72 -0
- package/dist/kit/raytrace.js +379 -0
- package/dist/kit/recordedDemo.js +10 -0
- package/dist/kit/reel.js +77 -0
- package/dist/kit/road3d.js +67 -0
- package/dist/kit/routeChecks.js +8 -0
- package/dist/kit/saveSlots.js +11 -0
- package/dist/kit/sceneInit.js +13 -0
- package/dist/kit/sceneSim.js +112 -0
- package/dist/kit/screenText.js +15 -0
- package/dist/kit/sdftext.js +237 -0
- package/dist/kit/shading.js +69 -0
- package/dist/kit/song.js +251 -0
- package/dist/kit/songFx.js +179 -0
- package/dist/kit/sound.js +52 -0
- package/dist/kit/synthParts.js +20 -0
- package/dist/kit/tar.js +53 -0
- package/dist/kit/textBounds.js +84 -0
- package/dist/kit/textfit.js +246 -0
- package/dist/kit/transforms.js +57 -0
- package/dist/kit/tune.js +21 -0
- package/dist/look-alike.js +50 -0
- package/dist/menu-version.js +4 -0
- package/dist/mesh/colorBodies.js +137 -0
- package/dist/mesh/decimate.js +207 -0
- package/dist/mesh/meshCheck.js +51 -0
- package/dist/mesh/overhang.js +41 -0
- package/dist/mesh/sampledField.js +12 -0
- package/dist/mesh/stl.js +36 -0
- package/dist/mesh/surfaceNets.js +79 -0
- package/dist/mesh/tetraMesh.js +62 -0
- package/dist/mesh/threeMf.js +58 -0
- package/dist/mesh/zipFile.js +52 -0
- package/dist/microFont.js +101 -0
- package/dist/music/compose.js +72 -0
- package/dist/pack/meshPack.js +198 -0
- package/dist/pack/threeMfPack.js +92 -0
- package/dist/palette-reserve.js +116 -0
- package/dist/palettes.js +138 -0
- package/dist/release-notes.js +40 -0
- package/dist/simulation.js +16 -2774
- package/dist/text.js +74 -0
- package/dist/types/audio.d.ts +4 -0
- package/dist/types/audioFiles.d.ts +22 -0
- package/dist/types/audioWav.d.ts +4 -0
- package/dist/types/blockMerge.d.ts +24 -0
- package/dist/types/colorReduce.d.ts +23 -0
- package/dist/types/{web/packages/tools/src/colors.d.ts → colors.d.ts} +6 -0
- package/dist/types/delta.d.ts +32 -0
- package/dist/types/diskDiff.d.ts +47 -0
- package/dist/types/drawing.d.ts +15 -0
- package/dist/types/embroidery/compile.d.ts +3 -0
- package/dist/types/embroidery/dst.d.ts +13 -0
- package/dist/types/embroidery/exp.d.ts +8 -0
- package/dist/types/embroidery/fill.d.ts +6 -0
- package/dist/types/embroidery/geom.d.ts +19 -0
- package/dist/types/embroidery/pes.d.ts +10 -0
- package/dist/types/embroidery/satin.d.ts +11 -0
- package/dist/types/embroidery/simulate.d.ts +19 -0
- package/dist/types/embroidery/strokeFont.d.ts +20 -0
- package/dist/types/embroidery/svg.d.ts +3 -0
- package/dist/types/embroidery/types.d.ts +70 -0
- package/dist/types/embroidery/units.d.ts +10 -0
- package/dist/types/embroidery/validate.d.ts +22 -0
- package/dist/types/formats/blocks.d.ts +1 -0
- package/dist/types/formats/character.d.ts +1 -0
- package/dist/types/formats/cmf.d.ts +1 -0
- package/dist/types/formats/fli.d.ts +1 -0
- package/dist/types/formats/fliLimits.d.ts +1 -0
- package/dist/types/formats/game.d.ts +1 -0
- package/dist/types/formats/gif.d.ts +1 -0
- package/dist/types/formats/graphicScripts.d.ts +1 -0
- package/dist/types/formats/map.d.ts +1 -0
- package/dist/types/formats/monster.d.ts +1 -0
- package/dist/types/formats/palette.d.ts +1 -0
- package/dist/types/formats/recording.d.ts +1 -0
- package/dist/types/formats/sound.d.ts +1 -0
- package/dist/types/formats/voc.d.ts +1 -0
- package/dist/types/gifShrink.d.ts +8 -0
- package/dist/types/image/animatedGif.d.ts +9 -0
- package/dist/types/image/surface.d.ts +26 -0
- package/dist/types/images.d.ts +13 -0
- package/dist/types/kit/actors.d.ts +7 -0
- package/dist/types/kit/align.d.ts +93 -0
- package/dist/types/kit/audioEvents.d.ts +26 -0
- package/dist/types/kit/blit.d.ts +20 -0
- package/dist/types/kit/blockRoles.d.ts +243 -0
- package/dist/types/{games/kit → kit}/clips.d.ts +1 -1
- package/dist/types/kit/coverPaint.d.ts +7 -0
- package/dist/types/kit/disk.d.ts +15 -0
- package/dist/types/kit/fadeOut.d.ts +12 -0
- package/dist/types/kit/fliClips.d.ts +32 -0
- package/dist/types/kit/fliShrink.d.ts +149 -0
- package/dist/types/{games/kit → kit}/gameSim.d.ts +9 -5
- package/dist/types/kit/hopBot.d.ts +72 -0
- package/dist/types/kit/laserClearance.d.ts +16 -0
- package/dist/types/kit/laserJoints.d.ts +39 -0
- package/dist/types/kit/laserLayout.d.ts +54 -0
- package/dist/types/kit/laserPixels.d.ts +52 -0
- package/dist/types/kit/laserPreview.d.ts +9 -0
- package/dist/types/kit/laserSvg.d.ts +35 -0
- package/dist/types/kit/levelGen/castle.d.ts +17 -0
- package/dist/types/kit/levelGen/dungeon.d.ts +11 -0
- package/dist/types/kit/levelGen/forest.d.ts +17 -0
- package/dist/types/kit/levelGen/furnish.d.ts +31 -0
- package/dist/types/kit/levelGen/grid.d.ts +46 -0
- package/dist/types/kit/levelGen/index.d.ts +138 -0
- package/dist/types/kit/levelGen/interior.d.ts +18 -0
- package/dist/types/kit/levelGen/jumpModel.d.ts +78 -0
- package/dist/types/kit/levelGen/needs.d.ts +44 -0
- package/dist/types/kit/levelGen/overworld.d.ts +21 -0
- package/dist/types/kit/levelGen/platform.d.ts +59 -0
- package/dist/types/kit/levelGen/platformCap.d.ts +13 -0
- package/dist/types/kit/levelGen/platformReach.d.ts +37 -0
- package/dist/types/kit/levelGen/props.d.ts +37 -0
- package/dist/types/kit/levelGen/town.d.ts +24 -0
- package/dist/types/kit/levelGrid.d.ts +16 -0
- package/dist/types/kit/levelPicture.d.ts +9 -0
- package/dist/types/kit/menuVersion.d.ts +7 -0
- package/dist/types/kit/microText.d.ts +18 -0
- package/dist/types/kit/mumble.d.ts +41 -0
- package/dist/types/kit/music.d.ts +1 -0
- package/dist/types/kit/palMerge.d.ts +10 -0
- package/dist/types/kit/palRamps.d.ts +28 -0
- package/dist/types/kit/pcText.d.ts +19 -0
- package/dist/types/kit/photo.d.ts +69 -0
- package/dist/types/kit/png.d.ts +7 -0
- package/dist/types/kit/quantize.d.ts +20 -0
- package/dist/types/kit/raytrace.d.ts +169 -0
- package/dist/types/kit/recordedDemo.d.ts +1 -0
- package/dist/types/kit/road3d.d.ts +71 -0
- package/dist/types/kit/routeChecks.d.ts +6 -0
- package/dist/types/kit/saveSlots.d.ts +17 -0
- package/dist/types/kit/sceneInit.d.ts +11 -0
- package/dist/types/{games/kit → kit}/sceneSim.d.ts +5 -5
- package/dist/types/kit/screenText.d.ts +3 -0
- package/dist/types/kit/sdftext.d.ts +34 -0
- package/dist/types/kit/shading.d.ts +23 -0
- package/dist/types/kit/shareBlocks.d.ts +20 -0
- package/dist/types/kit/song.d.ts +89 -0
- package/dist/types/kit/songFx.d.ts +99 -0
- package/dist/types/kit/synthParts.d.ts +7 -0
- package/dist/types/kit/tar.d.ts +13 -0
- package/dist/types/kit/textfit.d.ts +74 -0
- package/dist/types/kit/transforms.d.ts +8 -0
- package/dist/types/lookAlike.d.ts +31 -0
- package/dist/types/menuVersionEntry.d.ts +1 -0
- package/dist/types/mesh/colorBodies.d.ts +18 -0
- package/dist/types/mesh/decimate.d.ts +10 -0
- package/dist/types/mesh/fieldTrinket.d.ts +40 -0
- package/dist/types/mesh/figureShapes.d.ts +24 -0
- package/dist/types/mesh/mesh.d.ts +9 -0
- package/dist/types/mesh/meshCheck.d.ts +22 -0
- package/dist/types/mesh/overhang.d.ts +24 -0
- package/dist/types/mesh/pixelFigure.d.ts +41 -0
- package/dist/types/mesh/sampledField.d.ts +3 -0
- package/dist/types/mesh/sdfShapes.d.ts +20 -0
- package/dist/types/mesh/stl.d.ts +9 -0
- package/dist/types/mesh/strokeText.d.ts +8 -0
- package/dist/types/mesh/surfaceNets.d.ts +14 -0
- package/dist/types/mesh/tetraMesh.d.ts +4 -0
- package/dist/types/mesh/threeMf.d.ts +12 -0
- package/dist/types/mesh/trinketKinds.d.ts +72 -0
- package/dist/types/mesh/trinketTool.d.ts +26 -0
- package/dist/types/mesh/voxel.d.ts +10 -0
- package/dist/types/mesh/zipFile.d.ts +13 -0
- package/dist/types/microFont.d.ts +6 -0
- package/dist/types/pack/meshPack.d.ts +26 -0
- package/dist/types/pack/threeMfPack.d.ts +11 -0
- package/dist/types/palettePresetData.d.ts +4 -0
- package/dist/types/palettePresets.d.ts +12 -0
- package/dist/types/paletteReserve.d.ts +52 -0
- package/dist/types/palettes.d.ts +4 -0
- package/dist/types/releaseNotes.d.ts +3 -0
- package/dist/types/simulation.d.ts +6 -0
- package/dist/types/{web/packages/tools/src/text.d.ts → text.d.ts} +6 -6
- package/package.json +145 -15
- package/dist/binary-D7wuaC5g.js +0 -120
- package/dist/pixels-DzfIIUOl.js +0 -76
- package/dist/types/games/kit/blit.d.ts +0 -10
- package/dist/types/games/kit/music.d.ts +0 -1
- package/dist/types/games/kit/pcText.d.ts +0 -8
- package/dist/types/games/kit/shading.d.ts +0 -11
- package/dist/types/web/packages/tools/src/audio.d.ts +0 -3
- package/dist/types/web/packages/tools/src/drawing.d.ts +0 -10
- package/dist/types/web/packages/tools/src/images.d.ts +0 -2
- package/dist/types/web/packages/tools/src/microFont.d.ts +0 -1
- package/dist/types/web/packages/tools/src/simulation.d.ts +0 -3
- package/dist/types/web/scripts/cdGames.d.ts +0 -103
- package/dist/types/web/scripts/gameShots.d.ts +0 -12
- package/dist/types/web/scripts/ogImage.d.ts +0 -21
- package/dist/types/web/src/audio/cmfLoad.d.ts +0 -7
- package/dist/types/web/src/audio/cmfPlayer.d.ts +0 -69
- package/dist/types/web/src/audio/context.d.ts +0 -12
- package/dist/types/web/src/audio/engine.d.ts +0 -39
- package/dist/types/web/src/audio/music.worklet.d.ts +0 -14
- package/dist/types/web/src/audio/opl.d.ts +0 -37
- package/dist/types/web/src/audio/output.d.ts +0 -13
- package/dist/types/web/src/desk/boxes/boxFacts.d.ts +0 -85
- package/dist/types/web/src/dosPlayer/fileExtensions.d.ts +0 -44
- package/dist/types/web/src/dosPlayer/patchRules.d.ts +0 -24
- package/dist/types/web/src/dosPlayer/patchTable.d.ts +0 -80
- package/dist/types/web/src/edition.d.ts +0 -6
- package/dist/types/web/src/eggs/eggState.d.ts +0 -26
- package/dist/types/web/src/eggs/eggs.d.ts +0 -31
- package/dist/types/web/src/engine/character.d.ts +0 -30
- package/dist/types/web/src/engine/funcKeys.d.ts +0 -33
- package/dist/types/web/src/engine/game.d.ts +0 -52
- package/dist/types/web/src/engine/keys.d.ts +0 -17
- package/dist/types/web/src/engine/machine.d.ts +0 -99
- package/dist/types/web/src/engine/menus.d.ts +0 -46
- package/dist/types/web/src/engine/monsters.d.ts +0 -19
- package/dist/types/web/src/engine/playGain.d.ts +0 -11
- package/dist/types/web/src/engine/playerLook.d.ts +0 -26
- package/dist/types/web/src/engine/recorder.d.ts +0 -60
- package/dist/types/web/src/engine/render.d.ts +0 -8
- package/dist/types/web/src/engine/scene.d.ts +0 -156
- package/dist/types/web/src/engine/scroll.d.ts +0 -16
- package/dist/types/web/src/engine/showGraphic.d.ts +0 -39
- package/dist/types/web/src/engine/slowPc.d.ts +0 -62
- package/dist/types/web/src/engine/touch.d.ts +0 -33
- package/dist/types/web/src/engine/world.d.ts +0 -215
- package/dist/types/web/src/export/gameAbout.d.ts +0 -15
- package/dist/types/web/src/formats/binary.d.ts +0 -44
- package/dist/types/web/src/formats/blocks.d.ts +0 -52
- package/dist/types/web/src/formats/character.d.ts +0 -65
- package/dist/types/web/src/formats/cmf.d.ts +0 -33
- package/dist/types/web/src/formats/fli.d.ts +0 -45
- package/dist/types/web/src/formats/fliLimits.d.ts +0 -13
- package/dist/types/web/src/formats/game.d.ts +0 -72
- package/dist/types/web/src/formats/gif.d.ts +0 -15
- package/dist/types/web/src/formats/graphicScripts.d.ts +0 -18
- package/dist/types/web/src/formats/highscore.d.ts +0 -10
- package/dist/types/web/src/formats/map.d.ts +0 -24
- package/dist/types/web/src/formats/monster.d.ts +0 -48
- package/dist/types/web/src/formats/palette.d.ts +0 -15
- package/dist/types/web/src/formats/recording.d.ts +0 -7
- package/dist/types/web/src/formats/sound.d.ts +0 -13
- package/dist/types/web/src/formats/voc.d.ts +0 -13
- package/dist/types/web/src/gfx/cp437Glyphs.d.ts +0 -2
- package/dist/types/web/src/gfx/font8x8.d.ts +0 -2
- package/dist/types/web/src/gfx/levelPicture.d.ts +0 -81
- package/dist/types/web/src/gfx/screen.d.ts +0 -46
- package/dist/types/web/src/gfx/titlePicture.d.ts +0 -21
- package/dist/types/web/src/input/chords.d.ts +0 -22
- package/dist/types/web/src/input/deskMouse.d.ts +0 -14
- package/dist/types/web/src/input/keyboard.d.ts +0 -39
- package/dist/types/web/src/input/scancodes.d.ts +0 -3
- package/dist/types/web/src/manual/printables/types.d.ts +0 -277
- package/dist/types/web/src/project/bizarre.d.ts +0 -28
- package/dist/types/web/src/project/companion.d.ts +0 -35
- package/dist/types/web/src/project/diskFacts.d.ts +0 -30
- package/dist/types/web/src/project/files.d.ts +0 -124
- package/dist/types/web/src/project/gameFiles.d.ts +0 -49
- package/dist/types/web/src/project/gamePack.d.ts +0 -17
- package/dist/types/web/src/project/health.d.ts +0 -30
- package/dist/types/web/src/project/secretGames.d.ts +0 -19
- package/dist/types/web/src/project/storage.d.ts +0 -46
- package/dist/types/web/src/project/streamGame.d.ts +0 -38
- package/dist/types/web/src/project/zip.d.ts +0 -33
- package/dist/types/web/src/retro/dos/disks.d.ts +0 -33
- package/dist/types/web/src/retro/text/cp437.d.ts +0 -4
- package/dist/types/web/src/seededRandom.d.ts +0 -6
- package/dist/types/web/src/tinHearts/deskHearts.d.ts +0 -33
- package/dist/types/web/src/tinHearts/manifest.d.ts +0 -30
- package/dist/types/web/src/tinHearts/tinHearts.d.ts +0 -84
- package/dist/types/web/src/walkthrough/format.d.ts +0 -92
- package/dist/types/web/src/walkthrough/madeUpScores.d.ts +0 -6
- package/dist/types/web/src/walkthrough/runtime.d.ts +0 -134
- /package/dist/types/{web/src/assistant → image}/png.d.ts +0 -0
- /package/dist/types/{games/kit → kit}/palette.d.ts +0 -0
- /package/dist/types/{games/kit → kit}/pixels.d.ts +0 -0
- /package/dist/types/{games/kit → kit}/reel.d.ts +0 -0
- /package/dist/types/{games/kit → kit}/sound.d.ts +0 -0
- /package/dist/types/{games/kit → kit}/textBounds.d.ts +0 -0
- /package/dist/types/{games/kit → kit}/tune.d.ts +0 -0
- /package/dist/types/{web/src/audio → music}/compose.d.ts +0 -0
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type HeroSpec, type LevelPicture } from '../src/gfx/levelPicture.js';
|
|
2
|
-
/**
|
|
3
|
-
* A palette PNG of only the colors the picture uses; rows unfiltered (flat pixel art packs best
|
|
4
|
-
* that way). With `transparent`, that palette index is see-through.
|
|
5
|
-
*/
|
|
6
|
-
export declare function encodeIndexedPng(pic: LevelPicture, transparent?: number): Uint8Array;
|
|
7
|
-
/**
|
|
8
|
-
* A game's pictures, by site path: each size in BUILT_SHOTS, its title screen (titlePixels),
|
|
9
|
-
* an original game's box views (builtMapViews of its box's `shots`) and its hero (heroOf);
|
|
10
|
-
* none when it has no level to show. `disk` maps a game file's name (as listed) to where it is on disk.
|
|
11
|
-
*/
|
|
12
|
-
export declare function gameShots(id: string, gam: string | null, disk: ReadonlyMap<string, string>, boxShots?: [string, number, number][], hero?: HeroSpec): Map<string, Uint8Array>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { CdCatalogEntry } from './cdGames.js';
|
|
2
|
-
export declare const CARD_W = 1200;
|
|
3
|
-
export declare const CARD_H = 630;
|
|
4
|
-
/** A picture as 8-bit RGB. */
|
|
5
|
-
interface Rgb {
|
|
6
|
-
width: number;
|
|
7
|
-
height: number;
|
|
8
|
-
data: Uint8Array;
|
|
9
|
-
}
|
|
10
|
-
type Read = (name: string) => Uint8Array | undefined;
|
|
11
|
-
/** Words wrapped to `cols` characters a line (a longer word is cut). */
|
|
12
|
-
export declare function wrap(text: string, cols: number): string[];
|
|
13
|
-
/** A PNG chunk: length, type, data and CRC (also for scripts/gameShots.ts). */
|
|
14
|
-
export declare function pngChunk(type: string, data: Uint8Array): Uint8Array;
|
|
15
|
-
/** An RGB PNG. Rows the same as the one above use the Up filter (all zeros); others use Sub. */
|
|
16
|
-
export declare function encodePng(img: Rgb): Uint8Array;
|
|
17
|
-
/** The 1200 x 630 card for a game, as RGB. */
|
|
18
|
-
export declare function gameCard(entry: CdCatalogEntry, pic: Rgb | undefined): Rgb;
|
|
19
|
-
/** The game's preview card as a PNG. `read` gives the game's files by lower-case name. */
|
|
20
|
-
export declare function gameCardPng(entry: CdCatalogEntry, read: Read): Uint8Array;
|
|
21
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
interface LoadedSong {
|
|
2
|
-
music: Uint8Array;
|
|
3
|
-
/** The records load_file read; any past the end of the file are zeros here (DOS left whatever was in memory). */
|
|
4
|
-
instruments: Uint8Array[];
|
|
5
|
-
}
|
|
6
|
-
export declare function loadSong(bytes: Uint8Array | undefined): LoadedSong | undefined;
|
|
7
|
-
export {};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { Opl2 } from './opl.js';
|
|
2
|
-
/**
|
|
3
|
-
* Timer ticks per second: 1193180 / (65535 / 8). PLAYGAME.C reprograms PIT channel 0 with
|
|
4
|
-
* divisor 65535/8 (8 times the normal 18.2 Hz), giving about 145.67 ticks per second.
|
|
5
|
-
*/
|
|
6
|
-
export declare const TICK_RATE: number;
|
|
7
|
-
export declare class CmfPlayer {
|
|
8
|
-
private opl;
|
|
9
|
-
private music;
|
|
10
|
-
private instruments;
|
|
11
|
-
private offset;
|
|
12
|
-
private wait;
|
|
13
|
-
private channel;
|
|
14
|
-
private funct;
|
|
15
|
-
private rhythm;
|
|
16
|
-
private rhythmKeys;
|
|
17
|
-
private notes;
|
|
18
|
-
private programs;
|
|
19
|
-
playing: boolean;
|
|
20
|
-
constructor(opl: Opl2);
|
|
21
|
-
/** sbfd_init: enable waveform select, melody mode (0xBD = deep tremolo and vibrato, rhythm off). */
|
|
22
|
-
private init;
|
|
23
|
-
load(music: Uint8Array, instruments: Uint8Array[]): void;
|
|
24
|
-
/** sbfd_music_off + rewind. */
|
|
25
|
-
stop(): void;
|
|
26
|
-
private allNotesOff;
|
|
27
|
-
/**
|
|
28
|
-
* *(APOS) in SBMUSIC.C. PlayIt read sbmusic+offset with no bounds check, so past the end of
|
|
29
|
-
* the farmalloc'd music block it read whatever heap memory followed. Every CMF ends with the
|
|
30
|
-
* FF 2F 00 end marker, which restarts the song before the read gets there; only a truncated
|
|
31
|
-
* file runs off the end, and for that the port reads 0xFF, which takes the same path as the
|
|
32
|
-
* end marker (sbfd_music_off, offset = 0).
|
|
33
|
-
*/
|
|
34
|
-
private byte;
|
|
35
|
-
/**
|
|
36
|
-
* getpaws() in SBMUSIC.C: reads a MIDI variable length number (7 bits per byte, high bit
|
|
37
|
-
* set on every byte but the last), with no limit on the number of bytes:
|
|
38
|
-
* do { offset++; value = (value << 7) | ((c=*(APOS)) & 0x07F); } while (c & 0x80);
|
|
39
|
-
* value is an unsigned long, so bits shifted past 32 are lost (>>> 0). The one difference:
|
|
40
|
-
* the loop stops at the end of the data, where DOS read on into unknown memory.
|
|
41
|
-
*/
|
|
42
|
-
private getPaws;
|
|
43
|
-
/** One timer tick of PlayIt(). */
|
|
44
|
-
tick(): void;
|
|
45
|
-
/** sbfd_setmode: switch melody/rhythm mode and reload the drum channels' instruments. */
|
|
46
|
-
private setMode;
|
|
47
|
-
private programChange;
|
|
48
|
-
private melodyVoices;
|
|
49
|
-
/**
|
|
50
|
-
* Writes one operator from a 16 byte SBI instrument record, whose bytes alternate
|
|
51
|
-
* modulator/carrier: 0/1 AM-VIB-EG-KSR-MULT, 2/3 KSL-TL, 4/5 AR-DR, 6/7 SL-RR, 8/9 waveform.
|
|
52
|
-
*/
|
|
53
|
-
private loadOperator;
|
|
54
|
-
private loadVoice;
|
|
55
|
-
/**
|
|
56
|
-
* MIDI note -> OPL frequency: picks the lowest block (octave) whose F-number fits in 10 bits,
|
|
57
|
-
* which keeps the most pitch resolution (Hz = fnum * 49716 / 2^(20 - block)).
|
|
58
|
-
*/
|
|
59
|
-
private setPitch;
|
|
60
|
-
/**
|
|
61
|
-
* SBFMDRV's loudness by velocity: it scales the instrument's carrier level (TL is an
|
|
62
|
-
* attenuation, 0 loudest .. 63 silent) and keeps the key-scaling bits:
|
|
63
|
-
* TL = 63 - floor((velocity + 128) * (63 - instrumentTL) / 256). So velocity 127 plays
|
|
64
|
-
* the instrument almost as loud as written and velocity 1 about half as loud in TL steps.
|
|
65
|
-
*/
|
|
66
|
-
private applyVelocity;
|
|
67
|
-
private noteOn;
|
|
68
|
-
private noteOff;
|
|
69
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** The page's AudioContext (made on first use; undefined where there is no Web Audio). */
|
|
2
|
-
export declare function audioContext(): AudioContext | undefined;
|
|
3
|
-
/** True once a gesture has let the page's sound start (the context is running, or was). */
|
|
4
|
-
export declare function soundUnlocked(): boolean;
|
|
5
|
-
/** Calls `f` (inside the gesture's handler, so it may create and start nodes) each time sound unlocks. */
|
|
6
|
-
export declare function onSoundUnlocked(f: () => void): () => void;
|
|
7
|
-
/**
|
|
8
|
-
* Resumes the context; must run inside a user gesture's handler the first time (iOS).
|
|
9
|
-
* Called by the page's own gesture listeners; call it too from a handler that also starts
|
|
10
|
-
* a sound, before any await.
|
|
11
|
-
*/
|
|
12
|
-
export declare function unlock(): void;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export declare class AudioEngine {
|
|
2
|
-
private ctx?;
|
|
3
|
-
private master?;
|
|
4
|
-
private music?;
|
|
5
|
-
private musicReady?;
|
|
6
|
-
private speaker?;
|
|
7
|
-
private voc?;
|
|
8
|
-
private vocCache;
|
|
9
|
-
musicEnabled: boolean;
|
|
10
|
-
soundEnabled: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Starts the sound. The first time, call it from a user gesture's handler (iOS: inside
|
|
13
|
-
* the touchend/click itself, before any await); the page's one AudioContext (context.ts)
|
|
14
|
-
* is resumed there.
|
|
15
|
-
*/
|
|
16
|
-
resume(): Promise<void>;
|
|
17
|
-
/** Where this engine's sound leaves it (for recording just this game's sound). */
|
|
18
|
-
get node(): AudioNode | undefined;
|
|
19
|
-
/**
|
|
20
|
-
* Stops everything and lets go of the page's context (it is shared, so it stays open);
|
|
21
|
-
* a later resume() starts afresh.
|
|
22
|
-
*/
|
|
23
|
-
dispose(): void;
|
|
24
|
-
get context(): AudioContext | undefined;
|
|
25
|
-
private post;
|
|
26
|
-
/** PlaySong: returns false (silently, as the original did) for invalid songs. */
|
|
27
|
-
playSong(bytes: Uint8Array | undefined): Promise<boolean>;
|
|
28
|
-
/** Counts songs asked for, so one still waiting for the worklet doesn't start after a newer one (or a stop). */
|
|
29
|
-
private songs;
|
|
30
|
-
stopSong(): void;
|
|
31
|
-
pauseMusic(paused: boolean): void;
|
|
32
|
-
/** DoSound's PC speaker path: one frequency per 1/145.6 s tick; 0 = silence. */
|
|
33
|
-
playSpeaker(freqs: ArrayLike<number>): void;
|
|
34
|
-
stopSpeaker(): void;
|
|
35
|
-
/** PlaySbVocFile: a new digital sound cuts off the previous one. */
|
|
36
|
-
playVoc(bytes: Uint8Array | undefined): boolean;
|
|
37
|
-
stopVoc(): void;
|
|
38
|
-
stopAll(): void;
|
|
39
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export type MusicMessage = {
|
|
2
|
-
type: 'load';
|
|
3
|
-
music: Uint8Array;
|
|
4
|
-
instruments: Uint8Array[];
|
|
5
|
-
} | {
|
|
6
|
-
type: 'stop';
|
|
7
|
-
} | {
|
|
8
|
-
type: 'pause';
|
|
9
|
-
paused: boolean;
|
|
10
|
-
}
|
|
11
|
-
/** The engine is done with this node (the page's context lives on): stop processing. */
|
|
12
|
-
| {
|
|
13
|
-
type: 'end';
|
|
14
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export declare class Opl2 {
|
|
2
|
-
readonly sampleRate: number;
|
|
3
|
-
private channels;
|
|
4
|
-
private regs;
|
|
5
|
-
private waveSelect;
|
|
6
|
-
private noteSel;
|
|
7
|
-
private amDepth;
|
|
8
|
-
private vibDepth;
|
|
9
|
-
private rhythm;
|
|
10
|
-
private time;
|
|
11
|
-
private noise;
|
|
12
|
-
constructor(sampleRate: number);
|
|
13
|
-
reset(): void;
|
|
14
|
-
read(reg: number): number;
|
|
15
|
-
write(reg: number, value: number): void;
|
|
16
|
-
private rhythmKeys;
|
|
17
|
-
/**
|
|
18
|
-
* Register 0xBD: bit 7 tremolo depth, bit 6 vibrato depth, bit 5 rhythm mode, bits 0-4 the
|
|
19
|
-
* drum keys. In rhythm mode channels 6-8 become the bass drum (both operators of channel 6),
|
|
20
|
-
* hi-hat and snare (channel 7) and tom-tom and cymbal (channel 8).
|
|
21
|
-
*/
|
|
22
|
-
private writeRhythm;
|
|
23
|
-
/** Renders mono samples into out (added to existing content). */
|
|
24
|
-
render(out: Float32Array, gain?: number): void;
|
|
25
|
-
/** Linear amplitude from the summed attenuation: envelope + TL (0.75 dB steps) + KSL + tremolo. */
|
|
26
|
-
private opLevel;
|
|
27
|
-
private advance;
|
|
28
|
-
private channelSample;
|
|
29
|
-
/**
|
|
30
|
-
* Approximates the five drums. The bass drum is a normal FM channel (at double level); the
|
|
31
|
-
* hi-hat, snare and cymbal mix operator tone with LFSR noise, and the tom-tom is a plain tone.
|
|
32
|
-
* The mixing weights are this port's approximation, not the chip's exact phase logic.
|
|
33
|
-
*/
|
|
34
|
-
private rhythmSample;
|
|
35
|
-
}
|
|
36
|
-
/** Register offsets of the modulator for each FM channel (carrier = +3). */
|
|
37
|
-
export declare const MODULATOR_OFFSET: number[];
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const getVolume: () => number;
|
|
2
|
-
/** 0 (silent) to 1 (full). */
|
|
3
|
-
export declare function setVolume(v: number): void;
|
|
4
|
-
/** Where a context's sound should go: its destination, through the volume. */
|
|
5
|
-
export declare function output(ctx: BaseAudioContext): AudioNode;
|
|
6
|
-
type Tap = (ctx: BaseAudioContext, node: AudioNode) => void;
|
|
7
|
-
/**
|
|
8
|
-
* Calls `f` for every context's line out, now and as new ones appear (for recording the
|
|
9
|
-
* sound). Like a capture card on the sound card's line out, a recording has the PC's sound
|
|
10
|
-
* whatever the speakers' volume knob is set to, even turned all the way down.
|
|
11
|
-
*/
|
|
12
|
-
export declare function tapOutputs(f: Tap): () => void;
|
|
13
|
-
export {};
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import type { CatalogEntry } from '../../project/files.js';
|
|
2
|
-
import { type Game } from '../../formats/game.js';
|
|
3
|
-
/** Optional extras an about.json "box" may carry, beside the art and copy. */
|
|
4
|
-
export interface BoxExtras {
|
|
5
|
-
/** Hours of play to finish, set from the walkthrough by games/kit/playtime.ts (playtime.ts); estimated from the number of levels when missing. */
|
|
6
|
-
hours?: number;
|
|
7
|
-
/**
|
|
8
|
-
* What the box says in place of "N levels to explore" (the count of level scenes), for a game
|
|
9
|
-
* whose scenes aren't what a player would call levels: "One night in five parts", "23 haywire
|
|
10
|
-
* circuit boards". An empty string leaves the line off.
|
|
11
|
-
*/
|
|
12
|
-
levels?: string;
|
|
13
|
-
/** More selling points, printed with the ones worked out from the game's files. */
|
|
14
|
-
claims?: string[];
|
|
15
|
-
/** Quotes from (made-up) 1994-95 magazines. */
|
|
16
|
-
reviews?: {
|
|
17
|
-
quote: string;
|
|
18
|
-
source: string;
|
|
19
|
-
}[];
|
|
20
|
-
/** A laurel on the front, e.g. { title: 'Shareware Game of the Month', from: 'Diskette Digest' }. */
|
|
21
|
-
award?: {
|
|
22
|
-
title: string;
|
|
23
|
-
from: string;
|
|
24
|
-
};
|
|
25
|
-
/** The store's price sticker ($4.99 at Bits & Bytes by default): what the store asked for the shareware disk, not the author's registration fee (CatalogEntry.price). */
|
|
26
|
-
sticker?: {
|
|
27
|
-
store?: string;
|
|
28
|
-
price?: string;
|
|
29
|
-
};
|
|
30
|
-
/** A poster or fold-out map for the wall while the game is played. */
|
|
31
|
-
poster?: {
|
|
32
|
-
gif?: string;
|
|
33
|
-
map?: [string, number, number, number, number];
|
|
34
|
-
title?: string;
|
|
35
|
-
caption?: string;
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
export { disksLine } from '../../project/diskFacts.js';
|
|
39
|
-
/** How many 1.44 MB disks an original game ships on (its files plus the DOS player): project/diskFacts.ts gameDisks, from a size alone. */
|
|
40
|
-
export declare function boxDisks(bytes: number | undefined): number;
|
|
41
|
-
/** Hours to finish: the box's own figure, or about 45 minutes a level, rounded down to a figure a box would print. */
|
|
42
|
-
export declare function playHours(levels: number, stated?: number): number;
|
|
43
|
-
export declare function hoursLine(hours: number): string;
|
|
44
|
-
/** Selling points that are true of this game, from its files and sound card. */
|
|
45
|
-
export declare function boxClaims(entry: Pick<CatalogEntry, 'files' | 'original'>, levels: number): string[];
|
|
46
|
-
/** The rating seal: "Ages 8 and up" -> 8+; anything without an age is for everyone. */
|
|
47
|
-
export declare function ratingMark(rating: string | undefined): {
|
|
48
|
-
mark: string;
|
|
49
|
-
label: string;
|
|
50
|
-
};
|
|
51
|
-
/** A small, stable random number generator, so a box is scuffed the same way every time. */
|
|
52
|
-
export declare function seeded(seed: string): () => number;
|
|
53
|
-
export declare function boxReviews(id: string, extras: BoxExtras): {
|
|
54
|
-
quote: string;
|
|
55
|
-
source: string;
|
|
56
|
-
}[];
|
|
57
|
-
export declare function boxAward(id: string, extras: BoxExtras): {
|
|
58
|
-
title: string;
|
|
59
|
-
from: string;
|
|
60
|
-
};
|
|
61
|
-
interface BackPlan {
|
|
62
|
-
bodyPx: number;
|
|
63
|
-
features: number;
|
|
64
|
-
reviews: number;
|
|
65
|
-
/** Screenshot row scale (1 = full size); 0 drops the screenshots. */
|
|
66
|
-
shots: number;
|
|
67
|
-
height: number;
|
|
68
|
-
}
|
|
69
|
-
/** How good a back cover plan looks: readable type, the reviews, screenshots and features, in that order. */
|
|
70
|
-
export declare function backScore(p: Omit<BackPlan, 'height'>): number;
|
|
71
|
-
/**
|
|
72
|
-
* Fits the back cover: the story, reviews, feature bullets and a row of screenshots must
|
|
73
|
-
* end above the claims and requirements. Of every mix of type size, features, reviews and
|
|
74
|
-
* screenshot size that fits, picks the best looking (backScore); `heightOf` measures the
|
|
75
|
-
* content laid out with a plan.
|
|
76
|
-
*/
|
|
77
|
-
export declare function planBack(available: number, featureCount: number, reviewCount: number, heightOf: (p: Omit<BackPlan, 'height'>) => number): BackPlan;
|
|
78
|
-
/** A screenshot's caption: the name of the level its map belongs to ("1a The Data Bus" -> "Stage 1: The Data Bus"). */
|
|
79
|
-
export declare function shotCaption(game: Game | undefined, map: string): string;
|
|
80
|
-
/** What a box reads from the game's .gam: its number of levels and its screenshots' captions (CatalogEntry.boxGame, worked out when the site is built). */
|
|
81
|
-
export interface BoxGame {
|
|
82
|
-
levels: number;
|
|
83
|
-
captions: string[];
|
|
84
|
-
}
|
|
85
|
-
export declare function boxGame(game: Game | undefined, shots: [string, number, number][] | undefined): BoxGame;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
interface ExtKind {
|
|
2
|
-
/** Game-Maker's own extension, lower case, no dot. */
|
|
3
|
-
ext: string;
|
|
4
|
-
label: string;
|
|
5
|
-
note: string;
|
|
6
|
-
/**
|
|
7
|
-
* File offsets of each ".ext" in XFERPLAY 3.00, the one it opens files by first; none for the
|
|
8
|
-
* kinds the .gam names in full.
|
|
9
|
-
*/
|
|
10
|
-
offsets: number[];
|
|
11
|
-
}
|
|
12
|
-
export declare const EXT_KINDS: ExtKind[];
|
|
13
|
-
/** The patch id for a kind. */
|
|
14
|
-
export declare const extId: (ext: string) => string;
|
|
15
|
-
/** The kind an id names, if it is one. */
|
|
16
|
-
export declare function extKind(id: string): ExtKind | undefined;
|
|
17
|
-
/** Why `value` can't be kind `ext`'s new extension, or undefined when it can. */
|
|
18
|
-
export declare function extValueProblem(ext: string, value: unknown): string | undefined;
|
|
19
|
-
/** The kinds a set of patches renames: Game-Maker's extension -> the new one (both lower case, no dot). */
|
|
20
|
-
export declare function extensionMap(patches: Record<string, unknown> | undefined): Map<string, string>;
|
|
21
|
-
/** Kinds that share a new extension (each problem names both), for the panel and the export. */
|
|
22
|
-
export declare function extensionClashes(patches: Record<string, unknown> | undefined): Map<string, string>;
|
|
23
|
-
/** The patches without any renamed extensions (what the web player and web-page exports carry). */
|
|
24
|
-
export declare function withoutExtensions<T>(patches: Record<string, T>): Record<string, T>;
|
|
25
|
-
/** Writes each renamed kind's extension into every one of its copies in the player. */
|
|
26
|
-
export declare function writeExtensions(exe: Uint8Array, patches: Record<string, unknown>): void;
|
|
27
|
-
/**
|
|
28
|
-
* A player's renamed extensions as patches, for the kinds whose copies all agree and keep the
|
|
29
|
-
* rules; `read` lists the kinds read (so their bytes are explained).
|
|
30
|
-
*/
|
|
31
|
-
export declare function readExtensions(exe: Uint8Array): {
|
|
32
|
-
patches: Record<string, string>;
|
|
33
|
-
read: string[];
|
|
34
|
-
};
|
|
35
|
-
/** Writes Game-Maker's own extension back into every copy of the kinds listed. */
|
|
36
|
-
export declare function writeStockExtensions(exe: Uint8Array, kinds: string[]): void;
|
|
37
|
-
/**
|
|
38
|
-
* The CD's extension -> the one this player opens files by instead ('' when blanked), lower
|
|
39
|
-
* case with the dot, for the player's own kinds that differ. (Virtual Mario blanked .gam.)
|
|
40
|
-
*/
|
|
41
|
-
export declare function renamedExtensions(exe: Uint8Array): Record<string, string>;
|
|
42
|
-
/** Acord Games' extensions, as NEVER.EXE and its games' files use them (.lst, .voc and .dat kept). */
|
|
43
|
-
export declare const ACORD_EXTENSIONS: Record<string, string>;
|
|
44
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { type FramePatch, type PatchEntry } from './patchTable.js';
|
|
2
|
-
export type PatchValue = string | number | number[];
|
|
3
|
-
/** A project's DOS player choices: patch id -> value (patchTable.ts says what each takes). */
|
|
4
|
-
export type PlayerPatches = Record<string, PatchValue>;
|
|
5
|
-
export declare function patchEntry(id: string): PatchEntry | undefined;
|
|
6
|
-
/** A printf format's % codes, in order. */
|
|
7
|
-
export declare function formatCodes(text: string): string[];
|
|
8
|
-
/** Why `value` can't be written for `entry`, or undefined when it can. */
|
|
9
|
-
export declare function patchProblem(entry: PatchEntry, value: unknown): string | undefined;
|
|
10
|
-
/** The largest value a frame's left, top, right or bottom (i: 0-3) takes: a push imm8 is sign-extended, so a 1-byte one stops at 127. */
|
|
11
|
-
export declare function frameLimit(entry: FramePatch, i: number): number;
|
|
12
|
-
/** True when `value` is what the CD's player already has (so no patch is needed). */
|
|
13
|
-
export declare function isStock(entry: PatchEntry, value: PatchValue): boolean;
|
|
14
|
-
/** Writes a value already checked with patchProblem. */
|
|
15
|
-
export declare function writePatch(exe: Uint8Array, entry: PatchEntry, value: PatchValue): void;
|
|
16
|
-
/** The entry's value in `exe` (text up to its first 0, trailing spaces dropped), or undefined when it can't be read as one. */
|
|
17
|
-
export declare function readPatch(exe: Uint8Array, entry: PatchEntry): PatchValue | undefined;
|
|
18
|
-
/** Writes the CD's own value back (for every byte the entry covers, the 0s included). */
|
|
19
|
-
export declare function writeStock(exe: Uint8Array, entry: PatchEntry): void;
|
|
20
|
-
/**
|
|
21
|
-
* Only the patches that are known, valid and not the stock value; the rest are left out. Renamed
|
|
22
|
-
* file extensions (fileExtensions.ts) are kept in lower case.
|
|
23
|
-
*/
|
|
24
|
-
export declare function cleanPatches(patches: Record<string, unknown> | undefined): PlayerPatches;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/** The editor panel's groups. */
|
|
2
|
-
export type PatchGroup = 'words' | 'colors' | 'frames' | 'positions' | 'times' | 'keys';
|
|
3
|
-
/** The screen a patch shows on, which the panel previews while it is edited. */
|
|
4
|
-
export type PatchScreen = 'menu' | 'hiscores' | 'newHiscore' | 'status' | 'load' | 'save' | 'drop' | 'help' | 'text' | 'missing' | 'about' | 'play' | 'all';
|
|
5
|
-
/**
|
|
6
|
-
* The color targets RGBdata::Match looks for, by name, with the DGROUP offset of each object
|
|
7
|
-
* (what a color selector's push imm16 names).
|
|
8
|
-
*/
|
|
9
|
-
export declare const COLOR_TARGETS: {
|
|
10
|
-
readonly yellow: 623;
|
|
11
|
-
readonly red: 626;
|
|
12
|
-
readonly blue: 629;
|
|
13
|
-
readonly purple: 632;
|
|
14
|
-
readonly hsRed: 5626;
|
|
15
|
-
readonly hsBlue: 5629;
|
|
16
|
-
readonly hsGreen: 5632;
|
|
17
|
-
};
|
|
18
|
-
export type ColorName = keyof typeof COLOR_TARGETS;
|
|
19
|
-
/** One immediate in the code: its file offset and size (1: push imm8, sign-extended; 2: imm16). */
|
|
20
|
-
export interface ImmField {
|
|
21
|
-
offset: number;
|
|
22
|
-
size: number;
|
|
23
|
-
}
|
|
24
|
-
interface Base {
|
|
25
|
-
id: string;
|
|
26
|
-
group: PatchGroup;
|
|
27
|
-
screen: PatchScreen;
|
|
28
|
-
label: string;
|
|
29
|
-
note?: string;
|
|
30
|
-
safety: 'safe' | 'caution';
|
|
31
|
-
/** The web player shows it too (false: DOS only). */
|
|
32
|
-
web: boolean;
|
|
33
|
-
}
|
|
34
|
-
/** A NUL-ended string: never longer than `length`, characters 0x20-0x7E; a `format` keeps its % codes. */
|
|
35
|
-
export interface TextPatch extends Base {
|
|
36
|
-
kind: 'text' | 'format';
|
|
37
|
-
offset: number;
|
|
38
|
-
length: number;
|
|
39
|
-
stock: string;
|
|
40
|
-
}
|
|
41
|
-
/** A number in one immediate, or the same number in each of several (`fields`, patched together). */
|
|
42
|
-
export interface NumberPatch extends Base {
|
|
43
|
-
kind: 'number';
|
|
44
|
-
fields: ImmField[];
|
|
45
|
-
/** A 1-byte field is a sign-extended push imm8. */
|
|
46
|
-
signed: boolean;
|
|
47
|
-
min: number;
|
|
48
|
-
max: number;
|
|
49
|
-
stock: number;
|
|
50
|
-
}
|
|
51
|
-
/** A color: red, green and blue (0-63), one byte each. */
|
|
52
|
-
interface RgbPatch extends Base {
|
|
53
|
-
kind: 'rgb';
|
|
54
|
-
offsets: [number, number, number];
|
|
55
|
-
stock: [number, number, number];
|
|
56
|
-
}
|
|
57
|
-
/** Which color target a screen matches (the push imm16 before RGBdata::Match). */
|
|
58
|
-
interface SelectPatch extends Base {
|
|
59
|
-
kind: 'select';
|
|
60
|
-
offset: number;
|
|
61
|
-
stock: ColorName;
|
|
62
|
-
}
|
|
63
|
-
/** A Box(x1, y1, x2, y2) frame. */
|
|
64
|
-
export interface FramePatch extends Base {
|
|
65
|
-
kind: 'frame';
|
|
66
|
-
fields: [ImmField, ImmField, ImmField, ImmField];
|
|
67
|
-
stock: [number, number, number, number];
|
|
68
|
-
}
|
|
69
|
-
/** A function key's entry in DoFunKy's jump table: on (as shipped) or 'off'. */
|
|
70
|
-
interface FkeyPatch extends Base {
|
|
71
|
-
kind: 'fkey';
|
|
72
|
-
key: number;
|
|
73
|
-
offset: number;
|
|
74
|
-
stock: number;
|
|
75
|
-
}
|
|
76
|
-
export type PatchEntry = TextPatch | NumberPatch | RgbPatch | SelectPatch | FramePatch | FkeyPatch;
|
|
77
|
-
/** DoFunKy's "does nothing" target: an F-key whose entry jumps here is off. */
|
|
78
|
-
export declare const FKEY_OFF = 10489;
|
|
79
|
-
export declare const PATCHES: PatchEntry[];
|
|
80
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const EDITION = "Sandbox Edition";
|
|
2
|
-
export declare const PRODUCT = "Game-Maker: Sandbox Edition";
|
|
3
|
-
export declare const SHORT = "Game-Maker SE";
|
|
4
|
-
/** One line saying what it is, for footers and notes. */
|
|
5
|
-
export declare const FORK_NOTE = "A modified fork of RSD Game-Maker 3.0 \u2014 not an original RSD release";
|
|
6
|
-
export declare const NOTICE_URL = "https://github.com/lewismoten/GameMaker-SandboxEdition/blob/master/NOTICE.md";
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { type Egg, type EggDetect } from './eggs.js';
|
|
2
|
-
export declare const OVERRIDES_KEY = "gm-eggs";
|
|
3
|
-
/** Fired on window when EGG.EXE changes an override. */
|
|
4
|
-
export declare const EGGS_CHANGED = "gm-eggs-changed";
|
|
5
|
-
export type Override = 'added' | 'broken';
|
|
6
|
-
export type EggStatus = 'saved' | 'added' | 'broken' | 'none';
|
|
7
|
-
/** Does one game<n>.sav (this port's JSON save) hold the egg? */
|
|
8
|
-
export declare function saveHolds(bytes: Uint8Array, detect: EggDetect): boolean;
|
|
9
|
-
/** Does any saved slot (game0.sav .. game9.sav) of a game's save data hold the egg? */
|
|
10
|
-
export declare function savesHold(files: Record<string, Uint8Array>, detect: EggDetect | undefined): boolean;
|
|
11
|
-
export declare function readOverrides(): Record<string, Override>;
|
|
12
|
-
export declare function setOverride(game: string, value: Override | undefined): void;
|
|
13
|
-
/** EGG.EXE's X Reset all: every egg (the bonus ones too) back to what the saves say. */
|
|
14
|
-
export declare function resetAllOverrides(): void;
|
|
15
|
-
/** What EGG.EXE shows: where the egg stands, and whether it counts as found. */
|
|
16
|
-
export declare function statusOf(inSave: boolean, override: Override | undefined): {
|
|
17
|
-
status: EggStatus;
|
|
18
|
-
found: boolean;
|
|
19
|
-
};
|
|
20
|
-
export interface EggState {
|
|
21
|
-
egg: Egg;
|
|
22
|
-
inSave: boolean;
|
|
23
|
-
status: EggStatus;
|
|
24
|
-
found: boolean;
|
|
25
|
-
}
|
|
26
|
-
export declare function eggStates(): Promise<EggState[]>;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export type EggDetect = {
|
|
2
|
-
block: number;
|
|
3
|
-
} | {
|
|
4
|
-
counter: number;
|
|
5
|
-
atLeast?: number;
|
|
6
|
-
};
|
|
7
|
-
/** How the viewer stitches an egg: felt colors, a band pattern and an appliqué. */
|
|
8
|
-
export interface EggLook {
|
|
9
|
-
/** Felt colors: the shell, the bands, the appliqué, the thread. */
|
|
10
|
-
felt: string;
|
|
11
|
-
band: string;
|
|
12
|
-
patch: string;
|
|
13
|
-
thread: string;
|
|
14
|
-
pattern: 'zigzag' | 'dots' | 'stars' | 'snowflakes' | 'scallops' | 'checks' | 'waves' | 'circuit' | 'ruled' | 'pawprints' | 'grid' | 'diamonds' | 'confetti';
|
|
15
|
-
motif: 'paw' | 'castle' | 'mitten' | 'bolt' | 'planet' | 'mask' | 'rocket' | 'bug' | 'bookworm' | 'bone' | 'cube' | 'sword' | 'cake';
|
|
16
|
-
}
|
|
17
|
-
export interface Egg {
|
|
18
|
-
/** The Sandbox game it is hidden in (games/<id>). */
|
|
19
|
-
game: string;
|
|
20
|
-
gameTitle: string;
|
|
21
|
-
name: string;
|
|
22
|
-
/** The felt egg itself, as the viewer describes it. */
|
|
23
|
-
description: string;
|
|
24
|
-
credits: string[];
|
|
25
|
-
/** Its piece of the mystery. */
|
|
26
|
-
lore: string;
|
|
27
|
-
look: EggLook;
|
|
28
|
-
/** Set once the egg is in the game; see the top of this file. */
|
|
29
|
-
detect?: EggDetect;
|
|
30
|
-
}
|
|
31
|
-
export declare const EGGS: readonly Egg[];
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { type Frame } from '../formats/character.js';
|
|
2
|
-
import { type World } from './world.js';
|
|
3
|
-
/** Asks the player which inventory slot to drop; resolves -1 for Esc. */
|
|
4
|
-
type DropPicker = () => Promise<number>;
|
|
5
|
-
/**
|
|
6
|
-
* CHRFRAME with the original's out-of-range behavior: frame -1 read the 17 bytes
|
|
7
|
-
* before the sequence's first frame (the tail of the previous sequence record).
|
|
8
|
-
*/
|
|
9
|
-
export declare function currentFrame(w: World): Frame;
|
|
10
|
-
/**
|
|
11
|
-
* MoveCharGrav: every GRAVSPEED ticks, accelerate by one pixel a tick in each
|
|
12
|
-
* direction the block's grav bits name (1 up, 2 right, 4 down, 8 left), capped at
|
|
13
|
-
* MAXGRAV * 4. Returns true while there is any gravity momentum.
|
|
14
|
-
*/
|
|
15
|
-
export declare function moveCharGrav(w: World, reset?: boolean): boolean;
|
|
16
|
-
/** HandleJStick: joystick directions/buttons can trigger sequences too. */
|
|
17
|
-
export declare function handleJoystick(w: World, reset?: boolean): boolean;
|
|
18
|
-
/** movechars: one game tick of character animation and movement. Returns true when dead. */
|
|
19
|
-
export declare function moveChars(w: World, pickDrop: DropPicker): Promise<boolean>;
|
|
20
|
-
/**
|
|
21
|
-
* Screen coordinates of the character's bottom block (nextx/nexty), the tail of
|
|
22
|
-
* movechars (PLAYGAME.C 2593-2601; the func-key return at 1643 is the same with
|
|
23
|
-
* scroll.nx 0). The strict < matches the C: column mx itself counts as MLEN blocks
|
|
24
|
-
* away, so nextx is 2000+ (row my likewise). chkScrnBounds keeps a walk from
|
|
25
|
-
* entering it, but a solid monster's push (C 2508) can put the character there;
|
|
26
|
-
* the C then draws it off screen and ChangeScroll scrolls hard toward it. The port
|
|
27
|
-
* keeps that. test/charScreenColumn.test.ts covers it, across the map wrap too.
|
|
28
|
-
*/
|
|
29
|
-
export declare function updateCharScreenPos(w: World): void;
|
|
30
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { Machine } from './machine.js';
|
|
2
|
-
import type { Screen } from '../gfx/screen.js';
|
|
3
|
-
import { type PlayerLook } from './playerLook.js';
|
|
4
|
-
import { type World } from './world.js';
|
|
5
|
-
/** What the status and drop screens read of a level: its palette, blocks, inventory and clock. */
|
|
6
|
-
export type InventoryWorld = Pick<World, 'palette' | 'bg' | 'clock'> & {
|
|
7
|
-
ci: Pick<World['ci'], 'inv' | 'score' | 'meter' | 'hitpts' | 'lives'>;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* F1: HelpFiles. XFERPLAY.EXE (PLAYGAME.C built with TRANSFER, the player of every transferred
|
|
11
|
-
* game) shows the game's instructions, or one red line; it never reads GMHELP.TXT. PLAYGAME.EXE,
|
|
12
|
-
* run from Game-Maker, first shows Game-Maker's own GMHELP.TXT (`gmHelp`) in a blue frame.
|
|
13
|
-
*/
|
|
14
|
-
export declare function helpScreen(m: Machine, w: World, instructions: string | undefined, gmHelp?: Uint8Array, look?: PlayerLook): Promise<void>;
|
|
15
|
-
/** Display_Invent's page (F2). */
|
|
16
|
-
export declare function drawStatus(screen: Screen, w: InventoryWorld, look: PlayerLook): void;
|
|
17
|
-
/** F2: Display_Invent */
|
|
18
|
-
export declare function statusScreen(m: Machine, w: World, look?: PlayerLook): Promise<void>;
|
|
19
|
-
/** GMabout's first page (this web edition's words); returns the text color. */
|
|
20
|
-
export declare function drawAbout(screen: Screen, palette: Uint8Array, look: PlayerLook): number;
|
|
21
|
-
/** F10: GMabout */
|
|
22
|
-
export declare function aboutScreen(m: Machine, w: World, look?: PlayerLook): Promise<void>;
|
|
23
|
-
/** DropBloc's picker screen, with the selection box on slot (j, k); returns the box's color. */
|
|
24
|
-
export declare function drawDropPicker(screen: Screen, w: InventoryWorld, look: PlayerLook, j?: number, k?: number): number;
|
|
25
|
-
/** DropBloc's picker: arrows choose a slot, Enter drops, Esc cancels (-1). */
|
|
26
|
-
export declare function pickDropSlot(m: Machine, w: World, look?: PlayerLook): Promise<number>;
|
|
27
|
-
/** The load or save heading and slot marks, drawn when the game has no load or save picture. */
|
|
28
|
-
export declare function drawLoadHeading(screen: Screen, look: PlayerLook, cols: Uint8Array): void;
|
|
29
|
-
export declare function drawSaveHeading(screen: Screen, look: PlayerLook, cols: Uint8Array): void;
|
|
30
|
-
/** The ten slot names, in the load or save screen's color. */
|
|
31
|
-
export declare function drawSaveSlots(screen: Screen, look: PlayerLook, pal: Uint8Array, names: string[], saving: boolean): number;
|
|
32
|
-
/** SelectGameToLoad / SelectGameToSave: returns the slot (0..9) or -1. */
|
|
33
|
-
export declare function pickSaveSlot(m: Machine, pal: Uint8Array, saving: boolean, look?: PlayerLook): Promise<number>;
|