added mesh rendering

This commit is contained in:
2025-05-28 14:36:57 +03:00
parent 60fa98e240
commit b83078553e
53 changed files with 1436 additions and 363 deletions

36
game/server/__build.c Normal file
View File

@@ -0,0 +1,36 @@
#include "god/build.h"
#include "god/c.h"
#include "god/ld.h"
#include "libgen.h"
char* server_dll = 0;
void server_build(struct build_data b)
{
char* files[] = {
"game/server/game.cpp",
"game/server/baseplayer.cpp",
NULL,
};
struct project p = {
.b = &b,
.files = files,
.name = "server",
};
struct project o = C_compile(p, (struct C_settings){
.generation_flags = C_GENERATION_FLAGS_PIC,
.compile_flags = C_COMPILE_FLAGS_WALL,
.include_dirs = include_dirs,
});
char* libs[] = {
"c",
NULL,
};
server_dll = ld_link_project(o, (struct link_settings){
.type = LINK_TYPE_DYNAMIC,
.libs = libs,
});
mv("build/"GAME_NAME"/game/"GAME_NAME"/bin/libserver.so",server_dll);
}

View File

@@ -0,0 +1,32 @@
#include "baseentity.h"
class CBasePlayer: public CBaseEntity
{
public:
virtual void Precache ( void ) override;
virtual void Spawn( void ) override;
virtual void Destroy( void ) override;
virtual void Think( float fDelta ) override;
};
void CBasePlayer::Precache()
{
}
void CBasePlayer::Spawn()
{
};
void CBasePlayer::Destroy()
{
}
void CBasePlayer::Think( float fDelta )
{
};
DECLARE_ENTITY(player, CBasePlayer);

12
game/server/game.cpp Normal file
View File

@@ -0,0 +1,12 @@
#include "tier0/platform.h"
#include "engine.h"
#include "level.h"
#include "stdio.h"
DLL_EXPORT void IGame_Load()
{
ILevel::LoadLevel("maps/test_map");
return;
};