mirror of https://github.com/zeldaret/oot.git
EXPLICIT_DL_AND_TEX_SIZES = True
This commit is contained in:
parent
b9cb07f4bc
commit
c1e638ee76
|
@ -1,3 +1,2 @@
|
|||
WRITE_HINTS = True
|
||||
I_D_OMEGALUL = True # IDO specific things that may be otherwise different
|
||||
EXPLICIT_SIZES = True
|
||||
|
|
|
@ -9,8 +9,6 @@ from typing import TYPE_CHECKING, Callable, Any, Sequence, Union
|
|||
if TYPE_CHECKING:
|
||||
from .memorymap import MemoryContext
|
||||
|
||||
from ...conf import EXPLICIT_SIZES
|
||||
|
||||
from . import (
|
||||
RESOURCE_PARSE_SUCCESS,
|
||||
Resource,
|
||||
|
@ -458,7 +456,7 @@ class S16ArrayResource(CDataResource):
|
|||
super().__init__(file, range_start, name)
|
||||
|
||||
def get_c_declaration_base(self):
|
||||
if hasattr(self, "HACK_IS_STATIC_ON") or EXPLICIT_SIZES:
|
||||
if hasattr(self, "HACK_IS_STATIC_ON"):
|
||||
return f"s16 {self.symbol_name}[{self.cdata_ext.size // self.elem_cdata_ext.size}]"
|
||||
return f"s16 {self.symbol_name}[]"
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@ from typing import TYPE_CHECKING, Optional
|
|||
if TYPE_CHECKING:
|
||||
from ..extase.memorymap import MemoryContext
|
||||
|
||||
from ...conf import EXPLICIT_SIZES
|
||||
|
||||
from ..extase import (
|
||||
File,
|
||||
RESOURCE_PARSE_SUCCESS,
|
||||
|
@ -43,7 +41,7 @@ class CollisionVtxListResource(CDataResource):
|
|||
super().__init__(file, range_start, name)
|
||||
|
||||
def get_c_declaration_base(self):
|
||||
if hasattr(self, "HACK_IS_STATIC_ON") or EXPLICIT_SIZES:
|
||||
if hasattr(self, "HACK_IS_STATIC_ON"):
|
||||
return f"Vec3s {self.symbol_name}[{self.cdata_ext.length}]"
|
||||
return f"Vec3s {self.symbol_name}[]"
|
||||
|
||||
|
@ -162,7 +160,7 @@ class CollisionPolyListResource(CDataResource):
|
|||
return RESOURCE_PARSE_SUCCESS
|
||||
|
||||
def get_c_declaration_base(self):
|
||||
if hasattr(self, "HACK_IS_STATIC_ON") or EXPLICIT_SIZES:
|
||||
if hasattr(self, "HACK_IS_STATIC_ON"):
|
||||
return f"CollisionPoly {self.symbol_name}[{self.cdata_ext.length}]"
|
||||
return f"CollisionPoly {self.symbol_name}[]"
|
||||
|
||||
|
@ -293,7 +291,7 @@ class CollisionSurfaceTypeListResource(CDataResource):
|
|||
return RESOURCE_PARSE_SUCCESS
|
||||
|
||||
def get_c_declaration_base(self):
|
||||
if hasattr(self, "HACK_IS_STATIC_ON") or EXPLICIT_SIZES:
|
||||
if hasattr(self, "HACK_IS_STATIC_ON"):
|
||||
return f"SurfaceType {self.symbol_name}[{self.cdata_ext.length}]"
|
||||
return f"SurfaceType {self.symbol_name}[]"
|
||||
|
||||
|
@ -319,7 +317,7 @@ class BgCamFuncDataResource(CDataResource):
|
|||
super().__init__(file, range_start, name)
|
||||
|
||||
def get_c_declaration_base(self):
|
||||
if hasattr(self, "HACK_IS_STATIC_ON") or EXPLICIT_SIZES:
|
||||
if hasattr(self, "HACK_IS_STATIC_ON"):
|
||||
return f"Vec3s {self.symbol_name}[{self.cdata_ext.length}]"
|
||||
return f"Vec3s {self.symbol_name}[]"
|
||||
|
||||
|
@ -420,7 +418,7 @@ class CollisionBgCamListResource(CDataResource):
|
|||
return RESOURCE_PARSE_SUCCESS
|
||||
|
||||
def get_c_declaration_base(self):
|
||||
if hasattr(self, "HACK_IS_STATIC_ON") or EXPLICIT_SIZES:
|
||||
if hasattr(self, "HACK_IS_STATIC_ON"):
|
||||
return f"BgCamInfo {self.symbol_name}[{self.cdata_ext.length}]"
|
||||
return f"BgCamInfo {self.symbol_name}[]"
|
||||
|
||||
|
|
|
@ -36,13 +36,13 @@ from ..extase.cdata_resources import (
|
|||
fmt_hex_u,
|
||||
)
|
||||
|
||||
from ...conf import EXPLICIT_SIZES
|
||||
|
||||
BEST_EFFORT = True
|
||||
|
||||
VERBOSE_ColorIndexedTexturesManager = False
|
||||
VERBOSE_BEST_EFFORT_TLUT_NO_REAL_USER = True
|
||||
|
||||
EXPLICIT_DL_AND_TEX_SIZES = True
|
||||
|
||||
|
||||
class MtxResource(CDataResource):
|
||||
braces_in_source = False
|
||||
|
@ -151,7 +151,7 @@ class VtxArrayResource(CDataResource):
|
|||
</Array>"""
|
||||
|
||||
def get_c_declaration_base(self):
|
||||
if hasattr(self, "HACK_IS_STATIC_ON") or EXPLICIT_SIZES:
|
||||
if hasattr(self, "HACK_IS_STATIC_ON"):
|
||||
return f"Vtx {self.symbol_name}[{self.cdata_ext.length}]"
|
||||
return f"Vtx {self.symbol_name}[]"
|
||||
|
||||
|
@ -277,7 +277,7 @@ class TextureResource(Resource):
|
|||
def get_c_declaration_base(self):
|
||||
if hasattr(self, "HACK_IS_STATIC_ON") and self.is_tlut():
|
||||
raise NotImplementedError
|
||||
if hasattr(self, "HACK_IS_STATIC_ON") or EXPLICIT_SIZES:
|
||||
if hasattr(self, "HACK_IS_STATIC_ON") or EXPLICIT_DL_AND_TEX_SIZES:
|
||||
if not self.is_tlut():
|
||||
return f"{self.elem_type} {self.symbol_name}[{self.height_name} * {self.width_name} * {self.siz.bpp} / 8 / sizeof({self.elem_type})]"
|
||||
return f"{self.elem_type} {self.symbol_name}[]"
|
||||
|
@ -1337,7 +1337,7 @@ class DListResource(Resource, can_size_be_unknown=True):
|
|||
return RESOURCE_PARSE_SUCCESS
|
||||
|
||||
def get_c_declaration_base(self):
|
||||
if hasattr(self, "HACK_IS_STATIC_ON") or EXPLICIT_SIZES:
|
||||
if hasattr(self, "HACK_IS_STATIC_ON") or EXPLICIT_DL_AND_TEX_SIZES:
|
||||
length = (self.range_end - self.range_start) // 8
|
||||
return f"Gfx {self.symbol_name}[{length}]"
|
||||
return f"Gfx {self.symbol_name}[]"
|
||||
|
|
Loading…
Reference in New Issue