vn/code/vn_assets.md

60 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2024-01-20 11:18:57 +00:00
@table(Name, Path, IsPermanent, Scale) assets_desc:
{
2024-01-20 11:18:57 +00:00
{ None, "", true, 0 }
{ Error, "backgrounds/unknown.png", true, 0 }
2023-12-23 07:27:22 +00:00
////////////////////////////////
//~ sixten: backgrounds
2024-01-20 11:18:57 +00:00
{ DemoBackground, "backgrounds/test.jpg", false, 1 }
{ DDLCBackground, "backgrounds/ddlc.png", false, 1 }
2023-12-23 07:27:22 +00:00
////////////////////////////////
//~ sixten: characters
//- sixten: arthur
2024-01-20 11:18:57 +00:00
{ ArthurNormal, "characters/test_normal.png", false, 0.017 }
{ ArthurHappy, "characters/test_happy.png", false, 0.017 }
2023-12-23 07:27:22 +00:00
//- sixten: monika
2024-01-20 11:18:57 +00:00
{ MonikaLeaning, "characters/monika_leaning.png", false, 0.033 }
2023-12-23 07:27:22 +00:00
2024-01-21 20:01:00 +00:00
////////////////////////////////
//~ sixten: puzzles
{ Duck, "puzzles/duck.png", false, 1 }
}
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)",`;
2024-01-20 11:18:57 +00:00
}
@table_gen_data(`r32`) AssetScaleLUT:
{
@expand(assets_desc s)
`$(s.Scale),`;
}