名称変更 NandAppDebugCoordinator -> ImportJump

表示系をカッコよくしました。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1157 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
kamikawa 2008-04-16 06:39:39 +00:00
parent d12b0b07a2
commit 6bcf86e427
12 changed files with 75 additions and 50 deletions

View File

@ -1,5 +1,5 @@
#----------------------------------------------------------------------------
# Project: NandAppDebugCoordinator
# Project: ImportJump
# File: ARM9-TS.lsf
#
# Copyright 2007 Nintendo. All rights reserved.

View File

@ -1,6 +1,6 @@
#! make -f
#----------------------------------------------------------------------------
# Project: NandAppDebugCoordinator
# Project: ImportJump
# File: Makefile
#
# Copyright 2007 Nintendo. All rights reserved.
@ -35,7 +35,7 @@ TWL_ARCHGEN = LIMITED
TITLEID_LO = 0NIA
#TARGET_TAD =
TARGET_BIN = NandAppImporter.srl
TARGET_BIN = ImportJump.srl
LCFILE_SPEC = ARM9-TS.lsf
ROM_SPEC = main.rsf

View File

@ -1,5 +1,5 @@
/*---------------------------------------------------------------------------*
Project: NandAppDebugCoordinator
Project: ImportJump
File: graphics.h
Copyright 2008 Nintendo. All rights reserved.
@ -32,6 +32,7 @@ extern "C" {
void InitGraphics(void);
void DrawLine(s16 sx, s16 sy, s16 ex, s16 ey, GXRgb color);
void DrawQuad(s16 sx, s16 sy, s16 ex, s16 ey, GXRgb color);
/*===========================================================================*/

View File

@ -1,5 +1,5 @@
/*---------------------------------------------------------------------------*
Project: NandAppDebugCoordinator
Project: ImportJump
File: import.h
Copyright 2008 Nintendo. All rights reserved.

View File

@ -1,5 +1,5 @@
/*---------------------------------------------------------------------------*
Project: NandAppDebugCoordinator
Project: ImportJump
File: kami_font.h
Copyright 2008 Nintendo. All rights reserved.

View File

@ -1,5 +1,5 @@
#----------------------------------------------------------------------------
# Project: NandAppDebugCoordinator
# Project: ImportJump
# File: main.rsf
#
# Copyright 2007 Nintendo. All rights reserved.

View File

@ -1,5 +1,5 @@
/*---------------------------------------------------------------------------*
Project: NandAppDebugCoordinator
Project: ImportJump
File: font_data.c
Copyright 2008 Nintendo. All rights reserved.
@ -89,7 +89,7 @@ const u16 PlttDataObj[16][16] = {
// 上画面コンソール文字列パレット
const u16 PlttDataMain[16][16] = {
{RGB555( 0, 0, 0), RGB555(31, 10, 0), RGB555(0, 0, 0), RGB555(0, 0, 0),}, // Orange
{RGB555(31, 31, 31), RGB555(31, 10, 0), RGB555(0, 0, 0), RGB555(0, 0, 0),}, // Orange
{RGB555(31, 31, 31), RGB555(31, 0, 0), RGB555(31, 0, 0), RGB555(31, 0, 0),}, // Red
{RGB555(31, 31, 31), RGB555(0, 31, 0), RGB555(0, 31, 0), RGB555(0, 31, 0),}, // Green
{RGB555(31, 31, 31), RGB555(0, 0, 31), RGB555(0, 0, 31), RGB555(0, 0, 31),}, // Blue
@ -97,6 +97,7 @@ const u16 PlttDataMain[16][16] = {
{RGB555(31, 31, 31), RGB555(0, 31, 31), RGB555(0, 31, 31), RGB555(0, 31, 31),}, // Cyan
{RGB555(31, 31, 31), RGB555(31, 0, 31), RGB555(31, 0, 31), RGB555(31, 0, 31),}, // Purple
{RGB555(31, 31, 31), RGB555(31, 31, 31), RGB555(31, 31, 31), RGB555(31, 31, 31),}, // White
{RGB555( 5, 5, 5), RGB555( 5, 5, 5), RGB555( 5, 5, 5), RGB555(31, 31, 31),}, // Black
};
// 下画面コンソール文字列パレット

View File

@ -1,5 +1,5 @@
/*---------------------------------------------------------------------------*
Project: NandAppDebugCoordinator
Project: ImportJump
File: praphics.c
Copyright 2008 Nintendo. All rights reserved.
@ -66,7 +66,7 @@ InitGraphics(void)
//---- 3D<33>‰Šú‰»
G3X_Init();
G3X_InitMtxStack();
G2_SetBG0Priority(0);
G2_SetBG0Priority(3);
G3X_AlphaTest(FALSE, 0);
G3X_AntiAlias(TRUE);
G3X_EdgeMarking(FALSE);
@ -158,3 +158,42 @@ DrawLine(s16 sx, s16 sy, s16 ex, s16 ey, GXRgb color)
}
G3_End();
}
/*---------------------------------------------------------------------------*
Name: DrawQuad
Description:
Arguments: sx -
sy -
ex -
ey -
color -
Returns: None.
*---------------------------------------------------------------------------*/
void
DrawQuad(s16 sx, s16 sy, s16 ex, s16 ey, GXRgb color)
{
fx16 fsx = (fx16)(((sx - 128) * 0x1000) / 128);
fx16 fsy = (fx16)(((96 - sy) * 0x1000) / 96);
fx16 fex = (fx16)(((ex - 128) * 0x1000) / 128);
fx16 fey = (fx16)(((96 - ey) * 0x1000) / 96);
G3_Begin(GX_BEGIN_QUADS);
{
G3_Color( color );
G3_Vtx(fsx, fsy, 0);
G3_Color( color );
G3_Vtx(fex, fsy, 0);
G3_Color( color );
G3_Vtx(fex, fey, 0);
G3_Color( color );
G3_Vtx(fsx, fey, 1);
}
G3_End();
}

View File

@ -1,5 +1,5 @@
/*---------------------------------------------------------------------------*
Project: NandAppDebugCoordinator
Project: ImportJump
File: process_import.c
Copyright 2008 Nintendo. All rights reserved.
@ -25,6 +25,7 @@
#include "kami_font.h"
#include "import.h"
#include "TWLHWInfo_api.h"
#include "graphics.h"
/*---------------------------------------------------------------------------*
@ -51,7 +52,6 @@ static vu8 sNowImport = FALSE;
static void ProgressThread(void* arg);
static void Destructor(void* arg);
void ProgressInit(void);
void ProgressDraw(f32 ratio);
static void UpdateNandBoxCount( void );
@ -159,7 +159,8 @@ static void ProgressThread(void* /*arg*/)
u32 totalSize = 0;
u32 totalSizeBk = 0;
ProgressInit();
kamiFontPrintfMain( 4, 9, 8, "Now Importing...");
kamiFontLoadScreenData();
while (TRUE)
{
@ -185,20 +186,6 @@ static void ProgressThread(void* /*arg*/)
sNowImport = FALSE;
}
/*---------------------------------------------------------------------------*
Name: ProgressInit
Description:
Arguments:
Returns: None.
*---------------------------------------------------------------------------*/
void ProgressInit(void)
{
sCurrentProgress = 0;
}
/*---------------------------------------------------------------------------*
Name: ProgressDraw
@ -210,23 +197,24 @@ void ProgressInit(void)
*---------------------------------------------------------------------------*/
void ProgressDraw(f32 ratio)
{
char square[2] = { 0x01, 0x00 };
u32 temp;
s32 i;
s16 x = (s16)(30 + (226 - 30)*ratio);
temp = (u32)(32 * ratio);
if (temp > sCurrentProgress)
{
s32 diff = (s32)(temp - sCurrentProgress);
for (i=0;i<diff;i++)
{
kamiFontPrintfConsole(2, square);
}
}
sCurrentProgress = temp;
// 3D初期化
G3X_Reset();
G3_Identity();
G3_PolygonAttr(GX_LIGHTMASK_NONE, GX_POLYGONMODE_DECAL, GX_CULL_NONE, 0, 31, 0);
// フォントスクリーンデータロード
kamiFontLoadScreenData();
// グリーンバー
DrawQuad( 30, 90, x, 95, GX_RGB(12, 25, 12));
// グレーバー
DrawQuad( 30, 90, 226, 95, GX_RGB(28, 28, 28));
// グレーダイアログ
DrawQuad( 20, 60, 236, 110, GX_RGB(25, 25, 25));
// 3Dスワップ
G3_SwapBuffers(GX_SORTMODE_AUTO, GX_BUFFERMODE_W);
}
/*---------------------------------------------------------------------------*

View File

@ -1,5 +1,5 @@
/*---------------------------------------------------------------------------*
Project: NandAppDebugCoordinator
Project: ImportJump
File: kami_font.c
Copyright 2008 Nintendo. All rights reserved.

View File

@ -1,5 +1,5 @@
/*---------------------------------------------------------------------------*
Project: NandAppDebugCoordinator
Project: ImportJump
File: main.c
Copyright 2008 Nintendo. All rights reserved.
@ -120,17 +120,13 @@ TwlMain()
switch (HWI_Init( OS_AllocFromMain, OS_FreeToMain ))
{
case HWI_INIT_FAILURE:
// kamiFontPrintfConsoleEx(CONSOLE_RED, "HWI_INIT() Failure!\n" );
OS_Warning(" Fail! : HWI_INIT()");
break;
case HWI_INIT_SUCCESS_PRO_SIGNATURE_MODE:
// kamiFontPrintfConsoleEx(CONSOLE_ORANGE, "[PRO Signature MODE]\n" );
break;
case HWI_INIT_SUCCESS_DEV_SIGNATURE_MODE:
// kamiFontPrintfConsoleEx(CONSOLE_ORANGE, "[DEV Signature MODE]\n" );
break;
case HWI_INIT_SUCCESS_NO_SIGNATRUE_MODE:
// kamiFontPrintfConsoleEx(CONSOLE_RED, "[No Signature MODE]\n" );
break;
}

View File

@ -1,6 +1,6 @@
#! make -f
#----------------------------------------------------------------------------
# Project: TwlSDK - tests - camera
# Project: ImportJump
# File: Makefile
#
# Copyright 2007 Nintendo. All rights reserved.