NPCs 1: tools to integrate properties
This commit is contained in:
@ -17,6 +17,7 @@ cc_library(
|
||||
|
||||
add_sprites(name="game_collectibles", n=24)
|
||||
add_sprites(name="game_player", n=96)
|
||||
add_sprites(name="game_npcs", n=64)
|
||||
add_sprites(name="game_tiles", n=120)
|
||||
|
||||
run_binary(
|
||||
|
BIN
game/art/game_npcs.aseprite
Normal file
BIN
game/art/game_npcs.aseprite
Normal file
Binary file not shown.
8
game/art/game_npcs.h
Normal file
8
game/art/game_npcs.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef GAME_NPCS_H
|
||||
#define GAME_NPCS_H
|
||||
|
||||
#include "sys/sys.h"
|
||||
|
||||
extern sys_spritesheet spr_game_npcs;
|
||||
|
||||
#endif // GAME_NPCS_H
|
BIN
game/art/game_npcs.png
Normal file
BIN
game/art/game_npcs.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 500 B |
@ -15,11 +15,8 @@ const char* game_title() {
|
||||
void game_init() {
|
||||
sys_init();
|
||||
|
||||
game_collectibles_preinit();
|
||||
|
||||
map_game_map_create_entities();
|
||||
|
||||
game_collectibles_init();
|
||||
game_palette_init();
|
||||
game_player_init();
|
||||
}
|
||||
|
@ -20,8 +20,6 @@ struct {
|
||||
|
||||
sys_i32 game_collectible_wobb_frame = 0;
|
||||
|
||||
void game_collectibles_preinit() {
|
||||
}
|
||||
void game_collectible_create(sys_i32 x, sys_i32 y, game_collectible_type type) {
|
||||
assert(game_collectible_next < GAME_COLLECTIBLES_N && "too many collectibles");
|
||||
|
||||
@ -31,10 +29,6 @@ void game_collectible_create(sys_i32 x, sys_i32 y, game_collectible_type type) {
|
||||
game_collectibles[id].type = type;
|
||||
}
|
||||
|
||||
void game_collectibles_init() {
|
||||
|
||||
}
|
||||
|
||||
sys_i32 game_collectible_wobb() {
|
||||
return game_wobb3(game_collectible_wobb_frame & 0xff);
|
||||
}
|
||||
|
@ -17,10 +17,8 @@ typedef struct {
|
||||
bool collected;
|
||||
} game_collectible;
|
||||
|
||||
void game_collectibles_preinit();
|
||||
void game_collectible_create(sys_i32 x, sys_i32 y, game_collectible_type type);
|
||||
|
||||
void game_collectibles_init();
|
||||
void game_collectibles_update();
|
||||
void game_collectibles_draw();
|
||||
|
||||
|
1
game/game_npc.c
Normal file
1
game/game_npc.c
Normal file
@ -0,0 +1 @@
|
||||
#include "game_npc.h"
|
4
game/game_npc.h
Normal file
4
game/game_npc.h
Normal file
@ -0,0 +1,4 @@
|
||||
#ifndef GAME_NPC_H
|
||||
#define GAME_NPC_H
|
||||
|
||||
#endif // GAME_NPC_H
|
@ -11,7 +11,7 @@
|
||||
"iid": "7db5fd20-b0a0-11ee-9688-af2c6adbc1d6",
|
||||
"jsonVersion": "1.5.3",
|
||||
"appBuildId": 473703,
|
||||
"nextUid": 122,
|
||||
"nextUid": 130,
|
||||
"identifierStyle": "Lowercase",
|
||||
"toc": [],
|
||||
"worldLayout": "Free",
|
||||
@ -3477,6 +3477,227 @@
|
||||
"pivotX": 0,
|
||||
"pivotY": 0,
|
||||
"fieldDefs": []
|
||||
},
|
||||
{
|
||||
"identifier": "npc",
|
||||
"uid": 122,
|
||||
"tags": [],
|
||||
"exportToToc": false,
|
||||
"allowOutOfBounds": false,
|
||||
"doc": null,
|
||||
"width": 16,
|
||||
"height": 16,
|
||||
"resizableX": false,
|
||||
"resizableY": false,
|
||||
"minWidth": null,
|
||||
"maxWidth": null,
|
||||
"minHeight": null,
|
||||
"maxHeight": null,
|
||||
"keepAspectRatio": false,
|
||||
"tileOpacity": 1,
|
||||
"fillOpacity": 0.08,
|
||||
"lineOpacity": 0,
|
||||
"hollow": false,
|
||||
"color": "#E4A672",
|
||||
"renderMode": "Tile",
|
||||
"showName": true,
|
||||
"tilesetId": 123,
|
||||
"tileRenderMode": "FitInside",
|
||||
"tileRect": { "tilesetUid": 123, "x": 0, "y": 0, "w": 16, "h": 16 },
|
||||
"uiTileRect": null,
|
||||
"nineSliceBorders": [],
|
||||
"maxCount": 0,
|
||||
"limitScope": "PerLevel",
|
||||
"limitBehavior": "MoveLastOne",
|
||||
"pivotX": 0,
|
||||
"pivotY": 0,
|
||||
"fieldDefs": [
|
||||
{
|
||||
"identifier": "sprite_id",
|
||||
"doc": null,
|
||||
"__type": "Int",
|
||||
"uid": 125,
|
||||
"type": "F_Int",
|
||||
"isArray": false,
|
||||
"canBeNull": false,
|
||||
"arrayMinLength": null,
|
||||
"arrayMaxLength": null,
|
||||
"editorDisplayMode": "Hidden",
|
||||
"editorDisplayScale": 1,
|
||||
"editorDisplayPos": "Above",
|
||||
"editorLinkStyle": "StraightArrow",
|
||||
"editorDisplayColor": null,
|
||||
"editorAlwaysShow": false,
|
||||
"editorShowInWorld": true,
|
||||
"editorCutLongValues": true,
|
||||
"editorTextSuffix": null,
|
||||
"editorTextPrefix": null,
|
||||
"useForSmartColor": false,
|
||||
"exportToToc": false,
|
||||
"searchable": false,
|
||||
"min": null,
|
||||
"max": null,
|
||||
"regex": null,
|
||||
"acceptFileTypes": null,
|
||||
"defaultOverride": null,
|
||||
"textLanguageMode": null,
|
||||
"symmetricalRef": false,
|
||||
"autoChainRef": true,
|
||||
"allowOutOfLevelRef": true,
|
||||
"allowedRefs": "OnlySame",
|
||||
"allowedRefsEntityUid": null,
|
||||
"allowedRefTags": [],
|
||||
"tilesetUid": null
|
||||
},
|
||||
{
|
||||
"identifier": "palette_id",
|
||||
"doc": null,
|
||||
"__type": "Int",
|
||||
"uid": 126,
|
||||
"type": "F_Int",
|
||||
"isArray": false,
|
||||
"canBeNull": false,
|
||||
"arrayMinLength": null,
|
||||
"arrayMaxLength": null,
|
||||
"editorDisplayMode": "Hidden",
|
||||
"editorDisplayScale": 1,
|
||||
"editorDisplayPos": "Above",
|
||||
"editorLinkStyle": "StraightArrow",
|
||||
"editorDisplayColor": null,
|
||||
"editorAlwaysShow": false,
|
||||
"editorShowInWorld": true,
|
||||
"editorCutLongValues": true,
|
||||
"editorTextSuffix": null,
|
||||
"editorTextPrefix": null,
|
||||
"useForSmartColor": false,
|
||||
"exportToToc": false,
|
||||
"searchable": false,
|
||||
"min": null,
|
||||
"max": null,
|
||||
"regex": null,
|
||||
"acceptFileTypes": null,
|
||||
"defaultOverride": null,
|
||||
"textLanguageMode": null,
|
||||
"symmetricalRef": false,
|
||||
"autoChainRef": true,
|
||||
"allowOutOfLevelRef": true,
|
||||
"allowedRefs": "OnlySame",
|
||||
"allowedRefsEntityUid": null,
|
||||
"allowedRefTags": [],
|
||||
"tilesetUid": null
|
||||
},
|
||||
{
|
||||
"identifier": "inflict_id",
|
||||
"doc": null,
|
||||
"__type": "Int",
|
||||
"uid": 127,
|
||||
"type": "F_Int",
|
||||
"isArray": false,
|
||||
"canBeNull": false,
|
||||
"arrayMinLength": null,
|
||||
"arrayMaxLength": null,
|
||||
"editorDisplayMode": "Hidden",
|
||||
"editorDisplayScale": 1,
|
||||
"editorDisplayPos": "Above",
|
||||
"editorLinkStyle": "StraightArrow",
|
||||
"editorDisplayColor": null,
|
||||
"editorAlwaysShow": false,
|
||||
"editorShowInWorld": true,
|
||||
"editorCutLongValues": true,
|
||||
"editorTextSuffix": null,
|
||||
"editorTextPrefix": null,
|
||||
"useForSmartColor": false,
|
||||
"exportToToc": false,
|
||||
"searchable": false,
|
||||
"min": null,
|
||||
"max": null,
|
||||
"regex": null,
|
||||
"acceptFileTypes": null,
|
||||
"defaultOverride": null,
|
||||
"textLanguageMode": null,
|
||||
"symmetricalRef": false,
|
||||
"autoChainRef": true,
|
||||
"allowOutOfLevelRef": true,
|
||||
"allowedRefs": "OnlySame",
|
||||
"allowedRefsEntityUid": null,
|
||||
"allowedRefTags": [],
|
||||
"tilesetUid": null
|
||||
},
|
||||
{
|
||||
"identifier": "dialogue",
|
||||
"doc": null,
|
||||
"__type": "Array<String>",
|
||||
"uid": 124,
|
||||
"type": "F_String",
|
||||
"isArray": true,
|
||||
"canBeNull": false,
|
||||
"arrayMinLength": null,
|
||||
"arrayMaxLength": null,
|
||||
"editorDisplayMode": "Hidden",
|
||||
"editorDisplayScale": 1,
|
||||
"editorDisplayPos": "Above",
|
||||
"editorLinkStyle": "StraightArrow",
|
||||
"editorDisplayColor": null,
|
||||
"editorAlwaysShow": false,
|
||||
"editorShowInWorld": true,
|
||||
"editorCutLongValues": true,
|
||||
"editorTextSuffix": null,
|
||||
"editorTextPrefix": null,
|
||||
"useForSmartColor": false,
|
||||
"exportToToc": false,
|
||||
"searchable": false,
|
||||
"min": null,
|
||||
"max": null,
|
||||
"regex": null,
|
||||
"acceptFileTypes": null,
|
||||
"defaultOverride": null,
|
||||
"textLanguageMode": null,
|
||||
"symmetricalRef": false,
|
||||
"autoChainRef": true,
|
||||
"allowOutOfLevelRef": true,
|
||||
"allowedRefs": "OnlySame",
|
||||
"allowedRefsEntityUid": null,
|
||||
"allowedRefTags": [],
|
||||
"tilesetUid": null
|
||||
},
|
||||
{
|
||||
"identifier": "no_cake_dialogue",
|
||||
"doc": null,
|
||||
"__type": "String",
|
||||
"uid": 129,
|
||||
"type": "F_String",
|
||||
"isArray": false,
|
||||
"canBeNull": true,
|
||||
"arrayMinLength": null,
|
||||
"arrayMaxLength": null,
|
||||
"editorDisplayMode": "Hidden",
|
||||
"editorDisplayScale": 1,
|
||||
"editorDisplayPos": "Above",
|
||||
"editorLinkStyle": "StraightArrow",
|
||||
"editorDisplayColor": null,
|
||||
"editorAlwaysShow": false,
|
||||
"editorShowInWorld": true,
|
||||
"editorCutLongValues": true,
|
||||
"editorTextSuffix": null,
|
||||
"editorTextPrefix": null,
|
||||
"useForSmartColor": false,
|
||||
"exportToToc": false,
|
||||
"searchable": false,
|
||||
"min": null,
|
||||
"max": null,
|
||||
"regex": null,
|
||||
"acceptFileTypes": null,
|
||||
"defaultOverride": null,
|
||||
"textLanguageMode": null,
|
||||
"symmetricalRef": false,
|
||||
"autoChainRef": true,
|
||||
"allowOutOfLevelRef": true,
|
||||
"allowedRefs": "OnlySame",
|
||||
"allowedRefsEntityUid": null,
|
||||
"allowedRefTags": [],
|
||||
"tilesetUid": null
|
||||
}
|
||||
]
|
||||
}
|
||||
], "tilesets": [
|
||||
{
|
||||
@ -3544,6 +3765,28 @@
|
||||
"opaqueTiles": "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"averageColors": "9a86a6969a86a6969a86a6969a86a69600000000000000000000000000000000dc859d94dc858d94bc759d94ac857d95000000000000000000000000000000000f051f050f051f050f051f050f051f0500000000000000000000000000000000ab777ca6ab777ca69a777ca68a776ca600000000000000000000000000000000a9869797a9869797a9869797a9869797000000000000000000000000000000007d555c757d555c857d555c756d564c7600000000000000000000000000000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"__cWid": 8,
|
||||
"__cHei": 8,
|
||||
"identifier": "game_npcs",
|
||||
"uid": 123,
|
||||
"relPath": "../art/game_npcs.png",
|
||||
"embedAtlas": null,
|
||||
"pxWid": 64,
|
||||
"pxHei": 64,
|
||||
"tileGridSize": 8,
|
||||
"spacing": 0,
|
||||
"padding": 0,
|
||||
"tags": [],
|
||||
"tagsSourceEnumUid": null,
|
||||
"enumTags": [],
|
||||
"customData": [],
|
||||
"savedSelections": [],
|
||||
"cachedPixelData": {
|
||||
"opaqueTiles": "0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"averageColors": "bd8aae896b897d7a86ba8c899c9aae89daac9bbc7c8b489b7d8a69aadaac9bbc49aa5c9b0000000000000000000000007c8b489b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
}
|
||||
}
|
||||
], "enums": [], "externalEnums": [], "levelFields": [] },
|
||||
"levels": [
|
||||
@ -3949,6 +4192,34 @@
|
||||
"fieldInstances": [],
|
||||
"__worldX": 376,
|
||||
"__worldY": 488
|
||||
},
|
||||
{
|
||||
"__identifier": "npc",
|
||||
"__grid": [26,12],
|
||||
"__pivot": [0,0],
|
||||
"__tags": [],
|
||||
"__tile": { "tilesetUid": 123, "x": 0, "y": 0, "w": 16, "h": 16 },
|
||||
"__smartColor": "#E4A672",
|
||||
"iid": "013b9de0-b0a0-11ee-9688-2f8ccd9fe15d",
|
||||
"width": 16,
|
||||
"height": 16,
|
||||
"defUid": 122,
|
||||
"px": [208,96],
|
||||
"fieldInstances": [
|
||||
{ "__identifier": "sprite_id", "__type": "Int", "__value": 0, "__tile": null, "defUid": 125, "realEditorValues": [] },
|
||||
{ "__identifier": "palette_id", "__type": "Int", "__value": 0, "__tile": null, "defUid": 126, "realEditorValues": [] },
|
||||
{ "__identifier": "inflict_id", "__type": "Int", "__value": 0, "__tile": null, "defUid": 127, "realEditorValues": [] },
|
||||
{ "__identifier": "dialogue", "__type": "Array<String>", "__value": [ "Croc! I love you.", "But you should go to the next screen." ], "__tile": null, "defUid": 124, "realEditorValues": [ {
|
||||
"id": "V_String",
|
||||
"params": ["Croc! I love you."]
|
||||
}, {
|
||||
"id": "V_String",
|
||||
"params": ["But you should go to the next screen."]
|
||||
} ] },
|
||||
{ "__identifier": "no_cake_dialogue", "__type": "String", "__value": null, "__tile": null, "defUid": 129, "realEditorValues": [] }
|
||||
],
|
||||
"__worldX": 464,
|
||||
"__worldY": 528
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -34,4 +34,28 @@ void map_game_map_collectible_money_small_create(sys_i32 x, sys_i32 y) {
|
||||
(y + 1) * TILE_SZ_MICROPIXEL,
|
||||
GAME_COLLECTIBLE_TYPE_MONEY_SMALL
|
||||
);
|
||||
}
|
||||
|
||||
void map_game_map_npc_create(sys_i32 x, sys_i32 y) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void map_game_map_npc_set_sprite_id(sys_i32 id) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void map_game_map_npc_set_inflict_id(sys_i32 id) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void map_game_map_npc_set_no_cake_dialogue(const char* dialogue) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void map_game_map_npc_set_palette_id(sys_i32 id) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void map_game_map_npc_add_dialogue(const char* dialogue) {
|
||||
// TODO
|
||||
}
|
Reference in New Issue
Block a user