<NME> FILE.H
<BEF> #ifndef FILE_H
#define FILE_H

#include <cstdio>
#include "SPECTYPES.H"

#ifdef __cplusplus
//extern "C" {
#endif

int S_LoadLevelFile(int Name);

int LoadFile(const char* szFileName, void** pDest);

int FindCdDrive(void);

FILE* FileOpen(const char* filename);

int FileClose(FILE* fp);

unsigned long FileLength(FILE* nHandle);

void FreeD3DLights();

void FreeLevel();

NEW_CUTSCENE* FetchCutData(int num);

NEW_CUTSCENE* ReadCutData(int num, FILE* fp);

#ifdef __cplusplus
//}
extern int AnimFileLen;
extern LPDIRECTDRAWSURFACE4 surf_screen;

#endif
	tr4_mesh_face3* triangles;
	int* lights;
	LPDIRECT3DVERTEXBUFFER vbuf;
	void* normals;
	int attributes;
	mesh_thing* vert;
	bounding_box_f bbox;
};
#pragma pack(pop)

#endif
<MSG> [Specific-PC_N] export tr4_mesh

<DFF> @@ -33,4 +33,31 @@ extern bool levelLoading;
 extern int AnimFileLen;
 extern LPDIRECTDRAWSURFACE4 surf_screen;
 
+#pragma pack(push, 1)
+struct mesh_thing
+{
+	tr5_vertex pos;
+	tr5_vertex norm;
+	int f6, f7;
+};
+
+struct tr4_mesh
+{
+	tr_vertex center;
+	int coll_radius;
+	short num_vert;
+	short num_normals;
+	short num_rectangles;
+	tr4_mesh_face4* rectangles;
+	short num_triangles;
+	tr4_mesh_face3* triangles;
+	int* lights;
+	LPDIRECT3DVERTEXBUFFER vbuf;
+	void* normals;
+	int attributes;
+	mesh_thing* vert;
+	bounding_box_f bbox;
+};
+#pragma pack(pop)
+
 #endif
\ No newline at end of file

{'commit': 'diff --git a/SPEC_PC_N/FILE.CPP b/SPEC_PC_N/FILE.CPP\nindex 0e5817a7..c328d5e9 100644\n--- a/SPEC_PC_N/FILE.CPP\n+++ b/SPEC_PC_N/FILE.CPP\n@@ -48,33 +48,6 @@ FILE* fp_level;\n char* level_data;\n char* level_data_orig;\n \n-#pragma pack(push, 1)\n-struct mesh_thing\n-{\n-\ttr5_vertex pos;\n-\ttr5_vertex norm;\n-\tint f6, f7;\n-};\n-\n-struct tr4_mesh\n-{\n-\ttr_vertex center;\n-\tint coll_radius;\n-\tshort num_vert;\n-\tshort num_normals;\n-\tshort num_rectangles;\n-\ttr4_mesh_face4 *rectangles;\n-\tshort num_triangles;\n-\ttr4_mesh_face3 *triangles;\n-\tint *lights;\n-\tLPDIRECT3DVERTEXBUFFER vbuf;\n-\tvoid* normals;\n-\tint attributes;\n-\tmesh_thing* vert;\n-\tbounding_box_f bbox;\n-};\n-#pragma pack(pop)\n-\n tr4_mesh** mesh_infos;\n OBJECT_TEXTURE* object_textures;\n SPRITE_STRUCT* sprites;\n@@ -869,7 +842,7 @@ int numLvlMeshes;\n \t\t\t\tmesh_info->center = *(tr_vertex*)mptr;\n \t\t\t\tmesh_info->coll_radius = *(int*)&mptr[3];\n \t\t\t\tmesh_info->num_vert = v62 = mptr[5] & 0xFF;\n-\t\t\t\tif ((mptr[5] & 0xFF) == 0)\n+\t\t\t\tif (mesh_info->num_vert == 0)\n \t\t\t\t{\n \t\t\t\t\tv9 = v62 = mptr[5] >> 8;\n \t\t\t\t}\n@@ -930,7 +903,7 @@ int numLvlMeshes;\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tconst short v35 = 255 - (*mptr++ >> 5);\n \n-\t\t\t\t\t\t\tconst int v36 = v35 | ((v35 | (v35 << 8)) << 8);\n+\t\t\t\t\t\t\tconst int v36 = RGBA_MAKE(v35, v35, v35, 0);\n \t\t\t\t\t\t\tmesh_info->lights[j] = mesh_info->vert[j].f6 = v36;\n \t\t\t\t\t\t}\n \ndiff --git a/SPEC_PC_N/FILE.H b/SPEC_PC_N/FILE.H\nindex 4fdbd05c..8e686646 100644\n--- a/SPEC_PC_N/FILE.H\n+++ b/SPEC_PC_N/FILE.H\n@@ -33,4 +33,31 @@ extern bool levelLoading;\n extern int AnimFileLen;\n extern LPDIRECTDRAWSURFACE4 surf_screen;\n \n+#pragma pack(push, 1)\n+struct mesh_thing\n+{\n+\ttr5_vertex pos;\n+\ttr5_vertex norm;\n+\tint f6, f7;\n+};\n+\n+struct tr4_mesh\n+{\n+\ttr_vertex center;\n+\tint coll_radius;\n+\tshort num_vert;\n+\tshort num_normals;\n+\tshort num_rectangles;\n+\ttr4_mesh_face4* rectangles;\n+\tshort num_triangles;\n+\ttr4_mesh_face3* triangles;\n+\tint* lights;\n+\tLPDIRECT3DVERTEXBUFFER vbuf;\n+\tvoid* normals;\n+\tint attributes;\n+\tmesh_thing* vert;\n+\tbounding_box_f bbox;\n+};\n+#pragma pack(pop)\n+\n #endif\n\\ No newline at end of file\n', 'commit_subject': '[Specific-PC_N] export tr4_mesh', 'repo_name': 'TOMB5/TOMB5', 'committer': {'name': 'Tom', 'email': '7f133c9dd458bcf09a5cce3b4ee818e8fbace9c6@free.fr', 'time_sec': '1585877180', 'tz_offset': '120', 'date': {'seconds': '1585877180'}}, 'commit_tree': 'a0b3d517d538d8a8994334fc034df08ca59c06df', 'commit_message': '[Specific-PC_N] export tr4_mesh\n', 'language_name': 'C++', 'license': 'mit', 'hunks': '@@ -33,4 +33,31 @@ extern bool levelLoading;\n extern int AnimFileLen;\n extern LPDIRECTDRAWSURFACE4 surf_screen;\n \n+#pragma pack(push, 1)\n+struct mesh_thing\n+{\n+\ttr5_vertex pos;\n+\ttr5_vertex norm;\n+\tint f6, f7;\n+};\n+\n+struct tr4_mesh\n+{\n+\ttr_vertex center;\n+\tint coll_radius;\n+\tshort num_vert;\n+\tshort num_normals;\n+\tshort num_rectangles;\n+\ttr4_mesh_face4* rectangles;\n+\tshort num_triangles;\n+\ttr4_mesh_face3* triangles;\n+\tint* lights;\n+\tLPDIRECT3DVERTEXBUFFER vbuf;\n+\tvoid* normals;\n+\tint attributes;\n+\tmesh_thing* vert;\n+\tbounding_box_f bbox;\n+};\n+#pragma pack(pop)\n+\n #endif\n\\ No newline at end of file\n', 'addition_count': 27, 'deletion_count': 0, 'src_file': 'a/SPEC_PC_N/FILE.H', 'tgt_file': 'b/SPEC_PC_N/FILE.H', 'file_extension': '.H', 'before_file': '#ifndef FILE_H\n#define FILE_H\n\n#include <cstdio>\n#include "SPECTYPES.H"\n\n#ifdef __cplusplus\n//extern "C" {\n#endif\n\nint S_LoadLevelFile(int Name);\n\nint LoadFile(const char* szFileName, void** pDest);\n\nint FindCdDrive(void);\n\nFILE* FileOpen(const char* filename);\n\nint FileClose(FILE* fp);\n\nunsigned long FileLength(FILE* nHandle);\n\nvoid FreeD3DLights();\n\nvoid FreeLevel();\n\nNEW_CUTSCENE* FetchCutData(int num);\n\nNEW_CUTSCENE* ReadCutData(int num, FILE* fp);\n\n#ifdef __cplusplus\n//}\nextern int AnimFileLen;\nextern LPDIRECTDRAWSURFACE4 surf_screen;\n\n#endif\n\ttr4_mesh_face3* triangles;\n\tint* lights;\n\tLPDIRECT3DVERTEXBUFFER vbuf;\n\tvoid* normals;\n\tint attributes;\n\tmesh_thing* vert;\n\tbounding_box_f bbox;\n};\n#pragma pack(pop)\n\n#endif', 'message': '[Specific-PC_N] export tr4_mesh\n', 'author_name': 'Tom', 'lang': 'H'}