@wwawing/engine 3.13.0-unstable.based-on.3.12.11.p.11 → 4.0.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/LICENSE +2 -2
- package/debug/index.pug +2 -2
- package/lib/wwa.js +3 -3
- package/lib/wwa_data/options.d.ts +2 -0
- package/lib/wwa_data/typedef.d.ts +20 -0
- package/lib/wwa_data.d.ts +3 -3
- package/lib/wwa_expression/typedef.d.ts +3 -3
- package/lib/wwa_expression2/eval.d.ts +29 -15
- package/lib/wwa_expression2/typedef.d.ts +9 -0
- package/lib/wwa_expression2/wwa.d.ts +10 -4
- package/lib/wwa_macro.d.ts +76 -0
- package/lib/wwa_main.d.ts +28 -18
- package/lib/wwa_message/_internal/index.d.ts +32 -0
- package/lib/wwa_message/data/index.d.ts +18 -0
- package/lib/wwa_message/data/node.d.ts +46 -0
- package/lib/wwa_message/data/page.d.ts +13 -0
- package/lib/wwa_message/index.d.ts +10 -0
- package/lib/wwa_message/typedef.d.ts +5 -0
- package/lib/wwa_parts_player.d.ts +2 -2
- package/lib/wwa_window.d.ts +97 -0
- package/package.json +22 -21
- package/lib/wwa_message.d.ts +0 -241
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wwawing/engine",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "World Wide Adventure: an RPG Engine.",
|
|
5
5
|
"main": "./lib/wwa.js",
|
|
6
6
|
"files": [
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
32
|
-
"url": "
|
|
32
|
+
"url": "https://github.com/WWAWing/WWAWing.git",
|
|
33
|
+
"directory": "packages/engine"
|
|
33
34
|
},
|
|
34
35
|
"keywords": [
|
|
35
36
|
"wwa",
|
|
@@ -42,33 +43,33 @@
|
|
|
42
43
|
},
|
|
43
44
|
"homepage": "https://github.com/WWAWing/WWAWing#readme",
|
|
44
45
|
"devDependencies": {
|
|
45
|
-
"@swc/core": "^1.
|
|
46
|
-
"@swc/jest": "^0.2.
|
|
46
|
+
"@swc/core": "^1.10.4",
|
|
47
|
+
"@swc/jest": "^0.2.37",
|
|
47
48
|
"@types/crypto-js": "^4.1.1",
|
|
48
49
|
"@types/jest": "^29.5.1",
|
|
49
50
|
"@types/pug": "^2.0.6",
|
|
50
51
|
"@types/terser-webpack-plugin": "^5.2.0",
|
|
51
52
|
"@types/webpack": "^5.28.0",
|
|
52
|
-
"@wwawing/assets": "^
|
|
53
|
-
"@wwawing/common-interface": "^
|
|
54
|
-
"@wwawing/debug-server": "^
|
|
55
|
-
"@wwawing/event-emitter": "^
|
|
56
|
-
"@wwawing/loader": "^
|
|
57
|
-
"@wwawing/page-generator": "^
|
|
58
|
-
"@wwawing/styles": "^
|
|
59
|
-
"@wwawing/virtual-pad": "^
|
|
53
|
+
"@wwawing/assets": "^4.0.0",
|
|
54
|
+
"@wwawing/common-interface": "^4.0.0",
|
|
55
|
+
"@wwawing/debug-server": "^4.0.0",
|
|
56
|
+
"@wwawing/event-emitter": "^4.0.0",
|
|
57
|
+
"@wwawing/loader": "^4.0.0",
|
|
58
|
+
"@wwawing/page-generator": "^4.0.0",
|
|
59
|
+
"@wwawing/styles": "^4.0.0",
|
|
60
|
+
"@wwawing/virtual-pad": "^4.0.0",
|
|
60
61
|
"crypto-js": "^4.1.1",
|
|
61
62
|
"jest": "^29.5.0",
|
|
62
63
|
"jest-cli": "^29.5.0",
|
|
63
64
|
"jest-environment-jsdom": "^29.5.0",
|
|
64
|
-
"npm-run-
|
|
65
|
+
"npm-run-all2": "^8.0.1",
|
|
65
66
|
"pug": "^3.0.2",
|
|
66
|
-
"shelljs": "^0.
|
|
67
|
-
"shx": "^0.
|
|
67
|
+
"shelljs": "^0.9.2",
|
|
68
|
+
"shx": "^0.4.0",
|
|
68
69
|
"terser-webpack-plugin": "^5.3.9",
|
|
69
|
-
"ts-loader": "^9.
|
|
70
|
-
"ts-node": "^10.9.
|
|
71
|
-
"typescript": "^5.
|
|
70
|
+
"ts-loader": "^9.5.2",
|
|
71
|
+
"ts-node": "^10.9.2",
|
|
72
|
+
"typescript": "^5.8.3",
|
|
72
73
|
"webpack": "^5.83.1",
|
|
73
74
|
"webpack-cli": "^5.1.1"
|
|
74
75
|
},
|
|
@@ -76,8 +77,8 @@
|
|
|
76
77
|
"access": "public"
|
|
77
78
|
},
|
|
78
79
|
"engines": {
|
|
79
|
-
"node": ">=
|
|
80
|
-
"npm": ">=
|
|
80
|
+
"node": ">=22",
|
|
81
|
+
"npm": ">=11"
|
|
81
82
|
},
|
|
82
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "dd1d570673a896c26cc299f68033abcc3e867e21"
|
|
83
84
|
}
|
package/lib/wwa_message.d.ts
DELETED
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
import { WWA } from "./wwa_main";
|
|
2
|
-
import { Coord, PartsType, MacroType, Position, Direction, PreprocessMacroType, ScoreOptions as ScoreOptions } from "./wwa_data";
|
|
3
|
-
import { Monster } from "./wwa_monster";
|
|
4
|
-
import { WWAData } from "./wwa_data";
|
|
5
|
-
import { WWASave } from "./wwa_save";
|
|
6
|
-
import { type TokenValues, type Descriminant } from "./wwa_expression";
|
|
7
|
-
export type LazyEvaluateValue = () => number | string | boolean;
|
|
8
|
-
export type MessageSegments = (string | LazyEvaluateValue)[];
|
|
9
|
-
export declare class Page {
|
|
10
|
-
firstNode?: Node;
|
|
11
|
-
isLastPage?: boolean;
|
|
12
|
-
showChoice?: boolean;
|
|
13
|
-
isSystemMessage?: boolean;
|
|
14
|
-
scoreOptions?: ScoreOptions;
|
|
15
|
-
extraInfo?: {
|
|
16
|
-
partsId: number;
|
|
17
|
-
partsType: PartsType;
|
|
18
|
-
partsPosition: Coord;
|
|
19
|
-
};
|
|
20
|
-
constructor(firstNode?: Node, isLastPage?: boolean, showChoice?: boolean, isSystemMessage?: boolean, scoreOptions?: ScoreOptions, extraInfo?: {
|
|
21
|
-
partsId: number;
|
|
22
|
-
partsType: PartsType;
|
|
23
|
-
partsPosition: Coord;
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
export declare abstract class Node {
|
|
27
|
-
constructor();
|
|
28
|
-
}
|
|
29
|
-
export interface Branch {
|
|
30
|
-
descriminant?: Descriminant;
|
|
31
|
-
elseBranch?: {
|
|
32
|
-
type: "real" | "pesudo-else";
|
|
33
|
-
};
|
|
34
|
-
next?: Node;
|
|
35
|
-
}
|
|
36
|
-
export declare class Junction extends Node {
|
|
37
|
-
branches: Branch[];
|
|
38
|
-
constructor(branches?: Branch[]);
|
|
39
|
-
appendBranch(branch: Branch): void;
|
|
40
|
-
getLastUnconnectedBranch(): Branch | undefined;
|
|
41
|
-
evaluateAndGetNextNode(generateTokenValues: () => TokenValues): Node | undefined;
|
|
42
|
-
hasElseBranch(): boolean;
|
|
43
|
-
}
|
|
44
|
-
export declare class ParsedMessage extends Node {
|
|
45
|
-
macro?: Macro[];
|
|
46
|
-
next?: Node;
|
|
47
|
-
private messageSegments;
|
|
48
|
-
constructor(textOrMessageSegments: string | MessageSegments, macro?: Macro[], next?: Node);
|
|
49
|
-
isEmpty(): boolean;
|
|
50
|
-
generatePrintableMessage(): string;
|
|
51
|
-
appendMessage(message: string | MessageSegments, withNewLine?: boolean): void;
|
|
52
|
-
private parseMessage;
|
|
53
|
-
}
|
|
54
|
-
export declare function isEmptyMessageTree(node: Node | undefined): boolean;
|
|
55
|
-
export declare function getLastMessage(node: undefined): undefined;
|
|
56
|
-
export declare function getLastMessage(node: Node): Node;
|
|
57
|
-
export declare function concatMessage(node1: Node | undefined, node2: Node | undefined): Node | undefined;
|
|
58
|
-
export type MessageLineType = PreprocessMacroType | "text" | "normalMacro";
|
|
59
|
-
export declare const messagLineIsText: (lineType: MessageLineType) => boolean;
|
|
60
|
-
export type MessageLine = ({
|
|
61
|
-
type: PreprocessMacroType;
|
|
62
|
-
text: string;
|
|
63
|
-
macro: Macro;
|
|
64
|
-
} | {
|
|
65
|
-
type: "normalMacro";
|
|
66
|
-
text: string;
|
|
67
|
-
macro: Macro;
|
|
68
|
-
} | {
|
|
69
|
-
type: "text";
|
|
70
|
-
text: string;
|
|
71
|
-
macro?: undefined;
|
|
72
|
-
});
|
|
73
|
-
export declare class Macro {
|
|
74
|
-
private _wwa;
|
|
75
|
-
private _triggerPartsID;
|
|
76
|
-
private _triggerPartsType;
|
|
77
|
-
private _triggerPartsPosition;
|
|
78
|
-
macroType: MacroType;
|
|
79
|
-
macroArgs: string[];
|
|
80
|
-
constructor(_wwa: WWA, _triggerPartsID: number, _triggerPartsType: number, _triggerPartsPosition: Coord, macroType: MacroType, macroArgs: string[]);
|
|
81
|
-
isJunction(): boolean;
|
|
82
|
-
execute(): {
|
|
83
|
-
isGameOver?: true;
|
|
84
|
-
};
|
|
85
|
-
private _concatEmptyArgs;
|
|
86
|
-
private _evaluateIntValue;
|
|
87
|
-
private _executeJumpGateMacro;
|
|
88
|
-
private _executeRecPositionMacro;
|
|
89
|
-
private _executeJumpRecPositionMacro;
|
|
90
|
-
private _executeConsoleLogMacro;
|
|
91
|
-
private _executeCopyHpToMacro;
|
|
92
|
-
private _executeCopyHpMaxToMacro;
|
|
93
|
-
private _executeCopyAtToMacro;
|
|
94
|
-
private _executeCopyDfToMacro;
|
|
95
|
-
private _parseStatusKind;
|
|
96
|
-
private _executeCopyMoneyToMacro;
|
|
97
|
-
private _executeSetHPMacro;
|
|
98
|
-
private _executeSetHpMaxMacro;
|
|
99
|
-
private _executeSetAtMacro;
|
|
100
|
-
private _executeSetDfMacro;
|
|
101
|
-
private _executeSetMoneyMacro;
|
|
102
|
-
private _executeSetStepCountMacro;
|
|
103
|
-
private _executeVarSetValMacro;
|
|
104
|
-
private _executeVarSetMacro;
|
|
105
|
-
private _executeVarAddMacro;
|
|
106
|
-
private _executeVarSubMacro;
|
|
107
|
-
private _executeVarMulMacro;
|
|
108
|
-
private _executeVarDivMacro;
|
|
109
|
-
private _executeVarModMacro;
|
|
110
|
-
private _executeVarSetRandMacro;
|
|
111
|
-
private _executeGameSpeedMacro;
|
|
112
|
-
private _executeLegacyIfMacro;
|
|
113
|
-
private _executeSetSpeedMacro;
|
|
114
|
-
private _executeCopyTimeToMacro;
|
|
115
|
-
private _executeHideStatusMacro;
|
|
116
|
-
private _executeVarMapMacro;
|
|
117
|
-
private _executeImgPlayerMacro;
|
|
118
|
-
private _executeImgYesNoMacro;
|
|
119
|
-
private _executeHPMaxMacro;
|
|
120
|
-
private _executeSaveMacro;
|
|
121
|
-
private _executeItemMacro;
|
|
122
|
-
private _executeDefaultMacro;
|
|
123
|
-
private _executeOldMapMacro;
|
|
124
|
-
private _executePartsMacro;
|
|
125
|
-
private _executeMoveMacro;
|
|
126
|
-
private _executeMapMacro;
|
|
127
|
-
private _executeDirMapMacro;
|
|
128
|
-
private _executeImgFrameMacro;
|
|
129
|
-
private _executeImgBomMacro;
|
|
130
|
-
private _executeDelPlayerMacro;
|
|
131
|
-
private _executeFaceMacro;
|
|
132
|
-
private _executeEffectMacro;
|
|
133
|
-
private _executeGameOverMacro;
|
|
134
|
-
private _executeImgClickMacro;
|
|
135
|
-
private _executeEffItemMacro;
|
|
136
|
-
private _executeStatusMacro;
|
|
137
|
-
private _executeColorMacro;
|
|
138
|
-
private _executeWaitMacro;
|
|
139
|
-
private _executeSoundMacro;
|
|
140
|
-
private _executeGamePadButtonMacro;
|
|
141
|
-
private _executeOldMoveMacro;
|
|
142
|
-
private _executeNoGameOverMacro;
|
|
143
|
-
private _executeSetMacro;
|
|
144
|
-
private _executeDelayBgmMacro;
|
|
145
|
-
private _executeSysMsgMacro;
|
|
146
|
-
private resolveSystemMessageKeyFromMacroArg;
|
|
147
|
-
}
|
|
148
|
-
export declare function parseMacro(wwa: WWA, partsID: number, partsType: PartsType, position: Coord, macroStr: string): Macro;
|
|
149
|
-
export declare class TextWindow {
|
|
150
|
-
protected _wwa: WWA;
|
|
151
|
-
protected _coord: Coord;
|
|
152
|
-
protected _width: number;
|
|
153
|
-
protected _height: number;
|
|
154
|
-
protected _isVisible: boolean;
|
|
155
|
-
protected _parentElement: HTMLElement;
|
|
156
|
-
protected _element: HTMLElement;
|
|
157
|
-
constructor(_wwa: WWA, _coord: Coord, _width: number, _height: number, _isVisible: boolean, _parentElement: HTMLElement, zIndex: number);
|
|
158
|
-
update(a?: any): void;
|
|
159
|
-
show(): void;
|
|
160
|
-
hide(): void;
|
|
161
|
-
isVisible(): boolean;
|
|
162
|
-
protected get windowName(): string;
|
|
163
|
-
}
|
|
164
|
-
export declare class MonsterWindow extends TextWindow {
|
|
165
|
-
protected _cgFileName: string;
|
|
166
|
-
protected _monsterBox: HTMLDivElement;
|
|
167
|
-
protected _energyBox: HTMLDivElement;
|
|
168
|
-
protected _strengthBox: HTMLDivElement;
|
|
169
|
-
protected _defenceBox: HTMLDivElement;
|
|
170
|
-
constructor(wwa: WWA, coord: Coord, width: number, height: number, isVisible: boolean, parentElement: HTMLElement, _cgFileName: string);
|
|
171
|
-
update(monster?: Monster): void;
|
|
172
|
-
protected get windowName(): string;
|
|
173
|
-
}
|
|
174
|
-
export declare class ScoreWindow extends TextWindow {
|
|
175
|
-
protected static WINDOW_NAME: string;
|
|
176
|
-
constructor(wwa: WWA, coord: Coord, isVisible: boolean, parentElement: HTMLElement);
|
|
177
|
-
update(score?: number): void;
|
|
178
|
-
protected get windowName(): string;
|
|
179
|
-
}
|
|
180
|
-
export declare enum Positioning {
|
|
181
|
-
TOP = 0,
|
|
182
|
-
CENTER = 1,
|
|
183
|
-
BOTTOM = 2,
|
|
184
|
-
SCORE = 3
|
|
185
|
-
}
|
|
186
|
-
export declare class MessageWindow {
|
|
187
|
-
private _wwa;
|
|
188
|
-
private _x;
|
|
189
|
-
private _y;
|
|
190
|
-
private _width;
|
|
191
|
-
private _height;
|
|
192
|
-
private _message;
|
|
193
|
-
private _cgFileName;
|
|
194
|
-
private _isVisible;
|
|
195
|
-
private _isYesno;
|
|
196
|
-
private _isSave;
|
|
197
|
-
private _isItemMenu;
|
|
198
|
-
private _isInputDisable;
|
|
199
|
-
private _element;
|
|
200
|
-
private _msgWrapperElement;
|
|
201
|
-
private _dummyElement;
|
|
202
|
-
private _saveElement;
|
|
203
|
-
private _ynWrapperElement;
|
|
204
|
-
private _divYesElement;
|
|
205
|
-
private _divNoElement;
|
|
206
|
-
private _parentElement;
|
|
207
|
-
private _wwaSave;
|
|
208
|
-
private _save_select_id;
|
|
209
|
-
private _save_counter;
|
|
210
|
-
private _save_close;
|
|
211
|
-
constructor(wwa: WWA, x: number, y: number, width: number, height: number, cgFileName: string, isVisible: boolean, isYesno: boolean, isItemMenu: boolean, parentElement: HTMLElement);
|
|
212
|
-
setPosition(x: number, y: number, width: number, height: number): void;
|
|
213
|
-
setPositionByPlayerPosition(existsFaces: boolean, existsScoreWindow: boolean, displayCenter: boolean, playerPos: Position, cameraPos: Position): void;
|
|
214
|
-
setPositionEasy(pos: Positioning): void;
|
|
215
|
-
setMessage(message: string): void;
|
|
216
|
-
clear(): void;
|
|
217
|
-
setYesNoChoice(isYesNo: boolean): boolean;
|
|
218
|
-
isYesNoChoice(): boolean;
|
|
219
|
-
isSaveChoice(): boolean;
|
|
220
|
-
setItemMenuChoice(isItemMenu: boolean): boolean;
|
|
221
|
-
isItemMenuChoice(): boolean;
|
|
222
|
-
setInputDisable(): void;
|
|
223
|
-
isInputDisable(): boolean;
|
|
224
|
-
show(): void;
|
|
225
|
-
hide(): void;
|
|
226
|
-
isVisible(): boolean;
|
|
227
|
-
private isWideChar;
|
|
228
|
-
private createClassicTextElement;
|
|
229
|
-
update(): void;
|
|
230
|
-
setWWASave(wwaSave: WWASave): void;
|
|
231
|
-
createSaveDom(): void;
|
|
232
|
-
deleteSaveDom(): void;
|
|
233
|
-
setSaveID(save_select_id: number): void;
|
|
234
|
-
save(gameCvs: HTMLCanvasElement, _quickSaveData: WWAData): boolean;
|
|
235
|
-
load(): WWAData;
|
|
236
|
-
saveUpdate(): void;
|
|
237
|
-
isSaveClose(): boolean;
|
|
238
|
-
private cursor_wait;
|
|
239
|
-
saveControll(moveDir: Direction): void;
|
|
240
|
-
protected get windowName(): string;
|
|
241
|
-
}
|