EDuke32 2.0 and Polymer! "talk about the wonders of EDuke32 and the new renderer"
#4376 Posted 26 February 2014 - 11:14 AM
ERROR loading lookup.dat: failed reading enough data
All builds after 4331 give me this error, 4331 and earlier work fine.
EDIT: I am using Lezing's CLUT pack, which has a modified LOOKUP.DAT
This post has been edited by Trooper Dan: 26 February 2014 - 11:21 AM
#4377 Posted 26 February 2014 - 11:39 AM
ERROR: attempt to load lookup at reserved pal <number>
In case kread() really doesn't read enough data, it could mean two things. First, the file is really too short and we expect bytes that are not there. Second, the actual reading functions return a less-than-expected byte count. For the file I/O read() function, it is legal for that to happen. If that's a normal case on the OS you're using, we need to dig into it. If it's kzread(), Ken't ZIP implementation... well, that would need to be looked into as well, but it's not as urgent. (Personally, I'm not very interested in looking at that code.)
Note that in any case, the error only notifies you of an issue that was previously there, too. The earlier code simply didn't check the return value of kread(), which is bad style at the very least.
Edit: I can start LNGA2 fine around here. Just to make sure we're speaking of the same LOOKUP.DAT: is it 36480 bytes in length?
#4378 Posted 26 February 2014 - 11:53 AM
I can reproduce the error by starting a vanilla (i.e. no mods) game with the addition of the attached PALETTE.DAT and LOOKUP.DAT files.
The game will start fine in r4331 and earlier.
Attached File(s)
-
CLUT.zip (44.12K)
Number of downloads: 499
#4379 Posted 26 February 2014 - 12:00 PM
ERROR: attempt to load lookup at reserved pal 0
CraigFatman, why? Lookup 0 is the first 256 bytes of the base shade table after all, which you provide with PALETTE.DAT.
#4380 Posted 26 February 2014 - 12:04 PM
#4381 Posted 26 February 2014 - 12:11 PM
Helixhorned, on 26 February 2014 - 11:39 AM, said:
He is talking about ExtCLUT mod, not the LNGA. I can confirm that it doesn't launch in new builds because it uses altered pal #0:
Quote
Now it's mandatory to have a legacy support of pal #0 remapping like it was before.
#4382 Posted 26 February 2014 - 12:13 PM
Helixhorned, on 26 February 2014 - 12:00 PM, said:
I was trying to remove repeated colors from the ordinary color set to use them for special effects (like monochrome, invert, darken, brighten etc.).
#4383 Posted 26 February 2014 - 12:13 PM
EDIT: ninja'd.
EDIT2: committed.
#4384 Posted 26 February 2014 - 12:50 PM
Btw, there's a problem I forgot to mention. I've noticed the way the files are handled by writearraytofile and readarrayfromfile commands in 64-bit builds: whilst the gamevars are 32-bit integers, these commands apparently treat them as having 8 bytes per entry, what makes binary files saved with the 32-bit version incompatible with the 64-bit version. This bugs me because my current mod uses LOADS of precalculated binaries to work.
#4385 Posted 26 February 2014 - 01:12 PM
Fixing it in C-CON can be in one of two ways: making gamearrays always int32 in memory (harder), or only fixing the read/write routines (easier, only needs some temp. allocation). I'm not very keen on fixing any but the most critical C-CON bugs though.
#4386 Posted 26 February 2014 - 03:00 PM
Helixhorned, on 26 February 2014 - 01:12 PM, said:
I would state that both versions should handle integer overflows the same way to avoid possible compatibility problems, so it's better to have them strictly 32-bit. I also thought that simple replacing of all "int" types with "signed __int32" does the job, doesn't it?
#4387 Posted 27 February 2014 - 02:02 AM
#4388 Posted 27 February 2014 - 08:51 AM
Helixhorned, on 27 February 2014 - 02:02 AM, said:
Undefined by the language, but won't the hardware overflow as you expect? A full-adder bitstrip or any optimization of that design will.
#4389 Posted 27 February 2014 - 09:30 AM
Quote
(...)
Signed integer overflow: If arithmetic on an 'int' type (for example) overflows, the result is undefined. One example is that "INT_MAX+1" is not guaranteed to be INT_MIN. This behavior enables certain classes of optimizations that are important for some code. For example, knowing that INT_MAX+1 is undefined allows optimizing "X+1 > X" to "true". Knowing the multiplication "cannot" overflow (because doing so would be undefined) allows optimizing "X*2/2" to "X". While these may seem trivial, these sorts of things are commonly exposed by inlining and macro expansion. A more important optimization that this allows is for "<=" loops like this:
for (i = 0; i <= N; ++i) { ... }
In this loop, the compiler can assume that the loop will iterate exactly N+1 times if "i" is undefined on overflow, which allows a broad range of loop optimizations to kick in. On the other hand, if the variable is defined to wrap around on overflow, then the compiler must assume that the loop is possibly infinite (which happens if N is INT_MAX) - which then disables these important loop optimizations. This particularly affects 64-bit platforms since so much code uses "int" as induction variables.
You may object that in the case of CON additions, the compiler doesn't know anything about the addends and should just emit an ADD without any optimization magic kicking in. Arguably, this argument doesn't really stand on a solid footing though. Who are we as C users to say what the compiler does or not? Compilers are very complex pieces of software. The language sets forth (most of the time) clear rules, and that's what one should follow.
Anyhow, in our particular case, the second reason why overflow is "undefined" is due to what Lezing mentioned: on 64-bit archs, we simply get values outside of [INT_MIN .. INT_MAX].
#4390 Posted 28 February 2014 - 05:16 AM
like a "do state uniformceil" or "do state uniformfloor"
this would be so great for TROR
This post has been edited by DanM: 28 February 2014 - 05:20 AM
#4391 Posted 28 February 2014 - 01:23 PM
DanM, on 28 February 2014 - 05:16 AM, said:
like a "do state uniformceil" or "do state uniformfloor"
Sure, see r4357. Contrary to what the log says, it's "state uniformceil" as you proposed.
#4393 Posted 01 March 2014 - 04:53 AM
#4394 Posted 01 March 2014 - 05:11 PM
Fox, on 01 March 2014 - 04:53 AM, said:
I'm pretty sure that the original shade table was done mostly by hand, with little aid of transpal utility or something.
This post has been edited by CraigFatman: 01 March 2014 - 05:11 PM
#4395 Posted 04 March 2014 - 03:49 AM
#4396 Posted 04 March 2014 - 05:03 AM
#4397 Posted 04 March 2014 - 05:14 AM
This post has been edited by DanM: 04 March 2014 - 05:15 AM
#4398 Posted 04 March 2014 - 03:00 PM
Fox, on 01 March 2014 - 04:53 AM, said:
This is as far as I got, from earlier in this thread:
Helixhorned, on 03 January 2014 - 06:59 AM, said:
Note that I still got the formula wrong even after correcting it once. It should read something like (give/take off-by-one or rounding errors):
palookup[s][i] = b(i) + round(((32-s)/32)*(i - b(i)))
This second attempt at recreating it is implemented in shadexfog.lua's create_base_shtab_2(). No guarantees that I didn't write something entirely nonsensical though. Analyzing the resulting shade table still shows differences that aren't (as far as I can see) easily explained. So, that question might be something to ask Ken one day.
#4399 Posted 04 March 2014 - 03:29 PM
#4400 Posted 05 March 2014 - 04:53 AM
#4401 Posted 05 March 2014 - 05:08 PM
This post has been edited by Fox: 06 March 2014 - 05:58 AM
#4402 Posted 06 March 2014 - 05:33 AM
I tested this on DNE01 without any mods too, the rear doors to the cinema and in the theater can really display this problem really well, whats worse is overall fps gets worse and worse the more times you swing doors, even just opening and closing the same one will produce this effect.
This post has been edited by DanM: 06 March 2014 - 05:34 AM
#4403 Posted 06 March 2014 - 06:24 AM
#4404 Posted 06 March 2014 - 07:58 AM
#4405 Posted 06 March 2014 - 08:49 AM
edit : fixed that by copying the exploded wall sectors out, saving into a new map, loading DNE01 deleting the old walls and placing the newly copied section in its place, also notice substantial increases in FPS with every floor with a translucency on it stamped out, must of been why DNE bombed hard aswell in the FPS department, you could in the old days press T on floors and they would do a subtle weird effect but now they really show up and taking them out really ups the FPS.
just need a script that finds floors or ceilings that are NOT tror with translucency and turns them normal again and i should nail that one.
This post has been edited by DanM: 06 March 2014 - 09:15 AM

Help
Duke4.net
DNF #1
Duke 3D #1


