Archived
1
Fork 0

Readability changes

This commit is contained in:
Joshua Goins 2018-11-03 20:36:05 -04:00
parent 867d62edd4
commit 2a1575c5cc
2 changed files with 5 additions and 3 deletions

View file

@ -319,8 +319,10 @@ void DoFPass::createPipeline() {
}
void DoFPass::createBokehImage() {
int width, height, channels;
int width = 0, height = 0, channels = 0;
stbi_uc* pixels = stbi_load("data/bokeh.png", &width, &height, &channels, STBI_rgb_alpha);
if(pixels == nullptr)
return; // haha what
VkImageCreateInfo imageCreateInfo = {};
imageCreateInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;

View file

@ -152,7 +152,7 @@ Cinematic* loadCinematic(const char* path) {
nlohmann::json json;
file >> json;
Cinematic* cinematic = new Cinematic();
auto cinematic = new Cinematic();
for(auto shotObject : json["shots"]) {
Shot* shot = new Shot();
shot->start = shotObject["start"];
@ -166,7 +166,7 @@ Cinematic* loadCinematic(const char* path) {
}
for(auto animationObject : shotObject["animations"]) {
Animation* animation = new Animation();
auto animation = new Animation();
for(auto mesh : shot->meshes) {
if(mesh->name == animationObject["target"])
animation->target = mesh;