-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee9946f
commit 0cd595a
Showing
9 changed files
with
124 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
"""QuakeCon 2021 PC Re-release of Midway's Nintendo 64 port of Quake""" | ||
# Installation: Steam > Quake (Re-release) > Addons > Quake 64 | ||
# https://github.com/sezero/quakespasm/blame/master/Quake/bspfile.h | ||
import enum | ||
from typing import List | ||
|
||
from .. import base | ||
from .. import vector | ||
from . import quake | ||
|
||
|
||
FILE_MAGIC = b" 46Q" | ||
|
||
BSP_VERSION = None | ||
|
||
GAME_PATHS = {"Quake 64": "C://Users/%USERPROFILE%/Saved Games/Nightdive Studios/q64"} | ||
|
||
GAME_VERSIONS = {GAME_NAME: BSP_VERSION for GAME_NAME in GAME_PATHS} | ||
|
||
|
||
class LUMP(enum.Enum): | ||
ENTITIES = 0 | ||
PLANES = 1 | ||
MIP_TEXTURES = 2 | ||
VERTICES = 3 | ||
VISIBILITY = 4 | ||
NODES = 5 | ||
TEXTURE_INFO = 6 | ||
FACES = 7 | ||
LIGHTING = 8 # 8bpp 0x00-0xFF black-white | ||
CLIP_NODES = 9 | ||
LEAVES = 10 | ||
LEAF_FACES = 11 | ||
EDGES = 12 | ||
SURFEDGES = 13 | ||
MODELS = 14 | ||
|
||
|
||
class LumpHeader(base.MappedArray): | ||
_mapping = ["offset", "length"] | ||
_format = "2I" | ||
|
||
|
||
# special lump classes, in alphabetical order: | ||
class MipTexture(base.Struct): # LUMP 2 | ||
name: str # texture name | ||
size: vector.vec2 # width & height | ||
shift: int # ... | ||
offsets: List[int] # offset from entry start to texture | ||
__slots__ = ["name", "size", "shift", "offsets"] | ||
_format = "16s7I" | ||
_arrays = {"size": ["width", "height"], | ||
"offsets": ["full", "half", "quarter", "eighth"]} | ||
_classes = {"size": vector.renamed_vec2("width", "height")} | ||
|
||
|
||
class MipTextureLump(quake.MipTextureLump): # LUMP 2 | ||
MipTextureClass = MipTexture | ||
|
||
|
||
# {"LUMP": LumpClass} | ||
BASIC_LUMP_CLASSES = quake.BASIC_LUMP_CLASSES.copy() | ||
|
||
LUMP_CLASSES = quake.LUMP_CLASSES.copy() | ||
|
||
SPECIAL_LUMP_CLASSES = quake.SPECIAL_LUMP_CLASSES.copy() | ||
SPECIAL_LUMP_CLASSES.update({"MIP_TEXTURES": MipTextureLump}) | ||
|
||
|
||
methods = [*quake.methods] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters