water111 2023-02-18 15:45:13 -05:00 committed by GitHub
parent f452a504e6
commit b7cfd80b14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 7 deletions

View file

@ -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.
*/

View file

@ -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);
}
}

View file

@ -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 ()