@gmvjs/dunia1 0.0.0-stage → 0.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xbt.js","sources":["../src/xbt.ts"],"sourcesContent":["// Текстуры Dunia (Far Cry 2) .xbt: «TBX\\0», u32 версия 0x0b, u32 смещение DDS (размер заголовка), u32 2, 12 байт,\n// путь «…_mip0.xbt» (если старший уровень лежит отдельным файлом) — и обычный DDS (DXT1/DXT5, мипы).\nimport { decodeDDS } from '@gmvjs/core/images/dds';\nimport type { DecodedImage } from '@gmvjs/core/types';\n\nexport function xbtDds(buf: ArrayBuffer): ArrayBuffer {\n const dv = new DataView(buf);\n if (buf.byteLength < 0x20 || dv.getUint32(0, true) !== 0x00584254) throw new Error('Не текстура Dunia (нет «TBX»)');\n const off = dv.getUint32(8, true);\n if (off + 128 > buf.byteLength || dv.getUint32(off, true) !== 0x20534444) throw new Error('XBT: нет DDS после заголовка');\n return buf.slice(off);\n}\n\nexport const decodeXbt = (buf: ArrayBuffer): DecodedImage => decodeDDS(xbtDds(buf));\n"],"names":[],"mappings":";AAKO,SAAS,OAAO,KAA+B;AACpD,QAAM,KAAK,IAAI,SAAS,GAAG;AAC3B,MAAI,IAAI,aAAa,MAAQ,GAAG,UAAU,GAAG,IAAI,MAAM,QAAY,OAAM,IAAI,MAAM,+BAA+B;AAClH,QAAM,MAAM,GAAG,UAAU,GAAG,IAAI;AAChC,MAAI,MAAM,MAAM,IAAI,cAAc,GAAG,UAAU,KAAK,IAAI,MAAM,UAAY,OAAM,IAAI,MAAM,8BAA8B;AACxH,SAAO,IAAI,MAAM,GAAG;AACtB;AAEO,MAAM,YAAY,CAAC,QAAmC,UAAU,OAAO,GAAG,CAAC;"}
package/package.json CHANGED
@@ -1,6 +1,56 @@
1
1
  {
2
2
  "name": "@gmvjs/dunia1",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "gmv: Dunia Engine 1 (Far Cry 2)",
5
+ "keywords": [
6
+ "gmv",
7
+ "dunia",
8
+ "far-cry-2",
9
+ "xbg"
10
+ ],
11
+ "license": "MIT",
12
+ "author": "Alexander Shibisty",
13
+ "homepage": "https://github.com/shibisty/gmv/tree/main/packages/dunia1#readme",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/shibisty/gmv.git",
17
+ "directory": "packages/dunia1"
18
+ },
19
+ "bugs": {
20
+ "url": "https://github.com/shibisty/gmv/issues"
21
+ },
22
+ "type": "module",
23
+ "sideEffects": false,
24
+ "exports": {
25
+ ".": {
26
+ "gmv-source": "./src/index.ts",
27
+ "types": "./dist/index.d.ts",
28
+ "import": "./dist/index.js"
29
+ },
30
+ "./farcry2": {
31
+ "gmv-source": "./src/games/farcry2.ts",
32
+ "types": "./dist/games/farcry2.d.ts",
33
+ "import": "./dist/games/farcry2.js"
34
+ }
35
+ },
36
+ "main": "./dist/index.js",
37
+ "types": "./dist/index.d.ts",
38
+ "files": [
39
+ "dist",
40
+ "README.md",
41
+ "LICENSE"
42
+ ],
43
+ "scripts": {
44
+ "build": "node ../../scripts/build-package.mjs"
45
+ },
46
+ "dependencies": {
47
+ "@gmvjs/codecs": "^0.1.0",
48
+ "@gmvjs/core": "^0.1.0"
49
+ },
50
+ "devDependencies": {
51
+ "@gmvjs/test-utils": "^0.1.0"
52
+ },
53
+ "publishConfig": {
54
+ "access": "public"
55
+ }
56
+ }