Skip to content

Commit

Permalink
move types.ts into common
Browse files Browse the repository at this point in the history
  • Loading branch information
meszaros-lajos-gyorgy committed Dec 14, 2022
1 parent fb2feab commit 0f198b8
Show file tree
Hide file tree
Showing 15 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/common/BinaryIO.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TextIO } from './TextIO'
import { repeat } from './helpers'
import { LITTLE_ENDIAN, TRUNCATE_ZERO_BYTES, KEEP_ZERO_BYTES, BYTE_OF_AN_UNKNOWN_CHAR } from './constants'
import { ArxQuaternion, ArxRotation, ArxVector3 } from '../types'
import { ArxQuaternion, ArxRotation, ArxVector3 } from './types'

export class BinaryIO extends DataView {
public position: number // TODO: make this private - this needs to be public because of TEA
Expand Down
2 changes: 1 addition & 1 deletion src/common/Light.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BinaryIO } from './BinaryIO'
import { ArxColor, Color } from './Color'
import { repeat } from './helpers'
import { ArxVector3 } from '../types'
import { ArxVector3 } from './types'

/** @see https://github.com/arx/ArxLibertatis/blob/1.2.1/src/scene/Light.h#L80 */
export enum ArxLightFlags {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/dlf/DlfHeader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Buffer } from 'node:buffer'
import { BinaryIO } from '../common/BinaryIO'
import { DANAE_VERSION } from '../common/constants'
import { repeat } from '../common/helpers'
import { ArxRotation, ArxVector3 } from '../types'
import { ArxRotation, ArxVector3 } from '../common/types'
import { ArxDLF } from './DLF'

/** @see https://github.com/arx/ArxLibertatis/blob/1.2.1/src/scene/LevelFormat.h#L58 */
Expand Down
2 changes: 1 addition & 1 deletion src/dlf/Fog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Buffer } from 'node:buffer'
import { BinaryIO } from '../common/BinaryIO'
import { ArxColor, Color } from '../common/Color'
import { repeat } from '../common/helpers'
import { ArxRotation, ArxVector3 } from '../types'
import { ArxRotation, ArxVector3 } from '../common/types'

/** @see https://github.com/arx/ArxLibertatis/blob/1.2.1/src/scene/LevelFormat.h#L132 */
export type ArxFog = {
Expand Down
2 changes: 1 addition & 1 deletion src/dlf/InteactiveObject.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Buffer } from 'node:buffer'
import { BinaryIO } from '../common/BinaryIO'
import { repeat } from '../common/helpers'
import { ArxRotation, ArxVector3 } from '../types'
import { ArxRotation, ArxVector3 } from '../common/types'

/** @see https://github.com/arx/ArxLibertatis/blob/1.2.1/src/scene/LevelFormat.h#L193 */
export type ArxInteractiveObject = {
Expand Down
2 changes: 1 addition & 1 deletion src/dlf/PathHeader.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BinaryIO } from '../common/BinaryIO'
import { ArxColor, Color } from '../common/Color'
import { repeat } from '../common/helpers'
import { ArxVector3 } from '../types'
import { ArxVector3 } from '../common/types'
import { ArxPath } from './DLF'

/** @see https://github.com/arx/ArxLibertatis/blob/1.2.1/src/scene/LevelFormat.h#L150 */
Expand Down
2 changes: 1 addition & 1 deletion src/dlf/Pathway.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Buffer } from 'node:buffer'
import { BinaryIO } from '../common/BinaryIO'
import { repeat } from '../common/helpers'
import { ArxVector3 } from '../types'
import { ArxVector3 } from '../common/types'

/** @see https://github.com/arx/ArxLibertatis/blob/1.2.1/src/scene/LevelFormat.h#L168 */
export type ArxPathway = {
Expand Down
2 changes: 1 addition & 1 deletion src/fts/AnchorData.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Buffer } from 'node:buffer'
import { BinaryIO } from '../common/BinaryIO'
import { ArxVector3 } from '../types'
import { ArxVector3 } from '../common/types'
import { ArxAnchor } from './Anchor'

/** @see https://github.com/arx/ArxLibertatis/blob/1.2.1/src/graphics/data/FastSceneFormat.h#L117 */
Expand Down
2 changes: 1 addition & 1 deletion src/fts/Polygon.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Buffer } from 'node:buffer'
import { BinaryIO } from '../common/BinaryIO'
import { ArxVertex, Vertex } from './Vertex'
import { ArxVector3 } from '../types'
import { ArxVector3 } from '../common/types'
import { times } from '../common/helpers'

/** @see https://github.com/arx/ArxLibertatis/blob/1.2.1/src/graphics/data/FastSceneFormat.h#L81 */
Expand Down
2 changes: 1 addition & 1 deletion src/fts/PortalPolygon.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Buffer } from 'node:buffer'
import { BinaryIO } from '../common/BinaryIO'
import { times } from '../common/helpers'
import { ArxVector3 } from '../types'
import { ArxVector3 } from '../common/types'
import { ArxTextureVertex, TextureVertex } from './TextureVertex'

/** @see https://github.com/arx/ArxLibertatis/blob/1.2.1/src/graphics/data/FastSceneFormat.h#L136 */
Expand Down
2 changes: 1 addition & 1 deletion src/fts/RoomDistance.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Buffer } from 'node:buffer'
import { BinaryIO } from '../common/BinaryIO'
import { ArxVector3 } from '../types'
import { ArxVector3 } from '../common/types'

/** @see https://github.com/arx/ArxLibertatis/blob/1.2.1/src/graphics/data/FastSceneFormat.h#L130 */
export type ArxRoomDistance = {
Expand Down
2 changes: 1 addition & 1 deletion src/fts/SceneHeader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Buffer } from 'node:buffer'
import { BinaryIO } from '../common/BinaryIO'
import { FTS_VERSION, MAP_DEPTH_IN_CELLS, MAP_WIDTH_IN_CELLS } from '../common/constants'
import { maxAll, uniq } from '../common/helpers'
import { ArxVector3 } from '../types'
import { ArxVector3 } from '../common/types'
import { ArxFTS } from './FTS'

/** @see https://github.com/arx/ArxLibertatis/blob/1.2.1/src/graphics/data/FastSceneFormat.h#L94 */
Expand Down
2 changes: 1 addition & 1 deletion src/fts/TextureVertex.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Buffer } from 'node:buffer'
import { BinaryIO } from '../common/BinaryIO'
import { ArxColor, Color } from '../common/Color'
import { ArxVector3 } from '../types'
import { ArxVector3 } from '../common/types'

/** @see https://github.com/arx/ArxLibertatis/blob/1.2.1/src/graphics/GraphicsFormat.h#L82 */
export type ArxTextureVertex = {
Expand Down
2 changes: 1 addition & 1 deletion src/tea/TEA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BinaryIO } from '../common/BinaryIO'
import { KEEP_ZERO_BYTES } from '../common/constants'
import { ArxNewKeyFrame, NewKeyFrame } from './NewKeyFrame'
import { ArxOldKeyFrame, OldKeyFrame } from './OldKeyFrame'
import { ArxQuaternion, ArxVector3 } from '../types'
import { ArxQuaternion, ArxVector3 } from '../common/types'

export type ArxTEA = {
header: Omit<ArxTeaHeader, 'numberOfKeyFrames' | 'numberOfGroups'>
Expand Down

0 comments on commit 0f198b8

Please sign in to comment.