Some TMS header cleanups

Remove mostly redundant backend.h header, move print.h into core
This commit is contained in:
ROllerozxa 2026-06-22 19:30:37 +02:00
commit ec68f7ca47
14 changed files with 15 additions and 32 deletions

View file

@ -26,7 +26,7 @@
#include <Box2D/Collision/Shapes/b2Shape.h>
#include <algorithm>
#include <tms/backend/print.h>
#include <tms/core/print.h>
#include "creature.hh"
static const uint32 xTruncBits = 12;
@ -165,7 +165,7 @@ int32 b2ParticleSystem::CreateParticle(const b2ParticleDef& def)
tms_debugf("reached maximum particles");
return b2_invalidParticleIndex;
}
if (m_count >= m_internalAllocatedCapacity)
{
int32 capacity = m_count ? 2 * m_count : b2_minParticleBufferCapacity;

View file

@ -7,7 +7,7 @@
#include <unistd.h>
#ifndef _NO_TMS
#include <tms/backend/print.h>
#include <tms/cpp.hh>
#endif
uint32_t

View file

@ -1,5 +1,7 @@
#include "atlas.h"
#include "backend.h"
#include "err.h"
#include "print.h"
#include <stdlib.h>
struct tms_atlas *
tms_atlas_alloc(int width, int height, int num_channels)

View file

@ -1,18 +0,0 @@
#pragma once
#if !defined TMS_BACKEND_PC \
&& !defined TMS_BACKEND_MOBILE
#error Either TMS_BACKEND_PC or TMS_BACKEND_MOBILE need to be defined for your platform.
#endif
#include <tms/core/err.h>
#ifdef __cplusplus
extern "C" {
#endif
#include "storage.h"
#ifdef __cplusplus
}
#endif

View file

@ -7,7 +7,6 @@ enum {
T_CONT,
T_COULD_NOT_OPEN,
T_NO_DATA,
};
#include <tms/backend/print.h>
#include "print.h"

View file

@ -1,6 +1,5 @@
#pragma once
#include <tms/core/err.h>
#include <stdint.h>
#ifdef __cplusplus

View file

@ -1,7 +1,7 @@
#include "gbuffer.h"
#include "err.h"
#include "print.h"
#include <string.h>
#include <tms/core/err.h>
#include <tms/backend/print.h>
struct tms_gbuffer*
tms_gbuffer_alloc(size_t size)

View file

@ -1,5 +1,4 @@
#include "atlas.h"
#include "backend.h"
#include "camera.h"
#include "ddraw.h"
#include "entity.h"

View file

@ -1,6 +1,6 @@
#include "hash.h"
#include <tms/backend/print.h>
#include "print.h"
/**
* Round up to the nearest power of 2

View file

@ -1,5 +1,5 @@
#include "storage.h"
#include "tms/backend/print.h"
#include "print.h"
#include <SDL3/SDL.h>
#include <errno.h>
#include <stdlib.h>

View file

@ -2,7 +2,6 @@
#include <stdlib.h>
#include <string.h>
#include "backend.h"
#include "texture.h"
#include "framebuffer.h"
#include "tms.h"

View file

@ -7,7 +7,6 @@
#include "screen.h"
#include "event.h"
#include "material.h"
#include "backend.h"
#include "shader.h"
#include "project.h"
#include "hash.h"

View file

@ -66,6 +66,10 @@ struct tms_mesh;
#define opengl_height window_height
#endif
#if !defined TMS_BACKEND_PC && !defined TMS_BACKEND_MOBILE
#error Either TMS_BACKEND_PC or TMS_BACKEND_MOBILE need to be defined for your platform.
#endif
/**
* Global singleton object that the project work against.
* tms is a global singleton that can be accessed from anywhere,