Add P_LoadNodes and refactor P_SetupLevel vertices to call via pointers. Add the stub for R_RenderPLayerView and transfering misc values (player and player->mobj). Start adding P_LoadThings, just aiming to get player mobj created during level load

This commit is contained in:
jndean
2023-08-22 17:18:44 +00:00
parent a5c1858937
commit 847882cc1d
18 changed files with 1503 additions and 176 deletions

33
src/ipu/r_codelets.cpp Normal file
View File

@@ -0,0 +1,33 @@
#include <Vertex.hpp>
#include <print.h>
// #include "doomdata.h"
#include "ipu_transfer.h"
extern "C" {
// void P_SetupLevel_pt0(const unsigned char *buf);
};
// --------------- P_Setup ----------------- //
struct R_RenderPlayerView_Vertex : public poplar::Vertex {
poplar::Input<poplar::Vector<unsigned char>> miscValues;
poplar::InOut<poplar::Vector<unsigned char>> frame;
void compute() {
// printf("Running R_RenderPlayerView_Vertex\n");
// AM_Drawer(&frame[0]);
for (int i = 0; i < 100; ++i){
frame[i + 320 * i ] = 1;
frame[i + 320 * i + 1] = 1;
}
IPU_R_RenderPlayerView_UnpackMiscValues(
(R_RenderPlayerView_MiscValues_t*) &miscValues[0]
);
return ;
}
};