vn/code/vn_assets.md

50 lines
1.1 KiB
Markdown
Raw Normal View History

@table(Name, Path, IsPermanent) assets_desc:
{
2023-12-23 07:27:22 +00:00
{ None, "", true }
{ Error, "backgrounds/unknown.png", true }
////////////////////////////////
//~ sixten: backgrounds
{ DemoBackground, "backgrounds/test.jpg", false }
{ DDLCBackground, "backgrounds/ddlc.png", false }
////////////////////////////////
//~ sixten: characters
//- sixten: arthur
{ ArthurNormal, "characters/test_normal.png", false }
{ ArthurHappy, "characters/test_happy.png", false }
//- sixten: monika
{ MonikaLeaning, "characters/monika_leaning.png", false }
}
2023-12-23 07:27:22 +00:00
@table_gen
{
2023-12-23 07:27:22 +00:00
`typedef s32 asset_id;`
`enum`
`{`
@expand(assets_desc s) `AssetID_$(s.Name),`;
`AssetID_COUNT,`;
`};`
}
@table_gen_data(`char *`) AssetPathLUT:
{
2023-12-23 07:27:22 +00:00
@expand(assets_desc s)
`"$(s.Path)",`;
}
@table_gen_data(`bool`) AssetIsPermanentLUT:
{
2023-12-23 07:27:22 +00:00
@expand(assets_desc s)
`$(s.IsPermanent),`;
}
@table_gen_data(`char *`) AssetNameLUT:
{
2023-12-23 07:27:22 +00:00
@expand(assets_desc s)
`"$(s.Name)",`;
}