From 7b84d5c3d7dc572ee43bf1d67d7bc12e3b84c977 Mon Sep 17 00:00:00 2001 From: TwinAphex51224 Date: Sun, 24 Jun 2012 11:33:25 +0200 Subject: [PATCH] (360) Move font files --- 360/xdk360_video.cpp | 29 ++++++--------------- 360/xdk360_video.h | 2 +- console/griffin/griffin.c | 2 +- 360/fonts.cpp => gfx/fonts/xdk360_fonts.cpp | 5 ++-- 360/fonts.h => gfx/fonts/xdk360_fonts.h | 0 5 files changed, 12 insertions(+), 26 deletions(-) rename 360/fonts.cpp => gfx/fonts/xdk360_fonts.cpp (99%) rename 360/fonts.h => gfx/fonts/xdk360_fonts.h (100%) diff --git a/360/xdk360_video.cpp b/360/xdk360_video.cpp index 5da5486629..9012714432 100644 --- a/360/xdk360_video.cpp +++ b/360/xdk360_video.cpp @@ -667,19 +667,19 @@ static void xdk360_video_font_draw_text(xdk360_video_font_t * font, pVertex[0] = X1; pVertex[1] = Y1; ((volatile unsigned long *)pVertex)[2] = (tu1<<16)|tv1; // Merged using big endian rules - ((volatile unsigned long *)pVertex)[3] = 0; + pVertex[3] = 0; pVertex[4] = X2; pVertex[5] = Y2; ((volatile unsigned long *)pVertex)[6] = (tu2<<16)|tv1; // Merged using big endian rules - ((volatile unsigned long *)pVertex)[7] = 0; + pVertex[7] = 0; pVertex[8] = X3; pVertex[9] = Y3; ((volatile unsigned long *)pVertex)[10] = (tu2<<16)|tv2; // Merged using big endian rules - ((volatile unsigned long *)pVertex)[11] = 0; + pVertex[11] = 0; pVertex[12] = X4; pVertex[13] = Y4; ((volatile unsigned long *)pVertex)[14] = (tu1<<16)|tv2; // Merged using big endian rules - ((volatile unsigned long *)pVertex)[15] = 0; + pVertex[15] = 0; pVertex+=16; dwNumChars--; @@ -689,23 +689,10 @@ static void xdk360_video_font_draw_text(xdk360_video_font_t * font, // add some dummy verts for any skipped characters (like newlines, etc.) while( dwNumChars ) { - pVertex[0] = 0; - pVertex[1] = 0; - pVertex[2] = 0; - pVertex[3] = 0; - pVertex[4] = 0; - pVertex[5] = 0; - pVertex[6] = 0; - pVertex[7] = 0; - pVertex[8] = 0; - pVertex[9] = 0; - pVertex[10] = 0; - pVertex[11] = 0; - pVertex[12] = 0; - pVertex[13] = 0; - pVertex[14] = 0; - pVertex[15] = 0; - pVertex+=16; + for(int i = 0; i < 16; i++) + pVertex[i] = 0; + + pVertex += 16; dwNumChars--; } diff --git a/360/xdk360_video.h b/360/xdk360_video.h index 508e3ab832..504a459b1e 100644 --- a/360/xdk360_video.h +++ b/360/xdk360_video.h @@ -18,7 +18,7 @@ #define _XDK360_VIDEO_H #include -#include "fonts.h" +#include "../gfx/fonts/xdk360_fonts.h" #define DFONT_MAX 4096 #define PRIM_FVF (D3DFVF_XYZRHW | D3DFVF_TEX1) diff --git a/console/griffin/griffin.c b/console/griffin/griffin.c index 3b6c85d048..389e82ed97 100644 --- a/console/griffin/griffin.c +++ b/console/griffin/griffin.c @@ -101,7 +101,7 @@ FONTS #if defined(__CELLOS_LV2__) #include "../../gfx/fonts/ps3_libdbgfont.c" #elif defined(_XBOX) -#include "../../360/fonts.cpp" +#include "../../gfx/fonts/xdk360_fonts.cpp" #elif defined(GEKKO) #include "../../gfx/fonts/fonts.c" #endif diff --git a/360/fonts.cpp b/gfx/fonts/xdk360_fonts.cpp similarity index 99% rename from 360/fonts.cpp rename to gfx/fonts/xdk360_fonts.cpp index 6da4713d7d..636243a427 100644 --- a/360/fonts.cpp +++ b/gfx/fonts/xdk360_fonts.cpp @@ -16,9 +16,8 @@ #define NONET #include -#include "xdk360_video.h" -#include "fonts.h" -#include "../general.h" +#include "xdk360_fonts.h" +#include "../../general.h" video_console_t video_console; xdk360_video_font_t m_Font; diff --git a/360/fonts.h b/gfx/fonts/xdk360_fonts.h similarity index 100% rename from 360/fonts.h rename to gfx/fonts/xdk360_fonts.h