@wwawing/engine 3.5.14 → 3.6.0-alpha.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/debug/make-debug-pages.ts +3 -0
- package/debug/maps-config.ts +2 -1
- package/lib/wwa.js +3 -3
- package/lib/wwa_data.d.ts +62 -1
- package/lib/wwa_main.d.ts +39 -2
- package/lib/wwa_message.d.ts +29 -0
- package/lib/wwa_parts_player.d.ts +1 -1
- package/lib/wwa_save/WWACompress.d.ts +3 -0
- package/package.json +9 -9
package/lib/wwa_data.d.ts
CHANGED
|
@@ -225,6 +225,35 @@ export declare enum MacroType {
|
|
|
225
225
|
COLOR = 21,
|
|
226
226
|
WAIT = 22,
|
|
227
227
|
SOUND = 23,
|
|
228
|
+
JUMPGATE = 24,
|
|
229
|
+
RECPOSITION = 25,
|
|
230
|
+
JUMPRECPOSITION = 26,
|
|
231
|
+
CONSOLE_LOG = 27,
|
|
232
|
+
COPY_HP_TO = 28,
|
|
233
|
+
SET_HP = 29,
|
|
234
|
+
COPY_HPMAX_TO = 30,
|
|
235
|
+
SET_HPMAX = 31,
|
|
236
|
+
COPY_AT_TO = 32,
|
|
237
|
+
SET_AT = 33,
|
|
238
|
+
COPY_DF_TO = 34,
|
|
239
|
+
SET_DF = 35,
|
|
240
|
+
COPY_MONEY_TO = 36,
|
|
241
|
+
SET_MOENEY = 37,
|
|
242
|
+
COPY_STEP_COUNT_TO = 38,
|
|
243
|
+
VAR_SET_VAL = 39,
|
|
244
|
+
VAR_SET = 40,
|
|
245
|
+
VAR_ADD = 41,
|
|
246
|
+
VAR_SUB = 42,
|
|
247
|
+
VAR_MUL = 43,
|
|
248
|
+
VAR_DIV = 44,
|
|
249
|
+
VAR_SET_RAND = 45,
|
|
250
|
+
SHOW_STR = 46,
|
|
251
|
+
GAME_SPEED = 47,
|
|
252
|
+
IF = 50,
|
|
253
|
+
SET_SPEED = 51,
|
|
254
|
+
COPY_TIME_TO = 52,
|
|
255
|
+
HIDE_STATUS = 53,
|
|
256
|
+
VAR_MAP = 54,
|
|
228
257
|
GAMEPAD_BUTTON = 100,
|
|
229
258
|
OLDMOVE = 101
|
|
230
259
|
}
|
|
@@ -253,6 +282,35 @@ export declare var macrotable: {
|
|
|
253
282
|
$color: number;
|
|
254
283
|
$wait: number;
|
|
255
284
|
$sound: number;
|
|
285
|
+
$jumpgate: number;
|
|
286
|
+
$rec_pos: number;
|
|
287
|
+
$jump_rec_pos: number;
|
|
288
|
+
$console_log: number;
|
|
289
|
+
$copy_hp_to: number;
|
|
290
|
+
$set_hp: number;
|
|
291
|
+
$copy_hpmax_to: number;
|
|
292
|
+
$set_hpmax: number;
|
|
293
|
+
$copy_at_to: number;
|
|
294
|
+
$set_at: number;
|
|
295
|
+
$copy_df_to: number;
|
|
296
|
+
$set_df: number;
|
|
297
|
+
$copy_money_to: number;
|
|
298
|
+
$set_money: number;
|
|
299
|
+
$copy_step_count_to: number;
|
|
300
|
+
$var_set_val: number;
|
|
301
|
+
$var_set: number;
|
|
302
|
+
$var_add: number;
|
|
303
|
+
$var_sub: number;
|
|
304
|
+
$var_mul: number;
|
|
305
|
+
$var_div: number;
|
|
306
|
+
$var_set_rand: number;
|
|
307
|
+
$show_str: number;
|
|
308
|
+
$game_speed: number;
|
|
309
|
+
$if: number;
|
|
310
|
+
$set_speed: number;
|
|
311
|
+
$copy_time_to: number;
|
|
312
|
+
$hide_status: number;
|
|
313
|
+
$var_map: number;
|
|
256
314
|
$gamepad_button: number;
|
|
257
315
|
$oldmove: number;
|
|
258
316
|
};
|
|
@@ -280,6 +338,8 @@ export declare enum SystemSound {
|
|
|
280
338
|
}
|
|
281
339
|
export declare var speedList: number[];
|
|
282
340
|
export declare var speedNameList: string[];
|
|
341
|
+
export declare const StatusKind: readonly ["energy", "strength", "defence", "gold"];
|
|
342
|
+
export declare type StatusKind = typeof StatusKind[number];
|
|
283
343
|
export declare class WWAConsts {
|
|
284
344
|
static WWA_HOME: string;
|
|
285
345
|
static ITEMBOX_SIZE: number;
|
|
@@ -356,9 +416,9 @@ export declare class WWAConsts {
|
|
|
356
416
|
static MAP_WINDOW_HEIGHT: number;
|
|
357
417
|
static H_PARTS_NUM_IN_WINDOW: number;
|
|
358
418
|
static V_PARTS_NUM_IN_WINDOW: number;
|
|
359
|
-
static DEFAULT_SPEED_INDEX: number;
|
|
360
419
|
static MIN_SPEED_INDEX: number;
|
|
361
420
|
static MAX_SPEED_INDEX: number;
|
|
421
|
+
static QUICK_BATTLE_SPEED_INDECIES: number[];
|
|
362
422
|
static ANIMATION_REP_HALF_FRAME: number;
|
|
363
423
|
static PLAYER_LOOKING_AROUND_START_FRAME: number;
|
|
364
424
|
static RELATIVE_COORD_BIAS: number;
|
|
@@ -407,6 +467,7 @@ export declare class WWAConsts {
|
|
|
407
467
|
static MSG_STR_WIDTH: number;
|
|
408
468
|
static ITEM_EFFECT_SPEED_PIXEL_PER_FRAME: number;
|
|
409
469
|
static ITEMBOX_TOP_Y: number;
|
|
470
|
+
static USER_VAR_NUM: number;
|
|
410
471
|
static CONTROLL_WAIT_FRAME: number;
|
|
411
472
|
}
|
|
412
473
|
export declare class WWASaveConsts {
|
package/lib/wwa_main.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Coord, Position, LoaderProgress, LoadStage, YesNoState, Face, SidebarButton, SpeedChange, PartsType, AppearanceTriggerType, EquipmentStatus, ChangeStyleType, MacroStatusIndex, UserDevice, MacroImgFrameIndex } from "./wwa_data";
|
|
1
|
+
import { Coord, Position, LoaderProgress, LoadStage, YesNoState, Face, SidebarButton, SpeedChange, PartsType, AppearanceTriggerType, EquipmentStatus, ChangeStyleType, MacroStatusIndex, UserDevice, MacroImgFrameIndex, StatusKind } from "./wwa_data";
|
|
2
2
|
import { MessageWindow, MessageInfo } from "./wwa_message";
|
|
3
3
|
import { ItemMenu } from "./wwa_item_menu";
|
|
4
4
|
import { WWACompress } from "./wwa_save";
|
|
@@ -80,7 +80,9 @@ export declare class WWA {
|
|
|
80
80
|
private audioExtension;
|
|
81
81
|
userDevice: UserDevice;
|
|
82
82
|
private soundLoadedCheckTimer;
|
|
83
|
-
|
|
83
|
+
private _startTime;
|
|
84
|
+
private _dumpElement;
|
|
85
|
+
constructor(mapFileName: string, urlgateEnabled: boolean, titleImgName: string, classicModeEnabled: boolean, itemEffectEnabled: boolean, useGoToWWA: boolean, audioDirectory?: string, disallowLoadOldSave?: boolean, dumpElm?: HTMLElement);
|
|
84
86
|
private _setProgressBar;
|
|
85
87
|
private _setLoadingMessage;
|
|
86
88
|
private _setErrorMessage;
|
|
@@ -100,6 +102,7 @@ export declare class WWA {
|
|
|
100
102
|
onpasssuspendsavecalled(): void;
|
|
101
103
|
onitemmenucalled(): void;
|
|
102
104
|
onchangespeed(type: SpeedChange): void;
|
|
105
|
+
isbattleSpeeIndexForQuickBattle(battleSpeedIndex: number): boolean;
|
|
103
106
|
private _checkTurnKeyPressed;
|
|
104
107
|
private _main;
|
|
105
108
|
vibration(isStrong: boolean): void;
|
|
@@ -227,6 +230,38 @@ export declare class WWA {
|
|
|
227
230
|
showMonsterWindow(): void;
|
|
228
231
|
isClassicMode(): boolean;
|
|
229
232
|
isConsoleOutputMode(): boolean;
|
|
233
|
+
forcedJumpGate(jx: number, jy: number): void;
|
|
234
|
+
setUserVar(no: number, value: number): void;
|
|
235
|
+
getUserVar(no: number): number;
|
|
236
|
+
recUserPosition(x: number, y: number): void;
|
|
237
|
+
jumpRecUserPosition(x: number, y: number): void;
|
|
238
|
+
outputUserVar(num: number): void;
|
|
239
|
+
setUserVarHP(num: number): void;
|
|
240
|
+
setUserVarHPMAX(num: number): void;
|
|
241
|
+
setUserVarAT(num: number): void;
|
|
242
|
+
setUserVarDF(num: number): void;
|
|
243
|
+
setUserVarMONEY(num: number): void;
|
|
244
|
+
setHPUserVar(num: number): void;
|
|
245
|
+
setHPMAXUserVar(num: number): void;
|
|
246
|
+
setATUserVar(num: number): void;
|
|
247
|
+
setDFUserVar(num: number): void;
|
|
248
|
+
setMONEYUserVar(num: number): void;
|
|
249
|
+
setUserVarStep(num: number): void;
|
|
250
|
+
setUserVarVal(x: number, num: number): void;
|
|
251
|
+
setUserValOtherUserVal(x: number, y: number): void;
|
|
252
|
+
setUserValAdd(x: number, y: number): void;
|
|
253
|
+
setUserValSub(x: number, y: number): void;
|
|
254
|
+
setUserValMul(x: number, y: number): void;
|
|
255
|
+
setUserValDiv(x: number, y: number): void;
|
|
256
|
+
setUserValRandNum(x: number, num: number): void;
|
|
257
|
+
showUserValString(macroArgs: string[]): void;
|
|
258
|
+
speedChangeJudge(speedChangeFlag: boolean): void;
|
|
259
|
+
userVarUserIf(_triggerPartsPosition: Coord, str: string[]): void;
|
|
260
|
+
setPlayerSpeedIndex(speedIndex: number): void;
|
|
261
|
+
setUserVarPlayTime(num: number): void;
|
|
262
|
+
private setNowPlayTime;
|
|
263
|
+
hideStatus(no: number, isHide: boolean): void;
|
|
264
|
+
varMap(triggerPartsPos: Coord, xstr: string, ystr: string, partsID: number, targetPartsType: PartsType): void;
|
|
230
265
|
setItemboxBackgroundPosition(pos: {
|
|
231
266
|
x: number;
|
|
232
267
|
y: number;
|
|
@@ -234,4 +269,6 @@ export declare class WWA {
|
|
|
234
269
|
private _actionGamePadButtonItemMacro;
|
|
235
270
|
setGamePadButtonItemTable(buttonID: number, itemBoxNo: number): void;
|
|
236
271
|
private _checkSaveDataCompatibility;
|
|
272
|
+
isVisibleStatus(statusKind: StatusKind): boolean;
|
|
273
|
+
private _changeStatusVisibility;
|
|
237
274
|
}
|
package/lib/wwa_message.d.ts
CHANGED
|
@@ -22,6 +22,35 @@ export declare class Macro {
|
|
|
22
22
|
execute(): void;
|
|
23
23
|
private _concatEmptyArgs;
|
|
24
24
|
private _parseInt;
|
|
25
|
+
private _executeJumpGateMacro;
|
|
26
|
+
private _executeRecPositionMacro;
|
|
27
|
+
private _executeJumpRecPositionMacro;
|
|
28
|
+
private _executeConsoleLogMacro;
|
|
29
|
+
private _executeCopyHpToMacro;
|
|
30
|
+
private _executeCopyHpMaxToMacro;
|
|
31
|
+
private _executeCopyAtToMacro;
|
|
32
|
+
private _executeCopyDfToMacro;
|
|
33
|
+
private _executeCopyMoneyToMacro;
|
|
34
|
+
private _executeSetHPMacro;
|
|
35
|
+
private _executeSetHpMaxMacro;
|
|
36
|
+
private _executeSetAtMacro;
|
|
37
|
+
private _executeSetDfMacro;
|
|
38
|
+
private _executeSetMoneyMacro;
|
|
39
|
+
private _executeSetStepCountMacro;
|
|
40
|
+
private _executeVarSetValMacro;
|
|
41
|
+
private _executeVarSetMacro;
|
|
42
|
+
private _executeVarAddMacro;
|
|
43
|
+
private _executeVarSubMacro;
|
|
44
|
+
private _executeVarMulMacro;
|
|
45
|
+
private _executeVarDivMacro;
|
|
46
|
+
private _executeVarSetRandMacro;
|
|
47
|
+
private _executeGameSpeedMacro;
|
|
48
|
+
private _executeShowStrMacro;
|
|
49
|
+
private _executeIfMacro;
|
|
50
|
+
private _executeSetSpeedMacro;
|
|
51
|
+
private _executeCopyTimeToMacro;
|
|
52
|
+
private _hideStatusMacro;
|
|
53
|
+
private _varMapMacro;
|
|
25
54
|
private _executeImgPlayerMacro;
|
|
26
55
|
private _executeImgYesNoMacro;
|
|
27
56
|
private _executeHPMaxMacro;
|
|
@@ -163,5 +163,5 @@ export declare class Player extends PartsObject {
|
|
|
163
163
|
getSpeedIndex(): number;
|
|
164
164
|
speedUp(): number;
|
|
165
165
|
speedDown(): number;
|
|
166
|
-
constructor(wwa: WWA, pos: Position, camera: Camera, status: Status, em: number, moves: number);
|
|
166
|
+
constructor(wwa: WWA, pos: Position, camera: Camera, status: Status, em: number, moves: number, gameSpeedIndex: number);
|
|
167
167
|
}
|
|
@@ -12,6 +12,7 @@ export default class WWACompress {
|
|
|
12
12
|
private static _firstRandomMapObjectUtf8Table;
|
|
13
13
|
static compress(wwaData: WWAData): object;
|
|
14
14
|
private static compressObject;
|
|
15
|
+
private static compressUserVars;
|
|
15
16
|
private static compressMapAllObject;
|
|
16
17
|
private static indexListCompress;
|
|
17
18
|
private static idSort;
|
|
@@ -19,6 +20,8 @@ export default class WWACompress {
|
|
|
19
20
|
private static getDecompressArray;
|
|
20
21
|
static decompress(saveObject: object): WWADataWithWorldNameStatus;
|
|
21
22
|
private static decompressObject;
|
|
23
|
+
private static decompressUserVars;
|
|
24
|
+
private static generateEmptyUserVars;
|
|
22
25
|
private static decompressAllMapObject;
|
|
23
26
|
static setRestartData(restartData: WWAData, firstFrameData: WWAData): void;
|
|
24
27
|
private static getChangedUint8Array;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wwawing/engine",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0-alpha.0",
|
|
4
4
|
"description": "World Wide Adventure: an RPG Engine.",
|
|
5
5
|
"main": "./lib/wwa.js",
|
|
6
6
|
"files": [
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"@types/pug": "^2.0.4",
|
|
46
46
|
"@types/terser-webpack-plugin": "^5.0.3",
|
|
47
47
|
"@types/webpack": "^5.28.0",
|
|
48
|
-
"@wwawing/assets": "^3.
|
|
49
|
-
"@wwawing/common-interface": "^3.
|
|
50
|
-
"@wwawing/debug-server": "^3.
|
|
51
|
-
"@wwawing/event-emitter": "^3.
|
|
52
|
-
"@wwawing/loader": "^3.
|
|
53
|
-
"@wwawing/page-generator": "^3.
|
|
54
|
-
"@wwawing/styles": "^3.
|
|
48
|
+
"@wwawing/assets": "^3.6.0-alpha.0",
|
|
49
|
+
"@wwawing/common-interface": "^3.6.0-alpha.0",
|
|
50
|
+
"@wwawing/debug-server": "^3.6.0-alpha.0",
|
|
51
|
+
"@wwawing/event-emitter": "^3.6.0-alpha.0",
|
|
52
|
+
"@wwawing/loader": "^3.6.0-alpha.0",
|
|
53
|
+
"@wwawing/page-generator": "^3.6.0-alpha.0",
|
|
54
|
+
"@wwawing/styles": "^3.6.0-alpha.0",
|
|
55
55
|
"crypto-js": "4.0.0",
|
|
56
56
|
"npm-run-all": "^4.1.5",
|
|
57
57
|
"pug": "^3.0.2",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"node": ">=14",
|
|
72
72
|
"npm": ">=6"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "c87799aab79bfe7109a5597df9aa457e7e21f9e8"
|
|
75
75
|
}
|