mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
set up fog for jak 2 (#2223)
![image](https://user-images.githubusercontent.com/48171810/219878142-8ad7c154-9f52-4ad8-a315-1c932e24cd4b.png)
This commit is contained in:
parent
f452a504e6
commit
b7cfd80b14
|
@ -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)))
|
||||
)
|
||||
|
@ -273,9 +273,9 @@
|
|||
(the-as (pointer dma-tag) a3-3)
|
||||
)
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
(the-as pointer 0)
|
||||
)
|
||||
|
||||
(defun finish-background ()
|
||||
|
|
Loading…
Reference in a new issue