From d2d9aae9d5fbc7df032f812cfc6a6378aa5ed74e Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 21 Jul 2022 02:14:40 -0500 Subject: [PATCH] [nostalgia/sample_project] Update integer type descriptor names --- .../type_descriptors/{B.int32_t;0 => B.int32;0} | 2 +- .../.nostalgia/type_descriptors/{B.int8_t;0 => B.int8;0} | 2 +- .../type_descriptors/{B.uint16_t;0 => B.uint16;0} | 2 +- .../type_descriptors/{B.uint64_t;0 => B.uint64;0} | 2 +- .../type_descriptors/{B.uint8_t;0 => B.uint8;0} | 2 +- .../net.drinkingtea.nostalgia.core.Palette;1 | 2 +- .../net.drinkingtea.nostalgia.core.TileSheet.SubSheet;1 | 6 +++--- .../net.drinkingtea.nostalgia.core.TileSheet;2 | 2 +- .../net.drinkingtea.ox.FileAddress.Data;1 | 2 +- .../type_descriptors/net.drinkingtea.ox.FileAddress;1 | 2 +- src/nostalgia/core/userland/gfx_opengl.cpp | 9 ++++----- 11 files changed, 16 insertions(+), 17 deletions(-) rename sample_project/.nostalgia/type_descriptors/{B.int32_t;0 => B.int32;0} (75%) rename sample_project/.nostalgia/type_descriptors/{B.int8_t;0 => B.int8;0} (76%) rename sample_project/.nostalgia/type_descriptors/{B.uint16_t;0 => B.uint16;0} (68%) rename sample_project/.nostalgia/type_descriptors/{B.uint64_t;0 => B.uint64;0} (68%) rename sample_project/.nostalgia/type_descriptors/{B.uint8_t;0 => B.uint8;0} (69%) diff --git a/sample_project/.nostalgia/type_descriptors/B.int32_t;0 b/sample_project/.nostalgia/type_descriptors/B.int32;0 similarity index 75% rename from sample_project/.nostalgia/type_descriptors/B.int32_t;0 rename to sample_project/.nostalgia/type_descriptors/B.int32;0 index 53f702e2..a569f084 100644 --- a/sample_project/.nostalgia/type_descriptors/B.int32_t;0 +++ b/sample_project/.nostalgia/type_descriptors/B.int32;0 @@ -1,5 +1,5 @@ O1;net.drinkingtea.ox.DescriptorType;2;{ "length" : 4, "primitiveType" : 1, - "typeName" : "B.int32_t" + "typeName" : "B.int32" } diff --git a/sample_project/.nostalgia/type_descriptors/B.int8_t;0 b/sample_project/.nostalgia/type_descriptors/B.int8;0 similarity index 76% rename from sample_project/.nostalgia/type_descriptors/B.int8_t;0 rename to sample_project/.nostalgia/type_descriptors/B.int8;0 index 3a32577a..c5284b9f 100644 --- a/sample_project/.nostalgia/type_descriptors/B.int8_t;0 +++ b/sample_project/.nostalgia/type_descriptors/B.int8;0 @@ -1,5 +1,5 @@ O1;net.drinkingtea.ox.DescriptorType;2;{ "length" : 1, "primitiveType" : 1, - "typeName" : "B.int8_t" + "typeName" : "B.int8" } diff --git a/sample_project/.nostalgia/type_descriptors/B.uint16_t;0 b/sample_project/.nostalgia/type_descriptors/B.uint16;0 similarity index 68% rename from sample_project/.nostalgia/type_descriptors/B.uint16_t;0 rename to sample_project/.nostalgia/type_descriptors/B.uint16;0 index 07c11d29..a016123a 100644 --- a/sample_project/.nostalgia/type_descriptors/B.uint16_t;0 +++ b/sample_project/.nostalgia/type_descriptors/B.uint16;0 @@ -1,4 +1,4 @@ O1;net.drinkingtea.ox.DescriptorType;2;{ "length" : 2, - "typeName" : "B.uint16_t" + "typeName" : "B.uint16" } diff --git a/sample_project/.nostalgia/type_descriptors/B.uint64_t;0 b/sample_project/.nostalgia/type_descriptors/B.uint64;0 similarity index 68% rename from sample_project/.nostalgia/type_descriptors/B.uint64_t;0 rename to sample_project/.nostalgia/type_descriptors/B.uint64;0 index ae490439..781b6183 100644 --- a/sample_project/.nostalgia/type_descriptors/B.uint64_t;0 +++ b/sample_project/.nostalgia/type_descriptors/B.uint64;0 @@ -1,4 +1,4 @@ O1;net.drinkingtea.ox.DescriptorType;2;{ "length" : 8, - "typeName" : "B.uint64_t" + "typeName" : "B.uint64" } diff --git a/sample_project/.nostalgia/type_descriptors/B.uint8_t;0 b/sample_project/.nostalgia/type_descriptors/B.uint8;0 similarity index 69% rename from sample_project/.nostalgia/type_descriptors/B.uint8_t;0 rename to sample_project/.nostalgia/type_descriptors/B.uint8;0 index a3ddf705..a21568c8 100644 --- a/sample_project/.nostalgia/type_descriptors/B.uint8_t;0 +++ b/sample_project/.nostalgia/type_descriptors/B.uint8;0 @@ -1,4 +1,4 @@ O1;net.drinkingtea.ox.DescriptorType;2;{ "length" : 1, - "typeName" : "B.uint8_t" + "typeName" : "B.uint8" } diff --git a/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.Palette;1 b/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.Palette;1 index 892d056a..8e27408d 100644 --- a/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.Palette;1 +++ b/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.Palette;1 @@ -4,7 +4,7 @@ O1;net.drinkingtea.ox.DescriptorType;2;{ { "fieldName" : "colors", "subscriptLevels" : 1, - "typeName" : "B.uint16_t" + "typeName" : "B.uint16" } ], "primitiveType" : 5, diff --git a/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.TileSheet.SubSheet;1 b/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.TileSheet.SubSheet;1 index 5cff440f..e04d4e3c 100644 --- a/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.TileSheet.SubSheet;1 +++ b/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.TileSheet.SubSheet;1 @@ -7,11 +7,11 @@ O1;net.drinkingtea.ox.DescriptorType;2;{ }, { "fieldName" : "rows", - "typeName" : "B.int32_t" + "typeName" : "B.int32" }, { "fieldName" : "columns", - "typeName" : "B.int32_t" + "typeName" : "B.int32" }, { "fieldName" : "subsheets", @@ -21,7 +21,7 @@ O1;net.drinkingtea.ox.DescriptorType;2;{ { "fieldName" : "pixels", "subscriptLevels" : 1, - "typeName" : "B.uint8_t" + "typeName" : "B.uint8" } ], "primitiveType" : 5, diff --git a/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.TileSheet;2 b/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.TileSheet;2 index a9a314fa..3655196f 100644 --- a/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.TileSheet;2 +++ b/sample_project/.nostalgia/type_descriptors/net.drinkingtea.nostalgia.core.TileSheet;2 @@ -3,7 +3,7 @@ O1;net.drinkingtea.ox.DescriptorType;2;{ [ { "fieldName" : "bpp", - "typeName" : "B.int8_t" + "typeName" : "B.int8" }, { "fieldName" : "defaultPalette", diff --git a/sample_project/.nostalgia/type_descriptors/net.drinkingtea.ox.FileAddress.Data;1 b/sample_project/.nostalgia/type_descriptors/net.drinkingtea.ox.FileAddress.Data;1 index 66d085d6..9f586f33 100644 --- a/sample_project/.nostalgia/type_descriptors/net.drinkingtea.ox.FileAddress.Data;1 +++ b/sample_project/.nostalgia/type_descriptors/net.drinkingtea.ox.FileAddress.Data;1 @@ -11,7 +11,7 @@ O1;net.drinkingtea.ox.DescriptorType;2;{ }, { "fieldName" : "inode", - "typeName" : "B.uint64_t" + "typeName" : "B.uint64" } ], "primitiveType" : 6, diff --git a/sample_project/.nostalgia/type_descriptors/net.drinkingtea.ox.FileAddress;1 b/sample_project/.nostalgia/type_descriptors/net.drinkingtea.ox.FileAddress;1 index a33edf95..295700fe 100644 --- a/sample_project/.nostalgia/type_descriptors/net.drinkingtea.ox.FileAddress;1 +++ b/sample_project/.nostalgia/type_descriptors/net.drinkingtea.ox.FileAddress;1 @@ -3,7 +3,7 @@ O1;net.drinkingtea.ox.DescriptorType;2;{ [ { "fieldName" : "type", - "typeName" : "B.int8_t" + "typeName" : "B.int8" }, { "fieldName" : "data", diff --git a/src/nostalgia/core/userland/gfx_opengl.cpp b/src/nostalgia/core/userland/gfx_opengl.cpp index c8c15dce..5b505b85 100644 --- a/src/nostalgia/core/userland/gfx_opengl.cpp +++ b/src/nostalgia/core/userland/gfx_opengl.cpp @@ -4,16 +4,15 @@ #include -#include - #include #include +#include + #include #include #include "nostalgia/core/context.hpp" - namespace nostalgia::core { void ImGui_Impl_NewFrame() noexcept; @@ -99,8 +98,8 @@ static void initBackgroundBufferObjects(Context *ctx, glutils::BufferSet *bg) no for (auto x = 0u; x < TileColumns; ++x) { for (auto y = 0u; y < TileRows; ++y) { const auto i = bgVertexRow(x, y); - auto vbo = &bg->vertices[i * BgVertexVboLength]; - auto ebo = &bg->elements[i * BgVertexEboLength]; + auto vbo = &bg->vertices[i * static_cast(BgVertexVboLength)]; + auto ebo = &bg->elements[i * static_cast(BgVertexEboLength)]; setTileBufferObject(ctx, i * BgVertexVboRows, static_cast(x), static_cast(y), 0, vbo, ebo); } }