| 
									
										
										
										
											2009-07-28 21:32:10 +00:00
										 |  |  | // Copyright (C) 2003 Dolphin Project.
 | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | // This program is free software: you can redistribute it and/or modify
 | 
					
						
							|  |  |  | // it under the terms of the GNU General Public License as published by
 | 
					
						
							|  |  |  | // the Free Software Foundation, version 2.0.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // This program is distributed in the hope that it will be useful,
 | 
					
						
							|  |  |  | // but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					
						
							|  |  |  | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					
						
							|  |  |  | // GNU General Public License 2.0 for more details.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // A copy of the GPL 2.0 should have been included with the program.
 | 
					
						
							|  |  |  | // If not, see http://www.gnu.org/licenses/
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Official SVN repository and contact information can be found at
 | 
					
						
							|  |  |  | // http://code.google.com/p/dolphin-emu/
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef _BANNER_LOADER_GC_H_
 | 
					
						
							|  |  |  | #define _BANNER_LOADER_GC_H_
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "BannerLoader.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace DiscIO | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | class CBannerLoaderGC | 
					
						
							|  |  |  | 	: public IBannerLoader | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	public: | 
					
						
							|  |  |  | 		CBannerLoaderGC(DiscIO::IFileSystem& _rFileSystem); | 
					
						
							|  |  |  | 		virtual ~CBannerLoaderGC(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		virtual bool IsValid(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		virtual bool GetBanner(u32* _pBannerImage); | 
					
						
							| 
									
										
										
										
											2009-02-03 15:03:34 +00:00
										 |  |  | 		virtual bool GetName(std::string* _rName); | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  | 		virtual bool GetCompany(std::string& _rCompany); | 
					
						
							| 
									
										
										
										
											2009-02-03 15:03:34 +00:00
										 |  |  | 		virtual bool GetDescription(std::string* _rDescription); | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	private: | 
					
						
							|  |  |  | 		enum | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			DVD_BANNER_WIDTH  = 96, | 
					
						
							|  |  |  | 			DVD_BANNER_HEIGHT = 32 | 
					
						
							|  |  |  | 		}; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-22 07:42:17 +00:00
										 |  |  | 		enum BANNER_TYPE | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			BANNER_UNKNOWN, | 
					
						
							|  |  |  | 			BANNER_BNR1, | 
					
						
							|  |  |  | 			BANNER_BNR2, | 
					
						
							|  |  |  | 		}; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  | 		// Banner Comment
 | 
					
						
							|  |  |  | 		struct DVDBannerComment | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			char shortTitle[32]; // Short game title shown in IPL menu
 | 
					
						
							|  |  |  | 			char shortMaker[32]; // Short developer, publisher names shown in IPL menu
 | 
					
						
							|  |  |  | 			char longTitle[64]; // Long game title shown in IPL game start screen
 | 
					
						
							|  |  |  | 			char longMaker[64]; // Long developer, publisher names shown in IPL game start screen
 | 
					
						
							|  |  |  | 			char comment[128]; // Game description shown in IPL game start screen in two lines.
 | 
					
						
							|  |  |  | 		}; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		// "opening.bnr" file format for JP/US console
 | 
					
						
							|  |  |  | 		struct DVDBanner | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			u32 id; // 'BNR1'
 | 
					
						
							|  |  |  | 			u32 padding[7]; | 
					
						
							|  |  |  | 			u16 image[DVD_BANNER_WIDTH * DVD_BANNER_HEIGHT]; // RGB5A3 96x32 texture image
 | 
					
						
							|  |  |  | 			DVDBannerComment comment; | 
					
						
							|  |  |  | 		}; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		// "opening.bnr" file format for EU console
 | 
					
						
							|  |  |  | 		struct DVDBanner2 | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			u32 id; // 'BNR2'
 | 
					
						
							|  |  |  | 			u32 padding[7]; | 
					
						
							|  |  |  | 			u16 image[DVD_BANNER_WIDTH * DVD_BANNER_HEIGHT]; // RGB5A3 96x32 texture image
 | 
					
						
							|  |  |  | 			DVDBannerComment comment[6]; // Comments in six languages
 | 
					
						
							|  |  |  | 		}; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		u8* m_pBannerFile; | 
					
						
							|  |  |  | 		bool m_IsValid; | 
					
						
							| 
									
										
										
										
											2010-01-11 05:07:56 +00:00
										 |  |  | 		BANNER_TYPE m_BNRType; | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		void decode5A3image(u32* dst, u16* src, int width, int height); | 
					
						
							| 
									
										
										
										
											2009-01-22 07:42:17 +00:00
										 |  |  | 		BANNER_TYPE getBannerType(); | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  | }; | 
					
						
							| 
									
										
										
										
											2009-02-22 12:43:25 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-08 04:46:09 +00:00
										 |  |  | } // namespace
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 |