[CHG] When GRRLIB_Settings.antialias = false; we now also do not antialias verticaly

[CHG] Change nonameno02 sample code to fit this change.
This commit is contained in:
N0NameN0 2009-12-04 23:03:57 +00:00
parent 0d0ae2ca97
commit b17f304c17
2 changed files with 29 additions and 5 deletions

View file

@ -49,9 +49,13 @@ void GRRLIB_DrawImg (const f32 xpos, const f32 ypos, const GRRLIB_texImg *tex,
GX_InitTexObj(&texObj, tex->data, tex->w, tex->h, GX_InitTexObj(&texObj, tex->data, tex->w, tex->h,
GX_TF_RGBA8, GX_CLAMP, GX_CLAMP, GX_FALSE); GX_TF_RGBA8, GX_CLAMP, GX_CLAMP, GX_FALSE);
if (GRRLIB_Settings.antialias == false) GX_SetCopyFilter(rmode->aa, rmode->sample_pattern, GX_TRUE, rmode->vfilter);
if (GRRLIB_Settings.antialias == false){
GX_InitTexObjLOD(&texObj, GX_NEAR, GX_NEAR, GX_InitTexObjLOD(&texObj, GX_NEAR, GX_NEAR,
0.0f, 0.0f, 0.0f, 0, 0, GX_ANISO_1); 0.0f, 0.0f, 0.0f, 0, 0, GX_ANISO_1);
GX_SetCopyFilter(GX_FALSE, rmode->sample_pattern, GX_FALSE, rmode->vfilter);
}
GX_LoadTexObj(&texObj, GX_TEXMAP0); GX_LoadTexObj(&texObj, GX_TEXMAP0);
GX_SetTevOp (GX_TEVSTAGE0, GX_MODULATE); GX_SetTevOp (GX_TEVSTAGE0, GX_MODULATE);
@ -114,9 +118,15 @@ void GRRLIB_DrawImgQuad (const guVector pos[4], GRRLIB_texImg *tex, const u32 c
GX_InitTexObj(&texObj, tex->data, tex->w, tex->h, GX_InitTexObj(&texObj, tex->data, tex->w, tex->h,
GX_TF_RGBA8, GX_CLAMP, GX_CLAMP, GX_FALSE); GX_TF_RGBA8, GX_CLAMP, GX_CLAMP, GX_FALSE);
if (GRRLIB_Settings.antialias == false)
GX_SetCopyFilter(rmode->aa, rmode->sample_pattern, GX_TRUE, rmode->vfilter);
if (GRRLIB_Settings.antialias == false){
GX_InitTexObjLOD(&texObj, GX_NEAR, GX_NEAR, GX_InitTexObjLOD(&texObj, GX_NEAR, GX_NEAR,
0.0f, 0.0f, 0.0f, 0, 0, GX_ANISO_1); 0.0f, 0.0f, 0.0f, 0, 0, GX_ANISO_1);
GX_SetCopyFilter(GX_FALSE, rmode->sample_pattern, GX_FALSE, rmode->vfilter);
}
GX_LoadTexObj(&texObj, GX_TEXMAP0); GX_LoadTexObj(&texObj, GX_TEXMAP0);
GX_SetTevOp (GX_TEVSTAGE0, GX_MODULATE); GX_SetTevOp (GX_TEVSTAGE0, GX_MODULATE);
@ -181,9 +191,14 @@ void GRRLIB_DrawTile (const f32 xpos, const f32 ypos, const GRRLIB_texImg *tex,
tex->tilew * tex->nbtilew, tex->tileh * tex->nbtileh, tex->tilew * tex->nbtilew, tex->tileh * tex->nbtileh,
GX_TF_RGBA8, GX_CLAMP, GX_CLAMP, GX_FALSE); GX_TF_RGBA8, GX_CLAMP, GX_CLAMP, GX_FALSE);
if (GRRLIB_Settings.antialias == false) GX_SetCopyFilter(rmode->aa, rmode->sample_pattern, GX_TRUE, rmode->vfilter);
if (GRRLIB_Settings.antialias == false){
GX_InitTexObjLOD(&texObj, GX_NEAR, GX_NEAR, GX_InitTexObjLOD(&texObj, GX_NEAR, GX_NEAR,
0.0f, 0.0f, 0.0f, 0, 0, GX_ANISO_1); 0.0f, 0.0f, 0.0f, 0, 0, GX_ANISO_1);
GX_SetCopyFilter(GX_FALSE, rmode->sample_pattern, GX_FALSE, rmode->vfilter);
}
GX_LoadTexObj(&texObj, GX_TEXMAP0); GX_LoadTexObj(&texObj, GX_TEXMAP0);
GX_SetTevOp (GX_TEVSTAGE0, GX_MODULATE); GX_SetTevOp (GX_TEVSTAGE0, GX_MODULATE);
@ -264,9 +279,13 @@ void GRRLIB_DrawPart (const f32 xpos, const f32 ypos, const f32 partx, const f3
tex->w, tex->h, tex->w, tex->h,
GX_TF_RGBA8, GX_CLAMP, GX_CLAMP, GX_FALSE); GX_TF_RGBA8, GX_CLAMP, GX_CLAMP, GX_FALSE);
if (GRRLIB_Settings.antialias == false) GX_SetCopyFilter(rmode->aa, rmode->sample_pattern, GX_TRUE, rmode->vfilter);
if (GRRLIB_Settings.antialias == false){
GX_InitTexObjLOD(&texObj, GX_NEAR, GX_NEAR, GX_InitTexObjLOD(&texObj, GX_NEAR, GX_NEAR,
0.0f, 0.0f, 0.0f, 0, 0, GX_ANISO_1); 0.0f, 0.0f, 0.0f, 0, 0, GX_ANISO_1);
GX_SetCopyFilter(GX_FALSE, rmode->sample_pattern, GX_FALSE, rmode->vfilter);
}
GX_LoadTexObj(&texObj, GX_TEXMAP0); GX_LoadTexObj(&texObj, GX_TEXMAP0);
GX_SetTevOp (GX_TEVSTAGE0, GX_MODULATE); GX_SetTevOp (GX_TEVSTAGE0, GX_MODULATE);
@ -339,9 +358,13 @@ void GRRLIB_DrawTileQuad (const guVector pos[4], GRRLIB_texImg *tex, const u32
tex->tilew * tex->nbtilew, tex->tileh * tex->nbtileh, tex->tilew * tex->nbtilew, tex->tileh * tex->nbtileh,
GX_TF_RGBA8, GX_CLAMP, GX_CLAMP, GX_FALSE); GX_TF_RGBA8, GX_CLAMP, GX_CLAMP, GX_FALSE);
if (GRRLIB_Settings.antialias == false) GX_SetCopyFilter(rmode->aa, rmode->sample_pattern, GX_TRUE, rmode->vfilter);
if (GRRLIB_Settings.antialias == false){
GX_InitTexObjLOD(&texObj, GX_NEAR, GX_NEAR, GX_InitTexObjLOD(&texObj, GX_NEAR, GX_NEAR,
0.0f, 0.0f, 0.0f, 0, 0, GX_ANISO_1); 0.0f, 0.0f, 0.0f, 0, 0, GX_ANISO_1);
GX_SetCopyFilter(GX_FALSE, rmode->sample_pattern, GX_FALSE, rmode->vfilter);
}
GX_LoadTexObj(&texObj, GX_TEXMAP0); GX_LoadTexObj(&texObj, GX_TEXMAP0);
GX_SetTevOp (GX_TEVSTAGE0, GX_MODULATE); GX_SetTevOp (GX_TEVSTAGE0, GX_MODULATE);

View file

@ -23,6 +23,7 @@ int main() {
GRRLIB_Init(); GRRLIB_Init();
WPAD_Init(); WPAD_Init();
GRRLIB_Settings.antialias = false;
GRRLIB_texImg *tex_screen[10]; GRRLIB_texImg *tex_screen[10];
for(i=0; i<10; i++) { for(i=0; i<10; i++) {