fix alpha blend bit for jak 1 merc (#2458)

This fixes the sculptor's face shield and red rings on final boss.
This commit is contained in:
water111 2023-04-05 18:56:48 -04:00 committed by GitHub
parent f4085a4362
commit 15ab5d704d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 3 deletions

View file

@ -73,7 +73,7 @@ struct MemoryUsageTracker {
void add(MemoryUsageCategory category, u32 size_bytes) { data[category] += size_bytes; }
};
constexpr int TFRAG3_VERSION = 32;
constexpr int TFRAG3_VERSION = 33;
// These vertices should be uploaded to the GPU at load time and don't change
struct PreloadedVertex {

View file

@ -181,6 +181,7 @@ struct MercExtraInfo {
};
constexpr int kTextureScrollEffectBit = 1;
constexpr int kTransEffectBitJak1 = 2; // so far only confirmed for jak 1
constexpr int kRippleEffectBit = 4; // true in jak 1 and jak 2
struct MercEffect {

View file

@ -885,6 +885,10 @@ ConvertedMercEffect convert_merc_effect(const MercEffect& input_effect,
can_be_modified = true;
}
if (version == GameVersion::Jak1 && (input_effect.effect_bits & kTransEffectBitJak1)) {
use_alpha_blend = true;
}
handle_frag(debug_name, ctrl_header, frag, frag_ctrl, merc_state, result.vertices,
merc_memories[memory_buffer_toggle], can_be_modified, combined_lump4_addr, fi);
u32 vert_count = frag.lump4_unpacked.size() / 3;

View file

@ -451,7 +451,7 @@
(+! (-> obj sim-time-remaining)
(* 0.0033333334 (the float (- (-> *display* base-frame-counter) (-> *display* old-base-frame-counter))))
)
(let ((f30-0 0.016666668)
(let ((f30-0 (* DISPLAY_FPS_RATIO 0.016666668)) ;; changed for high fps
(f28-0 (* 0.0033333334 (the float (logand #xffffff (-> *display* base-frame-counter)))))
)
(while (>= (-> obj sim-time-remaining) (* 0.5 f30-0))