Support PAL and NTSC splash image
This commit is contained in:
3
src/Library/.gitignore
vendored
3
src/Library/.gitignore
vendored
@@ -1 +1,2 @@
|
||||
src/BootLoader/splash_image_boot.hpp
|
||||
src/BootLoader/splash_image_pal_boot.hpp
|
||||
src/BootLoader/splash_image_ntsc_boot.hpp
|
@@ -3,7 +3,8 @@ JABY_ENGINE_DIR = ../../
|
||||
ARTIFACT = libJabyEngine_$(TV_FORMAT)
|
||||
BUILD_DIR = bin
|
||||
|
||||
SPLASH_IMAGE = src/BootLoader/splash_image_boot.hpp
|
||||
SPLASH_IMAGE = src/BootLoader/splash_image_pal_boot.hpp
|
||||
SPLASH_IMAGE_NTSC = src/BootLoader/splash_image_ntsc_boot.hpp
|
||||
|
||||
CCFLAGS += -Iinclude -I../../include
|
||||
CCFLAGS += -save-temps=obj
|
||||
@@ -24,13 +25,18 @@ $(LIB_DIR)/$(ARTIFACT).a: $(TARGET).a
|
||||
@mkdir -p $(LIB_DIR)
|
||||
cp $(TARGET).a $(LIB_DIR)/$(ARTIFACT).a
|
||||
|
||||
# Improve later
|
||||
$(SPLASH_IMAGE): ressources/Splash.png
|
||||
jaby_engine_fconv $< simple-tim full16 | cpp_out --name SplashScreen -o $@
|
||||
|
||||
$(SPLASH_IMAGE_NTSC): ressources/Splash_ntsc.png
|
||||
jaby_engine_fconv $< simple-tim full16 | cpp_out --name SplashScreen -o $@
|
||||
|
||||
#Rules section for default compilation and linking
|
||||
all: $(SPLASH_IMAGE) $(LIB_DIR)/$(ARTIFACT).a
|
||||
all: $(SPLASH_IMAGE) $(SPLASH_IMAGE_NTSC) $(LIB_DIR)/$(ARTIFACT).a
|
||||
|
||||
clean:
|
||||
rm -fr $(SPLASH_IMAGE)
|
||||
rm -fr $(SPLASH_IMAGE_NTSC)
|
||||
rm -fr $(OUTPUT_DIR)
|
||||
rm -fr $(LIB_DIR)/$(ARTIFACT).a
|
BIN
src/Library/ressources/Splash.png
(Stored with Git LFS)
BIN
src/Library/ressources/Splash.png
(Stored with Git LFS)
Binary file not shown.
BIN
src/Library/ressources/Splash_ntsc.png
(Stored with Git LFS)
Normal file
BIN
src/Library/ressources/Splash_ntsc.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -2,14 +2,16 @@
|
||||
#include <PSX/File/Processor/File_Processor.hpp>
|
||||
#include <PSX/GPU/GPU.hpp>
|
||||
|
||||
#include "splash_image_boot.hpp"
|
||||
#ifdef JABYENGINE_PAL
|
||||
#include "splash_image_pal_boot.hpp"
|
||||
#else
|
||||
#include "splash_image_ntsc_boot.hpp"
|
||||
#endif //JABYENGINE_PAL
|
||||
|
||||
namespace GPU {
|
||||
void display_logo() {
|
||||
Display::disable();
|
||||
|
||||
// Upload SplashScreen picture
|
||||
auto state = FileProcessor::create(reinterpret_cast<const uint32_t*>(SplashScreen), SimpleTIM(0, 0, 0, 0));
|
||||
auto state = FileProcessor::create(reinterpret_cast<const uint32_t*>(SplashScreen), SimpleTIM(32, 0, 0, 0));
|
||||
while(state.process((sizeof(SplashScreen)/sizeof(uint32_t))));
|
||||
|
||||
Display::enable();
|
||||
@@ -20,6 +22,7 @@ namespace GPU {
|
||||
Screen::configurate();
|
||||
Screen::exchange_buffer_and_display();
|
||||
|
||||
quick_fill_fast(Color24::Black(), PositionU16(0, 0), SizeU16(640, 512));
|
||||
GPU::wait_ready_for_CMD();
|
||||
quick_fill_fast(Color24::Black(), PositionU16(32, 0), SizeU16(Display::Width, Display::Height));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user