♻️Typed file loading
Tthis gives us the option to specify what type a file should be loaded as, avoidng the need to case it and does some automatic checks on the fitness of the data, while making the process simpler. If no type is given then the type will be set to std::byte which limit what operations can be performed on the data.
This commit is contained in:
parent
18967ce5ff
commit
fa0b286693
27 changed files with 670 additions and 798 deletions
|
|
@ -894,14 +894,14 @@ void MakeLightTable()
|
|||
}
|
||||
|
||||
{
|
||||
auto trn = LoadFileInMem("PlrGFX\\Infra.TRN");
|
||||
auto trn = LoadFileInMem<BYTE>("PlrGFX\\Infra.TRN");
|
||||
for (i = 0; i < 256; i++) {
|
||||
*tbl++ = trn[i];
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
auto trn = LoadFileInMem("PlrGFX\\Stone.TRN");
|
||||
auto trn = LoadFileInMem<BYTE>("PlrGFX\\Stone.TRN");
|
||||
for (i = 0; i < 256; i++) {
|
||||
*tbl++ = trn[i];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue