openmohaa/code/qcommon/tiki.h

159 lines
3.7 KiB
C
Raw Normal View History

2016-03-27 11:49:47 +02:00
/*
===========================================================================
2023-11-06 18:08:21 +01:00
Copyright (C) 2023 the OpenMoHAA team
2016-03-27 11:49:47 +02:00
This file is part of OpenMoHAA source code.
OpenMoHAA source code is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
OpenMoHAA source code is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenMoHAA source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
2023-11-06 18:08:21 +01:00
#pragma once
2016-03-27 11:49:47 +02:00
#include "q_shared.h"
#include "../tiki/tiki_shared.h"
#ifdef __cplusplus
class Archiver;
2023-11-06 18:08:21 +01:00
# include "../qcommon/mem_blockalloc.h"
# include "../qcommon/con_set.h"
# include "../qcommon/str.h"
2016-03-27 11:49:47 +02:00
#endif
2023-11-06 18:08:21 +01:00
typedef struct AliasList_s AliasList_t;
2016-03-27 11:49:47 +02:00
typedef struct AliasListNode_s AliasListNode_t;
2023-11-06 18:08:21 +01:00
typedef struct msg_s msg_t;
2016-03-27 11:49:47 +02:00
typedef struct {
2023-11-06 18:08:21 +01:00
int indexes[3];
2016-03-27 11:49:47 +02:00
} tikiTriangle_t;
typedef struct {
2023-11-06 18:08:21 +01:00
float st[2];
2016-03-27 11:49:47 +02:00
} tikiSt_t;
typedef struct {
2023-11-06 18:08:21 +01:00
short unsigned int xyz[3];
short int normal;
2016-03-27 11:49:47 +02:00
} tikiXyzNormal_t;
typedef struct {
2023-11-06 18:08:21 +01:00
float origin[3];
float axis[3][3];
2016-03-27 11:49:47 +02:00
} tikiTagData_t;
typedef struct {
2023-11-06 18:08:21 +01:00
char name[64];
2016-03-27 11:49:47 +02:00
} tikiTag_t;
typedef struct {
2023-11-06 18:08:21 +01:00
qboolean valid;
int surface;
vec3_t position;
vec3_t normal;
float damage_multiplier;
2016-03-27 11:49:47 +02:00
} tikimdl_intersection_t;
typedef struct {
2023-11-06 18:08:21 +01:00
int indexes[3];
2016-03-27 11:49:47 +02:00
} skelTriangle_t;
typedef struct dtikicmd_s {
2023-11-06 18:08:21 +01:00
int frame_num;
int num_args;
char **args;
2016-03-27 11:49:47 +02:00
} dtikicmd_t;
typedef struct {
2023-11-06 18:08:21 +01:00
int frame_num;
int num_args;
char **args;
char location[256];
2016-03-27 11:49:47 +02:00
} dloadframecmd_t;
typedef struct {
2023-11-06 18:08:21 +01:00
int num_args;
char **args;
2016-03-27 11:49:47 +02:00
} dloadinitcmd_t;
typedef struct {
2023-11-06 18:08:21 +01:00
char name[32];
char shader[4][64];
int numskins;
int flags;
float damage_multiplier;
2016-03-27 11:49:47 +02:00
} dloadsurface_t;
typedef struct {
2023-11-06 18:08:21 +01:00
char *alias;
char name[128];
char location[256];
float weight;
float blendtime;
int flags;
int num_client_cmds;
int num_server_cmds;
dloadframecmd_t *loadservercmds[32];
dloadframecmd_t *loadclientcmds[128];
2016-03-27 11:49:47 +02:00
} dloadanim_t;
typedef struct dloaddef_s dloaddef_t;
#include "tiki_script.h"
2016-03-27 11:49:47 +02:00
#ifdef __cplusplus
typedef struct dloaddef_s {
2023-11-06 18:08:21 +01:00
const char *path;
class TikiScript tikiFile;
2016-03-27 11:49:47 +02:00
2023-11-06 18:08:21 +01:00
dloadanim_t *loadanims[4095];
dloadinitcmd_t *loadserverinitcmds[160];
dloadinitcmd_t *loadclientinitcmds[160];
2016-03-27 11:49:47 +02:00
2023-11-06 18:08:21 +01:00
int skelIndex_ld[12];
int numanims;
int numserverinitcmds;
int numclientinitcmds;
2016-03-27 11:49:47 +02:00
2023-11-06 18:08:21 +01:00
char headmodels[4096];
char headskins[4096];
qboolean bIsCharacter;
2016-03-27 11:49:47 +02:00
2023-11-06 18:08:21 +01:00
struct msg_s *modelBuf;
unsigned char modelData[8192];
2016-03-27 11:49:47 +02:00
2023-11-06 18:08:21 +01:00
qboolean bInIncludesSection;
2016-03-27 11:49:47 +02:00
} dloaddef_t;
#endif
#include "../skeletor/skeletor.h"
2023-01-29 20:59:31 +01:00
#include "../qcommon/tiki_main.h"
2016-03-27 11:49:47 +02:00
#include "../tiki/tiki_anim.h"
#include "../tiki/tiki_cache.h"
#include "../tiki/tiki_commands.h"
#include "../tiki/tiki_files.h"
#include "../tiki/tiki_imports.h"
#include "../tiki/tiki_parse.h"
#include "../tiki/tiki_skel.h"
#include "../tiki/tiki_tag.h"
#include "../tiki/tiki_utility.h"
#include "../tiki/tiki_frame.h"
#include "../tiki/tiki_surface.h"
2023-05-08 14:33:37 +02:00
#include "../tiki/tiki_mesh.h"