various tests and infrastructure fixes
This commit is contained in:
parent
c440a53d06
commit
4a7a434c2d
@ -66,7 +66,7 @@ LINK32=link.exe
|
|||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
# ADD CPP /nologo /MTd /W3 /GX /Zi /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "VORBIS_TEST" /FR /FD /GZ /c
|
# ADD CPP /nologo /MTd /W3 /GX /Zi /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "DS_TEST" /FR /FD /GZ /c
|
||||||
# SUBTRACT CPP /YX
|
# SUBTRACT CPP /YX
|
||||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
@ -226,6 +226,10 @@ SOURCE=.\test_image_write.c
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\test_packer.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\test_perlin.c
|
SOURCE=.\test_perlin.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
@ -52,6 +52,7 @@ void test_lex(void)
|
|||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
char *p;
|
char *p;
|
||||||
p = (char*) "abcdefghijklmnopqrstuvwxyz";
|
p = (char*) "abcdefghijklmnopqrstuvwxyz";
|
||||||
c(stb_ischar('c', p), "stb_ischar 1");
|
c(stb_ischar('c', p), "stb_ischar 1");
|
||||||
@ -73,6 +74,7 @@ int main(int argc, char **argv)
|
|||||||
c(stb_ischar('x', p), "stb_ischar f");
|
c(stb_ischar('x', p), "stb_ischar f");
|
||||||
c(!stb_ischar('#', p), "stb_ischar g");
|
c(!stb_ischar('#', p), "stb_ischar g");
|
||||||
c(stb_ischar('X', p), "stb_ischar h");
|
c(stb_ischar('X', p), "stb_ischar h");
|
||||||
|
#endif
|
||||||
|
|
||||||
test_lex();
|
test_lex();
|
||||||
|
|
||||||
|
@ -28,8 +28,16 @@
|
|||||||
#define STBVOX_CONFIG_MODE 1
|
#define STBVOX_CONFIG_MODE 1
|
||||||
#include "stb_voxel_render.h"
|
#include "stb_voxel_render.h"
|
||||||
|
|
||||||
#define STBTE_DRAW_RECT(x0,y0,x1,y1,color) 0
|
void STBTE_DRAW_RECT(int x0, int y0, int x1, int y1, unsigned int color)
|
||||||
#define STBTE_DRAW_TILE(x,y,id,highlight,data) 0
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void STBTE_DRAW_TILE(int x0, int y0, unsigned short id, int highlight, float *data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
#define STB_TILEMAP_EDITOR_IMPLEMENTATION
|
#define STB_TILEMAP_EDITOR_IMPLEMENTATION
|
||||||
#include "stb_tilemap_editor.h"
|
#include "stb_tilemap_editor.h"
|
||||||
|
|
||||||
|
@ -9,12 +9,13 @@
|
|||||||
//#define STBDS_INTERNAL_BUCKET_START // don't bother offseting differently within bucket for different hash values
|
//#define STBDS_INTERNAL_BUCKET_START // don't bother offseting differently within bucket for different hash values
|
||||||
//#define STBDS_FLUSH_CACHE (1u<<20) // do this much memory traffic to flush the cache between some benchmarking measurements
|
//#define STBDS_FLUSH_CACHE (1u<<20) // do this much memory traffic to flush the cache between some benchmarking measurements
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#define STB_DEFINE
|
#define STB_DEFINE
|
||||||
#define STB_NO_REGISTRY
|
#define STB_NO_REGISTRY
|
||||||
#include "../stb.h"
|
#include "../stb.h"
|
||||||
#include <stdio.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DS_TEST
|
#ifdef DS_TEST
|
||||||
|
@ -91,11 +91,10 @@ way of namespacing the filenames and source function names.
|
|||||||
|
|
||||||
#### Will you add more image types to stb_image.h?
|
#### Will you add more image types to stb_image.h?
|
||||||
|
|
||||||
If people submit them, I generally add them, but the goal of stb_image
|
No. As stb_image use has grown, it has become more important
|
||||||
is less for applications like image viewer apps (which need to support
|
for us to focus on security of the codebase. Adding new image
|
||||||
every type of image under the sun) and more for things like games which
|
formats increases the amount of code we need to secure, so it
|
||||||
can choose what images to use, so I may decline to add them if they're
|
is no longer worth adding new formats.
|
||||||
too rare or if the size of implementation vs. apparent benefit is too low.
|
|
||||||
|
|
||||||
#### Do you have any advice on how to create my own single-file library?
|
#### Do you have any advice on how to create my own single-file library?
|
||||||
|
|
||||||
|
@ -1,19 +1,20 @@
|
|||||||
stb
|
stb
|
||||||
===
|
===
|
||||||
|
|
||||||
single-file public domain (or MIT licensed) libraries for C/C++ <a name="stb_libs"></a>
|
single-file public domain (or MIT licensed) libraries for C/C++
|
||||||
|
|
||||||
Noteworthy:
|
Noteworthy:
|
||||||
|
|
||||||
* image loader: <a href="/nothings/stb/blob/master/stb_image.h">stb_image.h</a>
|
* image loader: [stb_image.h](stb_image.h)
|
||||||
* image writer: <a href="/nothings/stb/blob/master/stb_image_write.h">stb_image_write.h</a>
|
* image writer: [stb_image_write.h](stb_image_write.h)
|
||||||
* image resizer: <a href="/nothings/stb/blob/master/stb_image_resize.h">stb_image_resize.h></a>
|
* image resizer: [stb_image_resize.h](stb_image_resize.h)
|
||||||
* font text rasterizer: <a href="/nothings/stb/blob/master/stb_truetype.h">stb_truetype.h</a>
|
* font text rasterizer: [stb_truetype.h](stb_truetype.h)
|
||||||
* typesafe containers: <a href="/nothings/stb/blob/master/stb_ds.h">stb_ds.h</a>
|
* typesafe containers: [stb_ds.h](stb_ds.h)
|
||||||
|
|
||||||
Most libraries by stb, except: stb_dxt by Fabian "ryg" Giesen, stb_image_resize
|
Most libraries by stb, except: stb_dxt by Fabian "ryg" Giesen, stb_image_resize
|
||||||
by Jorge L. "VinoBS" Rodriguez, and stb_sprintf by Jeff Roberts.
|
by Jorge L. "VinoBS" Rodriguez, and stb_sprintf by Jeff Roberts.
|
||||||
|
|
||||||
|
<a name="stb_libs"></a>
|
||||||
|
|
||||||
library | lastest version | category | LoC | description
|
library | lastest version | category | LoC | description
|
||||||
--------------------- | ---- | -------- | --- | --------------------------------
|
--------------------- | ---- | -------- | --- | --------------------------------
|
||||||
|
@ -71,7 +71,7 @@ int main(int argc, char **argv)
|
|||||||
ci.batchfile = strdup(buffer);
|
ci.batchfile = strdup(buffer);
|
||||||
ci.compiler = count==3 ? strdup(tokens[2]) : "cl";
|
ci.compiler = count==3 ? strdup(tokens[2]) : "cl";
|
||||||
if (0==strnicmp(batch, "vcvars_", 7))
|
if (0==strnicmp(batch, "vcvars_", 7))
|
||||||
ci.objdir = strdup(stb_sprintf("%s_%d", batch+7, i));
|
ci.objdir = strdup(stb_sprintf("vs_%s_%d", batch+7, i));
|
||||||
else
|
else
|
||||||
ci.objdir = strdup(stb_sprintf("%s_%d", batch, i));
|
ci.objdir = strdup(stb_sprintf("%s_%d", batch, i));
|
||||||
ci.args = shared_args;
|
ci.args = shared_args;
|
||||||
@ -121,6 +121,11 @@ int main(int argc, char **argv)
|
|||||||
stb_arr_len(compilers[j].link), compilers[j].link);
|
stb_arr_len(compilers[j].link), compilers[j].link);
|
||||||
r = run_command(compilers[j].batchfile, command);
|
r = run_command(compilers[j].batchfile, command);
|
||||||
stbprint("{%c== Compiler %s == Building %s}\n", r ? '$' : '!', compilers[j].compiler_name, projects[i].filelist);
|
stbprint("{%c== Compiler %s == Building %s}\n", r ? '$' : '!', compilers[j].compiler_name, projects[i].filelist);
|
||||||
|
stb_copyfile("a.exe", stb_sprintf("obj/%s/a.exe", compilers[j].objdir));
|
||||||
|
//printf("Copy: %s to %s\n", "a.exe", stb_sprintf("obj/%s/a.exe", compilers[j].objdir));
|
||||||
|
stb_copyfile("temp.exe", stb_sprintf("obj/%s/temp.exe", compilers[j].objdir));
|
||||||
|
system("if EXIST a.exe del /q a.exe");
|
||||||
|
system("if EXIST temp.exe del /q temp.exe");
|
||||||
system("if EXIST *.obj del /q *.obj");
|
system("if EXIST *.obj del /q *.obj");
|
||||||
system("if EXIST *.o del /q *.o");
|
system("if EXIST *.o del /q *.o");
|
||||||
if (!r)
|
if (!r)
|
||||||
|
Loading…
Reference in New Issue
Block a user