rw-parser-ng 2.0.0 → 2.0.2

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 (39) hide show
  1. package/lib/index.d.ts +2 -0
  2. package/lib/index.js +2 -0
  3. package/lib/renderware/dff/DffParser.d.ts +1 -44
  4. package/lib/utils/ByteStream.d.ts +1 -0
  5. package/lib/utils/ByteStream.js +5 -0
  6. package/package.json +2 -3
  7. package/tsconfig.json +3 -4
  8. package/lib/scripts/sort_models.d.ts +0 -1
  9. package/lib/scripts/sort_models.js +0 -185
  10. package/lib/scripts/sort_worker.d.ts +0 -1
  11. package/lib/scripts/sort_worker.js +0 -140
  12. package/lib/src/index.d.ts +0 -8
  13. package/lib/src/index.js +0 -28
  14. package/lib/src/renderware/RwFile.d.ts +0 -10
  15. package/lib/src/renderware/RwFile.js +0 -33
  16. package/lib/src/renderware/RwSections.d.ts +0 -20
  17. package/lib/src/renderware/RwSections.js +0 -29
  18. package/lib/src/renderware/dff/DffModelType.d.ts +0 -5
  19. package/lib/src/renderware/dff/DffModelType.js +0 -9
  20. package/lib/src/renderware/dff/DffParser.d.ts +0 -112
  21. package/lib/src/renderware/dff/DffParser.js +0 -418
  22. package/lib/src/renderware/errors/RwParseError.d.ts +0 -6
  23. package/lib/src/renderware/errors/RwParseError.js +0 -34
  24. package/lib/src/renderware/txd/TxdParser.d.ts +0 -38
  25. package/lib/src/renderware/txd/TxdParser.js +0 -185
  26. package/lib/src/renderware/utils/ImageDecoder.d.ts +0 -23
  27. package/lib/src/renderware/utils/ImageDecoder.js +0 -512
  28. package/lib/src/renderware/utils/ImageFormatEnums.d.ts +0 -25
  29. package/lib/src/renderware/utils/ImageFormatEnums.js +0 -32
  30. package/lib/src/renderware/utils/RwVersion.d.ts +0 -7
  31. package/lib/src/renderware/utils/RwVersion.js +0 -30
  32. package/lib/src/utils/ByteStream.d.ts +0 -17
  33. package/lib/src/utils/ByteStream.js +0 -65
  34. /package/lib/{src/renderware → renderware}/common/types.d.ts +0 -0
  35. /package/lib/{src/renderware → renderware}/common/types.js +0 -0
  36. /package/lib/{src/renderware → renderware}/ifp/IfpData.d.ts +0 -0
  37. /package/lib/{src/renderware → renderware}/ifp/IfpData.js +0 -0
  38. /package/lib/{src/renderware → renderware}/ifp/IfpParser.d.ts +0 -0
  39. /package/lib/{src/renderware → renderware}/ifp/IfpParser.js +0 -0
@@ -1,65 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ByteStream = void 0;
4
- var ByteStream = /** @class */ (function () {
5
- function ByteStream(stream) {
6
- this._cursor = 0;
7
- this._stream = stream;
8
- }
9
- ByteStream.prototype.readUint8 = function () {
10
- var uint8 = this._stream.readUInt8(this._cursor);
11
- this._cursor++;
12
- return uint8;
13
- };
14
- ByteStream.prototype.readUint16 = function () {
15
- var uint16 = this._stream.readUInt16LE(this._cursor);
16
- this._cursor += 2;
17
- return uint16;
18
- };
19
- ByteStream.prototype.readUint32 = function () {
20
- var uint32 = this._stream.readUInt32LE(this._cursor);
21
- this._cursor += 4;
22
- return uint32;
23
- };
24
- ByteStream.prototype.readInt16 = function () {
25
- var int16 = this._stream.readInt16LE(this._cursor);
26
- this._cursor += 2;
27
- return int16;
28
- };
29
- ByteStream.prototype.readInt32 = function () {
30
- var int32 = this._stream.readInt32LE(this._cursor);
31
- this._cursor += 4;
32
- return int32;
33
- };
34
- ByteStream.prototype.readFloat = function () {
35
- var float = this._stream.readFloatLE(this._cursor);
36
- this._cursor += 4;
37
- return float;
38
- };
39
- ByteStream.prototype.readString = function (size) {
40
- var string = this._stream.toString('ascii', this._cursor, this._cursor + size);
41
- this._cursor += size;
42
- return string.split(/\0/g).shift() || '';
43
- };
44
- ByteStream.prototype.read = function (size) {
45
- var data = new Uint8Array(size);
46
- for (var i = 0; i < size; i++) {
47
- data[i] = this.readUint8();
48
- }
49
- return data;
50
- };
51
- ByteStream.prototype.getSize = function () {
52
- return this._stream.byteLength;
53
- };
54
- ByteStream.prototype.getPosition = function () {
55
- return this._cursor;
56
- };
57
- ByteStream.prototype.setPosition = function (position) {
58
- this._cursor = position;
59
- };
60
- ByteStream.prototype.skip = function (size) {
61
- this._cursor += size;
62
- };
63
- return ByteStream;
64
- }());
65
- exports.ByteStream = ByteStream;