Integrate all the progress into master #6

Merged
jaby merged 595 commits from ToolBox into main 2025-01-01 13:17:44 +00:00
9 changed files with 55 additions and 8 deletions
Showing only changes of commit 2c44f21748 - Show all commits

View File

@ -0,0 +1,9 @@
#pragma once
#include <PSX/GPU/gpu_types.hpp>
namespace JabyEngine {
struct FontInfo {
GPU::SizeU16 VRAMSize;
GPU::SizeU16 FontSize;
};
}

View File

@ -0,0 +1,13 @@
#pragma once
#include "Type/types.hpp"
namespace JabyEngine {
struct DefaultFont {
static constexpr auto Info = FontInfo {
.VRAMSize = {64, 80},
.FontSize = {12, 16}
};
static void load(GPU::PositionU16 vram_dst);
};
}

View File

@ -1,3 +1,8 @@
#pragma once
#include "Type/types.hpp"
void test();
namespace JabyEngine {
struct FontWriter {
static void setup(GPU::PositionU16 vram_pos, const FontInfo& font_info);
};
}

1
Support/src/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
FontWriter/src/default_font_data.hpp

View File

@ -4,6 +4,8 @@ include $(JABY_ENGINE_DIR)/mkfile/RebuildTarget.mk
ARTIFACT = libFontWriter
BUILD_DIR = bin
DEFAULT_FONT_IMAGE = src/default_font_data.hpp
CCFLAGS += -I../../include -I$(JABY_ENGINE_DIR)/include
CCFLAGS += -save-temps=obj
@ -18,6 +20,9 @@ LIB_OBJS = $(filter-out $(MAIN_BOOT_OBJ) $(OVERLAY_BOOT_OBJ),$(OBJS))
#$(info $$var is [${MAIN_BOOT_OBJ}])
#$(info $$var2 is [${LIB_OBJS}])
$(DEFAULT_FONT_IMAGE): ressources/DefaultFont.png
jaby_engine_fconv --lz4 $< simple-tim clut4 | cpp_out --name default_font_data -o $@
#Linking rule
$(TARGET).a: $(LIB_OBJS)
@mkdir -p $(dir $@)
@ -29,7 +34,7 @@ $(LIB_DIR)/$(ARTIFACT).a: $(TARGET).a
cp $(TARGET).a $(LIB_DIR)/$(ARTIFACT).a
#Rules section for default compilation and linking
all: $(LIB_DIR)/$(ARTIFACT).a
all: $(DEFAULT_FONT_IMAGE) $(LIB_DIR)/$(ARTIFACT).a
clean:
rm -fr $(OUTPUT_DIR)

BIN
Support/src/FontWriter/ressources/DefaultFont.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,6 +0,0 @@
#include <FontWriter/FontWriter.hpp>
#include <stdio.h>
void test() {
printf("Hello Planschi c:\n");
}

View File

@ -0,0 +1,9 @@
#include "default_font_data.hpp"
#include <FontWriter/default_font.hpp>
#include <stdio.h>
namespace JabyEngine {
void DefaultFont :: load(GPU::PositionU16 vram_dst) {
printf("Loading DefaultFont @0x%p -> %lu\n", default_font_data, sizeof(default_font_data));
}
}

View File

@ -0,0 +1,8 @@
#include <FontWriter/font_writer.hpp>
#include <stdio.h>
namespace JabyEngine {
void FontWriter :: setup(GPU::PositionU16 vram_pos, const FontInfo& font_info) {
printf("Hello Planschi c:\n");
}
}