diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GameInitDispose.cpp | 56 | ||||
-rw-r--r-- | src/misc.zig | 8 |
2 files changed, 33 insertions, 31 deletions
diff --git a/src/GameInitDispose.cpp b/src/GameInitDispose.cpp index ba27374..600a6a4 100644 --- a/src/GameInitDispose.cpp +++ b/src/GameInitDispose.cpp @@ -118,7 +118,7 @@ void LoadSounds(bool musictoggle) gSampleSet[bodylandsound] = loadSound("impact/body-fall.wav"); gSampleSet[bodyhitsound] = loadSound("impact/body-hit.wav"); gSampleSet[knifeslashsound] = loadSound("impact/knife-stab.wav"); - gSampleSet[wallhitsound] = loadSound("impact/wall-hit.ogg"); + gSampleSet[wallhitsound] = loadSound("impact/wall-hit.wav"); gSampleSet[visionsound] = loadSound("underwater.ogg"); gSampleSet[soulinsound] = loadSound("soul-in.ogg"); @@ -1376,33 +1376,33 @@ void initGame(Game* game) // Load animations testskeleton.reload(); - animation[idleanim].load("Breathe"); - animation[joganim].load("Run"); - animation[pistolaimanim].load("PistolAim"); - animation[walkanim].load("Walk"); - animation[rifleholdanim].load("Riflehold"); - animation[rifleaimanim].load("Rifleaim"); - animation[assaultrifleaimanim].load("AssaultRifleaim"); - animation[crouchanim].load("Crouch"); - animation[headpainanim].load("Headshot"); - animation[chestpainanim].load("Chestshot"); - animation[stomachpainanim].load("Stomachshot"); - animation[rightarmpainanim].load("Rightarmshot"); - animation[leftarmpainanim].load("Leftarmshot"); - animation[rightlegpainanim].load("Rightlegshot"); - animation[leftlegpainanim].load("Leftlegshot"); - animation[riflehitanim].load("Riflehit"); - animation[grenadeaimanim].load("grenadeaim"); - animation[grenadechargeanim].load("grenadecharge"); - animation[grenadethrowanim].load("grenadethrow"); - animation[zombieeatanim].load("Zombiemunch"); - animation[zombiejoganim].load("ZombieRun"); - animation[zombiewalkanim].load("Zombiewalk"); - animation[getupfrontanim].load("Getupfromfront"); - animation[getupbackanim].load("Getupfromback"); - animation[diveanim].load("Dive"); - animation[throwanim].load("Aikidothrow"); - animation[thrownanim].load("Aikidothrown"); + animation[idleanim].load("breathe"); + animation[crouchanim].load("crouch"); + animation[walkanim].load("walk-human"); + animation[joganim].load("run-human"); + animation[diveanim].load("dive"); + animation[rifleholdanim].load("hold-rifle"); + animation[rifleaimanim].load("aim-sniper-rifle"); + animation[assaultrifleaimanim].load("aim-assault-rifle"); + animation[pistolaimanim].load("aim-pistol"); + animation[grenadeaimanim].load("aim-grenade"); + animation[grenadechargeanim].load("charge-grenade"); + animation[grenadethrowanim].load("throw-grenade"); + animation[throwanim].load("throw-aikido"); + animation[thrownanim].load("thrown-aikido"); + animation[headpainanim].load("shot-head"); + animation[chestpainanim].load("shot-chest"); + animation[stomachpainanim].load("shot-stomach"); + animation[rightarmpainanim].load("shot-arm-right"); + animation[leftarmpainanim].load("shot-arm-left"); + animation[rightlegpainanim].load("shot-leg-right"); + animation[leftlegpainanim].load("shot-leg-left"); + animation[riflehitanim].load("hit-rifle"); + animation[getupfrontanim].load("get-up-from-front"); + animation[getupbackanim].load("get-up-from-back"); + animation[zombieeatanim].load("munch"); + animation[zombiejoganim].load("run-zombie"); + animation[zombiewalkanim].load("walk-zombie"); // Setup people for (int i = 0; i < max_people; ++i) { diff --git a/src/misc.zig b/src/misc.zig index caa0319..2bbb9f0 100644 --- a/src/misc.zig +++ b/src/misc.zig @@ -66,7 +66,9 @@ export fn loadAnimation(name: [*:0]const u8) extern struct { } { var dir = cwd().openDir(data_dir ++ "animations", .{}) catch unreachable; defer dir.close(); - const anim_file = readFile(dir, "{s}.tsv", .{ name }) catch unreachable; + const anim_file = readFile(dir, "{s}{c}index.tsv", .{ + name, sep, // $animation/index.tsv + }) catch unreachable; defer allocator.free(anim_file); const length = count(u8, anim_file, "\t") - 1; const frames = allocator.alloc(Frame, length) catch unreachable; @@ -76,8 +78,8 @@ export fn loadAnimation(name: [*:0]const u8) extern struct { var i = @as(usize, 0); while (i < length) : (i += 1) { var values = tokenize(anim.next().?, "\t"); - const frame_file = readFile(dir, "frames{c}{s}{c}{s}.tsv", .{ - sep, name, sep, values.next().?, // frames/$animation/$frame.tsv + const frame_file = readFile(dir, "{s}{c}frames{c}{s}.tsv", .{ + name, sep, sep, values.next().?, // $animation/frames/$frame.tsv }) catch unreachable; defer allocator.free(frame_file); |