mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-11-26 08:42:19 +00:00
[CHG] GRRLIB_Exit - Now resets clipping and blacks out the screen before exiting BRRLIB mode.
[CHG] GRRLIB_Init - Made the orthogonal init automatic. (guOrtho)
This commit is contained in:
parent
6ff0332f42
commit
c2086fbf93
2 changed files with 10 additions and 6 deletions
|
@ -463,10 +463,10 @@ inline void GRRLIB_DrawImg(f32 xpos, f32 ypos, GRRLIB_texImg tex, float degrees,
|
||||||
guMtxIdentity(m1);
|
guMtxIdentity(m1);
|
||||||
guMtxScaleApply(m1, m1, scaleX, scaleY, 1.0);
|
guMtxScaleApply(m1, m1, scaleX, scaleY, 1.0);
|
||||||
Vector axis = (Vector) {0, 0, 1 };
|
Vector axis = (Vector) {0, 0, 1 };
|
||||||
guMtxTransApply(m, m, xpos+width+tex.handlex-tex.offsetx+(scaleX*( -tex.handley*sin(-DegToRad(degrees)) - tex.handlex*cos(-DegToRad(degrees)) )), ypos+height+tex.handley-tex.offsety+(scaleX*( -tex.handley*cos(-DegToRad(degrees)) + tex.handlex*sin(-DegToRad(degrees)) )), 0);
|
guMtxRotAxisDeg (m2, &axis, degrees);
|
||||||
guMtxConcat(m2, m1, m);
|
guMtxConcat(m2, m1, m);
|
||||||
|
|
||||||
guMtxTransApply(m, m, xpos+width, ypos+height, 0);
|
guMtxTransApply(m, m, xpos+width+tex.handlex-tex.offsetx+(scaleX*( -tex.handley*sin(-DegToRad(degrees)) - tex.handlex*cos(-DegToRad(degrees)) )), ypos+height+tex.handley-tex.offsety+(scaleX*( -tex.handley*cos(-DegToRad(degrees)) + tex.handlex*sin(-DegToRad(degrees)) )), 0);
|
||||||
guMtxConcat(GXmodelView2D, m, mv);
|
guMtxConcat(GXmodelView2D, m, mv);
|
||||||
GX_LoadPosMtxImm(mv, GX_PNMTX0);
|
GX_LoadPosMtxImm(mv, GX_PNMTX0);
|
||||||
|
|
||||||
|
@ -1019,7 +1019,7 @@ void GRRLIB_Init() {
|
||||||
guMtxTransApply(GXmodelView2D, GXmodelView2D, 0.0F, 0.0F, -50.0F);
|
guMtxTransApply(GXmodelView2D, GXmodelView2D, 0.0F, 0.0F, -50.0F);
|
||||||
GX_LoadPosMtxImm(GXmodelView2D, GX_PNMTX0);
|
GX_LoadPosMtxImm(GXmodelView2D, GX_PNMTX0);
|
||||||
|
|
||||||
guOrtho(perspective,0, 479, 0, 639, 0, 300.0F);
|
guOrtho(perspective, 0, rmode->efbHeight, 0, rmode->fbWidth, 0, 300.0f);
|
||||||
GX_LoadProjectionMtx(perspective, GX_ORTHOGRAPHIC);
|
GX_LoadProjectionMtx(perspective, GX_ORTHOGRAPHIC);
|
||||||
|
|
||||||
GX_SetViewport(0, 0, rmode->fbWidth, rmode->efbHeight, 0, 1);
|
GX_SetViewport(0, 0, rmode->fbWidth, rmode->efbHeight, 0, 1);
|
||||||
|
@ -1048,6 +1048,10 @@ void GRRLIB_Render() {
|
||||||
* Call this before exiting your application.
|
* Call this before exiting your application.
|
||||||
*/
|
*/
|
||||||
void GRRLIB_Exit() {
|
void GRRLIB_Exit() {
|
||||||
|
GX_SetClipMode( GX_CLIP_DISABLE );
|
||||||
|
GX_SetScissor( 0, 0, WinW, WinH );
|
||||||
|
GRRLIB_FillScreen( 0x000000FF );
|
||||||
|
GRRLIB_Render();
|
||||||
GX_Flush();
|
GX_Flush();
|
||||||
GX_AbortFrame();
|
GX_AbortFrame();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue