mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Unrelated warning fixes
This commit is contained in:
parent
3e06eaccfb
commit
7391abcfd6
2 changed files with 10 additions and 10 deletions
|
@ -462,8 +462,8 @@ void RasterizeFonts(const FontReferenceList &fontRefs, vector<CharRange> &ranges
|
||||||
} else {
|
} else {
|
||||||
dist = -closest.find_closest(ctx, cty, 1);
|
dist = -closest.find_closest(ctx, cty, 1);
|
||||||
}
|
}
|
||||||
dist = dist / supersample * distmult + 127.5;
|
dist = dist / supersample * distmult + 127.5f;
|
||||||
dist = floor(dist + 0.5);
|
dist = floor(dist + 0.5f);
|
||||||
if (dist < 0) dist = 0;
|
if (dist < 0) dist = 0;
|
||||||
if (dist > 255) dist = 255;
|
if (dist > 255) dist = 255;
|
||||||
|
|
||||||
|
@ -564,7 +564,7 @@ struct FontDesc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
height = metrics_height / 64.0 / supersample;
|
height = metrics_height / 64.0f / supersample;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputSelf(FILE *fil, float tw, float th, const vector<Data> &results) const {
|
void OutputSelf(FILE *fil, float tw, float th, const vector<Data> &results) const {
|
||||||
|
@ -987,7 +987,7 @@ int main(int argc, char **argv) {
|
||||||
fwrite(&header, 1, sizeof(header), meta);
|
fwrite(&header, 1, sizeof(header), meta);
|
||||||
// For each image
|
// For each image
|
||||||
for (int i = 0; i < (int)images.size(); i++) {
|
for (int i = 0; i < (int)images.size(); i++) {
|
||||||
AtlasImage atlas_image = images[i].ToAtlasImage(dest.width(), dest.height(), results);
|
AtlasImage atlas_image = images[i].ToAtlasImage((float)dest.width(), (float)dest.height(), results);
|
||||||
fwrite(&atlas_image, 1, sizeof(atlas_image), meta);
|
fwrite(&atlas_image, 1, sizeof(atlas_image), meta);
|
||||||
}
|
}
|
||||||
// For each font
|
// For each font
|
||||||
|
@ -998,7 +998,7 @@ int main(int argc, char **argv) {
|
||||||
fwrite(&font_header, 1, sizeof(font_header), meta);
|
fwrite(&font_header, 1, sizeof(font_header), meta);
|
||||||
auto ranges = font.GetRanges();
|
auto ranges = font.GetRanges();
|
||||||
fwrite(ranges.data(), sizeof(AtlasCharRange), ranges.size(), meta);
|
fwrite(ranges.data(), sizeof(AtlasCharRange), ranges.size(), meta);
|
||||||
auto chars = font.GetChars(dest.width(), dest.height(), results);
|
auto chars = font.GetChars((float)dest.width(), (float)dest.height(), results);
|
||||||
fwrite(chars.data(), sizeof(AtlasChar), chars.size(), meta);
|
fwrite(chars.data(), sizeof(AtlasChar), chars.size(), meta);
|
||||||
}
|
}
|
||||||
fclose(meta);
|
fclose(meta);
|
||||||
|
@ -1010,7 +1010,7 @@ int main(int argc, char **argv) {
|
||||||
for (int i = 0; i < (int)fonts.size(); i++) {
|
for (int i = 0; i < (int)fonts.size(); i++) {
|
||||||
FontDesc &xfont = fonts[i];
|
FontDesc &xfont = fonts[i];
|
||||||
xfont.ComputeHeight(results, distmult);
|
xfont.ComputeHeight(results, distmult);
|
||||||
xfont.OutputSelf(cpp_file, dest.width(), dest.height(), results);
|
xfont.OutputSelf(cpp_file, (float)dest.width(), (float)dest.height(), results);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fonts.size()) {
|
if (fonts.size()) {
|
||||||
|
@ -1024,7 +1024,7 @@ int main(int argc, char **argv) {
|
||||||
if (images.size()) {
|
if (images.size()) {
|
||||||
fprintf(cpp_file, "const AtlasImage %s_images[%i] = {\n", atlas_name, (int)images.size());
|
fprintf(cpp_file, "const AtlasImage %s_images[%i] = {\n", atlas_name, (int)images.size());
|
||||||
for (int i = 0; i < (int)images.size(); i++) {
|
for (int i = 0; i < (int)images.size(); i++) {
|
||||||
images[i].OutputSelf(cpp_file, dest.width(), dest.height(), results);
|
images[i].OutputSelf(cpp_file, (float)dest.width(), (float)dest.height(), results);
|
||||||
}
|
}
|
||||||
fprintf(cpp_file, "};\n");
|
fprintf(cpp_file, "};\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<AdditionalIncludeDirectories>../../../../;../../ext;../../;../../../../ext;../prebuilt</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>../../../../;../../ext;../../;../../../../ext;../prebuilt</AdditionalIncludeDirectories>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
@ -108,4 +108,4 @@
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
Loading…
Add table
Reference in a new issue