mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-06-18 14:55:44 -04:00
ロゴを差し替え
ロゴデータの元ファイルを追加 git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@822 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
9c19d7f565
commit
391dc6e222
@ -100,7 +100,7 @@ struct LayoutAnimationIndex
|
||||
|
||||
// 3DSロゴレイアウト用アニメーション
|
||||
const char* s_LogoAnimName[] =
|
||||
{ "U_Wait_Fade_IN.bclan", "U_Wait_3DS_Rogo.bclan", "U_Wait_Fade.bclan" };
|
||||
{ "U_Wait_Fade_IN.bclan", "U_Wait_3DS_Logo.bclan", "U_Wait_Fade.bclan" };
|
||||
|
||||
// フェードイン・フェードアウトレイアウト用アニメーション
|
||||
const char* s_FadeAnimName[] =
|
||||
|
@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env omake
|
||||
|
||||
.SUBDIRS: ./banner
|
||||
|
||||
SUPPORTED_TARGETS = CTR-TS.Process.MPCore.fast
|
||||
|
||||
SOURCES[] =
|
||||
SHADER_SOURCES[] =
|
||||
SHADER_OBJECTS[] =
|
||||
|
||||
vmount(../sources, sources)
|
||||
|
||||
include ../libs.om
|
||||
include ../includes.om
|
||||
include ./Sources/sources.om
|
||||
|
||||
TARGET_PROGRAM = DummyTrialSystemUpdater_JP
|
||||
TITLE = DummyTrialSystemUpdater_JP
|
||||
|
||||
ROMFS_ROOT = ../Archive
|
||||
|
||||
TARGET_SHADER =
|
||||
SHBIN_INSTALL_ROOT =
|
||||
|
||||
ROM_SPEC_FILE = romspec.rsf
|
||||
CTR_BANNER = banner/banner.bnr
|
||||
CTR_ICON = banner/banner.icn
|
||||
CTR_APPTYPE = CARD
|
||||
|
||||
CCFLAGS_WARNING += --diag_suppress 1301
|
||||
|
||||
include $(ROOT_OMAKE)/modulerules
|
||||
build: $(DEFAULT_TARGETS)
|
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env omake
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
banner.bnr banner.icn:banner.bsf
|
||||
$(CTRSDK_ROOT)/tools/CommandLineTools/ctr_makebanner32.exe banner.bsf
|
||||
|
||||
.DEFAULT: banner.bnr banner.icn
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,21 @@
|
||||
BasicInfo:
|
||||
Title: $(TITLE)
|
||||
CompanyCode: "01"
|
||||
ProductCode: "CTR-E-ZADJ"
|
||||
BackupMemoryType: None
|
||||
Logo: Nintendo
|
||||
MediaSize: 128MB
|
||||
|
||||
CardInfo:
|
||||
CardDevice: None
|
||||
|
||||
TitleInfo:
|
||||
UniqueId: 0x00684
|
||||
Version: 00
|
||||
|
||||
Rom:
|
||||
HostRoot: $(ROMFS_ROOT)
|
||||
SaveDataSize: 0KB
|
||||
|
||||
SystemControlInfo:
|
||||
StackSize: 65536
|
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env omake
|
||||
|
||||
.SUBDIRS: $(exist-dirs JP US)
|
||||
|
||||
DefineDefaultRules()
|
@ -0,0 +1,73 @@
|
||||
#!/usr/bin/env omake
|
||||
#----------------------------------------------------------------------------
|
||||
# Project: Horizon
|
||||
# File: OMakeroot
|
||||
#
|
||||
# Copyright (C)2009 Nintendo Co., Ltd. All rights reserved.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs contain
|
||||
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
# Company Ltd., and are protected by Federal copyright law. They may
|
||||
# not be disclosed to third parties or copied or duplicated in any form,
|
||||
# in whole or in part, without the prior written consent of Nintendo.
|
||||
#
|
||||
# $Rev:$
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# ディレクトリレイアウトについての説明
|
||||
#
|
||||
# a) ソースコードがルートディレクトリ直下に配置される場合
|
||||
# 例:
|
||||
# /OMakeroot
|
||||
# /foo/bar/OMakefile
|
||||
#
|
||||
# 結果:
|
||||
# OMakefile と同じディレクトリ以下に objects や images が生成されます。
|
||||
#
|
||||
# /foo/bar/objects/...
|
||||
# /foo/bar/images/..
|
||||
#
|
||||
#
|
||||
# b) ソースコードが sources 以下に配置される場合
|
||||
# 例:
|
||||
# /OMakeroot
|
||||
# /sources/foo/bar/OMakefile
|
||||
#
|
||||
# 結果:
|
||||
# ルートディレクトリ以下に objects や images が生成されます。
|
||||
#
|
||||
# /objects/foo/bar/...
|
||||
# /images/foo/bar/...
|
||||
#
|
||||
#
|
||||
|
||||
# ルート環境変数の取得
|
||||
public.HORIZON_ROOT =
|
||||
if $(defined-env HORIZON_ROOT)
|
||||
HORIZON_ROOT = $(absname $(getenv HORIZON_ROOT))
|
||||
export
|
||||
|
||||
if $(defined-env CTRSDK_ROOT)
|
||||
CTRSDK_ROOT = $(absname $(getenv CTRSDK_ROOT))
|
||||
if $(and $(defined-env HORIZON_ROOT), $(not $(equal $(HORIZON_ROOT), $(CTRSDK_ROOT))))
|
||||
eprintln(HORIZON_ROOT と CTRSDK_ROOT が一致しません。同じパスを設定するか、どちらか一方だけを定義して下さい。)
|
||||
exit(1)
|
||||
HORIZON_ROOT = $(CTRSDK_ROOT)
|
||||
export
|
||||
|
||||
if $(not $(HORIZON_ROOT))
|
||||
eprintln($"$$CTRSDK_ROOT が定義されていません")
|
||||
exit(1)
|
||||
|
||||
include $(HORIZON_ROOT)/build/omake/commondefs
|
||||
|
||||
DefineCommandVars()
|
||||
|
||||
.PHONY: all build clean clobber
|
||||
.PHONY: run run-scripts
|
||||
|
||||
#
|
||||
# OMakefile の読み込み
|
||||
#
|
||||
.SUBDIRS: .
|
||||
|
@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env omake
|
||||
|
||||
.SUBDIRS: ./banner
|
||||
|
||||
SUPPORTED_TARGETS = CTR-TS.Process.MPCore.fast
|
||||
|
||||
SOURCES[] =
|
||||
SHADER_SOURCES[] =
|
||||
SHADER_OBJECTS[] =
|
||||
|
||||
vmount(../sources, sources)
|
||||
|
||||
include ../libs.om
|
||||
include ../includes.om
|
||||
include ./Sources/sources.om
|
||||
|
||||
TARGET_PROGRAM = DummyTrialSystemUpdater_US
|
||||
TITLE = DummyTrialSystemUpdater_US
|
||||
|
||||
ROMFS_ROOT = ../Archive
|
||||
|
||||
TARGET_SHADER =
|
||||
SHBIN_INSTALL_ROOT =
|
||||
|
||||
ROM_SPEC_FILE = romspec.rsf
|
||||
CTR_BANNER = banner/banner.bnr
|
||||
CTR_ICON = banner/banner.icn
|
||||
CTR_APPTYPE = CARD
|
||||
|
||||
CCFLAGS_WARNING += --diag_suppress 1301
|
||||
|
||||
include $(ROOT_OMAKE)/modulerules
|
||||
build: $(DEFAULT_TARGETS)
|
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env omake
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
banner.bnr banner.icn:banner.bsf
|
||||
$(CTRSDK_ROOT)/tools/CommandLineTools/ctr_makebanner32.exe banner.bsf
|
||||
|
||||
.DEFAULT: banner.bnr banner.icn
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,21 @@
|
||||
BasicInfo:
|
||||
Title: $(TITLE)
|
||||
CompanyCode: "01"
|
||||
ProductCode: "CTR-E-ZADE"
|
||||
BackupMemoryType: None
|
||||
Logo: Nintendo
|
||||
MediaSize: 128MB
|
||||
|
||||
CardInfo:
|
||||
CardDevice: None
|
||||
|
||||
TitleInfo:
|
||||
UniqueId: 0x00685
|
||||
Version: 00
|
||||
|
||||
Rom:
|
||||
HostRoot: $(ROMFS_ROOT)
|
||||
SaveDataSize: 0KB
|
||||
|
||||
SystemControlInfo:
|
||||
StackSize: 65536
|
@ -0,0 +1,8 @@
|
||||
call ..\..\misc\_env_set.bat
|
||||
|
||||
rem === omakeのclean実行 ===
|
||||
echo *** clean ***
|
||||
omake clean BUILD=release
|
||||
|
||||
del /Q /S *.omc
|
||||
del /Q /S .omakedb*
|
@ -0,0 +1,19 @@
|
||||
#
|
||||
# このプロジェクト固有のincludeディレクトリを追加する
|
||||
#
|
||||
|
||||
# DCLのパス追加
|
||||
INCLUDES += $(DCL_ROOT)\include
|
||||
|
||||
# DGFのパス追加
|
||||
INCLUDES += $(DGF_ROOT)\include
|
||||
|
||||
# MessageStudioのincludeパス追加
|
||||
INCLUDES += $(MESSAGE_STUDIO)/libms/include
|
||||
|
||||
# NW4Cのincludeパス追加
|
||||
INCLUDES += $(NW4C_ROOT)/include
|
||||
|
||||
# soundのパス追加
|
||||
INCLUDES += .\Sources\sound\include
|
||||
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# 必要なライブラリを追加する
|
||||
#
|
||||
|
||||
# 最初にLIBFILESをクリア
|
||||
LIBFILES =
|
||||
|
||||
# DCLライブラリ追加
|
||||
LIBFILES += \
|
||||
$`(addprefix $(DCL_ROOT)/libraries$(DIRSEP)$(config.getTargetSubDirectory true)$(DIRSEP), libDCL) \
|
||||
|
||||
# DGFライブラリ追加
|
||||
LIBFILES += \
|
||||
$`(addprefix $(DGF_ROOT)/libraries$(DIRSEP)$(config.getTargetSubDirectory true)$(DIRSEP), libDGF) \
|
||||
|
||||
# NW4Cライブラリ追加
|
||||
LIBFILES += \
|
||||
$`(addprefix $(NW4C_ROOT)/libraries$(DIRSEP)$(config.getTargetSubDirectory true)$(DIRSEP), libnw_font) \
|
||||
$`(addprefix $(NW4C_ROOT)/libraries$(DIRSEP)$(config.getTargetSubDirectory true)$(DIRSEP), libnw_gfx) \
|
||||
$`(addprefix $(NW4C_ROOT)/libraries$(DIRSEP)$(config.getTargetSubDirectory true)$(DIRSEP), libnw_lyt) \
|
||||
$`(addprefix $(NW4C_ROOT)/libraries$(DIRSEP)$(config.getTargetSubDirectory true)$(DIRSEP), libnw_os) \
|
||||
$`(addprefix $(NW4C_ROOT)/libraries$(DIRSEP)$(config.getTargetSubDirectory true)$(DIRSEP), libnw_ut) \
|
||||
|
@ -0,0 +1,20 @@
|
||||
call ..\..\misc\_env_set.bat
|
||||
|
||||
rem === shaderコピー ===
|
||||
call misc\_cpNW4CShader.bat
|
||||
|
||||
rem === リソースビルド ===
|
||||
pushd resource
|
||||
call make_resource.bat
|
||||
popd
|
||||
|
||||
rem === ビルド開始 ===
|
||||
echo *** build ***
|
||||
omake BUILD=release
|
||||
if errorlevel==1 goto ERROR
|
||||
goto END
|
||||
|
||||
:ERROR
|
||||
pause
|
||||
|
||||
:END
|
@ -0,0 +1,9 @@
|
||||
echo off
|
||||
|
||||
echo === NW4C‚ÌShaderƒRƒs<C692>[ ===
|
||||
|
||||
copy /Y %NW4C_ROOT%\shaders\nwfont_TextWriterShader.shbin .\Archive\shaders
|
||||
copy /Y %NW4C_ROOT%\shaders\nwlyt_CCPaneShader.shbin .\Archive\shaders
|
||||
copy /Y %NW4C_ROOT%\shaders\nwlyt_ConstColorShader.shbin .\Archive\shaders
|
||||
copy /Y %NW4C_ROOT%\shaders\nwlyt_PaneShader.shbin .\Archive\shaders
|
||||
copy /Y %NW4C_ROOT%\shaders\nwfont_RectDrawerShader.shbin .\Archive\shaders
|
@ -0,0 +1,19 @@
|
||||
#
|
||||
# ここに圧縮を除外するファイル名を列挙する
|
||||
# ファイル名はワイルドカード可能
|
||||
#
|
||||
|
||||
# フォント
|
||||
*.bcfnt
|
||||
|
||||
# シェーダ
|
||||
*.shbin
|
||||
|
||||
# サウンド
|
||||
*.bcsar
|
||||
|
||||
# メッセージ
|
||||
*.msbt
|
||||
|
||||
# 圧縮ファイル
|
||||
*.l
|
Binary file not shown.
@ -0,0 +1,27 @@
|
||||
echo off
|
||||
|
||||
set LYTCNVAST=%DEN_TOOLS%\NW4CLytCnvAst.exe
|
||||
set LYTCNVOPT=-ob "--cvtr-ref-tex-only --omit-samekey --omit-samekey"
|
||||
|
||||
rem エラーチェック
|
||||
if exist %LYTCNVAST% goto CONV
|
||||
echo *** エラー ***
|
||||
echo %LYTCNVAST%がありません。
|
||||
echo svnから拾ってください。
|
||||
goto ERROR
|
||||
|
||||
rem 掃除
|
||||
del /Q ..\..\Archive\layout\*.arc
|
||||
|
||||
:CONV
|
||||
rem main
|
||||
%LYTCNVAST% -f $(LYTCNVOPT) .\main ..\..\Archive\layout
|
||||
if errorlevel==1 goto ERROR
|
||||
|
||||
goto END
|
||||
|
||||
:ERROR
|
||||
exit 1
|
||||
|
||||
:END
|
||||
exit 0
|
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<nw4c_layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.2.0" xmlns="http://www.nintendo.co.jp/NW4C/LayoutEditor">
|
||||
<head>
|
||||
<create user="hyogo" host="HYOGO-PC" date="2011-04-15T15:08:49.4100872+09:00" source="" />
|
||||
<title />
|
||||
<comment />
|
||||
<generator name="" version="1.0.0" />
|
||||
</head>
|
||||
<body>
|
||||
<animTag name="Fade_IN" startFrame="0" endFrame="10" animLoop="OneTime" fileName="Fade_IN">
|
||||
<comment>インアニメ</comment>
|
||||
</animTag>
|
||||
<animTag name="Fade_Out" startFrame="10" endFrame="20" animLoop="OneTime" fileName="Fade_Out">
|
||||
<comment>アウトアニメ</comment>
|
||||
</animTag>
|
||||
<lan animType="VertexColor" startFrame="0" endFrame="500" convertStartFrame="0" convertEndFrame="500">
|
||||
<animContent name="P_BG">
|
||||
<animVertexColorTarget target="PaneAlpha">
|
||||
<key xsi:type="HermiteU8" frame="0" value="0" slope="25.5" slopeType="Smooth" />
|
||||
<key xsi:type="HermiteU8" frame="10" value="255" slopeType="Smooth" />
|
||||
<key xsi:type="HermiteU8" frame="20" value="0" slope="-25.5" slopeType="Smooth" />
|
||||
</animVertexColorTarget>
|
||||
</animContent>
|
||||
</lan>
|
||||
</body>
|
||||
</nw4c_layout>
|
@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<nw4c_layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.2.0" xmlns="http://www.nintendo.co.jp/NW4C/LayoutEditor">
|
||||
<head>
|
||||
<create user="hyogo" host="HYOGO-PC" date="2011-04-15T15:08:49.3880859+09:00" source="" />
|
||||
<title />
|
||||
<comment />
|
||||
<generator name="NW4C LayoutEditor Core" version="2007_07_00_000" />
|
||||
</head>
|
||||
<body>
|
||||
<lyt>
|
||||
<paneSet>
|
||||
<pane kind="Picture" name="P_BG" alpha="0">
|
||||
<comment>下画面用背景</comment>
|
||||
<basePositionType x="Center" y="Center" />
|
||||
<translate x="0" y="0" z="0" />
|
||||
<rotate x="0" y="0" z="0" />
|
||||
<scale x="1" y="1" />
|
||||
<size x="320" y="240" />
|
||||
<picture>
|
||||
<vtxColLT r="255" g="255" b="255" a="255" />
|
||||
<vtxColRT r="255" g="255" b="255" a="255" />
|
||||
<vtxColLB r="236" g="230" b="226" a="255" />
|
||||
<vtxColRB r="236" g="230" b="226" a="255" />
|
||||
<texCoord>
|
||||
<texLT s="0" t="0" />
|
||||
<texRT s="-3" t="0" />
|
||||
<texLB s="0" t="1" />
|
||||
<texRB s="-3" t="1" />
|
||||
</texCoord>
|
||||
<material name="P_BG">
|
||||
<blackColor r="0" g="0" b="0" />
|
||||
<whiteColor r="255" g="255" b="255" />
|
||||
</material>
|
||||
<materialCtr name="P_BG">
|
||||
<tevColReg r="0" g="0" b="0" a="0" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevStage>
|
||||
<rgb mode="Replace" konst="K0" scale="V1">
|
||||
<arg source="Constant" op="Rgb" />
|
||||
<arg source="Constant" op="Rgb" />
|
||||
<arg source="Constant" op="Rgb" />
|
||||
</rgb>
|
||||
<alpha mode="Replace" konst="K0" scale="V1">
|
||||
<arg source="Constant" op="Alpha" />
|
||||
<arg source="Constant" op="Alpha" />
|
||||
<arg source="Constant" op="Alpha" />
|
||||
</alpha>
|
||||
</tevStage>
|
||||
<alphaCompare comp="Always" ref="0" />
|
||||
<blendMode type="None" />
|
||||
</materialCtr>
|
||||
</picture>
|
||||
<userData>
|
||||
<string name="__BasicUserDataString" />
|
||||
</userData>
|
||||
</pane>
|
||||
</paneSet>
|
||||
<paneHierarchy>
|
||||
<paneTree name="RootPane">
|
||||
<paneTree name="P_BG" />
|
||||
</paneTree>
|
||||
</paneHierarchy>
|
||||
<groupSet>
|
||||
<group name="RootGroup">
|
||||
<comment />
|
||||
</group>
|
||||
</groupSet>
|
||||
<screenSetting origin="Normal">
|
||||
<layoutSize x="320" y="240" />
|
||||
<backGround>
|
||||
<color r="169" g="169" b="169" a="255" />
|
||||
</backGround>
|
||||
<grid thickLineInterval="40" thinDivisionNum="4" visible="true" moveMethod="None">
|
||||
<color r="128" g="128" b="64" a="128" />
|
||||
</grid>
|
||||
</screenSetting>
|
||||
<fontFile path="..\..\..\font\font_out\cbf_std.bcfnt" />
|
||||
</lyt>
|
||||
</body>
|
||||
</nw4c_layout>
|
@ -0,0 +1,183 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<nw4c_layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.2.0" xmlns="http://www.nintendo.co.jp/NW4C/LayoutEditor">
|
||||
<head>
|
||||
<create user="hyogo" host="HYOGO-PC" date="2011-06-15T15:03:57.7182044+09:00" source="" />
|
||||
<title />
|
||||
<comment />
|
||||
<generator name="" version="1.0.0" />
|
||||
</head>
|
||||
<body>
|
||||
<animTag name="Fade_IN" startFrame="0" endFrame="10" animLoop="OneTime" fileName="Fade_IN">
|
||||
<comment>フェードインアニメ 白</comment>
|
||||
<group name="Grp_Fade" />
|
||||
</animTag>
|
||||
<animTag name="Fade_Out" startFrame="10" endFrame="20" animLoop="OneTime" fileName="Fade_Out">
|
||||
<comment>フェードアウトアニメ 白</comment>
|
||||
<group name="Grp_Fade" />
|
||||
</animTag>
|
||||
<animTag name="Fade_IN_Black" startFrame="60" endFrame="70" animLoop="OneTime" fileName="Fade_IN_Black">
|
||||
<comment>フェードインアニメ 黒</comment>
|
||||
<group name="Grp_Fade" />
|
||||
</animTag>
|
||||
<animTag name="Fade_Out_Black" startFrame="70" endFrame="80" animLoop="OneTime" fileName="Fade_Out_Black">
|
||||
<comment>フェードアウトアニメ 黒</comment>
|
||||
<group name="Grp_Fade" />
|
||||
</animTag>
|
||||
<animTag name="Fade_IN_BlackHarf" startFrame="100" endFrame="110" animLoop="OneTime" fileName="Fade_IN_BlackHarf">
|
||||
<comment>フェードインアニメ 黒 半透明</comment>
|
||||
<group name="Grp_Fade" />
|
||||
</animTag>
|
||||
<animTag name="Fade_Out_BlackHarf" startFrame="110" endFrame="120" animLoop="OneTime" fileName="Fade_Out_BlackHarf">
|
||||
<comment>フェードアウトアニメ 黒 半透明</comment>
|
||||
<group name="Grp_Fade" />
|
||||
</animTag>
|
||||
<animTag name="Fade_IN_BlackReset" startFrame="150" endFrame="180" animLoop="OneTime" fileName="Fade_IN_BlackReset">
|
||||
<comment>フェードインアニメ 黒 リセット用</comment>
|
||||
<group name="Grp_Fade" />
|
||||
</animTag>
|
||||
<animTag name="Fade_Out_BlackReset" startFrame="180" endFrame="210" animLoop="OneTime" fileName="Fade_Out_BlackReset">
|
||||
<comment>フェードアウトアニメ 黒 リセット用</comment>
|
||||
<group name="Grp_Fade" />
|
||||
</animTag>
|
||||
<animTag name="Fade_IN_Mask" startFrame="0" endFrame="5" animLoop="OneTime" fileName="Fade_IN_Mask" outputPaneSRT="false" outputMaterialColor="false" outputTextureSRT="false" outputTexturePattern="false" outputIndTextureSRT="false">
|
||||
<comment>タイトル選択下画面のスクロール時に表示するマスク
|
||||
|
||||
加速時のアニメ
|
||||
|
||||
※癲癇防止のため</comment>
|
||||
<group name="Grp_ScrollMask" />
|
||||
</animTag>
|
||||
<animTag name="Base_Mask" startFrame="5" endFrame="6" animLoop="OneTime" fileName="Base_Mask" outputPaneSRT="false" outputMaterialColor="false" outputTextureSRT="false" outputTexturePattern="false" outputIndTextureSRT="false">
|
||||
<comment>タイトル選択下画面のスクロール時に表示するマスク
|
||||
|
||||
スクロール時の最高速度が持続している時のマスク</comment>
|
||||
<group name="Grp_ScrollMask" />
|
||||
</animTag>
|
||||
<animTag name="Fade_Out_Mask" startFrame="10" endFrame="15" animLoop="OneTime" fileName="Fade_Out_Mask" outputPaneSRT="false" outputMaterialColor="false" outputTextureSRT="false" outputTexturePattern="false" outputIndTextureSRT="false">
|
||||
<comment>タイトル選択下画面のスクロール時に表示するマスク
|
||||
|
||||
減速時のアニメ
|
||||
|
||||
※癲癇防止のため</comment>
|
||||
<group name="Grp_ScrollMask" />
|
||||
</animTag>
|
||||
<lan animType="MaterialColor" startFrame="0" endFrame="200" convertStartFrame="0" convertEndFrame="200">
|
||||
<animContent name="P_Fade">
|
||||
<animMaterialColorTarget target="WhiteColor_r">
|
||||
<key xsi:type="HermiteU8" frame="0" value="255" slopeType="Step" />
|
||||
<key xsi:type="HermiteU8" frame="50" value="255" slopeType="Step" />
|
||||
<key xsi:type="HermiteU8" frame="50" value="0" slopeType="Step" />
|
||||
<key xsi:type="HermiteU8" frame="50" value="0" slopeType="Step" />
|
||||
</animMaterialColorTarget>
|
||||
<animMaterialColorTarget target="WhiteColor_g">
|
||||
<key xsi:type="HermiteU8" frame="0" value="255" slopeType="Step" />
|
||||
<key xsi:type="HermiteU8" frame="50" value="255" slopeType="Step" />
|
||||
<key xsi:type="HermiteU8" frame="50" value="0" slopeType="Step" />
|
||||
<key xsi:type="HermiteU8" frame="50" value="0" slopeType="Step" />
|
||||
</animMaterialColorTarget>
|
||||
<animMaterialColorTarget target="WhiteColor_b">
|
||||
<key xsi:type="HermiteU8" frame="0" value="255" slopeType="Step" />
|
||||
<key xsi:type="HermiteU8" frame="50" value="255" slopeType="Step" />
|
||||
<key xsi:type="HermiteU8" frame="50" value="0" slopeType="Step" />
|
||||
<key xsi:type="HermiteU8" frame="50" value="0" slopeType="Step" />
|
||||
</animMaterialColorTarget>
|
||||
</animContent>
|
||||
<animContent name="P_Fade">
|
||||
<animMaterialColorTarget target="TevKonst0_r">
|
||||
<key xsi:type="HermiteU8" frame="0" value="255" slopeType="Step" />
|
||||
<key xsi:type="HermiteU8" frame="50" value="255" slopeType="Step" />
|
||||
<key xsi:type="HermiteU8" frame="50" value="0" slopeType="Step" />
|
||||
<key xsi:type="HermiteU8" frame="50" value="0" slopeType="Step" />
|
||||
</animMaterialColorTarget>
|
||||
<animMaterialColorTarget target="TevKonst0_g">
|
||||
<key xsi:type="HermiteU8" frame="0" value="255" slopeType="Step" />
|
||||
<key xsi:type="HermiteU8" frame="50" value="255" slopeType="Step" />
|
||||
<key xsi:type="HermiteU8" frame="50" value="0" slopeType="Step" />
|
||||
<key xsi:type="HermiteU8" frame="50" value="0" slopeType="Step" />
|
||||
</animMaterialColorTarget>
|
||||
<animMaterialColorTarget target="TevKonst0_b">
|
||||
<key xsi:type="HermiteU8" frame="0" value="255" slopeType="Step" />
|
||||
<key xsi:type="HermiteU8" frame="50" value="255" slopeType="Step" />
|
||||
<key xsi:type="HermiteU8" frame="50" value="0" slopeType="Step" />
|
||||
<key xsi:type="HermiteU8" frame="50" value="0" slopeType="Step" />
|
||||
</animMaterialColorTarget>
|
||||
</animContent>
|
||||
</lan>
|
||||
<lan animType="VertexColor" startFrame="0" endFrame="200" convertStartFrame="0" convertEndFrame="200">
|
||||
<animContent name="P_Fade">
|
||||
<animVertexColorTarget target="PaneAlpha">
|
||||
<key xsi:type="HermiteU8" frame="0" value="0" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="0" value="0" slope="25.5" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="10" value="255" slope="25.5" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="10" value="255" slope="-25.5" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="20" value="0" slope="-25.5" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="20" value="0" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="60" value="0" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="60" value="0" slope="25.5" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="70" value="255" slope="25.5" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="70" value="255" slope="-25.5" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="80" value="0" slope="-25.5" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="80" value="0" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="99" value="0" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="99" value="0" slope="11.636364" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="110" value="128" slope="11.636364" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="110" value="128" slope="-12.8" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="120" value="0" slope="-12.8" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="120" value="0" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="150" value="0" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="150" value="0" slope="8.5" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="180" value="255" slope="8.5" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="180" value="255" slope="-8.5" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="210" value="0" slope="-8.5" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="210" value="0" slopeType="Linear" />
|
||||
</animVertexColorTarget>
|
||||
</animContent>
|
||||
<animContent name="P_Scroll_Mask">
|
||||
<animVertexColorTarget target="PaneAlpha">
|
||||
<key xsi:type="HermiteU8" frame="0" value="0" />
|
||||
<key xsi:type="HermiteU8" frame="0" value="0" slope="36.2511864" />
|
||||
<key xsi:type="HermiteU8" frame="5" value="64" slope="0.7429974" />
|
||||
<key xsi:type="HermiteU8" frame="5" value="64" />
|
||||
<key xsi:type="HermiteU8" frame="10" value="64" />
|
||||
<key xsi:type="HermiteU8" frame="10" value="64" slope="-35.96067" />
|
||||
<key xsi:type="HermiteU8" frame="15" value="0" slope="-0.1950645" />
|
||||
<key xsi:type="HermiteU8" frame="15" value="0" slope="-12.8" />
|
||||
</animVertexColorTarget>
|
||||
</animContent>
|
||||
</lan>
|
||||
<lan animType="TextureSRT" startFrame="0" endFrame="200" convertStartFrame="0" convertEndFrame="200">
|
||||
<animContent name="P_Fade">
|
||||
<animTexSRTTarget id="1" target="TranslateS">
|
||||
<key frame="0" value="0" slopeType="Smooth" />
|
||||
</animTexSRTTarget>
|
||||
<animTexSRTTarget id="1" target="TranslateT">
|
||||
<key frame="0" value="0" slopeType="Smooth" />
|
||||
</animTexSRTTarget>
|
||||
<animTexSRTTarget id="1" target="ScaleS">
|
||||
<key frame="0" value="1" slopeType="Smooth" />
|
||||
</animTexSRTTarget>
|
||||
<animTexSRTTarget id="1" target="ScaleT">
|
||||
<key frame="0" value="1" slopeType="Smooth" />
|
||||
</animTexSRTTarget>
|
||||
<animTexSRTTarget id="1" target="Rotate">
|
||||
<key frame="0" value="0" slopeType="Smooth" />
|
||||
</animTexSRTTarget>
|
||||
<animTexSRTTarget id="2" target="TranslateS">
|
||||
<key frame="0" value="0" slopeType="Smooth" />
|
||||
</animTexSRTTarget>
|
||||
<animTexSRTTarget id="2" target="TranslateT">
|
||||
<key frame="0" value="0" slopeType="Smooth" />
|
||||
</animTexSRTTarget>
|
||||
<animTexSRTTarget id="2" target="ScaleS">
|
||||
<key frame="0" value="1" slopeType="Smooth" />
|
||||
</animTexSRTTarget>
|
||||
<animTexSRTTarget id="2" target="ScaleT">
|
||||
<key frame="0" value="1" slopeType="Smooth" />
|
||||
</animTexSRTTarget>
|
||||
<animTexSRTTarget id="2" target="Rotate">
|
||||
<key frame="0" value="0" slopeType="Smooth" />
|
||||
</animTexSRTTarget>
|
||||
</animContent>
|
||||
</lan>
|
||||
</body>
|
||||
</nw4c_layout>
|
@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<nw4c_layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.2.0" xmlns="http://www.nintendo.co.jp/NW4C/LayoutEditor">
|
||||
<head>
|
||||
<create user="hyogo" host="HYOGO-PC" date="2011-06-15T15:03:57.7026044+09:00" source="" />
|
||||
<title />
|
||||
<comment />
|
||||
<generator name="NW4C LayoutEditor Core" version="2007_07_00_000" />
|
||||
</head>
|
||||
<body>
|
||||
<lyt>
|
||||
<paneSet>
|
||||
<pane kind="Picture" name="P_Fade" alpha="0">
|
||||
<comment>フェード用板</comment>
|
||||
<basePositionType x="Center" y="Center" />
|
||||
<translate x="-0" y="-0" z="0" />
|
||||
<rotate x="0" y="0" z="0" />
|
||||
<scale x="1" y="1" />
|
||||
<size x="400" y="240" />
|
||||
<picture>
|
||||
<vtxColLT r="255" g="255" b="255" a="255" />
|
||||
<vtxColRT r="255" g="255" b="255" a="255" />
|
||||
<vtxColLB r="255" g="255" b="255" a="255" />
|
||||
<vtxColRB r="255" g="255" b="255" a="255" />
|
||||
<texCoord>
|
||||
<texLT s="0" t="0" />
|
||||
<texRT s="1" t="0" />
|
||||
<texLB s="0" t="1" />
|
||||
<texRB s="1" t="1" />
|
||||
</texCoord>
|
||||
<material name="P_Fade">
|
||||
<blackColor r="0" g="0" b="0" />
|
||||
<whiteColor r="255" g="255" b="255" />
|
||||
<texMap imageName="White" wrap_s="Clamp" wrap_t="Clamp" />
|
||||
<texMatrix rotate="0">
|
||||
<scale x="1" y="1" />
|
||||
<translate x="0" y="0" />
|
||||
</texMatrix>
|
||||
<texCoordGen srcParam="Tex0" />
|
||||
<textureStage texMap="0" />
|
||||
<texBlendRatio color="255" />
|
||||
</material>
|
||||
<materialCtr name="P_Fade">
|
||||
<tevColReg r="0" g="0" b="0" a="0" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<texMap imageName="White" wrap_s="Clamp" wrap_t="Clamp" />
|
||||
<texMatrix rotate="0">
|
||||
<scale x="1" y="1" />
|
||||
<translate x="0" y="0" />
|
||||
</texMatrix>
|
||||
<texCoordGen srcParam="Tex0" />
|
||||
<tevStage>
|
||||
<rgb mode="Replace" konst="K0" scale="V1">
|
||||
<arg source="Constant" op="Rgb" />
|
||||
<arg source="Constant" op="Rgb" />
|
||||
<arg source="Constant" op="Rgb" />
|
||||
</rgb>
|
||||
<alpha mode="Replace" konst="K0" scale="V1">
|
||||
<arg source="Constant" op="Alpha" />
|
||||
<arg source="Constant" op="Alpha" />
|
||||
<arg source="Constant" op="Alpha" />
|
||||
</alpha>
|
||||
</tevStage>
|
||||
<alphaCompare comp="Always" ref="0" />
|
||||
<blendMode type="None" />
|
||||
</materialCtr>
|
||||
</picture>
|
||||
<userData>
|
||||
<string name="__BasicUserDataString" />
|
||||
</userData>
|
||||
</pane>
|
||||
<pane kind="Picture" name="P_Scroll_Mask" alpha="0">
|
||||
<comment>タイトル選択スクロール時のマスク</comment>
|
||||
<basePositionType x="Center" y="Center" />
|
||||
<translate x="-0" y="-0" z="0" />
|
||||
<rotate x="0" y="0" z="0" />
|
||||
<scale x="1" y="1" />
|
||||
<size x="400" y="240" />
|
||||
<picture>
|
||||
<vtxColLT r="0" g="0" b="0" a="255" />
|
||||
<vtxColRT r="0" g="0" b="0" a="255" />
|
||||
<vtxColLB r="0" g="0" b="0" a="255" />
|
||||
<vtxColRB r="0" g="0" b="0" a="255" />
|
||||
<texCoord>
|
||||
<texLT s="0" t="0" />
|
||||
<texRT s="1" t="0" />
|
||||
<texLB s="0" t="1" />
|
||||
<texRB s="1" t="1" />
|
||||
</texCoord>
|
||||
<material name="P_Scroll_Mask">
|
||||
<blackColor r="0" g="0" b="0" />
|
||||
<whiteColor r="255" g="255" b="255" />
|
||||
<texMap imageName="White" wrap_s="Clamp" wrap_t="Clamp" />
|
||||
<texMatrix rotate="0">
|
||||
<scale x="1" y="1" />
|
||||
<translate x="0" y="0" />
|
||||
</texMatrix>
|
||||
<texCoordGen srcParam="Tex0" />
|
||||
<textureStage texMap="0" />
|
||||
<texBlendRatio color="255" />
|
||||
</material>
|
||||
<materialCtr name="P_Scroll_Mask">
|
||||
<tevColReg r="0" g="0" b="0" a="0" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<texMap imageName="White" wrap_s="Clamp" wrap_t="Clamp" />
|
||||
<texMatrix rotate="0">
|
||||
<scale x="1" y="1" />
|
||||
<translate x="0" y="0" />
|
||||
</texMatrix>
|
||||
<texCoordGen srcParam="Tex0" />
|
||||
<tevStage>
|
||||
<rgb mode="Replace" konst="K0" scale="V1">
|
||||
<arg source="Constant" op="Rgb" />
|
||||
<arg source="Constant" op="Rgb" />
|
||||
<arg source="Constant" op="Rgb" />
|
||||
</rgb>
|
||||
<alpha mode="Replace" konst="K0" scale="V1">
|
||||
<arg source="Constant" op="Alpha" />
|
||||
<arg source="Constant" op="Alpha" />
|
||||
<arg source="Constant" op="Alpha" />
|
||||
</alpha>
|
||||
</tevStage>
|
||||
<alphaCompare comp="Always" ref="0" />
|
||||
<blendMode type="None" />
|
||||
</materialCtr>
|
||||
</picture>
|
||||
<userData>
|
||||
<string name="__BasicUserDataString" />
|
||||
</userData>
|
||||
</pane>
|
||||
</paneSet>
|
||||
<paneHierarchy>
|
||||
<paneTree name="RootPane">
|
||||
<paneTree name="P_Fade" />
|
||||
<paneTree name="P_Scroll_Mask" />
|
||||
</paneTree>
|
||||
</paneHierarchy>
|
||||
<groupSet>
|
||||
<group name="RootGroup">
|
||||
<group name="Grp_Fade">
|
||||
<paneRef name="P_Fade" />
|
||||
<comment />
|
||||
</group>
|
||||
<group name="Grp_ScrollMask">
|
||||
<paneRef name="P_Scroll_Mask" />
|
||||
<comment />
|
||||
</group>
|
||||
<comment />
|
||||
</group>
|
||||
</groupSet>
|
||||
<screenSetting origin="Normal">
|
||||
<layoutSize x="400" y="240" />
|
||||
<backGround>
|
||||
<color r="169" g="169" b="169" a="255" />
|
||||
</backGround>
|
||||
<grid thickLineInterval="40" thinDivisionNum="4" visible="true" moveMethod="None">
|
||||
<color r="128" g="128" b="64" a="128" />
|
||||
</grid>
|
||||
</screenSetting>
|
||||
<textureFile imagePath="..\tga_out\White.TGA" format="L4" />
|
||||
</lyt>
|
||||
</body>
|
||||
</nw4c_layout>
|
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<nw4c_layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.2.0" xmlns="http://www.nintendo.co.jp/NW4C/LayoutEditor">
|
||||
<head>
|
||||
<create user="kaneko" host="KANEKO-PC" date="2014-09-24T11:22:03.8107758+09:00" source="" />
|
||||
<title />
|
||||
<comment />
|
||||
<generator name="" version="1.0.0" />
|
||||
</head>
|
||||
<body>
|
||||
<animTag name="3DS_Logo" startFrame="0" endFrame="1" fileName="3DS_Logo">
|
||||
<comment>3DSロゴの表示
|
||||
|
||||
※ムービーデータ読込み時に表示します</comment>
|
||||
<group name="Grp_Logo" />
|
||||
</animTag>
|
||||
<animTag name="Fade" startFrame="200" endFrame="220" animLoop="OneTime" fileName="Fade">
|
||||
<comment>ロゴから動画への切り替えアニメ
|
||||
|
||||
※動画からロゴへは逆再生でお願いします
|
||||
</comment>
|
||||
<group name="Grp_Logo" />
|
||||
</animTag>
|
||||
<animTag name="Fade_IN" startFrame="300" endFrame="320" animLoop="OneTime" fileName="Fade_IN">
|
||||
<comment>待機画面へ戻ってきた時の、fフェードアニメ</comment>
|
||||
<group name="Grp_Logo" />
|
||||
</animTag>
|
||||
<lan animType="VertexColor" startFrame="0" endFrame="400" convertStartFrame="0" convertEndFrame="400">
|
||||
<animContent name="N_logo">
|
||||
<animVertexColorTarget target="PaneAlpha">
|
||||
<key xsi:type="HermiteU8" frame="200" value="255" slope="-12.75" slopeType="Smooth" />
|
||||
<key xsi:type="HermiteU8" frame="220" value="0" slope="-12.75" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="220" value="0" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="300" value="0" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="300" value="0" slope="12.75" slopeType="Linear" />
|
||||
<key xsi:type="HermiteU8" frame="320" value="255" slope="12.75" slopeType="Linear" />
|
||||
</animVertexColorTarget>
|
||||
</animContent>
|
||||
</lan>
|
||||
</body>
|
||||
</nw4c_layout>
|
@ -0,0 +1,168 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<nw4c_layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.2.0" xmlns="http://www.nintendo.co.jp/NW4C/LayoutEditor">
|
||||
<head>
|
||||
<create user="kaneko" host="KANEKO-PC" date="2014-09-24T11:22:03.7907757+09:00" source="" />
|
||||
<title />
|
||||
<comment />
|
||||
<generator name="NW4C LayoutEditor Core" version="2007_07_00_000" />
|
||||
</head>
|
||||
<body>
|
||||
<lyt>
|
||||
<paneSet>
|
||||
<pane kind="Null" name="N_logo" influencedAlpha="true">
|
||||
<comment />
|
||||
<basePositionType x="Center" y="Center" />
|
||||
<translate x="-1E-07" y="3" z="0" />
|
||||
<rotate x="0" y="0" z="0" />
|
||||
<scale x="1" y="1" />
|
||||
<size x="30" y="40" />
|
||||
<userData>
|
||||
<string name="__BasicUserDataString" />
|
||||
</userData>
|
||||
</pane>
|
||||
<pane kind="Picture" name="P_BG">
|
||||
<comment />
|
||||
<basePositionType x="Center" y="Center" />
|
||||
<translate x="1E-07" y="-3" z="0" />
|
||||
<rotate x="0" y="0" z="0" />
|
||||
<scale x="1" y="1" />
|
||||
<size x="400" y="240" />
|
||||
<picture>
|
||||
<vtxColLT r="255" g="255" b="255" a="255" />
|
||||
<vtxColRT r="255" g="255" b="255" a="255" />
|
||||
<vtxColLB r="255" g="255" b="255" a="255" />
|
||||
<vtxColRB r="255" g="255" b="255" a="255" />
|
||||
<texCoord>
|
||||
<texLT s="0" t="0" />
|
||||
<texRT s="1" t="0" />
|
||||
<texLB s="0" t="1" />
|
||||
<texRB s="1" t="1" />
|
||||
</texCoord>
|
||||
<material name="P_BG">
|
||||
<blackColor r="0" g="0" b="0" />
|
||||
<whiteColor r="255" g="255" b="255" />
|
||||
</material>
|
||||
<materialCtr name="P_BG">
|
||||
<tevColReg r="0" g="0" b="0" a="0" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevStage>
|
||||
<rgb mode="Replace" konst="K0" scale="V1">
|
||||
<arg source="Constant" op="Rgb" />
|
||||
<arg source="Constant" op="Rgb" />
|
||||
<arg source="Constant" op="Rgb" />
|
||||
</rgb>
|
||||
<alpha mode="Replace" konst="K0" scale="V1">
|
||||
<arg source="Constant" op="Alpha" />
|
||||
<arg source="Constant" op="Alpha" />
|
||||
<arg source="Constant" op="Alpha" />
|
||||
</alpha>
|
||||
</tevStage>
|
||||
<alphaCompare comp="Always" ref="0" />
|
||||
<blendMode type="None" />
|
||||
</materialCtr>
|
||||
</picture>
|
||||
<userData>
|
||||
<string name="__BasicUserDataString" />
|
||||
</userData>
|
||||
</pane>
|
||||
<pane kind="Picture" name="P_LogoNinL_00">
|
||||
<comment />
|
||||
<basePositionType x="Center" y="Center" />
|
||||
<translate x="1E-07" y="-3" z="0" />
|
||||
<rotate x="0" y="0" z="0" />
|
||||
<scale x="0.7" y="0.7" />
|
||||
<size x="376" y="104" />
|
||||
<picture>
|
||||
<vtxColLT r="255" g="255" b="255" a="255" />
|
||||
<vtxColRT r="255" g="255" b="255" a="255" />
|
||||
<vtxColLB r="255" g="255" b="255" a="255" />
|
||||
<vtxColRB r="255" g="255" b="255" a="255" />
|
||||
<texCoord>
|
||||
<texLT s="0" t="0" />
|
||||
<texRT s="1" t="0" />
|
||||
<texLB s="0" t="1" />
|
||||
<texRB s="1" t="1" />
|
||||
</texCoord>
|
||||
<material name="P_LogoNinL_00">
|
||||
<blackColor r="140" g="140" b="140" />
|
||||
<whiteColor r="255" g="255" b="255" />
|
||||
<texMap imageName="Nintendo_LogoSizeL" wrap_s="Clamp" wrap_t="Clamp" />
|
||||
<texMatrix rotate="0">
|
||||
<scale x="1" y="1" />
|
||||
<translate x="0" y="0" />
|
||||
</texMatrix>
|
||||
<texCoordGen srcParam="Tex0" />
|
||||
<textureStage texMap="0" />
|
||||
<texBlendRatio color="255" />
|
||||
</material>
|
||||
<materialCtr name="P_LogoNinL_00">
|
||||
<tevColReg r="140" g="140" b="140" a="0" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<tevConstReg r="255" g="255" b="255" a="255" />
|
||||
<texMap imageName="Nintendo_LogoSizeL" wrap_s="Clamp" wrap_t="Clamp" />
|
||||
<texMatrix rotate="0">
|
||||
<scale x="1" y="1" />
|
||||
<translate x="0" y="0" />
|
||||
</texMatrix>
|
||||
<texCoordGen srcParam="Tex0" />
|
||||
<tevStage>
|
||||
<rgb mode="Replace" konst="K0" scale="V1">
|
||||
<arg source="Constant" op="Rgb" />
|
||||
<arg source="Constant" op="Rgb" />
|
||||
<arg source="Constant" op="Rgb" />
|
||||
</rgb>
|
||||
<alpha mode="Replace" konst="K0" scale="V1">
|
||||
<arg source="Constant" op="Alpha" />
|
||||
<arg source="Constant" op="Alpha" />
|
||||
<arg source="Constant" op="Alpha" />
|
||||
</alpha>
|
||||
</tevStage>
|
||||
<alphaCompare comp="Always" ref="0" />
|
||||
<blendMode type="None" />
|
||||
</materialCtr>
|
||||
</picture>
|
||||
<userData>
|
||||
<string name="__BasicUserDataString" />
|
||||
</userData>
|
||||
</pane>
|
||||
</paneSet>
|
||||
<paneHierarchy>
|
||||
<paneTree name="RootPane">
|
||||
<paneTree name="N_logo">
|
||||
<paneTree name="P_BG" />
|
||||
<paneTree name="P_LogoNinL_00" />
|
||||
</paneTree>
|
||||
</paneTree>
|
||||
</paneHierarchy>
|
||||
<groupSet>
|
||||
<group name="RootGroup">
|
||||
<group name="Grp_Logo">
|
||||
<paneRef name="N_logo" />
|
||||
<paneRef name="P_BG" />
|
||||
<comment />
|
||||
</group>
|
||||
<comment />
|
||||
</group>
|
||||
</groupSet>
|
||||
<screenSetting origin="Normal" transferPosition="Upper">
|
||||
<layoutSize x="400" y="240" />
|
||||
<backGround>
|
||||
<color r="169" g="169" b="169" a="255" />
|
||||
</backGround>
|
||||
<grid thickLineInterval="40" thinDivisionNum="4" visible="true" moveMethod="None">
|
||||
<color r="128" g="128" b="64" a="128" />
|
||||
</grid>
|
||||
</screenSetting>
|
||||
<textureFile imagePath="..\tga_out\Nintendo_LogoSizeL.tga" format="A8" />
|
||||
</lyt>
|
||||
</body>
|
||||
</nw4c_layout>
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,29 @@
|
||||
call ..\..\..\misc\_env_set.bat
|
||||
|
||||
rem Archive内のデータ削除
|
||||
%DEN_TOOLS%\delex.exe ..\Archive\*.*.l -n
|
||||
%DEN_TOOLS%\delex.exe ..\Archive\layout\*.arc -n
|
||||
|
||||
rem レイアウトデータコンバート
|
||||
pushd .\layout
|
||||
cmd /c cnv_layout.bat
|
||||
set ERR=%errorlevel%
|
||||
popd
|
||||
if %ERR%==1 goto ERROR
|
||||
|
||||
rem 圧縮
|
||||
rem (*)..\Archive以下のファイルで、compressRejectList.txtに書かれている
|
||||
rem ファイル以外を圧縮する
|
||||
echo ファイル圧縮用バッチ生成中...
|
||||
%DEN_TOOLS%\cxcmpAst.exe %CTRSDK_ROOT%\tools\CommandLineTools\ctr_compress32.exe -r compressRejectList.txt -d -f ..\Archive -n > _cmp.bat
|
||||
if errorlevel==1 goto ERROR
|
||||
|
||||
echo 圧縮中..
|
||||
call _cmp.bat
|
||||
if errorlevel == 0 goto END
|
||||
|
||||
:ERROR
|
||||
echo *** エラーが発生しました ***
|
||||
pause
|
||||
|
||||
:END
|
@ -0,0 +1,148 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file common_app.h
|
||||
// @brief 共通設定
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
#if !defined __COMMON_APP__
|
||||
#define __COMMON_APP__
|
||||
|
||||
//-----------------------------------------------------
|
||||
// include
|
||||
//-----------------------------------------------------
|
||||
|
||||
#include <nn/version.h>
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Define
|
||||
//-----------------------------------------------------
|
||||
|
||||
// メモリサイズ
|
||||
// ****************************************************
|
||||
|
||||
// for GX
|
||||
#define COMMON_APP_MEM_GX_FCRAM ( 1024 * 1024 * 6 ) // GXで使うFCRAMのサイズ
|
||||
|
||||
// for NW4C
|
||||
#define COMMON_APP_MEM_NW4C ( 1024 * 1024 * 2 ) // NW4Cのレイアウトで使うサイズ
|
||||
#define COMMON_APP_MEM_NW4C_DEVICE ( 1024 * 32 ) // NW4Cのレイアウトで使うデバイスメモリのサイズ
|
||||
|
||||
// for command list
|
||||
#define COMMON_APP_BUFSIZE_CMDLIST ( 0x20000 ) // コマンドリスト用バッファサイズ
|
||||
#define COMMON_APP_REQCNT_CMDLIST ( 16 ) // コマンドリストのリクエスト数
|
||||
|
||||
// for file system
|
||||
#define COMMON_APP_SETTING_FILESYSTEM_WORKBUF_SIZE ( 1024 * 200 ) // ファイル展開用バッファサイズ
|
||||
#define COMMON_APP_SETTING_FILESYSTEM_SLOT_NUM ( 10 ) // ファイルシステムで予約できるファイル数
|
||||
|
||||
// for res manager
|
||||
#define COMMON_APP_SETTING_RESMANAGER_WORKBUF_DEV_SIZE ( 1024 * 64 )
|
||||
#define COMMON_APP_SETTING_RESMANAGER_WORKBUF_MAIN_SIZE ( 1024 * 32 )
|
||||
|
||||
// for sound
|
||||
#define COMMON_APP_SETTING_SOUND_WORKBUF_SIZE ( 1024 * 800 ) // サウンド用ヒープ
|
||||
|
||||
#if defined(NN_BUILD_DEBUG) && defined(ENABLE_DEBUG_COMMAND)
|
||||
#define COMMON_APP_SCREENSHOT_BUFSIZE ( 1024 * 1024 )
|
||||
#else
|
||||
#define COMMON_APP_SCREENSHOT_BUFSIZE ( 0 )
|
||||
#endif
|
||||
|
||||
// for other
|
||||
#define COMMON_APP_VIEW_BUFSIZE ( 1024 * 1024 * 6 ) // add take
|
||||
#define COMMON_APP_SETTING_SCENEINSTANE_BUFSIZE ( 1024 * 64 )
|
||||
|
||||
// for Debug
|
||||
#if defined ENABLE_DEBUG_COMMAND
|
||||
#define COMMON_APP_DEBUG_MEM_SIZE ( 1024 * 256 )
|
||||
#else
|
||||
#define COMMON_APP_DEBUG_MEM_SIZE ( 1024 * 256 )
|
||||
#endif
|
||||
|
||||
// スタックブロックサイズ
|
||||
#define COMMON_APP_STACK_BLOCKSIZE ( 4096 * 32 ) // add take
|
||||
|
||||
// system base
|
||||
// (!)上のメモリ量から計算
|
||||
#define COMMON_APP_MEM_GLOBALHEAP ( \
|
||||
COMMON_APP_MEM_NW4C + \
|
||||
COMMON_APP_SETTING_FILESYSTEM_WORKBUF_SIZE + \
|
||||
COMMON_APP_SETTING_RESMANAGER_WORKBUF_MAIN_SIZE + \
|
||||
COMMON_APP_SETTING_SOUND_WORKBUF_SIZE + \
|
||||
COMMON_APP_VIEW_BUFSIZE + \
|
||||
COMMON_APP_SETTING_SCENEINSTANE_BUFSIZE + \
|
||||
COMMON_APP_DEBUG_MEM_SIZE + \
|
||||
COMMON_APP_SCREENSHOT_BUFSIZE \
|
||||
) // グローバルヒープ用サイズ
|
||||
|
||||
|
||||
// アライメント
|
||||
// ****************************************************
|
||||
|
||||
// レイアウトアーカイブ内のファイル配置アライメント
|
||||
#define COMMON_APP_LYTARC_ALIGN ( 128 )
|
||||
|
||||
// カメラ設定関連
|
||||
// ****************************************************
|
||||
|
||||
// 透視投影変換
|
||||
#define COMMON_APP_CAMSET_PRS_NEAR ( 0.05f )
|
||||
#define COMMON_APP_CAMSET_PRS_FAR ( 10000.0f )
|
||||
#define COMMON_APP_CAMSET_PRS_FOVY ( 45.0f )
|
||||
#define COMMON_APP_CAMSET_PRS_ASPECT ( 400.0f / 240.0f )
|
||||
#define COMMON_APP_CAMSET_PRS_STEREO_DEPTHLEVEL ( 289.71f )
|
||||
#define COMMON_APP_CAMSET_PRS_STEREO_FACTOR ( 1.0f )
|
||||
#define COMMON_APP_CAMSET_PRS_CAMPOS_X ( 0.0f )
|
||||
#define COMMON_APP_CAMSET_PRS_CAMPOS_Y ( 0.0f )
|
||||
#define COMMON_APP_CAMSET_PRS_CAMPOS_Z ( COMMON_APP_CAMSET_PRS_STEREO_DEPTHLEVEL )
|
||||
#define COMMON_APP_CAMSET_PRS_CAMLOOK_X ( 0.0f )
|
||||
#define COMMON_APP_CAMSET_PRS_CAMLOOK_Y ( 0.0f )
|
||||
#define COMMON_APP_CAMSET_PRS_CAMLOOK_Z ( COMMON_APP_CAMSET_PRS_CAMPOS_Z - COMMON_APP_CAMSET_PRS_STEREO_DEPTHLEVEL )
|
||||
|
||||
// 正射影
|
||||
#define COMMON_APP_CAMSET_ORT_NEAR ( -100.0f )
|
||||
#define COMMON_APP_CAMSET_ORT_FAR ( 500.0f )
|
||||
#define COMMON_APP_CAMSET_ORT_STEREO_DEPTHLEVEL ( 120.0f )
|
||||
#define COMMON_APP_CAMSET_ORT_STEREO_FACTOR ( 1.0f )
|
||||
#define COMMON_APP_CAMSET_ORT_CAMPOS_X ( 0.0f )
|
||||
#define COMMON_APP_CAMSET_ORT_CAMPOS_Y ( 0.0f )
|
||||
#define COMMON_APP_CAMSET_ORT_CAMPOS_Z ( COMMON_APP_CAMSET_ORT_STEREO_DEPTHLEVEL )
|
||||
#define COMMON_APP_CAMSET_ORT_CAMLOOK_X ( 0.0f )
|
||||
#define COMMON_APP_CAMSET_ORT_CAMLOOK_Y ( 0.0f )
|
||||
#define COMMON_APP_CAMSET_ORT_CAMLOOK_Z ( 0.0f )
|
||||
|
||||
// 操作に関係するもの
|
||||
// ****************************************************
|
||||
|
||||
#define COMMON_APP_PAD_REPEAT_START ( 30 ) // パッドのリピート開始フレーム
|
||||
#define COMMON_APP_PAD_REPEAT_TICK ( 5 ) // パッドのリピート間隔フレーム
|
||||
#define COMMON_APP_TOUCHPANEL_REPEAT_START ( 30 ) // タッチパネルのリピート開始フレーム
|
||||
#define COMMON_APP_TOUCHPANEL_REPEAT_TICK ( 10 ) // タッチパネルのリピート間隔フレーム
|
||||
|
||||
// ファイル関連
|
||||
// ****************************************************
|
||||
|
||||
// フォントインデックス
|
||||
enum
|
||||
{
|
||||
COMMON_APP_FONTIDX_NORMAL , // 通常フォント
|
||||
|
||||
COMMON_APP_FONTIDX_MAX
|
||||
} ;
|
||||
|
||||
// --------------------------------
|
||||
// 以降デバッグ用
|
||||
// --------------------------------
|
||||
|
||||
// パフォーマンス計測用
|
||||
enum
|
||||
{
|
||||
PEFREPO_DEBUGDRAW , // デバッグ描画
|
||||
|
||||
PEFREPO_MAX
|
||||
} ;
|
||||
|
||||
#endif // __COMMON_APP__
|
@ -0,0 +1,15 @@
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# ソース列挙用ファイル(仮)
|
||||
#
|
||||
# ここにはこのディレクトリのソースを列挙します。
|
||||
# パスはrootからの相対パスで記述してください。
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SOURCES[] += \
|
||||
|
||||
# 必要があればこのディレクトリのサブディレクトリの
|
||||
# ソース列挙ファイルをincludeしてください。
|
||||
#
|
||||
# ↓'#'を外して"subdir"を任意のディレクトリ名に変更
|
||||
#include ./Sources/sources.om
|
@ -0,0 +1,535 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file main.cpp
|
||||
// @brief メイン
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
//-----------------------------------------------------
|
||||
// include
|
||||
//-----------------------------------------------------
|
||||
|
||||
#include <nn/version.h>
|
||||
|
||||
#include <nn.h>
|
||||
#include <nn/fnd.h>
|
||||
#include <nn/cfg.h>
|
||||
#include <nn/ndm.h>
|
||||
|
||||
#include <GLES2/gl2.h>
|
||||
#include <nw/lyt.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <DCL/system/CTR/CTRManager.h>
|
||||
#include <DCL/system/CTR/CTRGrpManager.h>
|
||||
#include <DCL/system/Device/DevicePad.h>
|
||||
#include <DCL/system/Device/DeviceTouchPanel.h>
|
||||
#include <DCL/system/File/FileSystem.h>
|
||||
#include <DCL/system/Resource/ResManager.h>
|
||||
#include <DCL/framework/HeapManager.h>
|
||||
|
||||
#include <DGF/NW4CMem.h>
|
||||
|
||||
#include "../common/common_app.h"
|
||||
#include "../stage/StageManager.h"
|
||||
//#include "../common/message/BxyMessage.h"
|
||||
//#include "../param/CommonParam/CommonParam.h"
|
||||
|
||||
// for debug
|
||||
#include <DCL/debug/DbgUtil.h>
|
||||
#include <DCL/debug/PefReport.h>
|
||||
#include <DCL/debug/LogStream.h>
|
||||
#include <DCL/system/Device/DeviceDebugPad.h>
|
||||
#include <DCL/graphics/EasyGraphics/EasyGraphics.h>
|
||||
#include <DCL/utility/math/Rand.h>
|
||||
#include <DCL/utility/string/String.h>
|
||||
|
||||
#include <DGF/DebugLog.h>
|
||||
|
||||
|
||||
//-----------------------------------------------------
|
||||
// debug switch
|
||||
//-----------------------------------------------------
|
||||
|
||||
#define ENABLE_CLEAR_FRAMEBUFFER
|
||||
|
||||
//-----------------------------------------------------
|
||||
// define
|
||||
//-----------------------------------------------------
|
||||
|
||||
// 初期化エラーリスト
|
||||
enum
|
||||
{
|
||||
ERROR_NONE ,
|
||||
ERROR_RESOURCE_INITIALIZE ,
|
||||
ERROR_SHAREFONT_INITIALIZE ,
|
||||
ERROR_FONT_INITIALIZE ,
|
||||
ERROR_FONT_LOAD ,
|
||||
ERROR_MESSAGE_LOAD ,
|
||||
ERROR_PARAM ,
|
||||
ERROR_SOUND ,
|
||||
ERROR_SAVEDATA_FORMAT ,
|
||||
ERROR_SAVEDATA_MOUNT ,
|
||||
|
||||
ERROR_INVALID
|
||||
} ;
|
||||
|
||||
//-----------------------------------------------------
|
||||
// struct
|
||||
//-----------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------
|
||||
// prototype
|
||||
//-----------------------------------------------------
|
||||
|
||||
static s32 _InitSystem( void ) ;
|
||||
static s32 _InitResource( void ) ;
|
||||
static s32 _InitMessage( void ) ;
|
||||
static s32 _InitParam( void ) ;
|
||||
static void _InitSubSystem( void ) ;
|
||||
static void _EasyClearScreen( void ) ;
|
||||
static void _Finalize( void ) ;
|
||||
|
||||
static void _Error( s32 iErrorNo ) ;
|
||||
|
||||
//-----------------------------------------------------
|
||||
// class
|
||||
//-----------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------
|
||||
// static variables
|
||||
//-----------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------
|
||||
// prototype
|
||||
//-----------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------
|
||||
// functions
|
||||
//-----------------------------------------------------
|
||||
|
||||
// add take --->
|
||||
/*---------------------------------------------------------------------------*
|
||||
Description: スタートアップ
|
||||
note : C++のスタティックイニシャライザの呼び出し、nnMainの前に呼ばれる
|
||||
*---------------------------------------------------------------------------*/
|
||||
void nninitStartUp( void )
|
||||
{
|
||||
nn::os::SetDeviceMemorySize( 0 ) ;
|
||||
nn::os::SetHeapSize( 0 ) ;
|
||||
}
|
||||
// <--- add take
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Description: メインルーチン
|
||||
*---------------------------------------------------------------------------*/
|
||||
void nnMain()
|
||||
{
|
||||
// add take ( 同時に更新も ) --->
|
||||
|
||||
const u32 uHeapSize = COMMON_APP_MEM_GLOBALHEAP + COMMON_APP_STACK_BLOCKSIZE ;
|
||||
u32 uSize ;
|
||||
s32 iError = ERROR_NONE ;
|
||||
|
||||
// デバイスメモリサイズを設定
|
||||
nn::os::SetDeviceMemorySize( 1024 * 1024 * 32 ) ;
|
||||
|
||||
// ヒープサイズを設定
|
||||
uSize = ((uHeapSize + 4095) / 4096) * 4096;
|
||||
nn::os::SetHeapSize( uSize ) ;
|
||||
NN_LOG( "app usable main mem size = %d\n" , uSize ) ;
|
||||
|
||||
// メモリブロックを初期化
|
||||
nn::os::InitializeMemoryBlock( nn::os::GetHeapAddress() , uHeapSize ) ;
|
||||
|
||||
// <--- add take
|
||||
|
||||
// fsの初期化
|
||||
nn::fs::Initialize() ;
|
||||
|
||||
// 初期化
|
||||
if( iError == ERROR_NONE )
|
||||
iError = _InitSystem() ;
|
||||
|
||||
// 画面をクリアしておく
|
||||
_EasyClearScreen() ;
|
||||
|
||||
// LCDをつける
|
||||
nngxStartLcdDisplay() ;
|
||||
|
||||
// リソース管理初期化
|
||||
if( iError == ERROR_NONE )
|
||||
iError = _InitResource() ;
|
||||
|
||||
// サブシステムの初期化
|
||||
_InitSubSystem() ;
|
||||
|
||||
if( iError != ERROR_NONE )
|
||||
{
|
||||
// エラー表示
|
||||
_Error( iError ) ;
|
||||
}
|
||||
|
||||
// ステージ管理初期化
|
||||
iStageManager.Initialize( COMMON_APP_SETTING_SCENEINSTANE_BUFSIZE ,
|
||||
SCENE_ID_MAX ,
|
||||
VIEW_ID_MAX ,
|
||||
iResManager.GetLytGraphicsResource() ) ;
|
||||
|
||||
// ホームボタンは使用禁止
|
||||
iStageManager.HomeButtonEnable( false ) ;
|
||||
|
||||
// 電源ボタン使用禁止
|
||||
iStageManager.PowerButtonEnable( false ) ;
|
||||
|
||||
// スリープは拒否
|
||||
iStageManager.RejectSleep( true ) ;
|
||||
|
||||
iStageManager.Start( SCENE_ID_START ) ;
|
||||
|
||||
// 動作
|
||||
bool fProc = true ;
|
||||
while( fProc == true )
|
||||
{
|
||||
// ステージ管理動作
|
||||
fProc = iStageManager.Proc() ;
|
||||
}
|
||||
|
||||
// スリープを無効にする
|
||||
nn::applet::DisableSleep() ;
|
||||
|
||||
// ステージ管理終了
|
||||
iStageManager.Finalize() ;
|
||||
|
||||
// 終了処理
|
||||
_Finalize() ;
|
||||
|
||||
NN_LOG( "app end\n" ) ;
|
||||
|
||||
// ホームメニューに戻る
|
||||
nn::applet::CTR::PrepareToCloseApplication() ;
|
||||
nn::applet::CTR::CloseApplication( NULL , 0 ) ;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*
|
||||
Description: システム初期化
|
||||
*---------------------------------------------------------------------------*/
|
||||
s32 _InitSystem( void )
|
||||
{
|
||||
cCTRGrpManager::sInitParam sGrpInitParam ;
|
||||
void* pBuf ;
|
||||
u32 uSize ;
|
||||
nn::Result cResult ;
|
||||
|
||||
// アプレットコールバックを設定する
|
||||
iStageManager.InitializeAppletCB() ;
|
||||
|
||||
// アプレットコールバック機能を有効にする
|
||||
nn::applet::Enable( false ) ;
|
||||
|
||||
if( nn::applet::IsExpectedToCloseApplication() )
|
||||
{
|
||||
// 起動中に電源ボタンを押された場合は、ここで終わる
|
||||
nn::fs::Finalize() ;
|
||||
cResult = nn::applet::PrepareToCloseApplication() ;
|
||||
NN_UTIL_PANIC_IF_FAILED( cResult ) ;
|
||||
nn::applet::CloseApplication() ;
|
||||
}
|
||||
|
||||
// カレントのスレッドプライオリティを設定
|
||||
nn::os::Thread::ChangeCurrentPriority( NN_OS_DEFAULT_THREAD_PRIORITY ) ;
|
||||
|
||||
// システム初期化
|
||||
iCTRManager.Initialize( iCTRManager.TYPE_ROM ,
|
||||
COMMON_APP_MEM_GLOBALHEAP ) ;
|
||||
|
||||
// グラフィックス初期化
|
||||
memset( &sGrpInitParam , 0x00 , sizeof( sGrpInitParam ) ) ;
|
||||
sGrpInitParam.uFCRamSize = COMMON_APP_MEM_GX_FCRAM ;
|
||||
sGrpInitParam.uCmdListBufSize = COMMON_APP_BUFSIZE_CMDLIST ;
|
||||
sGrpInitParam.uCmdListReqCount = COMMON_APP_REQCNT_CMDLIST ;
|
||||
sGrpInitParam.uDispMode = NN_GX_DISPLAYMODE_STEREO ;
|
||||
// sGrpInitParam.uDispMode = NN_GX_DISPLAYMODE_NORMAL ;
|
||||
sGrpInitParam.eDispFormat[ cCTRGrpManager::DISP_TOP_SCREEN ] = GL_RGB8_OES ;
|
||||
sGrpInitParam.eDispFormat[ cCTRGrpManager::DISP_TOUCH_SCREEN ] = GL_RGB8_OES ;
|
||||
sGrpInitParam.eDispUseArea[ cCTRGrpManager::DISP_TOP_SCREEN ] = NN_GX_MEM_FCRAM ;
|
||||
sGrpInitParam.eDispUseArea[ cCTRGrpManager::DISP_TOUCH_SCREEN ] = NN_GX_MEM_FCRAM ;
|
||||
sGrpInitParam.eColorBufFormat[ cCTRGrpManager::DISP_TOP_SCREEN ] = GL_RGBA8_OES ;
|
||||
sGrpInitParam.eColorBufFormat[ cCTRGrpManager::DISP_TOUCH_SCREEN ] = GL_RGBA8_OES ;
|
||||
sGrpInitParam.eDepthStencilFormat[ cCTRGrpManager::DISP_TOP_SCREEN ] = GL_DEPTH_COMPONENT16 ;
|
||||
sGrpInitParam.eDepthStencilFormat[ cCTRGrpManager::DISP_TOUCH_SCREEN ] = GL_DEPTH_COMPONENT16 ;
|
||||
sGrpInitParam.fUseSingleFrameBuffer = false ;
|
||||
sGrpInitParam.fClearDisplayBuffer = false ;
|
||||
sGrpInitParam.fDisableLcdDisplay = true ;
|
||||
iCTRGrpManager.Initialize( sGrpInitParam , sGrpInitParam.uDispMode ) ;
|
||||
|
||||
// NW4Cのレイアウト用メモリ初期化
|
||||
NW4CMem_Initialize( COMMON_APP_MEM_NW4C , COMMON_APP_MEM_NW4C_DEVICE ) ;
|
||||
|
||||
// ファイルシステム初期化
|
||||
uSize = cFileSystem::GetWorkBufferSize( COMMON_APP_SETTING_FILESYSTEM_SLOT_NUM , COMMON_APP_SETTING_FILESYSTEM_WORKBUF_SIZE ) ;
|
||||
pBuf = iCTRManager.Allocate( iCTRManager.HEAPTYPE_GLOBALHEAP , uSize ) ;
|
||||
NN_ASSERT( pBuf ) ;
|
||||
iFileSystem.Initialize( pBuf , uSize , COMMON_APP_SETTING_FILESYSTEM_SLOT_NUM ) ;
|
||||
|
||||
// ファイルシステムの設定
|
||||
iFileSystem.SetAsyncParam( 50 , // 非同期処理中に休む時間(ミリ秒)
|
||||
1024 * 64 , // 非同期処理で一度に読み込むサイズ
|
||||
1024 * 64 // 非同期処理で一度に書き込むサイズ
|
||||
) ;
|
||||
|
||||
#if defined ENABLE_DEBUG_COMMAND
|
||||
// デバッグ出力初期化
|
||||
cDebugLog::GetInstance().Initialize() ;
|
||||
#endif
|
||||
|
||||
// HIDの初期化
|
||||
cResult = nn::hid::Initialize() ;
|
||||
NN_UTIL_PANIC_IF_FAILED( cResult ) ;
|
||||
|
||||
// 各デバイスの初期化
|
||||
cDevicePad::sConfig sPadConfig ;
|
||||
sPadConfig.fTriggerToRepeatAllClear = true ;
|
||||
iDevicePad.Initialize( &sPadConfig ) ;
|
||||
iDeviceTouchPanel.Initialize() ;
|
||||
iDevicePad.SetRepeatStatus( COMMON_APP_PAD_REPEAT_START , COMMON_APP_PAD_REPEAT_TICK ) ;
|
||||
iDeviceTouchPanel.SetRepeatStatus( COMMON_APP_PAD_REPEAT_START , COMMON_APP_PAD_REPEAT_TICK ) ;
|
||||
|
||||
#if defined ENABLE_DEBUG_COMMAND
|
||||
iDeviceDebugPad.Initialize() ;
|
||||
#endif
|
||||
|
||||
#if defined(NN_BUILD_DEBUG) && defined(ENABLE_DEBUG_COMMAND)
|
||||
// スクリーンショット用メモリを確保
|
||||
void* pScrShotBuf = iCTRManager.Allocate( iCTRManager.HEAPTYPE_GLOBALHEAP , cStageManagerBase::CalcScreenShotBufferSize() ) ;
|
||||
NN_LOG("%d\n",COMMON_APP_SCREENSHOT_BUFSIZE);
|
||||
iStageManager.SetScreenShotBuffer( pScrShotBuf , cStageManagerBase::CalcScreenShotBufferSize() ) ;
|
||||
#endif
|
||||
|
||||
#if defined ENABLE_CLEAR_FRAMEBUFFER
|
||||
glClearColor( 0.0f , 0.0f , 0.0f , 1.0f ) ;
|
||||
glClearDepthf( 1.0f ) ;
|
||||
for( int i = 0 ; i < 3 ; i ++ )
|
||||
{
|
||||
iCTRGrpManager.Clear( cCTRGrpManager::DISP_BOTH ) ;
|
||||
iCTRGrpManager.TransferRenderBufferStereo() ;
|
||||
iCTRGrpManager.TransferRenderBuffer( cCTRGrpManager::DISP_BOTH ) ;
|
||||
iCTRGrpManager.SwapBuffers( cCTRGrpManager::DISP_BOTH ) ;
|
||||
iCTRGrpManager.RunCmdList() ;
|
||||
}
|
||||
#endif
|
||||
|
||||
NN_LOG( "%s : GetHeapAddress = 0x%X GetHeapSize=%u\n" , __FUNCTION__ , nn::os::GetHeapAddress(), nn::os::GetHeapSize() ) ;
|
||||
NN_LOG( "%s : GetDeviceMemoryAddress = 0x%X GetDeviceMemorySize=%u\n" , __FUNCTION__ , nn::os::GetDeviceMemoryAddress(), nn::os::GetDeviceMemorySize() ) ;
|
||||
|
||||
return ERROR_NONE ;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------
|
||||
// リソース初期化
|
||||
//--------------------------------------------------
|
||||
s32 _InitResource( void )
|
||||
{
|
||||
cResManager::InitParam sParam ;
|
||||
u32 i ;
|
||||
void* pBuf ;
|
||||
bool fResult ;
|
||||
nn::Result cResult ;
|
||||
|
||||
// パラメータ初期化
|
||||
sParam.uWorkMainMemSize = COMMON_APP_SETTING_RESMANAGER_WORKBUF_MAIN_SIZE ;
|
||||
sParam.pWorkMainMem = iCTRManager.Allocate( iCTRManager.HEAPTYPE_GLOBALHEAP , COMMON_APP_SETTING_RESMANAGER_WORKBUF_MAIN_SIZE ) ;
|
||||
NN_ASSERT( sParam.pWorkMainMem ) ;
|
||||
sParam.uWorkDevMemSize = COMMON_APP_SETTING_RESMANAGER_WORKBUF_DEV_SIZE ;
|
||||
sParam.pWorkDevMem = iCTRManager.Allocate( iCTRManager.HEAPTYPE_DEVICE , COMMON_APP_SETTING_RESMANAGER_WORKBUF_DEV_SIZE ) ;
|
||||
NN_ASSERT( sParam.pWorkDevMem ) ;
|
||||
sParam.uNumFonts = 1 ;
|
||||
|
||||
// 内臓フォントの初期化
|
||||
nn::pl::Initialize() ;
|
||||
cResult = nn::pl::InitializeSharedFont() ;
|
||||
if( cResult.IsSuccess() == false )
|
||||
{
|
||||
// 共有フォント初期化失敗
|
||||
return ERROR_SHAREFONT_INITIALIZE ;
|
||||
}
|
||||
|
||||
// リソース管理の初期化
|
||||
fResult = iResManager.Initialize( sParam ) ;
|
||||
if( fResult == false )
|
||||
{
|
||||
return ERROR_RESOURCE_INITIALIZE ;
|
||||
}
|
||||
|
||||
// フォントの初期化
|
||||
fResult = iResManager.InitFont( L"rom:/shaders/nwfont_TextWriterShader.shbin" ) ;
|
||||
if( fResult == false )
|
||||
{
|
||||
return ERROR_FONT_INITIALIZE ;
|
||||
}
|
||||
|
||||
// メインフォント読み込み
|
||||
fResult = iResManager.LoadBuiltinFont( COMMON_APP_FONTIDX_NORMAL , nn::pl::SHARED_FONT_TYPE_STD , L"cbf_std.bcfnt" ) ;
|
||||
if( fResult == false )
|
||||
{
|
||||
return ERROR_FONT_LOAD ;
|
||||
}
|
||||
NN_LOG( "%s : font name = %s\n" , __FUNCTION__ , iResManager.GetFontName( COMMON_APP_FONTIDX_NORMAL ) ) ;
|
||||
|
||||
return ERROR_NONE ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// サブシステム初期化
|
||||
//--------------------------------------------------
|
||||
void _InitSubSystem( void )
|
||||
{
|
||||
// デバッグユーティリティー初期化
|
||||
iDbgUtil.Initialize() ;
|
||||
|
||||
// 簡易グラフィックライブラリ初期化
|
||||
iEasyGraphics.Initialize() ;
|
||||
|
||||
#if defined ENABLE_DEBUG_COMMAND
|
||||
// パフォーマンス計測初期化
|
||||
void* pBuf ;
|
||||
u32 uBufSize = cPefReport::GetWorkBufferSize( PEFREPO_MAX ) ;
|
||||
pBuf = iCTRManager.Allocate( iCTRManager.HEAPTYPE_GLOBALHEAP , uBufSize ) ;
|
||||
iPefReport.Initialize( PEFREPO_MAX , pBuf , uBufSize ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 簡易画面クリア
|
||||
//--------------------------------------------------
|
||||
void _EasyClearScreen( void )
|
||||
{
|
||||
int i ;
|
||||
|
||||
iCTRGrpManager.WaitRunningCmdList() ;
|
||||
for( i = 0 ; i < 2 ; i ++ )
|
||||
{
|
||||
glClearColor( 0.0f , 0.0f , 0.0f , 0.0f ) ;
|
||||
glClearDepthf( 1.0f ) ;
|
||||
|
||||
iCTRGrpManager.SetRenderTarget( cCTRGrpManager::DISP_TOP_SCREEN ) ;
|
||||
iCTRGrpManager.Clear( cCTRGrpManager::DISP_TOP_SCREEN ) ;
|
||||
iCTRGrpManager.TransferRenderBuffer( cCTRGrpManager::DISP_TOP_SCREEN ) ;
|
||||
iCTRGrpManager.TransferRenderBufferStereo() ;
|
||||
|
||||
iCTRGrpManager.SetRenderTarget( cCTRGrpManager::DISP_TOUCH_SCREEN ) ;
|
||||
iCTRGrpManager.Clear( cCTRGrpManager::DISP_TOUCH_SCREEN ) ;
|
||||
iCTRGrpManager.TransferRenderBuffer( cCTRGrpManager::DISP_TOUCH_SCREEN ) ;
|
||||
|
||||
iCTRGrpManager.SwapBuffers( cCTRGrpManager::DISP_BOTH ) ;
|
||||
iCTRGrpManager.RunCmdList( true ) ;
|
||||
}
|
||||
iCTRGrpManager.WaitRunningCmdList() ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 終了処理
|
||||
//--------------------------------------------------
|
||||
void _Finalize( void )
|
||||
{
|
||||
void* pDevMem ;
|
||||
void* pMainMem ;
|
||||
nn::Result cResult ;
|
||||
|
||||
// リソース管理開放
|
||||
pDevMem = iResManager.GetParamSetDevMemAdr() ;
|
||||
pMainMem = iResManager.GetParamSetMainMemAdr() ;
|
||||
iResManager.Finalize() ;
|
||||
iCTRManager.Free( iCTRManager.HEAPTYPE_GLOBALHEAP , pMainMem ) ;
|
||||
iCTRManager.Free( iCTRManager.HEAPTYPE_DEVICE , pDevMem ) ;
|
||||
|
||||
// cfgの終了
|
||||
nn::cfg::Finalize() ;
|
||||
|
||||
// 内臓フォントの終了
|
||||
nn::pl::Finalize() ;
|
||||
|
||||
// ファイルシステム開放
|
||||
pMainMem = iFileSystem.GetWorkBuffer() ;
|
||||
iFileSystem.Finalize() ;
|
||||
iCTRManager.Free( iCTRManager.HEAPTYPE_GLOBALHEAP , pMainMem ) ;
|
||||
|
||||
// デバイス開放
|
||||
#if defined ENABLE_DEBUG_COMMAND
|
||||
iDeviceDebugPad.Finalize() ;
|
||||
#endif
|
||||
iDevicePad.Finalize() ;
|
||||
iDeviceTouchPanel.Finalize() ;
|
||||
|
||||
iDbgUtil.Finalize() ;
|
||||
iEasyGraphics.Finalize() ;
|
||||
#if defined ENABLE_DEBUG_COMMAND
|
||||
pMainMem = iPefReport.GetWorkBuf() ;
|
||||
iCTRManager.Free( iCTRManager.HEAPTYPE_GLOBALHEAP , pMainMem ) ;
|
||||
iPefReport.Finalize() ;
|
||||
cDebugLog::GetInstance().Finalize() ;
|
||||
#endif
|
||||
|
||||
#if defined(NN_BUILD_DEBUG) && defined(ENABLE_DEBUG_COMMAND)
|
||||
// スクリーンショット用メモリを開放
|
||||
pMainMem = iStageManager.GetScreenShotBuffer() ;
|
||||
if( pMainMem )
|
||||
iCTRManager.Free( iCTRManager.HEAPTYPE_GLOBALHEAP , pMainMem ) ;
|
||||
#endif
|
||||
|
||||
// NW4C用メモリ開放
|
||||
NW4CMem_Finalize() ;
|
||||
|
||||
// グラフィック管理開放
|
||||
iCTRGrpManager.Finalize() ;
|
||||
|
||||
// CTR管理開放
|
||||
iCTRManager.Finalize() ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// エラー処理
|
||||
//--------------------------------------------------
|
||||
void _Error( s32 iErrorNo )
|
||||
{
|
||||
const char* pszErrorList[] = {
|
||||
"ERROR_NONE" ,
|
||||
"ERROR_RESOURCE_INITIALIZE" ,
|
||||
"ERROR_SHAREFONT_INITIALIZE" ,
|
||||
"ERROR_FONT_INITIALIZE" ,
|
||||
"ERROR_FONT_LOAD" ,
|
||||
"ERROR_MESSAGE_LOAD" ,
|
||||
"ERROR_PARAM" ,
|
||||
"ERROR_SOUND"
|
||||
// "ERROR_SAVEDATA_FORMAT" ,
|
||||
// "ERROR_SAVEDATA_MOUNT" ,
|
||||
} ;
|
||||
s32 x ;
|
||||
|
||||
// エラー表示
|
||||
while( 1 )
|
||||
{
|
||||
iCTRGrpManager.SetRenderTarget( cCTRGrpManager::DISP_TOUCH_SCREEN ) ;
|
||||
|
||||
glClearColor( 0.0f , 0.0f , 0.0f , 1.0f ) ;
|
||||
glClearDepthf( 1.0f ) ;
|
||||
iCTRGrpManager.Clear( cCTRGrpManager::DISP_TOUCH_SCREEN ) ;
|
||||
|
||||
iDbgUtil.PrintSetFontScale( 1.0f ) ;
|
||||
iDbgUtil.PrintSetColorPreset( cDbgUtil::PRINTCOLOR_WHITE , 0xff ) ;
|
||||
x = ( 320 - strlen( pszErrorList[ iErrorNo ] ) * 8 ) / 2 ;
|
||||
iDbgUtil.Print( x , 120 , pszErrorList[ iErrorNo ] ) ;
|
||||
|
||||
iDbgUtil.PrintFlush() ;
|
||||
|
||||
iCTRGrpManager.TransferRenderBuffer( cCTRGrpManager::DISP_TOUCH_SCREEN ) ;
|
||||
iCTRGrpManager.SwapBuffers( cCTRGrpManager::DISP_TOUCH_SCREEN ) ;
|
||||
iCTRGrpManager.RunCmdList( true ) ;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# ソース列挙用ファイル(仮)
|
||||
#
|
||||
# ここにはこのディレクトリのソースを列挙します。
|
||||
# パスはrootからの相対パスで記述してください。
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SOURCES[] += \
|
||||
./Sources/main/main.cpp \
|
||||
|
||||
# 必要があればこのディレクトリのサブディレクトリの
|
||||
# ソース列挙ファイルをincludeしてください。
|
||||
#
|
||||
# ↓'#'を外して"subdir"を任意のディレクトリ名に変更
|
||||
#include ./Sources/sources.om
|
@ -0,0 +1,141 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file SceneMain.cpp
|
||||
// @brief メインシーン
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
|
||||
#include "./SceneMain.h"
|
||||
|
||||
#include "../../stage/StageManager.h"
|
||||
#include "../../view/fade_d/ViewFadeD.h"
|
||||
#include "../../view/fade_u/ViewFadeU.h"
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Variables
|
||||
//-----------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------
|
||||
// function
|
||||
//-----------------------------------------------------
|
||||
|
||||
//--------------------------------------------------
|
||||
// 初期化
|
||||
//--------------------------------------------------
|
||||
|
||||
//--------------------------------------------------
|
||||
// コンストラクタ
|
||||
//--------------------------------------------------
|
||||
cSceneMain::cSceneMain() : m_Sequence(SEQUENCE_NONE)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// デストラクタ
|
||||
//--------------------------------------------------
|
||||
cSceneMain::~cSceneMain()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 処理
|
||||
//--------------------------------------------------
|
||||
bool cSceneMain::Proc( void )
|
||||
{
|
||||
switch (m_Sequence)
|
||||
{
|
||||
case SEQUENCE_NONE:
|
||||
{
|
||||
nn::os::Tick tick = nn::os::Tick::GetSystemCurrent();
|
||||
if (tick.ToTimeSpan().GetMilliSeconds() - m_StartTick.ToTimeSpan().GetMilliSeconds() >= 500)
|
||||
{
|
||||
iStageManager.SendMessageToView( VIEW_ID_FADE_D, cViewFadeD::MESSAGE_START, 0 );
|
||||
iStageManager.SendMessageToView( VIEW_ID_FADE_U, cViewFadeU::MESSAGE_START, 0 );
|
||||
m_StartTick = nn::os::Tick::GetSystemCurrent();
|
||||
m_Sequence = SEQUENCE_IDLE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SEQUENCE_IDLE:
|
||||
{
|
||||
nn::os::Tick tick = nn::os::Tick::GetSystemCurrent();
|
||||
if (tick.ToTimeSpan().GetMilliSeconds() - m_StartTick.ToTimeSpan().GetMilliSeconds() >= 3500)
|
||||
{
|
||||
iStageManager.SendMessageToView( VIEW_ID_FADE_D, cViewFadeD::MESSAGE_FINISH, 0 );
|
||||
iStageManager.SendMessageToView( VIEW_ID_FADE_U, cViewFadeU::MESSAGE_FINISH, 0 );
|
||||
m_Sequence = SEQUENCE_WAIT;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SEQUENCE_WAIT:
|
||||
if (iStageManager.SendMessageToView( VIEW_ID_FADE_D, cViewFadeD::MESSAGE_IS_FINISH, 0 ) &&
|
||||
iStageManager.SendMessageToView( VIEW_ID_FADE_U, cViewFadeU::MESSAGE_IS_FINISH, 0 ))
|
||||
{
|
||||
m_Sequence = SEQUENCE_FINISH;
|
||||
iStageManager.Shutdown( cStageManager::SHUTDOWN_TYPE_GOTO_POWERMENU );
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// メッセージ受信
|
||||
//--------------------------------------------------
|
||||
bool cSceneMain::MessageProc( ViewID eFromID , u32 uMessage , u32 uParam )
|
||||
{
|
||||
( void )eFromID ;
|
||||
( void )uMessage ;
|
||||
( void )uParam ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 初期化時に呼ばれる
|
||||
//--------------------------------------------------
|
||||
bool cSceneMain::_InitializeInternal( void )
|
||||
{
|
||||
|
||||
iStageManager.ViewSetPriority( VIEW_ID_MAIN, cStageManager::PRIORITY_MID_5 );
|
||||
iStageManager.ViewSetEnableProc( VIEW_ID_MAIN, true );
|
||||
iStageManager.ViewSetEnableDraw( VIEW_ID_MAIN, true );
|
||||
|
||||
iStageManager.ViewSetPriority( VIEW_ID_TOP, cStageManager::PRIORITY_MID_5 );
|
||||
iStageManager.ViewSetEnableProc( VIEW_ID_TOP, true );
|
||||
iStageManager.ViewSetEnableDraw( VIEW_ID_TOP, true );
|
||||
|
||||
iStageManager.ViewSetPriority( VIEW_ID_FADE_D, cStageManager::PRIORITY_MID_4 );
|
||||
iStageManager.ViewSetEnableProc( VIEW_ID_FADE_D, true );
|
||||
iStageManager.ViewSetEnableDraw( VIEW_ID_FADE_D, true );
|
||||
|
||||
iStageManager.ViewSetPriority( VIEW_ID_FADE_U, cStageManager::PRIORITY_MID_4 );
|
||||
iStageManager.ViewSetEnableProc( VIEW_ID_FADE_U, true );
|
||||
iStageManager.ViewSetEnableDraw( VIEW_ID_FADE_U, true );
|
||||
|
||||
m_StartTick = nn::os::Tick::GetSystemCurrent();
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 終了時に呼ばれる
|
||||
//--------------------------------------------------
|
||||
bool cSceneMain::_FinalizeInternal( void )
|
||||
{
|
||||
|
||||
iStageManager.ViewSetEnableProc( VIEW_ID_MAIN, false );
|
||||
iStageManager.ViewSetEnableDraw( VIEW_ID_MAIN, false );
|
||||
|
||||
iStageManager.ViewSetEnableProc( VIEW_ID_TOP, false );
|
||||
iStageManager.ViewSetEnableDraw( VIEW_ID_TOP, false );
|
||||
|
||||
iStageManager.ViewSetEnableProc( VIEW_ID_FADE_D, false );
|
||||
iStageManager.ViewSetEnableDraw( VIEW_ID_FADE_D, false );
|
||||
|
||||
iStageManager.ViewSetEnableProc( VIEW_ID_FADE_U, false );
|
||||
iStageManager.ViewSetEnableDraw( VIEW_ID_FADE_U, false );
|
||||
|
||||
return true ;
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file SceneMain.h
|
||||
// @brief メインシーン
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
#if !defined __SceneMain__
|
||||
#define __SceneMain__
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Include
|
||||
//-----------------------------------------------------
|
||||
|
||||
#include <nn.h>
|
||||
#include <nn/types.h>
|
||||
|
||||
#include <DGF/SceneBase.h>
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Variables
|
||||
//-----------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------
|
||||
// function
|
||||
//-----------------------------------------------------
|
||||
|
||||
class cSceneMain : public cSceneBase
|
||||
{
|
||||
public:
|
||||
// 必要ヒープサイズ
|
||||
// (!)必ず必要サイズを入力しておく事
|
||||
enum
|
||||
{
|
||||
HEAPSIZE = 1024 * 2 // ビューで使うヒープサイズを指定します
|
||||
} ;
|
||||
|
||||
// シーケンス
|
||||
enum SEQUENCE
|
||||
{
|
||||
SEQUENCE_NONE,
|
||||
SEQUENCE_IDLE,
|
||||
SEQUENCE_WAIT,
|
||||
SEQUENCE_FINISH
|
||||
} ;
|
||||
|
||||
private:
|
||||
SEQUENCE m_Sequence;
|
||||
|
||||
public:
|
||||
cSceneMain() ;
|
||||
virtual ~cSceneMain() ;
|
||||
|
||||
public:
|
||||
// ビューの名前を返す
|
||||
// (!)必ずこのクラスの名前を入力する事
|
||||
virtual const char* Name( void ) { return "SceneMain" ; } ;
|
||||
|
||||
// ヒープサイズを返す(ここは触らない)
|
||||
virtual u32 HeapSize( void ) { return HEAPSIZE ; } ;
|
||||
|
||||
// 以下、オーバーライドして処理を入れる
|
||||
public:
|
||||
virtual bool Proc( void ) ;
|
||||
virtual bool MessageProc( ViewID eFromID , u32 uMessage , u32 uParam ) ;
|
||||
|
||||
protected:
|
||||
virtual bool _InitializeInternal( void ) ;
|
||||
virtual bool _FinalizeInternal( void ) ;
|
||||
|
||||
private:
|
||||
nn::os::Tick m_StartTick;
|
||||
} ;
|
||||
|
||||
#endif // __SceneMain__
|
@ -0,0 +1,16 @@
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# ソース列挙用ファイル(仮)
|
||||
#
|
||||
# ここにはこのディレクトリのソースを列挙します。
|
||||
# パスはrootからの相対パスで記述してください。
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SOURCES[] += \
|
||||
./Sources/scene/Main/SceneMain.cpp \
|
||||
|
||||
# 必要があればこのディレクトリのサブディレクトリの
|
||||
# ソース列挙ファイルをincludeしてください。
|
||||
#
|
||||
# ↓'#'を外して"subdir"を任意のディレクトリ名に変更
|
||||
#include ./subdir/sources.om
|
@ -0,0 +1,77 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file SceneStart.cpp
|
||||
// @brief 開始用シーン
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
|
||||
#include "./SceneStart.h"
|
||||
|
||||
#include "../../stage/StageManager.h"
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Variables
|
||||
//-----------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------
|
||||
// function
|
||||
//-----------------------------------------------------
|
||||
|
||||
//--------------------------------------------------
|
||||
// 初期化
|
||||
//--------------------------------------------------
|
||||
|
||||
//--------------------------------------------------
|
||||
// コンストラクタ
|
||||
//--------------------------------------------------
|
||||
cSceneStart::cSceneStart()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// デストラクタ
|
||||
//--------------------------------------------------
|
||||
cSceneStart::~cSceneStart()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 処理
|
||||
//--------------------------------------------------
|
||||
bool cSceneStart::Proc( void )
|
||||
{
|
||||
iStageManager.ChangeScene( SCENE_ID_MAIN ) ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// メッセージ受信
|
||||
//--------------------------------------------------
|
||||
bool cSceneStart::MessageProc( ViewID eFromID , u32 uMessage , u32 uParam )
|
||||
{
|
||||
( void )eFromID ;
|
||||
( void )uMessage ;
|
||||
( void )uParam ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 初期化時に呼ばれる
|
||||
//--------------------------------------------------
|
||||
bool cSceneStart::_InitializeInternal( void )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 終了時に呼ばれる
|
||||
//--------------------------------------------------
|
||||
bool cSceneStart::_FinalizeInternal( void )
|
||||
{
|
||||
return true ;
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file SceneStart.h
|
||||
// @brief 開始用シーン
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
#if !defined __SceneStart__
|
||||
#define __SceneStart__
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Include
|
||||
//-----------------------------------------------------
|
||||
|
||||
#include <nn.h>
|
||||
#include <nn/types.h>
|
||||
|
||||
#include <DGF/SceneBase.h>
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Variables
|
||||
//-----------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------
|
||||
// function
|
||||
//-----------------------------------------------------
|
||||
|
||||
class cSceneStart : public cSceneBase
|
||||
{
|
||||
public:
|
||||
// 必要ヒープサイズ
|
||||
// (!)必ず必要サイズを入力しておく事
|
||||
enum
|
||||
{
|
||||
HEAPSIZE = 1024 * 2 // ビューで使うヒープサイズを指定します
|
||||
} ;
|
||||
|
||||
public:
|
||||
cSceneStart() ;
|
||||
virtual ~cSceneStart() ;
|
||||
|
||||
public:
|
||||
// ビューの名前を返す
|
||||
// (!)必ずこのクラスの名前を入力する事
|
||||
virtual const char* Name( void ) { return "SceneStart" ; } ;
|
||||
|
||||
// ヒープサイズを返す(ここは触らない)
|
||||
virtual u32 HeapSize( void ) { return HEAPSIZE ; } ;
|
||||
|
||||
// 以下、オーバーライドして処理を入れる
|
||||
public:
|
||||
virtual bool Proc( void ) ;
|
||||
virtual bool MessageProc( ViewID eFromID , u32 uMessage , u32 uParam ) ;
|
||||
|
||||
protected:
|
||||
virtual bool _InitializeInternal( void ) ;
|
||||
virtual bool _FinalizeInternal( void ) ;
|
||||
} ;
|
||||
|
||||
#endif // __SceneStart__
|
@ -0,0 +1,16 @@
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# ソース列挙用ファイル(仮)
|
||||
#
|
||||
# ここにはこのディレクトリのソースを列挙します。
|
||||
# パスはrootからの相対パスで記述してください。
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SOURCES[] += \
|
||||
./Sources/scene/Start/SceneStart.cpp \
|
||||
|
||||
# 必要があればこのディレクトリのサブディレクトリの
|
||||
# ソース列挙ファイルをincludeしてください。
|
||||
#
|
||||
# ↓'#'を外して"subdir"を任意のディレクトリ名に変更
|
||||
#include ./subdir/sources.om
|
@ -0,0 +1,14 @@
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# ソース列挙用ファイル(仮)
|
||||
#
|
||||
# ここにはこのディレクトリのソースを列挙します。
|
||||
# パスはrootからの相対パスで記述してください。
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# 必要があればこのディレクトリのサブディレクトリの
|
||||
# ソース列挙ファイルをincludeしてください。
|
||||
#
|
||||
# ↓'#'を外して"subdir"を任意のディレクトリ名に変更
|
||||
include ./Sources/scene/Start/sources.om
|
||||
include ./Sources/scene/Main/sources.om
|
@ -0,0 +1,18 @@
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# ソース列挙用ファイル(仮)
|
||||
#
|
||||
# ここにはこのディレクトリのソースを列挙します。
|
||||
# パスはrootからの相対パスで記述してください。
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# 必要があればこのディレクトリのサブディレクトリの
|
||||
# ソース列挙ファイルをincludeしてください。
|
||||
#
|
||||
# ↓'#'を外して"subdir"を任意のディレクトリ名に変更
|
||||
include ./Sources/main/sources.om
|
||||
include ./Sources/common/sources.om
|
||||
include ./Sources/stage/sources.om
|
||||
include ./Sources/scene/sources.om
|
||||
include ./Sources/view/sources.om
|
||||
#include ./Sources/param/sources.om
|
@ -0,0 +1,45 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file ObjectIDLIst.h
|
||||
// @brief オブジェクトIDリスト
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
#if !defined __OBJECTIDLIST__
|
||||
#define __OBJECTIDLIST__
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Include
|
||||
//-----------------------------------------------------
|
||||
|
||||
#include <nn.h>
|
||||
#include <nn/types.h>
|
||||
|
||||
//-----------------------------------------------------
|
||||
// enum
|
||||
//-----------------------------------------------------
|
||||
|
||||
typedef u32 SceneID ;
|
||||
typedef u32 ViewID ;
|
||||
|
||||
// シーンID
|
||||
enum
|
||||
{
|
||||
SCENE_ID_START ,//!< 開始用シーン
|
||||
SCENE_ID_MAIN ,//!< メインシーン
|
||||
SCENE_ID_MAX
|
||||
} ;
|
||||
|
||||
// ビューID
|
||||
enum
|
||||
{
|
||||
VIEW_ID_MAIN ,//!< メインビュー
|
||||
VIEW_ID_TOP ,//!< 上画面ビュー
|
||||
VIEW_ID_FADE_D ,//!< 下画面フェードビュー
|
||||
VIEW_ID_FADE_U ,//!< 上画面フェードビュー
|
||||
VIEW_ID_MAX
|
||||
} ;
|
||||
|
||||
#endif // __OBJECTIDLIST__
|
@ -0,0 +1,264 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file cStageManager.cpp
|
||||
// @brief ステージマネージャ
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include "./StageManager.h"
|
||||
|
||||
/// シーンクラス
|
||||
#include "../scene/Start/SceneStart.h"
|
||||
#include "../scene/Main/SceneMain.h"
|
||||
|
||||
/// ビュークラス
|
||||
#include "../view/main/ViewMain.h"
|
||||
#include "../view/top/ViewTop.h"
|
||||
#include "../view/fade_d/ViewFadeD.h"
|
||||
#include "../view/fade_u/ViewFadeU.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Define
|
||||
//-----------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Variables
|
||||
//-----------------------------------------------------
|
||||
|
||||
/**
|
||||
@brief メモリインスタンス
|
||||
*/
|
||||
cStageManager cStageManager::m_Instance ;
|
||||
|
||||
//-----------------------------------------------------
|
||||
// prototype
|
||||
//-----------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------
|
||||
// function
|
||||
//-----------------------------------------------------
|
||||
|
||||
//--------------------------------------------------
|
||||
// コンストラクタ
|
||||
//--------------------------------------------------
|
||||
cStageManager::cStageManager()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// デストラクタ
|
||||
//--------------------------------------------------
|
||||
cStageManager::~cStageManager()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// インスタンスを返す
|
||||
//--------------------------------------------------
|
||||
cStageManager& cStageManager::GetInstance()
|
||||
{
|
||||
return m_Instance;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// カメラ初期化
|
||||
//-----------------------------------------------------
|
||||
void cStageManager::_StereoCameraInitialize( void )
|
||||
{
|
||||
const f32 fWidth = 240.0f , fHeight = 400.0f ;
|
||||
|
||||
_CameraSetPerspective( COMMON_APP_CAMSET_PRS_NEAR ,
|
||||
COMMON_APP_CAMSET_PRS_FAR ,
|
||||
COMMON_APP_CAMSET_PRS_FOVY ,
|
||||
COMMON_APP_CAMSET_PRS_ASPECT ,
|
||||
COMMON_APP_CAMSET_PRS_STEREO_DEPTHLEVEL ,
|
||||
COMMON_APP_CAMSET_PRS_STEREO_FACTOR ,
|
||||
COMMON_APP_CAMSET_PRS_CAMPOS_X ,
|
||||
COMMON_APP_CAMSET_PRS_CAMPOS_Y ,
|
||||
COMMON_APP_CAMSET_PRS_STEREO_DEPTHLEVEL ,
|
||||
0.0f , 1.0f , 0.0f ,
|
||||
COMMON_APP_CAMSET_PRS_CAMLOOK_X ,
|
||||
COMMON_APP_CAMSET_PRS_CAMLOOK_Y ,
|
||||
COMMON_APP_CAMSET_PRS_CAMLOOK_Z ) ;
|
||||
|
||||
_CameraSetOrtho( COMMON_APP_CAMSET_ORT_NEAR ,
|
||||
COMMON_APP_CAMSET_ORT_FAR ,
|
||||
COMMON_APP_CAMSET_ORT_STEREO_DEPTHLEVEL ,
|
||||
COMMON_APP_CAMSET_ORT_STEREO_FACTOR ,
|
||||
-fHeight / 2.0f ,
|
||||
fHeight / 2.0f ,
|
||||
-fWidth / 2.0f ,
|
||||
fWidth / 2.0f ,
|
||||
COMMON_APP_CAMSET_ORT_CAMPOS_X ,
|
||||
COMMON_APP_CAMSET_ORT_CAMPOS_Y ,
|
||||
COMMON_APP_CAMSET_ORT_CAMPOS_Z ,
|
||||
0.0f , 1.0f , 0.0f ,
|
||||
COMMON_APP_CAMSET_ORT_CAMLOOK_X ,
|
||||
COMMON_APP_CAMSET_ORT_CAMLOOK_Y ,
|
||||
COMMON_APP_CAMSET_ORT_CAMLOOK_Z ) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// 各ビューのインスタンスサイズを返す
|
||||
//-----------------------------------------------------
|
||||
u32 cStageManager::_ViewGetInstanceSize( u32 uViewID )
|
||||
{
|
||||
switch( uViewID )
|
||||
{
|
||||
case VIEW_ID_MAIN : return sizeof( cViewMain ) ;
|
||||
case VIEW_ID_TOP : return sizeof( cViewTop ) ;
|
||||
case VIEW_ID_FADE_D : return sizeof( cViewFadeD ) ;
|
||||
case VIEW_ID_FADE_U : return sizeof( cViewFadeU ) ;
|
||||
}
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// 各ビューのインスタンスを初期化(コンストラクト)する
|
||||
//-----------------------------------------------------
|
||||
bool cStageManager::_ViewConstruct( u32 uViewID , void* pViewInstanceBuf , u32 uInstanceSize )
|
||||
{
|
||||
( void )uInstanceSize ;
|
||||
|
||||
switch( uViewID )
|
||||
{
|
||||
case VIEW_ID_MAIN :
|
||||
NN_ASSERT( uInstanceSize == sizeof( cViewMain ) ) ;
|
||||
pViewInstanceBuf = ( void* )new ( pViewInstanceBuf ) cViewMain() ; break ;
|
||||
case VIEW_ID_TOP :
|
||||
NN_ASSERT( uInstanceSize == sizeof( cViewTop ) ) ;
|
||||
pViewInstanceBuf = ( void* )new ( pViewInstanceBuf ) cViewTop() ; break ;
|
||||
case VIEW_ID_FADE_D :
|
||||
NN_ASSERT( uInstanceSize == sizeof( cViewFadeD ) ) ;
|
||||
pViewInstanceBuf = ( void* )new ( pViewInstanceBuf ) cViewFadeD() ; break ;
|
||||
case VIEW_ID_FADE_U :
|
||||
NN_ASSERT( uInstanceSize == sizeof( cViewFadeU ) ) ;
|
||||
pViewInstanceBuf = ( void* )new ( pViewInstanceBuf ) cViewFadeU() ; break ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// 各シーンのインスタンスサイズを得る
|
||||
//-----------------------------------------------------
|
||||
u32 cStageManager::_SceneGetInstanceSize( u32 uSceneID )
|
||||
{
|
||||
switch( uSceneID )
|
||||
{
|
||||
case SCENE_ID_START : return sizeof( cSceneStart ) ;
|
||||
case SCENE_ID_MAIN : return sizeof( cSceneMain ) ;
|
||||
default : NN_ASSERT( 0 ) ; break ;
|
||||
}
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// 各シーンのインスタンスを初期化(コンストラクト)する
|
||||
//-----------------------------------------------------
|
||||
bool cStageManager::_SceneConstruct( u32 uSceneID , void* pSceneInstanceBuf , u32 uInstanceSize )
|
||||
{
|
||||
( void )uInstanceSize ;
|
||||
|
||||
switch( uSceneID )
|
||||
{
|
||||
case SCENE_ID_START :
|
||||
NN_ASSERT( uInstanceSize == sizeof( cSceneStart ) ) ;
|
||||
pSceneInstanceBuf = ( void* )new ( pSceneInstanceBuf ) cSceneStart() ; break ;
|
||||
case SCENE_ID_MAIN :
|
||||
NN_ASSERT( uInstanceSize == sizeof( cSceneMain ) ) ;
|
||||
pSceneInstanceBuf = ( void* )new ( pSceneInstanceBuf ) cSceneMain() ; break ;
|
||||
default : NN_ASSERT( 0 ) ; break ;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// 初期化の最後に呼ばれる
|
||||
//-----------------------------------------------------
|
||||
void cStageManager::_InitializeAfter( void )
|
||||
{
|
||||
// ManualSwapEnable( true ) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// 初期化の最後に呼ばれる
|
||||
//-----------------------------------------------------
|
||||
void cStageManager::_FinalizeBefore( void )
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// 毎ループの一番最初に呼ばれる
|
||||
//-----------------------------------------------------
|
||||
void cStageManager::_StageProcLoopBefore( void )
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// 毎ループの一番最後に呼ばれる
|
||||
//-----------------------------------------------------
|
||||
void cStageManager::_StageProcLoopAfter( void )
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// システムコールバック:ホームボタンシングルクリック
|
||||
//-----------------------------------------------------
|
||||
bool cStageManager::_CBHomeButtonSingle( bool fHomeButtonEnable )
|
||||
{
|
||||
(void)fHomeButtonEnable;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// システムコールバック:ホームボタンシングルクリック
|
||||
//-----------------------------------------------------
|
||||
bool cStageManager::_CBHomeButtonDouble( bool fHomeButtonEnable )
|
||||
{
|
||||
(void)fHomeButtonEnable;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// システムコールバック:スリープ開始
|
||||
//-----------------------------------------------------
|
||||
bool cStageManager::_CBSleep( void )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// システムコールバック:スリープからの復帰
|
||||
//-----------------------------------------------------
|
||||
bool cStageManager::_CBAwake( void )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// システムコールバック:シャットダウン
|
||||
//-----------------------------------------------------
|
||||
bool cStageManager::_CBShutdown( void )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
#if defined ENABLE_DEBUG_COMMAND
|
||||
//-----------------------------------------------------
|
||||
// デバッグ表示の続きの表示を行う
|
||||
//-----------------------------------------------------
|
||||
void cStageManager::_DbgDrawInfoEtc( s32 x , s32 y )
|
||||
{
|
||||
( void )x ;
|
||||
( void )y ;
|
||||
}
|
||||
#endif
|
@ -0,0 +1,69 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file StageManager.h
|
||||
// @brief ステージマネージャ
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
#if !defined __STAGEMANAGER__
|
||||
#define __STAGEMANAGER__
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Include
|
||||
//-----------------------------------------------------
|
||||
|
||||
#include <DGF/StageManagerBase.h>
|
||||
#include "./ObjectIDList.h"
|
||||
#include "../common/common_app.h"
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Variables
|
||||
//-----------------------------------------------------
|
||||
|
||||
/**
|
||||
@brief インスタンス取得用
|
||||
*/
|
||||
#define iStageManager cStageManager::GetInstance()
|
||||
|
||||
//-----------------------------------------------------
|
||||
// function
|
||||
//-----------------------------------------------------
|
||||
|
||||
class cStageManager : public cStageManagerBase
|
||||
{
|
||||
private:
|
||||
static cStageManager m_Instance ;
|
||||
|
||||
public:
|
||||
cStageManager() ;
|
||||
virtual ~cStageManager() ;
|
||||
|
||||
public:
|
||||
static cStageManager& GetInstance() ;
|
||||
|
||||
protected:
|
||||
virtual void _StereoCameraInitialize( void ) ;
|
||||
virtual u32 _ViewGetInstanceSize( u32 uViewID ) ;
|
||||
virtual bool _ViewConstruct( u32 uViewID , void* pViewInstanceBuf , u32 uInstanceSize ) ;
|
||||
virtual u32 _SceneGetInstanceSize( u32 uSceneID ) ;
|
||||
virtual bool _SceneConstruct( u32 uSceneID , void* pSceneInstanceBuf , u32 uInstanceSize ) ;
|
||||
|
||||
virtual void _InitializeAfter( void ) ;
|
||||
virtual void _FinalizeBefore( void ) ;
|
||||
virtual void _StageProcLoopBefore( void ) ;
|
||||
virtual void _StageProcLoopAfter( void ) ;
|
||||
virtual bool _CBHomeButtonSingle( bool fHomeButtonEnable ) ;
|
||||
virtual bool _CBHomeButtonDouble( bool fHomeButtonEnable ) ;
|
||||
virtual bool _CBSleep( void ) ;
|
||||
virtual bool _CBAwake( void ) ;
|
||||
virtual bool _CBShutdown( void ) ;
|
||||
|
||||
#if defined ENABLE_DEBUG_COMMAND
|
||||
virtual void _DbgDrawInfoEtc( s32 x , s32 y ) ;
|
||||
#endif
|
||||
|
||||
} ;
|
||||
|
||||
#endif // __STAGEMANAGER__
|
@ -0,0 +1,16 @@
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# ソース列挙用ファイル(仮)
|
||||
#
|
||||
# ここにはこのディレクトリのソースを列挙します。
|
||||
# パスはrootからの相対パスで記述してください。
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SOURCES[] += \
|
||||
./Sources/Stage/StageManager.cpp \
|
||||
|
||||
# 必要があればこのディレクトリのサブディレクトリの
|
||||
# ソース列挙ファイルをincludeしてください。
|
||||
#
|
||||
# ↓'#'を外して"subdir"を任意のディレクトリ名に変更
|
||||
#include ./subdir/sources.om
|
@ -0,0 +1,263 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file Renderer.cpp
|
||||
// @brief View基底クラス
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
#include <DCL/debug/DbgUtil.h>
|
||||
#include <DCL/utility/string/String.h>
|
||||
#include <DCL/graphics/util/GrpUtil.h>
|
||||
#include <DCL/system/File/FileSystem.h>
|
||||
#include <DCL/system/Device/DeviceTouchPanel.h>
|
||||
#include <DCL/system/CTR/CTRManager.h>
|
||||
#include <DCL/system/CTR/CTRGrpManager.h>
|
||||
#include <DCL/system/Resource/ResManager.h>
|
||||
#include "../../common/common_app.h"
|
||||
#include "../../stage/StageManager.h"
|
||||
#include "./Renderer.h"
|
||||
|
||||
|
||||
//--------------------------------------------------
|
||||
// Variables
|
||||
//--------------------------------------------------
|
||||
GLvoid * cRenderer::m_pScreenImage = NULL;
|
||||
|
||||
//--------------------------------------------------
|
||||
// Functions
|
||||
//--------------------------------------------------
|
||||
|
||||
|
||||
//--------------------------------------------------
|
||||
// コンストラクタ
|
||||
//--------------------------------------------------
|
||||
cRenderer::cRenderer():
|
||||
m_pArchive( NULL )
|
||||
{
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// デストラクタ
|
||||
//--------------------------------------------------
|
||||
cRenderer::~cRenderer()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 描画
|
||||
//--------------------------------------------------
|
||||
bool cRenderer::_DrawRenderer( void )
|
||||
{
|
||||
// 描画設定
|
||||
glDisable( GL_CULL_FACE );
|
||||
glDisable( GL_DEPTH_TEST );
|
||||
glDisable( GL_SCISSOR_TEST );
|
||||
glDisable( GL_STENCIL_TEST );
|
||||
glDisable( GL_POLYGON_OFFSET_FILL );
|
||||
glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
|
||||
glDepthMask( GL_TRUE );
|
||||
|
||||
// レイアウト描画
|
||||
m_Layout.CalculateMtx( m_DrawInfo );
|
||||
// m_Layout.Draw( m_DrawInfo );
|
||||
// add take 2010/05/19 --->
|
||||
DrawerBegin( m_DrawInfo ) ;
|
||||
DrawerDrawLayout( &m_Layout , m_DrawInfo ) ;
|
||||
DrawerEnd( m_DrawInfo ) ;
|
||||
// <--- add take 2010/05/19
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// レイアウト関係を初期化します。
|
||||
//--------------------------------------------------
|
||||
bool cRenderer::_InitializeRenderer( const wchar_t *pszArcName, const char *pszBclytName, const char *pszBclanName[], const int animNum )
|
||||
{
|
||||
NN_ASSERTMSG( pszArcName, "%s >> Null Pointer\n", __FUNCTION__ );
|
||||
NN_ASSERTMSG( pszBclytName, "%s >> Null Pointer\n", __FUNCTION__ );
|
||||
|
||||
// レイアウトファイルロード
|
||||
u32 length = this->LoadFile( pszArcName, &m_pArchive );
|
||||
if( length == 0 )
|
||||
return false;
|
||||
|
||||
// リソースアクセサ設定
|
||||
bool result = m_ResAcc.Attach( m_pArchive, "." );
|
||||
NN_ASSERTMSG( result, "%s >> Attach() Error\n", __FUNCTION__ );
|
||||
if( result == false )
|
||||
return false;
|
||||
|
||||
// フォント設定
|
||||
m_FontKey = m_ResAcc.RegistFont( iResManager.GetFontName(COMMON_APP_FONTIDX_NORMAL), iResManager.GetFont(COMMON_APP_FONTIDX_NORMAL) );
|
||||
NN_ASSERTMSG( m_FontKey, "%s >> FontKey Null Pointer\n", __FUNCTION__ );
|
||||
if( m_FontKey == NULL )
|
||||
return false;
|
||||
|
||||
// レイアウトリソースロード
|
||||
const void *pLayoutRes = m_ResAcc.GetResource( 0, pszBclytName );
|
||||
NN_ASSERTMSG( pLayoutRes, "%s >> GetResource(%s) Error\n", __FUNCTION__, pszBclytName );
|
||||
if( pLayoutRes == NULL )
|
||||
return false;
|
||||
|
||||
// レイアウト初期化
|
||||
result = m_Layout.Build( pLayoutRes, &m_ResAcc );
|
||||
NN_ASSERTMSG( result, "%s >> Build() Error\n", __FUNCTION__ );
|
||||
if( result == false )
|
||||
return false;
|
||||
|
||||
// アニメーションロード
|
||||
result = m_LayoutAnim.Init( &m_Layout, animNum, this );
|
||||
NN_ASSERTMSG( result, "%s >> Animation Init Error\n", __FUNCTION__ );
|
||||
if( result == false )
|
||||
return false;
|
||||
|
||||
if( pszBclanName )
|
||||
{
|
||||
// アニメ設定
|
||||
for( int i = 0 ; i < animNum ; i++ )
|
||||
{
|
||||
const void *pAnimRes = m_ResAcc.GetResource( 0, pszBclanName[i] );
|
||||
NN_ASSERTMSG( pAnimRes, "%s >> GetResource(%s) Error\n", __FUNCTION__, pszBclanName[i] );
|
||||
if( pAnimRes == NULL )
|
||||
return false;
|
||||
m_LayoutAnim.SetAnimation( i, pAnimRes, &m_ResAcc );
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// レンダリング情報を初期化します。
|
||||
//--------------------------------------------------
|
||||
bool cRenderer::_InitializeRenderState( void )
|
||||
{
|
||||
// 描画情報クラス初期化
|
||||
nw::ut::Rect rect = m_Layout.GetLayoutRect();
|
||||
nw::math::MTX44 projMatrix;
|
||||
nw::math::MTX34 viewMatrix;
|
||||
nw::math::VEC3 pos( 0, 0, 1 );
|
||||
nw::math::VEC3 up( 0, 1, 0 );
|
||||
nw::math::VEC3 target( 0, 0, 0 );
|
||||
|
||||
// 射影行列設定
|
||||
const u32 NEAR_CLIP = 0;
|
||||
const u32 FAR_CLIP = 500;
|
||||
nw::math::MTX44OrthoPivot( &projMatrix, rect.left, rect.right, rect.bottom, rect.top, NEAR_CLIP, FAR_CLIP, nw::math::PIVOT_UPSIDE_TO_TOP );
|
||||
m_DrawInfo.SetProjectionMtx( projMatrix );
|
||||
|
||||
// ビュー行列設定
|
||||
nw::math::MTX34LookAt( &viewMatrix, &pos, &up, &target );
|
||||
m_DrawInfo.SetViewMtx( viewMatrix );
|
||||
m_DrawInfo.SetGraphicsResource( iResManager.GetLytGraphicsResource() );
|
||||
m_Layout.Animate();
|
||||
m_Layout.CalculateMtx( m_DrawInfo );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// レイアウト関係を破棄します。
|
||||
//--------------------------------------------------
|
||||
void cRenderer::_FinalizeRenderer( void )
|
||||
{
|
||||
// フォント解放
|
||||
if( m_FontKey )
|
||||
{
|
||||
m_ResAcc.UnregistFont( m_FontKey );
|
||||
m_FontKey = NULL;
|
||||
}
|
||||
|
||||
// レイアウト解放
|
||||
m_LayoutAnim.Term();
|
||||
if( m_ResAcc.IsAttached() )
|
||||
m_ResAcc.Detach();
|
||||
|
||||
// アーカイブ解放
|
||||
if( m_pArchive )
|
||||
FreeFromDeviceHeap( m_pArchive );
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// ファイルロード
|
||||
// @param <1> ファイル名
|
||||
// @param <2> ロード用バッファ
|
||||
// @return true : 成功
|
||||
// false : 失敗
|
||||
//--------------------------------------------------
|
||||
u32 cRenderer::LoadFile( const wchar_t *pszFileName, void **ppBuffer )
|
||||
{
|
||||
// ファイルサイズ取得
|
||||
int length = iFileSystem.GetLength( pszFileName );
|
||||
NN_ASSERTMSG( length > 0, "%s >> GetLength() Error\n", __FUNCTION__ );
|
||||
if( length == 0 )
|
||||
return 0;
|
||||
|
||||
// ファイルイメージ用メモリ確保
|
||||
*ppBuffer = AllocateFromDeviceHeap( length, COMMON_APP_LYTARC_ALIGN );
|
||||
NN_ASSERTMSG( *ppBuffer, "%s >> AllocateFromDeviceHeap() Error length=%d\n", __FUNCTION__, length );
|
||||
if( *ppBuffer == NULL )
|
||||
return 0;
|
||||
|
||||
// ファイルロード
|
||||
int readLength = iFileSystem.Read( pszFileName, *ppBuffer, length );
|
||||
NN_ASSERTMSG( readLength == length, "%s >> Read() Error\n", __FUNCTION__ );
|
||||
if( readLength != length )
|
||||
return 0;
|
||||
|
||||
return length;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// テクスチャ情報を設定します
|
||||
// @return true : 成功
|
||||
// false : 失敗
|
||||
//--------------------------------------------------
|
||||
bool cRenderer::SetTextureInfo( nw::lyt::Pane *pPane,
|
||||
void *pTextureBuffer,
|
||||
u16 width,
|
||||
u16 height,
|
||||
u16 realWidth,
|
||||
u16 realHeight,
|
||||
nw::lyt::TexFormat format,
|
||||
GLenum glTarget,
|
||||
GLenum glTexFormat,
|
||||
GLenum glTexType )
|
||||
{
|
||||
nw::lyt::TexSize size( width, height );
|
||||
nw::lyt::TexSize realSize( realWidth, realHeight );
|
||||
GLint texAddr;
|
||||
|
||||
// 先頭マテリアル取得
|
||||
nw::lyt::Material *pMaterial = pPane->GetMaterial();
|
||||
NN_ASSERT( pMaterial );
|
||||
if( pMaterial == NULL )
|
||||
return false;
|
||||
|
||||
// テクスチャマップ数チェック
|
||||
NN_ASSERT( pMaterial->GetTexMapNum() > 0 );
|
||||
if( pMaterial->GetTexMapNum() == 0 )
|
||||
return false;
|
||||
|
||||
// テクスチャマップ取得
|
||||
const nw::lyt::TexMap& textureMap = pMaterial->GetTexMap( 0 );
|
||||
|
||||
// テクスチャ書き換え
|
||||
glActiveTexture( GL_TEXTURE0 );
|
||||
glBindTexture( GL_TEXTURE_2D, textureMap.GetTextureObject() );
|
||||
glTexImage2D( GL_TEXTURE_2D | glTarget, 0, glTexFormat, realWidth, realHeight, 0, glTexFormat, glTexType, pTextureBuffer );
|
||||
|
||||
// テクスチャアドレス取得
|
||||
glGetTexParameteriv( GL_TEXTURE_2D, GL_TEXTURE_DATA_ADDR_DMP, &texAddr );
|
||||
|
||||
// テクスチャ情報設定
|
||||
nw::lyt::TextureInfo texInfo( textureMap.GetTextureObject(), nngxGetPhysicalAddr((uptr)texAddr), size, realSize, format );
|
||||
pMaterial->SetTexMap( 0, texInfo );
|
||||
|
||||
return true;
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file Renderer.h
|
||||
// @brief View基底クラス
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
#if !defined __RENDERER__
|
||||
#define __RENDERER__
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Include
|
||||
//-----------------------------------------------------
|
||||
#include <nn.h>
|
||||
#include <nn/types.h>
|
||||
#include <nn/fnd/fnd_ExpHeap.h>
|
||||
#include <nw/lyt.h>
|
||||
#include <DCL/graphics/layout/animation/PaneAnimation.h>
|
||||
#include <DCL/graphics/layout/animation/LayoutAnimation.h>
|
||||
#include <DCL/graphics/layout/ui/button/ButtonController.h>
|
||||
//#include "../../common/message/BxyMessage.h"
|
||||
#include <DGF/ViewBase.h>
|
||||
|
||||
#pragma diag_suppress 1301 // パディング警告の抑制
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Namespace
|
||||
//-----------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Define
|
||||
//-----------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Classes
|
||||
//-----------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------
|
||||
// @brief View基底クラス
|
||||
//------------------------------------------------------------
|
||||
class cRenderer : public cViewBase
|
||||
{
|
||||
public:
|
||||
cRenderer();
|
||||
virtual ~cRenderer();
|
||||
protected:
|
||||
nw::lyt::Layout m_Layout; // レイアウトデータ
|
||||
nw::lyt::DrawInfo m_DrawInfo; // レイアウト描画情報
|
||||
nw::lyt::ArcResourceAccessor m_ResAcc; // アーカイブリソースアクセサ
|
||||
cLayoutAnimation m_LayoutAnim; // レイアウトアニメーション
|
||||
cLayoutUI::UpdateInfo m_UIUpdateInfo; // UI更新情報
|
||||
nw::lyt::FontKey m_FontKey; // フォントキー
|
||||
void* m_pArchive; // レイアウトアーカイブ
|
||||
protected:
|
||||
static GLvoid* m_pScreenImage; // 共通イメージ
|
||||
protected:
|
||||
bool _InitializeRenderer( const wchar_t *pszArcName, const char *pszBclytName, const char *pszBclanName[] = NULL, const int animNum = 0 );
|
||||
bool _InitializeRenderState( void ) ;
|
||||
bool _DrawRenderer( void );
|
||||
void _FinalizeRenderer( void );
|
||||
u32 LoadFile( const wchar_t *pszFileName, void **ppBuffer );
|
||||
bool SetTextureInfo( nw::lyt::Pane *pPane, void *pTextureBuffer, u16 width, u16 height, u16 realWidth, u16 realHeight, nw::lyt::TexFormat format, GLenum glTarget, GLenum glTexFormat, GLenum glTexType );
|
||||
} ;
|
||||
|
||||
#endif // __RENDERER__
|
@ -0,0 +1,16 @@
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# ソース列挙用ファイル(仮)
|
||||
#
|
||||
# ここにはこのディレクトリのソースを列挙します。
|
||||
# パスはrootからの相対パスで記述してください。
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SOURCES[] += \
|
||||
./Sources/view/base/Renderer.cpp \
|
||||
|
||||
# 必要があればこのディレクトリのサブディレクトリの
|
||||
# ソース列挙ファイルをincludeしてください。
|
||||
#
|
||||
# ↓'#'を外して"subdir"を任意のディレクトリ名に変更
|
||||
#include ./subdir/sources.om
|
@ -0,0 +1,169 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file ViewFadeD.cpp
|
||||
// @brief 上画面ビュー
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
#include "./ViewFadeD.h"
|
||||
#include "../../stage/ObjectIDList.h"
|
||||
#include "../../stage/StageManager.h"
|
||||
#include <DCL/graphics/util/GrpUtil.h>
|
||||
|
||||
//--------------------------------------------------
|
||||
// コンストラクタ
|
||||
//--------------------------------------------------
|
||||
cViewFadeD::cViewFadeD() : m_Sequence(SEQUENCE_NONE)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// デストラクタ
|
||||
//--------------------------------------------------
|
||||
cViewFadeD::~cViewFadeD()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 動作
|
||||
//--------------------------------------------------
|
||||
bool cViewFadeD::Proc( void )
|
||||
{
|
||||
switch (m_Sequence)
|
||||
{
|
||||
case SEQUENCE_FADE_IN:
|
||||
{
|
||||
if(m_LayoutAnim.IsAnimation(ANIM_FADE_IN) == false)
|
||||
m_Sequence = SEQUENCE_IDLE;
|
||||
m_LayoutAnim.Update();
|
||||
}
|
||||
break;
|
||||
case SEQUENCE_FADE_OUT:
|
||||
{
|
||||
if(m_LayoutAnim.IsAnimation(ANIM_FADE_OUT) == false)
|
||||
m_Sequence = SEQUENCE_FINISH;
|
||||
m_LayoutAnim.Update();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
m_Layout.Animate();
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 上画面描画
|
||||
//--------------------------------------------------
|
||||
bool cViewFadeD::DrawTopScreen( cCTRGrpManager::STEREO eTarget )
|
||||
{
|
||||
(void)eTarget;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 下画面描画
|
||||
//--------------------------------------------------
|
||||
bool cViewFadeD::DrawTouchScreen( void )
|
||||
{
|
||||
_DrawRenderer();
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// メッセージ処理
|
||||
//--------------------------------------------------
|
||||
bool cViewFadeD::MessageProc( u32 uMsg , u32 uParam )
|
||||
{
|
||||
(void)uMsg;
|
||||
(void)uParam;
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case MESSAGE_START:
|
||||
m_LayoutAnim.DisableAnimationAll();
|
||||
m_LayoutAnim.EnableAnimation(ANIM_FADE_IN);
|
||||
m_Sequence = SEQUENCE_FADE_IN;
|
||||
break;
|
||||
case MESSAGE_FINISH:
|
||||
m_LayoutAnim.DisableAnimationAll();
|
||||
m_LayoutAnim.EnableAnimation(ANIM_FADE_OUT);
|
||||
m_Sequence = SEQUENCE_FADE_OUT;
|
||||
break;
|
||||
case MESSAGE_IS_FINISH:
|
||||
return (m_Sequence == SEQUENCE_FINISH);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 動作許可が出たときに呼ばれる
|
||||
//--------------------------------------------------
|
||||
void cViewFadeD::_EnableProcCall( void )
|
||||
{
|
||||
EnableUseablePadButtonsBit( 0 ) ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 動作不許可が出たときに呼ばれる
|
||||
//--------------------------------------------------
|
||||
void cViewFadeD::_DisableProcCall( void )
|
||||
{
|
||||
EnableUseablePadButtonsBit( 0 ) ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 初期化時に呼ばれる
|
||||
//--------------------------------------------------
|
||||
bool cViewFadeD::_InitializeInternal( void )
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
// レイアウトの初期化
|
||||
result = _InitializeLayout();
|
||||
NN_ASSERTMSG( result, "%s >> _InitializeLayout() Error\n", __FUNCTION__ );
|
||||
|
||||
// レイアウトの設定
|
||||
result = _SettingLayout();
|
||||
NN_ASSERTMSG( result, "%s >> _SettingLayout() Error\n", __FUNCTION__ );
|
||||
|
||||
// レンダリング情報の初期化
|
||||
result = _InitializeRenderState();
|
||||
NN_ASSERTMSG( result, "%s >> _InitializeRenderState() Error\n", __FUNCTION__ );
|
||||
|
||||
return result ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 終了時に呼ばれる
|
||||
//--------------------------------------------------
|
||||
bool cViewFadeD::_FinalizeInternal( void )
|
||||
{
|
||||
_FinalizeRenderer();
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// レイアウトを初期化
|
||||
//--------------------------------------------------
|
||||
bool cViewFadeD::_InitializeLayout( void )
|
||||
{
|
||||
const char* pszBclanName[ ANIM_MAX ] = { "Fade_Fade_Out_Black.bclan", "Fade_Fade_IN_Black.bclan" };
|
||||
|
||||
// レイアウト共通初期化処理
|
||||
bool result =_InitializeRenderer( L"rom:/layout/Fade.arc.l", "Fade.bclyt", pszBclanName, ANIM_MAX );
|
||||
NN_ASSERTMSG( result, "%s >> _InitializeRendererLayout failed.\n", __FUNCTION__ );
|
||||
|
||||
m_LayoutAnim.EnableAnimation(ANIM_FADE_IN);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// レイアウトの設定
|
||||
//--------------------------------------------------
|
||||
bool cViewFadeD::_SettingLayout( void )
|
||||
{
|
||||
return true;
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file ViewFadeU.h
|
||||
// @brief 上画面ビュー
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
#if !defined VIEW_FADE_D_H
|
||||
#define VIEW_FADE_D_H
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Include
|
||||
//-----------------------------------------------------
|
||||
|
||||
#include <nn.h>
|
||||
#include <nn/types.h>
|
||||
#include <nn/font.h>
|
||||
|
||||
#include "../base/Renderer.h"
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Variables
|
||||
//-----------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------
|
||||
// function
|
||||
//-----------------------------------------------------
|
||||
|
||||
class cViewFadeD : public cRenderer
|
||||
{
|
||||
public:
|
||||
// 必要ヒープサイズ
|
||||
// (!)必ず必要サイズを入力しておく事
|
||||
enum
|
||||
{
|
||||
HEAPSIZE = 512 * 1024 , //< ビューで使うヒープサイズを指定します
|
||||
DEVICE_HEAPSIZE = 256 * 1024 //< ビューで使うデバイスヒープサイズを指定します
|
||||
} ;
|
||||
|
||||
// シーケンス
|
||||
enum SEQUENCE
|
||||
{
|
||||
SEQUENCE_NONE,
|
||||
SEQUENCE_FADE_IN,
|
||||
SEQUENCE_IDLE,
|
||||
SEQUENCE_FADE_OUT,
|
||||
SEQUENCE_FINISH
|
||||
} ;
|
||||
|
||||
// メッセージID
|
||||
enum
|
||||
{
|
||||
MESSAGE_START,
|
||||
MESSAGE_FINISH,
|
||||
MESSAGE_IS_FINISH,
|
||||
MESSAGE_MAX
|
||||
} ;
|
||||
|
||||
// アニメID
|
||||
enum
|
||||
{
|
||||
ANIM_FADE_IN,
|
||||
ANIM_FADE_OUT,
|
||||
ANIM_MAX
|
||||
} ;
|
||||
|
||||
private:
|
||||
|
||||
bool _InitializeLayout( void );
|
||||
bool _SettingLayout( void );
|
||||
|
||||
SEQUENCE m_Sequence;
|
||||
|
||||
public:
|
||||
cViewFadeD() ;
|
||||
virtual ~cViewFadeD() ;
|
||||
|
||||
// ビューの名前を返す
|
||||
// (!)必ずこのクラスの名前を入力する事
|
||||
virtual const char* Name( void ) { return "ViewFadeU" ; } ;
|
||||
|
||||
// ヒープサイズを返す(ここは触らない)
|
||||
virtual u32 HeapSize( void ) { return HEAPSIZE ; } ;
|
||||
|
||||
// デバイスヒープサイズを返す(ここは触らない)
|
||||
virtual u32 DeviceHeapSize( void ) { return DEVICE_HEAPSIZE ; } ;
|
||||
|
||||
// 以下、オーバーライドして処理を入れる
|
||||
public:
|
||||
virtual bool Proc( void ) ;
|
||||
virtual bool DrawTopScreen( cCTRGrpManager::STEREO eTarget ) ;
|
||||
virtual bool DrawTouchScreen( void );
|
||||
virtual bool MessageProc( u32 uMsg , u32 uParam ) ;
|
||||
|
||||
private:
|
||||
virtual void _EnableProcCall( void ) ; //< 動作許可が出たときに呼ばれる
|
||||
virtual void _DisableProcCall( void ) ; //< 動作不許可が出たときに呼ばれる
|
||||
|
||||
protected:
|
||||
virtual bool _InitializeInternal( void ) ;
|
||||
virtual bool _FinalizeInternal( void ) ;
|
||||
} ;
|
||||
|
||||
#endif // VIEW_TOP_H
|
@ -0,0 +1,16 @@
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# ソース列挙用ファイル(仮)
|
||||
#
|
||||
# ここにはこのディレクトリのソースを列挙します。
|
||||
# パスはrootからの相対パスで記述してください。
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SOURCES[] += \
|
||||
./Sources/view/fade_d/ViewFadeD.cpp \
|
||||
|
||||
# 必要があればこのディレクトリのサブディレクトリの
|
||||
# ソース列挙ファイルをincludeしてください。
|
||||
#
|
||||
# ↓'#'を外して"subdir"を任意のディレクトリ名に変更
|
||||
#include ./subdir/sources.om
|
@ -0,0 +1,188 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file ViewFadeU.cpp
|
||||
// @brief 上画面ビュー
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
#include "./ViewFadeU.h"
|
||||
#include "../../stage/ObjectIDList.h"
|
||||
#include "../../stage/StageManager.h"
|
||||
#include <DCL/graphics/util/GrpUtil.h>
|
||||
|
||||
//--------------------------------------------------
|
||||
// コンストラクタ
|
||||
//--------------------------------------------------
|
||||
cViewFadeU::cViewFadeU() : m_Sequence(SEQUENCE_NONE)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// デストラクタ
|
||||
//--------------------------------------------------
|
||||
cViewFadeU::~cViewFadeU()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 動作
|
||||
//--------------------------------------------------
|
||||
bool cViewFadeU::Proc( void )
|
||||
{
|
||||
switch (m_Sequence)
|
||||
{
|
||||
case SEQUENCE_FADE_IN:
|
||||
{
|
||||
if(m_LayoutAnim.IsAnimation(ANIM_FADE_IN) == false)
|
||||
m_Sequence = SEQUENCE_IDLE;
|
||||
m_LayoutAnim.Update();
|
||||
}
|
||||
break;
|
||||
case SEQUENCE_FADE_OUT:
|
||||
{
|
||||
if(m_LayoutAnim.IsAnimation(ANIM_FADE_OUT) == false)
|
||||
m_Sequence = SEQUENCE_FINISH;
|
||||
m_LayoutAnim.Update();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
m_Layout.Animate();
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 上画面描画
|
||||
//--------------------------------------------------
|
||||
bool cViewFadeU::DrawTopScreen( cCTRGrpManager::STEREO eTarget )
|
||||
{
|
||||
// 描画設定
|
||||
glDisable( GL_CULL_FACE );
|
||||
glDisable( GL_DEPTH_TEST );
|
||||
glDisable( GL_SCISSOR_TEST );
|
||||
glDisable( GL_STENCIL_TEST );
|
||||
glDisable( GL_POLYGON_OFFSET_FILL );
|
||||
glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
|
||||
glDepthMask( GL_TRUE );
|
||||
|
||||
// KAJU設定
|
||||
m_DrawInfo.SetProjectionMtx( iStageManager.GetTopScreenProjMtx( eTarget ) );
|
||||
m_DrawInfo.SetViewMtx( iStageManager.GetTopScreenViewMtx( eTarget ) );
|
||||
|
||||
// レイアウト描画
|
||||
m_Layout.CalculateMtx( m_DrawInfo );
|
||||
// m_Layout.Draw( m_DrawInfo );
|
||||
// add take 2010/05/19 --->
|
||||
DrawerBegin( m_DrawInfo ) ;
|
||||
DrawerDrawLayout( &m_Layout , m_DrawInfo ) ;
|
||||
DrawerEnd( m_DrawInfo ) ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 下画面描画
|
||||
//--------------------------------------------------
|
||||
bool cViewFadeU::DrawTouchScreen( void )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// メッセージ処理
|
||||
//--------------------------------------------------
|
||||
bool cViewFadeU::MessageProc( u32 uMsg , u32 uParam )
|
||||
{
|
||||
(void)uMsg;
|
||||
(void)uParam;
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case MESSAGE_START:
|
||||
m_LayoutAnim.DisableAnimationAll();
|
||||
m_LayoutAnim.EnableAnimation(ANIM_FADE_IN);
|
||||
m_Sequence = SEQUENCE_FADE_IN;
|
||||
break;
|
||||
case MESSAGE_FINISH:
|
||||
m_LayoutAnim.DisableAnimationAll();
|
||||
m_LayoutAnim.EnableAnimation(ANIM_FADE_OUT);
|
||||
m_Sequence = SEQUENCE_FADE_OUT;
|
||||
break;
|
||||
case MESSAGE_IS_FINISH:
|
||||
return (m_Sequence == SEQUENCE_FINISH);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 動作許可が出たときに呼ばれる
|
||||
//--------------------------------------------------
|
||||
void cViewFadeU::_EnableProcCall( void )
|
||||
{
|
||||
EnableUseablePadButtonsBit( 0 ) ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 動作不許可が出たときに呼ばれる
|
||||
//--------------------------------------------------
|
||||
void cViewFadeU::_DisableProcCall( void )
|
||||
{
|
||||
EnableUseablePadButtonsBit( 0 ) ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 初期化時に呼ばれる
|
||||
//--------------------------------------------------
|
||||
bool cViewFadeU::_InitializeInternal( void )
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
// レイアウトの初期化
|
||||
result = _InitializeLayout();
|
||||
NN_ASSERTMSG( result, "%s >> _InitializeLayout() Error\n", __FUNCTION__ );
|
||||
|
||||
// レイアウトの設定
|
||||
result = _SettingLayout();
|
||||
NN_ASSERTMSG( result, "%s >> _SettingLayout() Error\n", __FUNCTION__ );
|
||||
|
||||
// レンダリング情報の初期化
|
||||
result = _InitializeRenderState();
|
||||
NN_ASSERTMSG( result, "%s >> _InitializeRenderState() Error\n", __FUNCTION__ );
|
||||
|
||||
return result ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 終了時に呼ばれる
|
||||
//--------------------------------------------------
|
||||
bool cViewFadeU::_FinalizeInternal( void )
|
||||
{
|
||||
_FinalizeRenderer();
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// レイアウトを初期化
|
||||
//--------------------------------------------------
|
||||
bool cViewFadeU::_InitializeLayout( void )
|
||||
{
|
||||
const char* pszBclanName[ ANIM_MAX ] = { "Fade_Fade_Out_Black.bclan", "Fade_Fade_IN_Black.bclan" };
|
||||
|
||||
// レイアウト共通初期化処理
|
||||
bool result =_InitializeRenderer( L"rom:/layout/Fade.arc.l", "Fade.bclyt", pszBclanName, ANIM_MAX );
|
||||
NN_ASSERTMSG( result, "%s >> _InitializeRendererLayout failed.\n", __FUNCTION__ );
|
||||
|
||||
m_LayoutAnim.EnableAnimation(ANIM_FADE_IN);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// レイアウトの設定
|
||||
//--------------------------------------------------
|
||||
bool cViewFadeU::_SettingLayout( void )
|
||||
{
|
||||
return true;
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file ViewFadeU.h
|
||||
// @brief 上画面ビュー
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
#if !defined VIEW_FADE_U_H
|
||||
#define VIEW_FADE_U_H
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Include
|
||||
//-----------------------------------------------------
|
||||
|
||||
#include <nn.h>
|
||||
#include <nn/types.h>
|
||||
#include <nn/font.h>
|
||||
|
||||
#include "../base/Renderer.h"
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Variables
|
||||
//-----------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------
|
||||
// function
|
||||
//-----------------------------------------------------
|
||||
|
||||
class cViewFadeU : public cRenderer
|
||||
{
|
||||
public:
|
||||
// 必要ヒープサイズ
|
||||
// (!)必ず必要サイズを入力しておく事
|
||||
enum
|
||||
{
|
||||
HEAPSIZE = 512 * 1024 , //< ビューで使うヒープサイズを指定します
|
||||
DEVICE_HEAPSIZE = 256 * 1024 //< ビューで使うデバイスヒープサイズを指定します
|
||||
} ;
|
||||
|
||||
// シーケンス
|
||||
enum SEQUENCE
|
||||
{
|
||||
SEQUENCE_NONE,
|
||||
SEQUENCE_FADE_IN,
|
||||
SEQUENCE_IDLE,
|
||||
SEQUENCE_FADE_OUT,
|
||||
SEQUENCE_FINISH
|
||||
} ;
|
||||
|
||||
// メッセージID
|
||||
enum
|
||||
{
|
||||
MESSAGE_START,
|
||||
MESSAGE_FINISH,
|
||||
MESSAGE_IS_FINISH,
|
||||
MESSAGE_MAX
|
||||
} ;
|
||||
|
||||
// アニメID
|
||||
enum
|
||||
{
|
||||
ANIM_FADE_IN,
|
||||
ANIM_FADE_OUT,
|
||||
ANIM_MAX
|
||||
} ;
|
||||
|
||||
private:
|
||||
|
||||
bool _InitializeLayout( void );
|
||||
bool _SettingLayout( void );
|
||||
|
||||
SEQUENCE m_Sequence;
|
||||
|
||||
public:
|
||||
cViewFadeU() ;
|
||||
virtual ~cViewFadeU() ;
|
||||
|
||||
// ビューの名前を返す
|
||||
// (!)必ずこのクラスの名前を入力する事
|
||||
virtual const char* Name( void ) { return "ViewFadeU" ; } ;
|
||||
|
||||
// ヒープサイズを返す(ここは触らない)
|
||||
virtual u32 HeapSize( void ) { return HEAPSIZE ; } ;
|
||||
|
||||
// デバイスヒープサイズを返す(ここは触らない)
|
||||
virtual u32 DeviceHeapSize( void ) { return DEVICE_HEAPSIZE ; } ;
|
||||
|
||||
// 以下、オーバーライドして処理を入れる
|
||||
public:
|
||||
virtual bool Proc( void ) ;
|
||||
virtual bool DrawTopScreen( cCTRGrpManager::STEREO eTarget ) ;
|
||||
virtual bool DrawTouchScreen( void );
|
||||
virtual bool MessageProc( u32 uMsg , u32 uParam ) ;
|
||||
|
||||
private:
|
||||
virtual void _EnableProcCall( void ) ; //< 動作許可が出たときに呼ばれる
|
||||
virtual void _DisableProcCall( void ) ; //< 動作不許可が出たときに呼ばれる
|
||||
|
||||
protected:
|
||||
virtual bool _InitializeInternal( void ) ;
|
||||
virtual bool _FinalizeInternal( void ) ;
|
||||
} ;
|
||||
|
||||
#endif // VIEW_TOP_H
|
@ -0,0 +1,16 @@
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# ソース列挙用ファイル(仮)
|
||||
#
|
||||
# ここにはこのディレクトリのソースを列挙します。
|
||||
# パスはrootからの相対パスで記述してください。
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SOURCES[] += \
|
||||
./Sources/view/fade_u/ViewFadeU.cpp \
|
||||
|
||||
# 必要があればこのディレクトリのサブディレクトリの
|
||||
# ソース列挙ファイルをincludeしてください。
|
||||
#
|
||||
# ↓'#'を外して"subdir"を任意のディレクトリ名に変更
|
||||
#include ./subdir/sources.om
|
@ -0,0 +1,137 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file ViewMain.cpp
|
||||
// @brief メインビュー
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
#include "./ViewMain.h"
|
||||
#include "../../stage/ObjectIDList.h"
|
||||
#include "../../stage/StageManager.h"
|
||||
|
||||
//--------------------------------------------------
|
||||
// コンストラクタ
|
||||
//--------------------------------------------------
|
||||
cViewMain::cViewMain() : m_Sequence(SEQUENCE_NONE)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// デストラクタ
|
||||
//--------------------------------------------------
|
||||
cViewMain::~cViewMain()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 動作
|
||||
//--------------------------------------------------
|
||||
bool cViewMain::Proc( void )
|
||||
{
|
||||
// アニメーション更新
|
||||
m_LayoutAnim.Update();
|
||||
m_Layout.Animate();
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 上画面描画
|
||||
//--------------------------------------------------
|
||||
bool cViewMain::DrawTopScreen( cCTRGrpManager::STEREO eTarget )
|
||||
{
|
||||
(void)eTarget;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 下画面描画
|
||||
//--------------------------------------------------
|
||||
bool cViewMain::DrawTouchScreen( void )
|
||||
{
|
||||
_DrawRenderer();
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// メッセージ処理
|
||||
//--------------------------------------------------
|
||||
bool cViewMain::MessageProc( u32 uMsg , u32 uParam )
|
||||
{
|
||||
(void)uMsg;
|
||||
(void)uParam;
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 動作許可が出たときに呼ばれる
|
||||
//--------------------------------------------------
|
||||
void cViewMain::_EnableProcCall( void )
|
||||
{
|
||||
EnableUseablePadButtonsBit( 0 ) ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 動作不許可が出たときに呼ばれる
|
||||
//--------------------------------------------------
|
||||
void cViewMain::_DisableProcCall( void )
|
||||
{
|
||||
EnableUseablePadButtonsBit( 0 ) ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 初期化時に呼ばれる
|
||||
//--------------------------------------------------
|
||||
bool cViewMain::_InitializeInternal( void )
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
// レイアウトの初期化
|
||||
result = _InitializeLayout();
|
||||
NN_ASSERTMSG( result, "%s >> _InitializeLayout() Error\n", __FUNCTION__ );
|
||||
|
||||
// レイアウトの設定
|
||||
result = _SettingLayout();
|
||||
NN_ASSERTMSG( result, "%s >> _SettingLayout() Error\n", __FUNCTION__ );
|
||||
|
||||
// レンダリング情報の初期化
|
||||
result = _InitializeRenderState();
|
||||
NN_ASSERTMSG( result, "%s >> _InitializeRenderState() Error\n", __FUNCTION__ );
|
||||
|
||||
m_Sequence = SEQUENCE_FADE_IN;
|
||||
return result ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 終了時に呼ばれる
|
||||
//--------------------------------------------------
|
||||
bool cViewMain::_FinalizeInternal( void )
|
||||
{
|
||||
_FinalizeRenderer();
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// レイアウトを初期化
|
||||
//--------------------------------------------------
|
||||
bool cViewMain::_InitializeLayout( void )
|
||||
{
|
||||
const char* pszBclanName[ ANIM_MAX ] = { "D_BG_Fade_IN.bclan" };
|
||||
|
||||
// レイアウト共通初期化処理
|
||||
bool result =_InitializeRenderer( L"rom:/layout/D_BG.arc.l", "D_BG.bclyt", pszBclanName, ANIM_MAX );
|
||||
NN_ASSERTMSG( result, "%s >> _InitializeRendererLayout failed.\n", __FUNCTION__ );
|
||||
|
||||
m_LayoutAnim.EnableAnimation(ANIM_FADE_IN);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// レイアウトの設定
|
||||
//--------------------------------------------------
|
||||
bool cViewMain::_SettingLayout( void )
|
||||
{
|
||||
return true;
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file ViewMain.h
|
||||
// @brief メインビュー
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
#if !defined VIEW_MAIN_H
|
||||
#define VIEW_MAIN_H
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Include
|
||||
//-----------------------------------------------------
|
||||
|
||||
#include <nn.h>
|
||||
#include <nn/types.h>
|
||||
#include <nn/font.h>
|
||||
|
||||
#include "../base/Renderer.h"
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Variables
|
||||
//-----------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------
|
||||
// function
|
||||
//-----------------------------------------------------
|
||||
|
||||
class cViewMain : public cRenderer
|
||||
{
|
||||
public:
|
||||
// 必要ヒープサイズ
|
||||
// (!)必ず必要サイズを入力しておく事
|
||||
enum
|
||||
{
|
||||
HEAPSIZE = 512 * 1024 , //< ビューで使うヒープサイズを指定します
|
||||
DEVICE_HEAPSIZE = 256 * 1024 //< ビューで使うデバイスヒープサイズを指定します
|
||||
} ;
|
||||
|
||||
// シーケンス
|
||||
enum SEQUENCE
|
||||
{
|
||||
SEQUENCE_NONE,
|
||||
SEQUENCE_FADE_IN,
|
||||
SEQUENCE_IDLE
|
||||
} ;
|
||||
|
||||
// アニメID
|
||||
enum
|
||||
{
|
||||
ANIM_FADE_IN,
|
||||
ANIM_MAX
|
||||
} ;
|
||||
|
||||
private:
|
||||
|
||||
bool _InitializeLayout( void );
|
||||
bool _SettingLayout( void );
|
||||
|
||||
SEQUENCE m_Sequence;
|
||||
|
||||
public:
|
||||
cViewMain() ;
|
||||
virtual ~cViewMain() ;
|
||||
|
||||
// ビューの名前を返す
|
||||
// (!)必ずこのクラスの名前を入力する事
|
||||
virtual const char* Name( void ) { return "ViewMain" ; } ;
|
||||
|
||||
// ヒープサイズを返す(ここは触らない)
|
||||
virtual u32 HeapSize( void ) { return HEAPSIZE ; } ;
|
||||
|
||||
// デバイスヒープサイズを返す(ここは触らない)
|
||||
virtual u32 DeviceHeapSize( void ) { return DEVICE_HEAPSIZE ; } ;
|
||||
|
||||
// 以下、オーバーライドして処理を入れる
|
||||
public:
|
||||
virtual bool Proc( void ) ;
|
||||
virtual bool DrawTopScreen( cCTRGrpManager::STEREO eTarget ) ;
|
||||
virtual bool DrawTouchScreen( void );
|
||||
virtual bool MessageProc( u32 uMsg , u32 uParam ) ;
|
||||
|
||||
private:
|
||||
virtual void _EnableProcCall( void ) ; //< 動作許可が出たときに呼ばれる
|
||||
virtual void _DisableProcCall( void ) ; //< 動作不許可が出たときに呼ばれる
|
||||
|
||||
protected:
|
||||
virtual bool _InitializeInternal( void ) ;
|
||||
virtual bool _FinalizeInternal( void ) ;
|
||||
} ;
|
||||
|
||||
#endif // VIEW_MAIN_H
|
@ -0,0 +1,16 @@
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# ソース列挙用ファイル(仮)
|
||||
#
|
||||
# ここにはこのディレクトリのソースを列挙します。
|
||||
# パスはrootからの相対パスで記述してください。
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SOURCES[] += \
|
||||
./Sources/view/main/ViewMain.cpp \
|
||||
|
||||
# 必要があればこのディレクトリのサブディレクトリの
|
||||
# ソース列挙ファイルをincludeしてください。
|
||||
#
|
||||
# ↓'#'を外して"subdir"を任意のディレクトリ名に変更
|
||||
#include ./subdir/sources.om
|
@ -0,0 +1,17 @@
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# ソース列挙用ファイル(仮)
|
||||
#
|
||||
# ここにはこのディレクトリのソースを列挙します。
|
||||
# パスはrootからの相対パスで記述してください。
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# 必要があればこのディレクトリのサブディレクトリの
|
||||
# ソース列挙ファイルをincludeしてください。
|
||||
#
|
||||
# ↓'#'を外して"subdir"を任意のディレクトリ名に変更
|
||||
include ./Sources/view/fade_d/sources.om
|
||||
include ./Sources/view/fade_u/sources.om
|
||||
include ./Sources/view/main/sources.om
|
||||
include ./Sources/view/top/sources.om
|
||||
include ./Sources/view/base/sources.om
|
@ -0,0 +1,157 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file ViewTop.cpp
|
||||
// @brief 上画面ビュー
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
#include "./ViewTop.h"
|
||||
#include "../../stage/ObjectIDList.h"
|
||||
#include "../../stage/StageManager.h"
|
||||
#include <DCL/graphics/util/GrpUtil.h>
|
||||
|
||||
//--------------------------------------------------
|
||||
// コンストラクタ
|
||||
//--------------------------------------------------
|
||||
cViewTop::cViewTop() : m_Sequence(SEQUENCE_NONE)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// デストラクタ
|
||||
//--------------------------------------------------
|
||||
cViewTop::~cViewTop()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 動作
|
||||
//--------------------------------------------------
|
||||
bool cViewTop::Proc( void )
|
||||
{
|
||||
// アニメーション更新
|
||||
m_LayoutAnim.Update();
|
||||
m_Layout.Animate();
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 上画面描画
|
||||
//--------------------------------------------------
|
||||
bool cViewTop::DrawTopScreen( cCTRGrpManager::STEREO eTarget )
|
||||
{
|
||||
// 描画設定
|
||||
glDisable( GL_CULL_FACE );
|
||||
glDisable( GL_DEPTH_TEST );
|
||||
glDisable( GL_SCISSOR_TEST );
|
||||
glDisable( GL_STENCIL_TEST );
|
||||
glDisable( GL_POLYGON_OFFSET_FILL );
|
||||
glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
|
||||
glDepthMask( GL_TRUE );
|
||||
|
||||
// KAJU設定
|
||||
m_DrawInfo.SetProjectionMtx( iStageManager.GetTopScreenProjMtx( eTarget ) );
|
||||
m_DrawInfo.SetViewMtx( iStageManager.GetTopScreenViewMtx( eTarget ) );
|
||||
|
||||
// レイアウト描画
|
||||
m_Layout.CalculateMtx( m_DrawInfo );
|
||||
// m_Layout.Draw( m_DrawInfo );
|
||||
// add take 2010/05/19 --->
|
||||
DrawerBegin( m_DrawInfo ) ;
|
||||
DrawerDrawLayout( &m_Layout , m_DrawInfo ) ;
|
||||
DrawerEnd( m_DrawInfo ) ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 下画面描画
|
||||
//--------------------------------------------------
|
||||
bool cViewTop::DrawTouchScreen( void )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// メッセージ処理
|
||||
//--------------------------------------------------
|
||||
bool cViewTop::MessageProc( u32 uMsg , u32 uParam )
|
||||
{
|
||||
(void)uMsg;
|
||||
(void)uParam;
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 動作許可が出たときに呼ばれる
|
||||
//--------------------------------------------------
|
||||
void cViewTop::_EnableProcCall( void )
|
||||
{
|
||||
EnableUseablePadButtonsBit( 0 ) ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 動作不許可が出たときに呼ばれる
|
||||
//--------------------------------------------------
|
||||
void cViewTop::_DisableProcCall( void )
|
||||
{
|
||||
EnableUseablePadButtonsBit( 0 ) ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 初期化時に呼ばれる
|
||||
//--------------------------------------------------
|
||||
bool cViewTop::_InitializeInternal( void )
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
// レイアウトの初期化
|
||||
result = _InitializeLayout();
|
||||
NN_ASSERTMSG( result, "%s >> _InitializeLayout() Error\n", __FUNCTION__ );
|
||||
|
||||
// レイアウトの設定
|
||||
result = _SettingLayout();
|
||||
NN_ASSERTMSG( result, "%s >> _SettingLayout() Error\n", __FUNCTION__ );
|
||||
|
||||
// レンダリング情報の初期化
|
||||
result = _InitializeRenderState();
|
||||
NN_ASSERTMSG( result, "%s >> _InitializeRenderState() Error\n", __FUNCTION__ );
|
||||
|
||||
m_Sequence = SEQUENCE_FADE_IN;
|
||||
return result ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// 終了時に呼ばれる
|
||||
//--------------------------------------------------
|
||||
bool cViewTop::_FinalizeInternal( void )
|
||||
{
|
||||
_FinalizeRenderer();
|
||||
return true ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// レイアウトを初期化
|
||||
//--------------------------------------------------
|
||||
bool cViewTop::_InitializeLayout( void )
|
||||
{
|
||||
const char* pszBclanName[ ANIM_MAX ] = { "U_Wait_3DS_Logo.bclan" };
|
||||
|
||||
// レイアウト共通初期化処理
|
||||
bool result =_InitializeRenderer( L"rom:/layout/U_Wait.arc.l", "U_Wait.bclyt", pszBclanName, ANIM_MAX );
|
||||
NN_ASSERTMSG( result, "%s >> _InitializeRendererLayout failed.\n", __FUNCTION__ );
|
||||
|
||||
m_LayoutAnim.EnableAnimation(ANIM_FADE_IN);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// レイアウトの設定
|
||||
//--------------------------------------------------
|
||||
bool cViewTop::_SettingLayout( void )
|
||||
{
|
||||
return true;
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
//**********************************************************************
|
||||
//
|
||||
// @file ViewTop.h
|
||||
// @brief 上画面ビュー
|
||||
//
|
||||
// @author K.Hiraoka
|
||||
//
|
||||
//**********************************************************************
|
||||
|
||||
#if !defined VIEW_TOP_H
|
||||
#define VIEW_TOP_H
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Include
|
||||
//-----------------------------------------------------
|
||||
|
||||
#include <nn.h>
|
||||
#include <nn/types.h>
|
||||
#include <nn/font.h>
|
||||
|
||||
#include "../base/Renderer.h"
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Variables
|
||||
//-----------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------
|
||||
// function
|
||||
//-----------------------------------------------------
|
||||
|
||||
class cViewTop : public cRenderer
|
||||
{
|
||||
public:
|
||||
// 必要ヒープサイズ
|
||||
// (!)必ず必要サイズを入力しておく事
|
||||
enum
|
||||
{
|
||||
HEAPSIZE = 512 * 1024 , //< ビューで使うヒープサイズを指定します
|
||||
DEVICE_HEAPSIZE = 256 * 1024 //< ビューで使うデバイスヒープサイズを指定します
|
||||
} ;
|
||||
|
||||
// シーケンス
|
||||
enum SEQUENCE
|
||||
{
|
||||
SEQUENCE_NONE,
|
||||
SEQUENCE_FADE_IN,
|
||||
SEQUENCE_IDLE,
|
||||
SEQUENCE_FADE_OUT,
|
||||
SEQUENCE_FINISH
|
||||
} ;
|
||||
|
||||
// メッセージID
|
||||
enum
|
||||
{
|
||||
MESSAGE_FINISH,
|
||||
MESSAGE_IS_FINISH,
|
||||
MESSAGE_MAX
|
||||
} ;
|
||||
|
||||
// アニメID
|
||||
enum
|
||||
{
|
||||
ANIM_FADE_IN,
|
||||
ANIM_MAX
|
||||
} ;
|
||||
|
||||
private:
|
||||
|
||||
bool _InitializeLayout( void );
|
||||
bool _SettingLayout( void );
|
||||
|
||||
cPaneAnimation m_Anim;
|
||||
SEQUENCE m_Sequence;
|
||||
|
||||
public:
|
||||
cViewTop() ;
|
||||
virtual ~cViewTop() ;
|
||||
|
||||
// ビューの名前を返す
|
||||
// (!)必ずこのクラスの名前を入力する事
|
||||
virtual const char* Name( void ) { return "ViewTop" ; } ;
|
||||
|
||||
// ヒープサイズを返す(ここは触らない)
|
||||
virtual u32 HeapSize( void ) { return HEAPSIZE ; } ;
|
||||
|
||||
// デバイスヒープサイズを返す(ここは触らない)
|
||||
virtual u32 DeviceHeapSize( void ) { return DEVICE_HEAPSIZE ; } ;
|
||||
|
||||
// 以下、オーバーライドして処理を入れる
|
||||
public:
|
||||
virtual bool Proc( void ) ;
|
||||
virtual bool DrawTopScreen( cCTRGrpManager::STEREO eTarget ) ;
|
||||
virtual bool DrawTouchScreen( void );
|
||||
virtual bool MessageProc( u32 uMsg , u32 uParam ) ;
|
||||
|
||||
private:
|
||||
virtual void _EnableProcCall( void ) ; //< 動作許可が出たときに呼ばれる
|
||||
virtual void _DisableProcCall( void ) ; //< 動作不許可が出たときに呼ばれる
|
||||
|
||||
protected:
|
||||
virtual bool _InitializeInternal( void ) ;
|
||||
virtual bool _FinalizeInternal( void ) ;
|
||||
} ;
|
||||
|
||||
#endif // VIEW_TOP_H
|
@ -0,0 +1,16 @@
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# ソース列挙用ファイル(仮)
|
||||
#
|
||||
# ここにはこのディレクトリのソースを列挙します。
|
||||
# パスはrootからの相対パスで記述してください。
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
SOURCES[] += \
|
||||
./Sources/view/top/ViewTop.cpp \
|
||||
|
||||
# 必要があればこのディレクトリのサブディレクトリの
|
||||
# ソース列挙ファイルをincludeしてください。
|
||||
#
|
||||
# ↓'#'を外して"subdir"を任意のディレクトリ名に変更
|
||||
#include ./subdir/sources.om
|
@ -9,3 +9,6 @@
|
||||
+ trunk r46347 erreula.h, erreulaライブラリ
|
||||
|
||||
r33437に、上記のファイルを個別に上書きした後のパッチ forCardCupForNBD.patch をコミットしています。
|
||||
|
||||
・NintendoWareForCtr-1_2_23
|
||||
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user