working caseys thread window creation example

This commit is contained in:
Anton Ljungdahl 2025-05-14 13:30:49 +02:00
parent d7d9bc8d92
commit 0c2f8bdbd5
7 changed files with 47 additions and 20 deletions

View File

@ -1,5 +1,5 @@
@echo off
echo --- Metagen
@rem ---------------------------------------------------------------------------------------
@rem Build and run codegen
@ -24,11 +24,12 @@ pushd gen_test
popd
popd
echo --- Main
@rem ---------------------------------------------------------------------------------------
@rem Build main program
set CommonCompilerFlags=/nologo /Zi /FC /Od
set CommonCompilerFlags=/nologo /Zi /FC /Od /wd4042
@rem /WX /W4 /wd4201 /wd4100 /wd4189 /wd4244 /wd4127 /wd4456
@rem
@rem
@ -48,3 +49,5 @@ popd
IF NOT %LastError%==0 GOTO :end
:end
echo ---

View File

@ -1,4 +1,19 @@
#ifndef BASE_CORE_H
#define BASE_CORE_H
#include <stdint.h>
typedef int32_t S32;
typedef uint32_t U32;
typedef int64_t S64;
typedef uint64_t U64;
typedef float F32;
typedef double F64;
#define global static
#define function static
#endif /* BASE_CORE_H */
#define function static

View File

@ -1,12 +1,16 @@
#include <stdio.h>
//////////////////////////////////////////////////////////////////////////////////////////////
static void entry_point();
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//~ Header includes
#include "base/base_inc.h"
#include "os/os_inc.h"
#include "render/render_inc.h"
//////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//~ Source includes
#include "base/base_inc.c"
#include "os/os_inc.c"
@ -17,22 +21,10 @@
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//~ Main entry
function void
entry_point()
{
printf("HELLO MAIN");
}
int main()
{
printf("Accessing generated table gen_table[enum]\n");
for (int i = 0; i < TestEnum_COUNT; i++)
{
printf("table[%i] = %s \n", i, test_value_table[i]);
}
return 0;
}

2
src/os/os_core.c Normal file
View File

@ -0,0 +1,2 @@
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//~

7
src/os/os_core.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef OS_CORE_H
#define OS_CORE_H
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//~
#endif /* OS_CORE_H */

View File

@ -1,2 +1,5 @@
//////////////////////////////////////////////////////////////////////////////////////////////
//~ os source includes
//~ os source includes
#include "os/os_core.c"
#include "os/win32/os_core_win32.c"

View File

@ -4,4 +4,9 @@
//////////////////////////////////////////////////////////////////////////////////////////////
//~ OS Header includes
#include "os/os_core.h"
// If win32
#include "os/win32/os_core_win32.h"
#endif /* OS_INC_H */