yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::app::gfx::scad_format Namespace Reference

Loading from prototype SCAD format. More...

Classes

struct  CgxHeader
 Cgx file header キャラクタ(.SCH)ファイル ヘッダー情報 アドレス 説明 00000 - 00003 ファイルタイプ "SCH" 00004 - 00008 ビットモード "?BIT" 00009 - 00013 バージョンナンバー "Ver-????\n" 00014 - 00017 ヘッダーサイズ 00018 - 0001B ハード名 "SFC" or "CGB" or "GB" 0001C - 0001C BG/OBJフラグ(AGBの時) 0001D - 0001D Color Pallette Number 0001D - 000FF 予約 00100 - 001FF Color Path. More...
 

Functions

void FindMetastamp ()
 Find metastamp in CGX file.
 
absl::Status LoadCgx (uint8_t bpp, std::string_view filename, std::vector< uint8_t > &cgx_data, std::vector< uint8_t > &cgx_loaded, std::vector< uint8_t > &cgx_header)
 Load Cgx file (graphical content)
 
absl::Status LoadScr (std::string_view filename, uint8_t input_value, std::vector< uint8_t > &map_data)
 Load Scr file (screen data)
 
absl::Status DrawScrWithCgx (uint8_t bpp, std::vector< uint8_t > &map_bitmap_data, std::vector< uint8_t > &map_data, std::vector< uint8_t > &cgx_loaded)
 Draw screen tilemap with graphical data.
 
std::vector< SDL_Color > DecodeColFile (const std::string_view filename)
 Decode color file.
 
absl::Status DecodeObjFile (std::string_view filename, std::vector< uint8_t > &obj_data, std::vector< uint8_t > actual_obj_data, std::unordered_map< std::string, std::vector< uint8_t > > decoded_obj, std::vector< uint8_t > &decoded_extra_obj, int &obj_loaded)
 Decode obj file.
 

Variables

constexpr uint16_t kMatchedBytes [] = {0x4E, 0x41, 0x4B, 0x31, 0x39, 0x38, 0x39}
 
constexpr uint16_t kOffsetFromMatchedBytesEnd = 0x1D
 

Detailed Description

Loading from prototype SCAD format.

Function Documentation

◆ FindMetastamp()

void yaze::app::gfx::scad_format::FindMetastamp ( )

Find metastamp in CGX file.

Definition at line 20 of file scad_format.cc.

References kMatchedBytes, and kOffsetFromMatchedBytesEnd.

◆ LoadCgx()

absl::Status yaze::app::gfx::scad_format::LoadCgx ( uint8_t bpp,
std::string_view filename,
std::vector< uint8_t > & cgx_data,
std::vector< uint8_t > & cgx_loaded,
std::vector< uint8_t > & cgx_header )

Load Cgx file (graphical content)

Definition at line 45 of file scad_format.cc.

References yaze::app::gfx::Bpp8SnesToIndexed().

Referenced by yaze::app::editor::GraphicsEditor::DrawCgxImport().

Here is the call graph for this function:

◆ LoadScr()

absl::Status yaze::app::gfx::scad_format::LoadScr ( std::string_view filename,
uint8_t input_value,
std::vector< uint8_t > & map_data )

Load Scr file (screen data)

Definition at line 70 of file scad_format.cc.

References yaze::app::gfx::GetTilesInfo(), and yaze::app::gfx::TileInfoToShort().

Referenced by yaze::app::editor::GraphicsEditor::DrawScrImport().

Here is the call graph for this function:

◆ DrawScrWithCgx()

absl::Status yaze::app::gfx::scad_format::DrawScrWithCgx ( uint8_t bpp,
std::vector< uint8_t > & map_data,
std::vector< uint8_t > & map_bitmap_data,
std::vector< uint8_t > & cgx_loaded )

Draw screen tilemap with graphical data.

Definition at line 122 of file scad_format.cc.

References yaze::app::gfx::GetTilesInfo().

Referenced by yaze::app::editor::GraphicsEditor::DrawScrImport().

Here is the call graph for this function:

◆ DecodeColFile()

std::vector< SDL_Color > yaze::app::gfx::scad_format::DecodeColFile ( const std::string_view filename)

Decode color file.

Definition at line 161 of file scad_format.cc.

Referenced by yaze::app::editor::GraphicsEditor::DrawPaletteControls().

◆ DecodeObjFile()

absl::Status yaze::app::gfx::scad_format::DecodeObjFile ( std::string_view filename,
std::vector< uint8_t > & obj_data,
std::vector< uint8_t > actual_obj_data,
std::unordered_map< std::string, std::vector< uint8_t > > decoded_obj,
std::vector< uint8_t > & decoded_extra_obj,
int & obj_loaded )

Decode obj file.

Definition at line 196 of file scad_format.cc.

Variable Documentation

◆ kMatchedBytes

uint16_t yaze::app::gfx::scad_format::kMatchedBytes[] = {0x4E, 0x41, 0x4B, 0x31, 0x39, 0x38, 0x39}
constexpr

Definition at line 58 of file scad_format.h.

Referenced by FindMetastamp().

◆ kOffsetFromMatchedBytesEnd

uint16_t yaze::app::gfx::scad_format::kOffsetFromMatchedBytesEnd = 0x1D
constexpr

Definition at line 59 of file scad_format.h.

Referenced by FindMetastamp().