@lewismoten/gamemaker-sandbox-engine 0.0.0-stage → 3.1.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 (57) hide show
  1. package/LICENSE +24 -0
  2. package/NOTICE.md +753 -0
  3. package/README.md +65 -2
  4. package/dist/assets/music.worklet-NqOeNo6T.js +464 -0
  5. package/dist/engine.js +5436 -0
  6. package/dist/types/audio/cmfLoad.d.ts +7 -0
  7. package/dist/types/audio/cmfPlayer.d.ts +69 -0
  8. package/dist/types/audio/context.d.ts +12 -0
  9. package/dist/types/audio/engine.d.ts +39 -0
  10. package/dist/types/audio/music.worklet.d.ts +14 -0
  11. package/dist/types/audio/opl.d.ts +37 -0
  12. package/dist/types/audio/output.d.ts +13 -0
  13. package/dist/types/dosPlayer/fileExtensions.d.ts +44 -0
  14. package/dist/types/dosPlayer/patchRules.d.ts +24 -0
  15. package/dist/types/dosPlayer/patchTable.d.ts +80 -0
  16. package/dist/types/engine/character.d.ts +30 -0
  17. package/dist/types/engine/funcKeys.d.ts +33 -0
  18. package/dist/types/engine/game.d.ts +52 -0
  19. package/dist/types/engine/keys.d.ts +17 -0
  20. package/dist/types/engine/machine.d.ts +99 -0
  21. package/dist/types/engine/menus.d.ts +46 -0
  22. package/dist/types/engine/monsters.d.ts +19 -0
  23. package/dist/types/engine/package.d.ts +4 -0
  24. package/dist/types/engine/playGain.d.ts +11 -0
  25. package/dist/types/engine/playerLook.d.ts +26 -0
  26. package/dist/types/engine/recorder.d.ts +60 -0
  27. package/dist/types/engine/render.d.ts +8 -0
  28. package/dist/types/engine/scene.d.ts +156 -0
  29. package/dist/types/engine/scroll.d.ts +16 -0
  30. package/dist/types/engine/showGraphic.d.ts +39 -0
  31. package/dist/types/engine/slowPc.d.ts +62 -0
  32. package/dist/types/engine/touch.d.ts +33 -0
  33. package/dist/types/engine/world.d.ts +215 -0
  34. package/dist/types/formats/binary.d.ts +44 -0
  35. package/dist/types/formats/blocks.d.ts +52 -0
  36. package/dist/types/formats/character.d.ts +65 -0
  37. package/dist/types/formats/cmf.d.ts +33 -0
  38. package/dist/types/formats/fli.d.ts +45 -0
  39. package/dist/types/formats/game.d.ts +72 -0
  40. package/dist/types/formats/gif.d.ts +15 -0
  41. package/dist/types/formats/graphicScripts.d.ts +18 -0
  42. package/dist/types/formats/highscore.d.ts +10 -0
  43. package/dist/types/formats/map.d.ts +24 -0
  44. package/dist/types/formats/monster.d.ts +48 -0
  45. package/dist/types/formats/palette.d.ts +15 -0
  46. package/dist/types/formats/recording.d.ts +7 -0
  47. package/dist/types/formats/sound.d.ts +13 -0
  48. package/dist/types/formats/voc.d.ts +13 -0
  49. package/dist/types/gfx/cp437Glyphs.d.ts +2 -0
  50. package/dist/types/gfx/font8x8.d.ts +2 -0
  51. package/dist/types/gfx/screen.d.ts +46 -0
  52. package/dist/types/input/chords.d.ts +22 -0
  53. package/dist/types/input/deskMouse.d.ts +14 -0
  54. package/dist/types/input/keyboard.d.ts +39 -0
  55. package/dist/types/input/scancodes.d.ts +3 -0
  56. package/dist/types/project/gameFiles.d.ts +49 -0
  57. package/package.json +26 -4
@@ -0,0 +1,49 @@
1
+ /** Files of a game still on their way from the site (project/streamGame.ts). */
2
+ export interface FileStream {
3
+ /** Resolves once these files are in, or known not to come; undefined when none is still coming. */
4
+ need(names: string[]): Promise<void> | undefined;
5
+ /** Fetches these next, without waiting for them. */
6
+ want(names: string[]): void;
7
+ }
8
+ export declare class GameFiles {
9
+ private files;
10
+ /** Notified after any change. */
11
+ onChange?: (name: string) => void;
12
+ /** Set while files are still arriving: the game waits for one it needs (engine/machine.ts, need). */
13
+ stream?: FileStream;
14
+ /** Asked before set or delete changes a file; throws to refuse (a game opened to look inside, editor/core/readOnly.ts). */
15
+ guard?: (name: string) => void;
16
+ constructor(entries?: Iterable<[string, Uint8Array]>);
17
+ get(name: string | undefined): Uint8Array | undefined;
18
+ has(name: string | undefined): boolean;
19
+ /** The stored name a reference opens (see cdName), or undefined when there is none. */
20
+ resolve(name: string | undefined): string | undefined;
21
+ set(name: string, bytes: Uint8Array): void;
22
+ /**
23
+ * A copy of these files to change freely. While files are still arriving here, the copy
24
+ * gets them too as it needs them (its own changes stay).
25
+ */
26
+ copy(): GameFiles;
27
+ /** Adds a file that arrived (not one the game wrote): onChange is not told, and a file already here stays. */
28
+ put(name: string, bytes: Uint8Array): void;
29
+ delete(name: string): void;
30
+ names(): string[];
31
+ entries(): [string, Uint8Array][];
32
+ byExtension(ext: string): string[];
33
+ get size(): number;
34
+ /** The .gam file to play: the one named like the folder, else the first. */
35
+ mainGame(preferred?: string): string | undefined;
36
+ }
37
+ /**
38
+ * File names as DOS saw them: lower case, without folders, and cut to 8.3. DOS dropped the
39
+ * extra letters silently, so games could name "nejillian.gif" and open NEJILLIA.GIF.
40
+ */
41
+ export declare function normalize(name: string): string;
42
+ /**
43
+ * The name a file got on the Game-Maker CD. Its ISO 9660 copy allowed only A-Z, 0-9 and _,
44
+ * so A-J.BKD, PARSEC-W.GIF and CAN'T.GIF are a_j.bkd, parsec_w.gif and can_t.gif there,
45
+ * while the games still name them the DOS way. A name not found as is is looked up this way.
46
+ */
47
+ export declare function cdName(name: string): string;
48
+ /** Files only meaningful to DOS. */
49
+ export declare const IGNORED_FILE: RegExp;
package/package.json CHANGED
@@ -1,6 +1,28 @@
1
1
  {
2
2
  "name": "@lewismoten/gamemaker-sandbox-engine",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "3.1.0",
4
+ "description": "Browser engine for RSD Game-Maker games in their original DOS file formats",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/lewismoten/GameMaker-SandboxEdition.git",
8
+ "directory": "web/packages/engine"
9
+ },
10
+ "type": "module",
11
+ "license": "MIT",
12
+ "files": ["dist", "README.md", "LICENSE", "NOTICE.md"],
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/types/engine/package.d.ts",
16
+ "import": "./dist/engine.js"
17
+ }
18
+ },
19
+ "types": "./dist/types/engine/package.d.ts",
20
+ "scripts": {
21
+ "build": "vite build --config vite.config.ts && tsc -p tsconfig.build.json && cp ../../../LICENSE LICENSE && cp ../../../NOTICE.md NOTICE.md",
22
+ "prepack": "npm run build"
23
+ },
24
+ "devDependencies": {
25
+ "typescript": "~5.9.0",
26
+ "vite": "^7.1.0"
27
+ }
28
+ }