Both formats expanded their packed channels with arithmetic that cannot
reach the top of the 8-bit range.
A4R4G4B4 used `nibble / 0xF * 255` in integer arithmetic. nibble / 15 is
0 for every nibble 0..14 and 1 only for 15, so all four channels - alpha
included - snapped to 0 or 255. In practice every affected texture
decoded to a single flat colour with binary alpha. Measured on a
CustomDM dat set, distinct colours and distinct alpha levels per texture
before -> after:
06007068 1 -> 14 colours, 1 -> 1 alpha
0600926C 1 -> 40 colours, 2 -> 15 alpha
0600926E 1 -> 54 colours, 2 -> 16 alpha
06009340 1 -> 70 colours, 2 -> 9 alpha
06006430 1 -> 1 colours, 2 -> 11 alpha
255 / 15 == 17 exactly, so multiplying the nibble by 17 maps 0..15 onto
0..255 with no rounding error. The alpha nibble is now masked for
symmetry with the other three.
R5G6B5 expanded with a bare left shift, mapping a 5-bit value onto
0,8,16..248 and a 6-bit value onto 0,4,8..252. Neither reaches 255, so a
fully saturated white decoded to (248,252,248) - slightly dark and
slightly green tinted, since green keeps one more bit. Replicating the
high bits into the low ones spans the full range. Measured before ->
after on four textures whose brightest pixel is white:
06006402, 06006404, 0600641D, 060096C0
(248,252,248) -> (255,255,255)
and partial-range textures scale correspondingly, e.g. 06009694
(216,36,248) -> (222,36,255).
Affects every consumer of ACE.DatLoader that renders or exports
textures.
* Wire up support for RotationSpeed
Co-Authored-By: gmriggs <8909245+gmriggs@users.noreply.github.com>
* Cache HasMissileFlightPlacement in Setup
Co-authored-by: gmriggs <8909245+gmriggs@users.noreply.github.com>
This is from OptimShi. I verified the string is now correct. Interestingly enough, tests still passed before with truncated strings.
All tests still pass
* Added dat file Iteration checking to server files
* Handled DDD_InterrogationResponse to check clients connecting for up-to-date dat files and display a warning upon login.
* Use command "modifybool show_dat_warning true" to show warning to clients upon login.
* Fixed ACE.Server.Network binaryReader.Align() function.
* adding preliminary support for dual-wielding monsters
* fixing monster special attack fx
* improved monster combat maneuvers table
* adding dual wield speed modifier for mobs
* fixing mobs casting flame wave
* adding support for EmoteManager.CastSpell untargeted spell projectiles
* fixing untargeted Blast spells
* fixing blast spells
* fixing spell z-angle
* re-add Emote.Move* physics position sync w/ valid rotation check
* wip
* latest wip
* cleanup
* small position adjustments
* matching create.Y formula up to retail pcaps
* refactoring spell projectiles
* startPos based on targetPos instead of casterPos for strike spells?
* improved strike spawn position
* add error logging
* add support for peturbation, improve ring positioning for even # of projectiles
* adding /clearcache for content developers
* fixing boost variance
* adding quadrant stuff
* splatter dir
* better usage of body part quadrants for physical attacks
* found CMTs with multiple entries per lookup key, cycle through anims
* fixing portal gems
* fixing monster special attack fx
* improved monster combat maneuvers table
* found CMTs with multiple entries per lookup key, cycle through anims
* reset PrevMotionCommand / DualWieldAlternate each time attack height button is clicked
* Use PortalDat skill table instead of reflection properties
* Update showstats comments
* remove attributes from Skill enum (Values now come from dat)
* Remove attributes from PropertyAttribute2nd (Values come from dat now)
* Landblock, worldObjects to private and adjacents->Adjacents
* Landblock remove PhysicsObj != null check. No need. 6% CPU savings
* showstats shows [Unusable] for untrained skills which are unusable
* Improve performance of GetWorldObjectsForPhysicsHandling
* Improve Skill IsUsable
* Updating showstats
* Fixing null pointer exception in IsUsable
* persistent tracking of item affectance
item affectance is restored at Player.EnterWorld
* Fixing sliding along the edge of cliffs
* Reverting item affectance PR