Hook in IPU player spawning to allocate memory for player obj at the correct time, sync positions on each tick

This commit is contained in:
jndean
2023-08-24 17:01:15 +00:00
parent 847882cc1d
commit 050ff5f588
13 changed files with 1053 additions and 56 deletions

View File

@@ -2,13 +2,13 @@
#include <print.h>
// #include "doomdata.h"
#include "doomstat.h"
#include "ipu_transfer.h"
extern "C" {
// void P_SetupLevel_pt0(const unsigned char *buf);
void R_RenderPlayerView(player_t *player);
};
@@ -19,15 +19,14 @@ struct R_RenderPlayerView_Vertex : public poplar::Vertex {
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;
}
// 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]
);
R_RenderPlayerView(&players[displayplayer]);
return ;
}
};