mirror of
https://github.com/open-goal/jak-project
synced 2026-07-27 06:45:56 -04:00
set up fog for jak 2 (#2223)

This commit is contained in:
@@ -1011,6 +1011,7 @@ void OpenGLRenderer::dispatch_buckets_jak2(DmaFollower dma,
|
||||
|
||||
// TODO ending data.
|
||||
}
|
||||
|
||||
/*!
|
||||
* This function finds buckets and dispatches them to the appropriate part.
|
||||
*/
|
||||
|
||||
@@ -52,7 +52,8 @@ void VisDataHandler::render(DmaFollower& dma,
|
||||
|
||||
for (int i = 0; i < render_state->num_vis_to_copy; i++) {
|
||||
auto vis_data = dma.read_and_advance();
|
||||
ASSERT(vis_data.vif0() == 0);
|
||||
u32 vif0 = vis_data.vif0();
|
||||
memcpy(render_state->fog_color.data(), &vif0, 4);
|
||||
if (vis_data.vifcode1().kind != VifCode::Kind::PC_PORT) {
|
||||
break;
|
||||
}
|
||||
@@ -75,8 +76,7 @@ void VisDataHandler::render(DmaFollower& dma,
|
||||
}
|
||||
|
||||
while (dma.current_tag_offset() != render_state->next_bucket) {
|
||||
auto x = dma.read_and_advance();
|
||||
fmt::print("{} {}\n", x.vifcode0().print(), x.vifcode1().print());
|
||||
dma.read_and_advance();
|
||||
ASSERT(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
;; the level is active.
|
||||
(let ((packet (the-as dma-packet (-> dma-buf base))))
|
||||
(set! (-> packet dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc 128))
|
||||
(set! (-> packet vif0) (new 'static 'vif-tag))
|
||||
(set! (-> packet vif0) (the-as vif-tag *fog-color*))
|
||||
(set! (-> packet vif1) (new 'static 'vif-tag :cmd (vif-cmd pc-port)))
|
||||
(set! (-> dma-buf base) (the pointer (&+ packet 16)))
|
||||
)
|
||||
@@ -250,7 +250,7 @@
|
||||
(else
|
||||
(let ((packet (the-as dma-packet (-> dma-buf base))))
|
||||
(set! (-> packet dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc 1))
|
||||
(set! (-> packet vif0) (new 'static 'vif-tag))
|
||||
(set! (-> packet vif0) (the-as vif-tag *fog-color*))
|
||||
(set! (-> packet vif1) (new 'static 'vif-tag :cmd (vif-cmd pc-port)))
|
||||
(set! (-> dma-buf base) (the pointer (&+ packet 16)))
|
||||
)
|
||||
@@ -268,14 +268,14 @@
|
||||
(set! (-> dma-buf base) (&+ (the-as pointer v1-38) 16))
|
||||
)
|
||||
(dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group)
|
||||
(bucket-id bucket-2)
|
||||
(bucket-id bucket-2)
|
||||
dma-start
|
||||
(the-as (pointer dma-tag) a3-3)
|
||||
)
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
(the-as pointer 0)
|
||||
)
|
||||
|
||||
(defun finish-background ()
|
||||
|
||||
Reference in New Issue
Block a user