charinfo-ex 0.0.1
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 +5 -0
- package/LICENSE +21 -0
- package/README.md +20 -0
- package/charinfo-ex-0.0.1.tgz +0 -0
- package/lib/CharInfoEx.d.ts +125 -0
- package/lib/CharInfoEx.js +298 -0
- package/lib/CharInfoOffset.d.ts +120 -0
- package/lib/CharInfoOffset.js +134 -0
- package/lib/Helpers.d.ts +1 -0
- package/lib/Helpers.js +16 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +9 -0
- package/other/CharInfoEx.hexpat +140 -0
- package/package.json +28 -0
- package/src/CharInfoEx.ts +310 -0
- package/src/CharInfoOffset.ts +132 -0
- package/src/Helpers.ts +17 -0
- package/src/index.ts +3 -0
- package/tsconfig.json +18 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
export enum CharInfoOffset {
|
|
2
|
+
createId1 = 0x0, //s32
|
|
3
|
+
createId2 = 0x4, //s32
|
|
4
|
+
createId3 = 0x8, //s32
|
|
5
|
+
createId4 = 0xc, //s32
|
|
6
|
+
name = 0x10, // utf16 - 11 char, 22 bytes
|
|
7
|
+
fontRegion = 0x26,
|
|
8
|
+
gender = 0x27, // u8
|
|
9
|
+
height = 0x28, // u8
|
|
10
|
+
build = 0x29, // u8
|
|
11
|
+
regionMove = 0x2a, // u8
|
|
12
|
+
|
|
13
|
+
// Bit 0 - Unknown
|
|
14
|
+
// Bit 1 - Bangs Side
|
|
15
|
+
// Bit 2 - Back Dual Color
|
|
16
|
+
// Bit 3 - Bangs Dual Color
|
|
17
|
+
// Bit 4 - Eye Shadow Enabled
|
|
18
|
+
// Bit 5 - Mouth Invert?
|
|
19
|
+
// Bit 6 - Moustache Inverted
|
|
20
|
+
// Bit 7 - Mole
|
|
21
|
+
faceFlags = 0x2b, // u8 bitflags
|
|
22
|
+
facelineType = 0x2c, // u8
|
|
23
|
+
facelineColor = 0x2d, // u8
|
|
24
|
+
wrinkleLower = 0x2e, // u8
|
|
25
|
+
wrinkleLowerScale = 0x2f, // u8
|
|
26
|
+
wrinkleLowerAspect = 0x30, // u8
|
|
27
|
+
wrinkleLowerX = 0x31, // u8
|
|
28
|
+
wrinkleLowerY = 0x32, // u8
|
|
29
|
+
wrinkleUpper = 0x33, // u8
|
|
30
|
+
wrinkleUpperScale = 0x34, // u8
|
|
31
|
+
wrinkleUpperAspect = 0x35, // u8
|
|
32
|
+
wrinkleUpperX = 0x36, // u8
|
|
33
|
+
wrinkleUpperY = 0x37, // u8
|
|
34
|
+
makeup0 = 0x38, // u8
|
|
35
|
+
makeup0Color = 0x39, // u8
|
|
36
|
+
makeup0Scale = 0x3a, // u8
|
|
37
|
+
makeup0Aspect = 0x3b, // u8
|
|
38
|
+
makeup0X = 0x3c, // u8
|
|
39
|
+
makeup0Y = 0x3d, // u8
|
|
40
|
+
makeup1 = 0x3e, // u8
|
|
41
|
+
makeup1Color = 0x3f, // u8
|
|
42
|
+
makeup1Scale = 0x40, // u8
|
|
43
|
+
makeup1Aspect = 0x41, // u8
|
|
44
|
+
makeup1X = 0x42, // u8
|
|
45
|
+
makeup1Y = 0x43, // u8
|
|
46
|
+
hairType = 0x44, // u16
|
|
47
|
+
hairColor0 = 0x46, // u8
|
|
48
|
+
hairColor1 = 0x47, // u8
|
|
49
|
+
hairTypeFront = 0x48, // u8
|
|
50
|
+
hairTypeBack = 0x49, // u8
|
|
51
|
+
|
|
52
|
+
// Bit 0 - Left Side
|
|
53
|
+
// Bit 1 - Right Side
|
|
54
|
+
hairStyle = 0x4a, // u8 bitflag
|
|
55
|
+
earType = 0x4b, // u8
|
|
56
|
+
earScale = 0x4c, // u8
|
|
57
|
+
earY = 0x4d, // u8
|
|
58
|
+
eyeType = 0x4e, // u8
|
|
59
|
+
eyeColor = 0x4f, // u8
|
|
60
|
+
eyeScale = 0x50, // u8
|
|
61
|
+
eyeAspect = 0x51, // u8
|
|
62
|
+
eyeRotate = 0x52, // u8
|
|
63
|
+
eyeX = 0x53, // u8
|
|
64
|
+
eyeY = 0x54, // u8
|
|
65
|
+
eyeShadowColor = 0x55, // u8
|
|
66
|
+
eyeHighlightType = 0x56, // u8
|
|
67
|
+
eyeHighlightScale = 0x57, // u8
|
|
68
|
+
eyeHighlightAspect = 0x58, // u8
|
|
69
|
+
eyeHighlightRotate = 0x59, // u8
|
|
70
|
+
eyeHighlightX = 0x5a, // u8
|
|
71
|
+
eyeHighlightY = 0x5b, // u8
|
|
72
|
+
eyelashUpperType = 0x5c, // u8
|
|
73
|
+
eyelashUpperScale = 0x5d, // u8
|
|
74
|
+
eyelashUpperAspect = 0x5e, // u8
|
|
75
|
+
eyelashUpperRotate = 0x5f, // u8
|
|
76
|
+
eyelashUpperX = 0x60, // u8
|
|
77
|
+
eyelashUpperY = 0x61, // u8
|
|
78
|
+
eyelashLowerType = 0x62, // u8
|
|
79
|
+
eyelashLowerScale = 0x63, // u8
|
|
80
|
+
eyelashLowerAspect = 0x64, // u8
|
|
81
|
+
eyelashLowerRotate = 0x65, // u8
|
|
82
|
+
eyelashLowerX = 0x66, // u8
|
|
83
|
+
eyelashLowerY = 0x67, // u8
|
|
84
|
+
eyeLidUpperType = 0x68, // u8
|
|
85
|
+
eyeLidUpperScale = 0x69, // u8
|
|
86
|
+
eyeLidUpperAspect = 0x6a, // u8
|
|
87
|
+
eyeLidUpperRotate = 0x6b, // u8
|
|
88
|
+
eyeLidUpperX = 0x6c, // u8
|
|
89
|
+
eyeLidUpperY = 0x6d, // u8
|
|
90
|
+
eyelidLowerType = 0x6e, // u8
|
|
91
|
+
eyelidLowerScale = 0x6f, // u8
|
|
92
|
+
eyelidLowerAspect = 0x70, // u8
|
|
93
|
+
eyelidLowerRotate = 0x71, // u8
|
|
94
|
+
eyelidLowerX = 0x72, // u8
|
|
95
|
+
eyelidLowerY = 0x73, // u8
|
|
96
|
+
eyebrowType = 0x74, // u8
|
|
97
|
+
eyebrowColor = 0x75, // u8
|
|
98
|
+
eyebrowScale = 0x76, // u8
|
|
99
|
+
eyebrowAspect = 0x77, // u8
|
|
100
|
+
eyebrowRotate = 0x78, // u8
|
|
101
|
+
eyebrowX = 0x79, // u8
|
|
102
|
+
eyebrowY = 0x7a, // u8
|
|
103
|
+
noseType = 0x7b, // u8
|
|
104
|
+
noseScale = 0x7c, // u8
|
|
105
|
+
noseY = 0x7d, // u8
|
|
106
|
+
mouthType = 0x7e, // u8
|
|
107
|
+
mouthColor = 0x7f, // u8
|
|
108
|
+
mouthScale = 0x80, // u8
|
|
109
|
+
mouthAspect = 0x81, // u8
|
|
110
|
+
mouthRotate = 0x82, // u8
|
|
111
|
+
mouthY = 0x83, // u8
|
|
112
|
+
beardType = 0x84, // u8
|
|
113
|
+
beardColor = 0x85, // u8
|
|
114
|
+
beardShortType = 0x86, // u8
|
|
115
|
+
beardShortColor = 0x87, // u8
|
|
116
|
+
mustacheType = 0x88, // u8
|
|
117
|
+
mustacheColor = 0x89, // u8
|
|
118
|
+
mustacheScale = 0x8a, // u8
|
|
119
|
+
mustacheAspect = 0x8b, // u8
|
|
120
|
+
mustacheY = 0x8c, // u8
|
|
121
|
+
glassType1 = 0x8d, // u8
|
|
122
|
+
glassColor1 = 0x8e, // u8
|
|
123
|
+
glassScale = 0x8f, // u8
|
|
124
|
+
glassAspect = 0x90, // u8
|
|
125
|
+
glassY = 0x91, // u8
|
|
126
|
+
glassType2 = 0x92, // u8
|
|
127
|
+
glassColor2 = 0x93, // u8
|
|
128
|
+
moleScale = 0x94, // u8
|
|
129
|
+
moleX = 0x95, // u8
|
|
130
|
+
moleY = 0x96, // u8
|
|
131
|
+
unkDefault45 = 0x97, // u8
|
|
132
|
+
}
|
package/src/Helpers.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export function getStringUTF16NullTerminated(data: DataView, offset: number, maxChars: number, littleEndian = true): string {
|
|
2
|
+
const chars: number[] = [];
|
|
3
|
+
|
|
4
|
+
for (let i = 0; i < maxChars; i++) {
|
|
5
|
+
const codeUnit = data.getUint16(offset, littleEndian);
|
|
6
|
+
offset += 2;
|
|
7
|
+
|
|
8
|
+
if (codeUnit === 0) {
|
|
9
|
+
offset += (maxChars - i - 1) * 2;
|
|
10
|
+
break;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
chars.push(codeUnit);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return String.fromCharCode(...chars);
|
|
17
|
+
}
|
package/src/index.ts
ADDED
package/tsconfig.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"lib": ["ESNext", "DOM"],
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"target": "esnext",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"outDir": "lib",
|
|
11
|
+
"rootDir": "./src",
|
|
12
|
+
"declaration": true,
|
|
13
|
+
"types": ["node"]
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
"include": ["src/**/*"],
|
|
17
|
+
"exclude": ["node_modules"]
|
|
18
|
+
}
|