所以我正在尝试将 PRBoom 移植到 arm,我可以解决一个问题......
有以下代码....
R_DrawColumn_f R_GetDrawColumnFunc(enum column_pipeline_e type,
enum draw_filter_type_e filter,
enum draw_filter_type_e filterz) {
R_DrawColumn_f result = drawcolumnfuncs[V_GetMode()][filterz][filter][type];
if (result == NULL)
I_Error("R_GetDrawColumnFunc: undefined function (%d, %d, %d)",
type, filter, filterz);
return result;
}
哪个生产
04-12 12:58:45.970: E/DJNI(16943): 系统错误: R_GetDrawColumnFunc: 未定义函数 (2, 1, 0)
所以我的理解是 drawcolumnfuncs 方法正在失控。但这是我挣扎的地方,我不确定这个函数 sig 在做什么......
static R_DrawColumn_f drawcolumnfuncs[VID_MODEMAX][RDRAW_FILTER_MAXFILTERS][RDRAW_FILTER_MAXFILTERS][RDC_PIPELINE_MAXPIPELINES] = {
{
{
{NULL, NULL, NULL, NULL,},
{R_DrawColumn8_PointUV,
R_DrawTLColumn8_PointUV,
R_DrawTranslatedColumn8_PointUV,
R_DrawFuzzColumn8_PointUV,},
{R_DrawColumn8_LinearUV,
R_DrawTLColumn8_LinearUV,
R_DrawTranslatedColumn8_LinearUV,
R_DrawFuzzColumn8_LinearUV,},
{R_DrawColumn8_RoundedUV,
R_DrawTLColumn8_RoundedUV,
R_DrawTranslatedColumn8_RoundedUV,
R_DrawFuzzColumn8_RoundedUV,},
},
...
看起来它正在制作 HashMap 的 C 版本,但为什么它会返回 null 呢?