Remove all old copyrighted sprites and animated sprites

main
Cameron Murphy Reikes 2 years ago
parent 41375cc902
commit 87996ce4c5

@ -26,10 +26,6 @@
{
filepath: "sword_of_nazareth.png",
}
@image merchant:
{
filepath: "copyrighted/merchant.png",
}
@image idol:
{
filepath: "idol.png",
@ -74,22 +70,6 @@
{
filepath: "gold_coin.png",
}
@image new_knight_idle:
{
filepath: "copyrighted/knight_idle.png",
}
@image new_knight_run:
{
filepath: "copyrighted/knight_run_start.png",
}
@image new_knight_attack:
{
filepath: "copyrighted/knight_attack.png",
}
@image death:
{
filepath: "copyrighted/wraith.png",
}
@image thinking:
{
filepath: "thinking.png",
@ -98,14 +78,6 @@
{
filepath: "small_old_man.png",
}
@image animated_terrain:
{
filepath: "copyrighted/animated_terrain.png",
}
@image ruins_ancient:
{
filepath: "copyrighted/ruins_ancient.png",
}
@image hurt_vignette:
{
filepath: "hurt_vignette.png",
@ -122,18 +94,10 @@
{
filepath: "bullet.png",
}
@image props_atlas:
{
filepath: "copyrighted/props.png"
}
@image drop_shadow:
{
filepath: "drop_shadow.png",
}
@image skeleton:
{
filepath: "copyrighted/skeleton.png",
}
@image pile:
{
filepath: "pile_of_rocks.png",
@ -154,12 +118,6 @@
{
filepath: "swipe.png",
}
/*
@image moose:
{
filepath: "copyrighted/moose.png",
}
*/
@image shift_icon:
{
filepath: "shift_icon.png",
@ -196,22 +154,6 @@
{
filepath: "tripod.png",
}
@image main_tileset:
{
filepath: "copyrighted/TileSet.png",
}
@tileset main:
{
image: image_main_tileset,
filepath: "Main.tsx",
firstgid: 1,
}
@tileset ruins_ancient:
{
image: image_ruins_ancient,
filepath: "copyrighted/ruins_ancient.tsx",
firstgid: 2597,
}
@level level0:
{
filepath: "new_level.json",

@ -320,45 +320,6 @@ typedef struct
AnimatedSprite sprites[] = {
{.enum_name = "invalid", .img_var_name = "image_white_square"},
{
.enum_name = "knight_idle",
.img_var_name = "image_new_knight_idle",
.time_per_frame = 0.4,
.num_frames = 6,
.start = {0.0f, 0.0f},
.horizontal_diff_btwn_frames = 64.0,
.region_size = {64.0f, 64.0f},
},
{
.enum_name = "knight_running",
.img_var_name = "image_new_knight_run",
.time_per_frame = 0.1,
.num_frames = 7,
.start = {64.0f*10, 0.0f},
.horizontal_diff_btwn_frames = 64.0,
.region_size = {64.0f, 64.0f},
},
{
.enum_name = "knight_rolling",
.img_var_name = "image_knight_roll",
.time_per_frame = 0.04,
.num_frames = 12,
.start = {19.0f, 0.0f},
.horizontal_diff_btwn_frames = 120.0,
.region_size = {80.0f, 80.0f},
.no_wrap = true,
},
{
.enum_name = "knight_attack",
.img_var_name = "image_new_knight_attack",
.time_per_frame = 0.06,
.num_frames = 7,
.start = {0.0f, 0.0f},
.horizontal_diff_btwn_frames = 64.0,
.region_size = {64.0f, 64.0f},
.no_wrap = true,
},
{
.enum_name = "old_man_idle",
.img_var_name = "image_old_man",
@ -368,65 +329,4 @@ AnimatedSprite sprites[] = {
.horizontal_diff_btwn_frames = 16.0f,
.region_size = {16.0f, 16.0f},
},
{
.enum_name = "death_idle",
.img_var_name = "image_death",
.time_per_frame = 0.15,
.num_frames = 10,
.start = {0.0, 0.0},
.horizontal_diff_btwn_frames = 100.0f,
.region_size = {100.0f, 100.0f},
},
{
.enum_name = "skeleton_idle",
.img_var_name = "image_skeleton",
.time_per_frame = 0.15,
.num_frames = 6,
.start = {0.0f, 0.0f},
.horizontal_diff_btwn_frames = 80.0,
.offset = {0.0f, 20.0f},
.region_size = {80.0f, 80.0f},
},
{
.enum_name = "skeleton_swing_sword",
.img_var_name = "image_skeleton",
.time_per_frame = 0.10,
.num_frames = 6,
.start = {0.0f, 240.0f},
.horizontal_diff_btwn_frames = 80.0,
.offset = {0.0f, 20.0f},
.region_size = {80.0f, 80.0f},
.no_wrap = true,
},
{
.enum_name = "skeleton_run",
.img_var_name = "image_skeleton",
.time_per_frame = 0.07,
.num_frames = 8,
.start = {0.0f, 160.0f},
.horizontal_diff_btwn_frames = 80.0,
.offset = {0.0f, 20.0f},
.region_size = {80.0f, 80.0f},
},
{
.enum_name = "skeleton_die",
.img_var_name = "image_skeleton",
.time_per_frame = 0.10,
.num_frames = 13,
.start = {0.0f, 400.0f},
.horizontal_diff_btwn_frames = 80.0,
.offset = {0.0f, 20.0f},
.region_size = {80.0f, 80.0f},
.no_wrap = true,
},
{
.enum_name = "merchant_idle",
.img_var_name = "image_merchant",
.time_per_frame = 0.15,
.num_frames = 8,
.start = {0.0, 0.0},
.horizontal_diff_btwn_frames = 110.0f,
.region_size = {110.0f, 110.0f},
.offset = {0.0f, -20.0f},
},
};

@ -189,6 +189,7 @@ int main(int argc, char **argv)
filepath = asset_file_path(filepath);
assert(filepath.str != 0); // , MD_S8Fmt(cg_arena, "No filepath specified for image '%.*s'", MD_S8VArg(node->string)));
FILE *asset_file = fopen(nullterm(filepath), "r");
assert(asset_file); // , MD_S8Fmt(cg_arena, "Could not open filepath %.*s for asset '%.*s'", MD_S8VArg(filepath), MD_S8VArg(node->string)));
fclose(asset_file);

155
main.c

@ -624,10 +624,6 @@ Vec2 entity_aabb_size(Entity *e)
{
return V2(TILE_SIZE*0.5f, TILE_SIZE*0.5f);
}
else if (npc_is_skeleton(e))
{
return V2(TILE_SIZE*1.0f, TILE_SIZE*1.0f);
}
else if (e->npc_kind == NPC_Pile)
{
return V2(TILE_SIZE, TILE_SIZE);
@ -4907,15 +4903,6 @@ void frame(void)
it->pos = move_and_slide((MoveSlideParams){it, it->pos, MulV2F(it->vel, pixels_per_meter * dt)});
*/
}
else if (npc_is_skeleton(it))
{
if (it->dead)
{
}
else
{
} // skelton combat and movement
}
// @Place(NPC processing)
else if(it->npc_kind == NPC_Arrow)
{
@ -4960,17 +4947,10 @@ void frame(void)
}
if (it->damage >= entity_max_damage(it))
{
if (npc_is_skeleton(it))
{
it->dead = true;
}
else
{
it->destroy = true;
}
}
}
// @Place(non-entity processing)
else if (it->is_item)
{
@ -5390,7 +5370,6 @@ void frame(void)
}
}
Vec2 character_sprite_pos = AddV2(player->pos, V2(0.0, 20.0f));
// if somebody, show their dialog panel
if (interacting_with)
{
@ -5408,15 +5387,12 @@ void frame(void)
if (player->state == CHARACTER_WALKING)
{
to_draw = (DrawnAnimatedSprite) { ANIM_knight_running, elapsed_time, player->facing_left, character_sprite_pos, WHITE };
}
else if (player->state == CHARACTER_IDLE)
{
to_draw = (DrawnAnimatedSprite) { ANIM_knight_idle, elapsed_time, player->facing_left, character_sprite_pos, WHITE };
}
else if (player->state == CHARACTER_TALKING)
{
to_draw = (DrawnAnimatedSprite) { ANIM_knight_idle, elapsed_time, player->facing_left, character_sprite_pos, WHITE };
}
else
{
@ -5454,7 +5430,6 @@ void frame(void)
draw_quad((DrawParams) { quad_centered(AddV2(it->pos, V2(0.0, 50.0)), V2(100.0, 100.0)), IMG(image_thinking), WHITE });
}
Color col = LerpV4(WHITE, it->damage, RED);
if (it->is_npc)
{
float dist = LenV2(SubV2(it->pos, player->pos));
@ -5468,111 +5443,8 @@ void frame(void)
alpha = 1.0f;
}
it->dialog_panel_opacity = Lerp(it->dialog_panel_opacity, unwarped_dt*10.0f, alpha);
draw_dialog_panel(it, it->dialog_panel_opacity);
// @Place(npc rendering)
if (false) // used to be old man code
{
bool face_left = SubV2(player->pos, it->pos).x < 0.0f;
draw_animated_sprite((DrawnAnimatedSprite) { ANIM_old_man_idle, elapsed_time, face_left, it->pos, col });
}
else if (npc_is_skeleton(it))
{
Color col = WHITE;
if (it->dead)
{
draw_animated_sprite((DrawnAnimatedSprite) { ANIM_skeleton_die, it->dead_time, it->facing_left, it->pos, col });
}
else
{
if (it->swing_timer > 0.0)
{
// swinging sword
draw_animated_sprite((DrawnAnimatedSprite) { ANIM_skeleton_swing_sword, it->swing_timer, it->facing_left, it->pos, col });
}
else
{
if (it->walking)
{
draw_animated_sprite((DrawnAnimatedSprite) { ANIM_skeleton_run, elapsed_time, it->facing_left, it->pos, col });
}
else
{
draw_animated_sprite((DrawnAnimatedSprite) { ANIM_skeleton_idle, elapsed_time, it->facing_left, it->pos, col });
}
}
}
}
else if (npc_is_knight_sprite(it))
{
Color tint = WHITE;
if (it->npc_kind == NPC_Edeline)
{
tint = colhex(0x8c34eb);
}
else if (it->npc_kind == NPC_TheKing)
{
tint = colhex(0xf0be1d);
}
else if (it->npc_kind == NPC_TheBlacksmith)
{
tint = colhex(0x5c5c5c);
}
else if (it->npc_kind == NPC_Red)
{
tint = colhex(0xf56f42);
}
else if (it->npc_kind == NPC_Blue)
{
tint = colhex(0x1153d6);
}
else if (it->npc_kind == NPC_Davis)
{
tint = colhex(0x8f8f8f);
}
else if (it->npc_kind == NPC_Bill)
{
tint = colhex(0x49d14b);
}
else if (it->npc_kind == NPC_Jester)
{
tint = colhex(0x49d14b);
}
else
{
assert(false);
}
draw_animated_sprite((DrawnAnimatedSprite) { ANIM_knight_idle, elapsed_time, true, AddV2(it->pos, V2(0, 30.0f)), tint });
}
else if(it->npc_kind == NPC_Door)
{
DrawParams d = { quad_centered(it->pos, entity_aabb_size(it)), IMG(image_door), blendalpha(WHITE, (1.0f - it->opened_amount)*0.8f + 0.2f), };
draw_shadow_for(d);
draw_quad(d);
}
else if(it->npc_kind == NPC_Pile)
{
DrawParams d = { quad_centered(it->pos, V2(TILE_SIZE, TILE_SIZE)), IMG(image_pile), WHITE, };
if(!it->gave_away_sword)
{
DrawParams d = { quad_rotated_centered(AddV2(it->pos, V2(0, 15.0f)), V2(TILE_SIZE, TILE_SIZE), -PI32*0.75f), IMG(image_sword), WHITE, };
draw_quad(d);
}
draw_shadow_for(d);
draw_quad(d);
}
else if(it->npc_kind == NPC_Arrow)
{
DrawParams d = { quad_centered(it->pos, entity_aabb_size(it)), IMG(image_arrow), WHITE, };
draw_shadow_for(d);
draw_quad(d);
}
else
{
assert(false);
}
}
else if (it->is_item)
{
@ -5583,33 +5455,6 @@ void frame(void)
}
else if (it->is_prop)
{
DrawParams d = { 0 };
if (it->prop_kind == TREE0)
{
Vec2 prop_size = V2(74.0f, 122.0f);
d = (DrawParams) { quad_centered(AddV2(it->pos, V2(-5.0f, 45.0)), prop_size), image_props_atlas, aabb_at_yplusdown(V2(2.0f, 4.0f), prop_size), WHITE, .sorting_key = sorting_key_at(AddV2(it->pos, V2(0.0f, 20.0f))), .alpha_clip_threshold = 0.7f };
}
else if (it->prop_kind == TREE1)
{
Vec2 prop_size = V2(94.0f, 120.0f);
d = ((DrawParams) { quad_centered(AddV2(it->pos, V2(-4.0f, 55.0)), prop_size), image_props_atlas, aabb_at_yplusdown(V2(105.0f, 4.0f), prop_size), WHITE, .sorting_key = sorting_key_at(AddV2(it->pos, V2(0.0f, 20.0f))), .alpha_clip_threshold = 0.4f });
}
else if (it->prop_kind == TREE2)
{
Vec2 prop_size = V2(128.0f, 192.0f);
d = ((DrawParams) { quad_centered(AddV2(it->pos, V2(-2.5f, 70.0)), prop_size), image_props_atlas, aabb_at_yplusdown(V2(385.0f, 479.0f), prop_size), WHITE, .sorting_key = sorting_key_at(AddV2(it->pos, V2(0.0f, 20.0f))), .alpha_clip_threshold = 0.4f });
}
else if (it->prop_kind == ROCK0)
{
Vec2 prop_size = V2(30.0f, 22.0f);
d = (DrawParams) { quad_centered(AddV2(it->pos, V2(0.0f, 25.0)), prop_size), image_props_atlas, aabb_at_yplusdown(V2(66.0f, 235.0f), prop_size), WHITE, .sorting_key = sorting_key_at(AddV2(it->pos, V2(0.0f, 0.0f))), .alpha_clip_threshold = 0.7f };
}
else
{
assert(false);
}
draw_shadow_for(d);
draw_quad(d);
}
else if(it->is_machine)
{

@ -362,26 +362,14 @@ MD_String8 scroll_secret(ItemKind i)
}
}
bool npc_is_skeleton(Entity *it)
{
return it->is_npc && false;
}
float entity_max_damage(Entity *e)
{
if (e->is_npc && npc_is_skeleton(e))
{
return 2.0f;
}
else
{
return 1.0f;
}
}
bool npc_attacks_with_sword(Entity *it)
{
return npc_is_skeleton(it);
return false;
}
bool npc_attacks_with_shotgun(Entity *it)

@ -2,30 +2,7 @@
echo Running codegen...
echo To build the game right now you must also get access to the rpgpt_private_assets megasync folder from creikey, and put it in this repo under that exact folder name. Use megasync to have it automatically update with the master of the repo. Contact him for access
echo Unfortunately this does mean you're a little boned when you check out to an old build that has different assets. We need to do something about this.
rmdir /S /q assets\copyrighted
mkdir assets\copyrighted
@echo on
copy "rpgpt_private_assets\EPIC RPG World Pack - Ancient Ruins V 1.8.1\Characters\NPC merchant\NPC Merchant-idle.png" "assets\copyrighted\merchant.png" || goto :error
copy "rpgpt_private_assets\EPIC RPG World Pack - Ancient Ruins V 1.8.1\Tilesets\wall-1 - 3 tiles tall.png" "assets\copyrighted\wall-1 - 3 tiles tall.png" || goto :error
copy "rpgpt_private_assets\EPIC RPG World Pack - Ancient Ruins V 1.8.1\Tilesets\Tileset-Animated Terrains-16 frames.png" "assets\copyrighted\animated_terrain.png" || goto :error
copy "rpgpt_private_assets\EPIC RPG World Pack - Ancient Ruins V 1.8.1\TiledMap Editor NEW\Tilesets\Ancient Ruins-Animated Terrains-16 frames.tsx" "assets\copyrighted\ruins_animated.tsx" || goto :error
copy "rpgpt_private_assets\EPIC RPG World Pack - Ancient Ruins V 1.8.1\TiledMap Editor NEW\Tilesets\Terrain - Ancient Ruins.tsx" "assets\copyrighted\ruins_ancient.tsx" || goto :error
copy "rpgpt_private_assets\EPIC RPG World Pack - Ancient Ruins V 1.8.1\Tilesets\Tileset-Terrain.png" "assets\copyrighted\ruins_ancient.png" || goto :error
copy "rpgpt_private_assets\EPIC RPG World Pack - Ancient Ruins V 1.8.1\Props\Atlas-Props.png" "assets\copyrighted\props.png" || goto :error
copy "rpgpt_private_assets\EPIC RPG World Pack - Ancient Ruins V 1.8.1\Characters\Moose\moose1-all animations-347x192.png" "assets\copyrighted\moose.png" || goto :error
copy "rpgpt_private_assets\Undead - Pixel Art Characters\Sprites\Wraith_Red.png" "assets\copyrighted\wraith.png" || goto :error
copy "rpgpt_private_assets\Undead - Pixel Art Characters\Sprites\Skeleton_Blue.png" "assets\copyrighted\skeleton.png" || goto :error
copy "rpgpt_private_assets\props_modified.png" "assets\copyrighted\Props.png" || goto :error
copy "rpgpt_private_assets\ForgottenMemories\TileSet.png" "assets\copyrighted\TileSet.png" || goto :error
copy "rpgpt_private_assets\ForgottenMemories\Trees.png" "assets\copyrighted\Trees.png" || goto :error
copy "rpgpt_private_assets\ForgottenMemories\WaterTiles-6frames.png" "assets\copyrighted\WaterTiles-6frames.png" || goto :error
copy "rpgpt_private_assets\knight_idle.png" "assets\copyrighted\knight_idle.png" || goto :error
copy "rpgpt_private_assets\knight_attack.png" "assets\copyrighted\knight_attack.png" || goto :error
copy "rpgpt_private_assets\knight_run_start.png" "assets\copyrighted\knight_run_start.png" || goto :error
rmdir /S /q "assets\exported_3d"
mkdir "assets\exported_3d" || goto :error

Loading…
Cancel
Save