Skip to content

Commit c0b4117

Browse files
authored
Merge branch 'OpenParsec:main' into main
2 parents 884e393 + 7f0781d commit c0b4117

6 files changed

Lines changed: 191 additions & 1 deletion

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@
3030
# Visual Studio cached files
3131
.vs/
3232

33+
platforms/vs/parsec.log
34+
platforms/vs/Parsec.vcxproj.user

.vscode/extensions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"ms-vscode.cpptools"
4+
]
5+
}

.vscode/launch.json

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations":
7+
[
8+
{
9+
"name": "(Linux) Client Debug x64 - gdb",
10+
"type": "cppdbg",
11+
"request": "launch",
12+
"program": "${workspaceFolder}/parsec_root/client/parsec",
13+
"args": [ "-b"],
14+
"stopAtEntry": false,
15+
"cwd": "${workspaceFolder}/parsec_root/client/",
16+
"environment": [],
17+
"externalConsole": false,
18+
"MIMode": "gdb",
19+
"setupCommands": [
20+
{
21+
"description": "Enable pretty-printing for gdb",
22+
"text": "-enable-pretty-printing",
23+
"ignoreFailures": true
24+
}
25+
]
26+
},
27+
{
28+
"name": "(Linux) Server Debug x64 - gdb",
29+
"type": "cppdbg",
30+
"request": "launch",
31+
"program": "${workspaceFolder}/parsec_root/server/parsec_server",
32+
"args": [],
33+
"stopAtEntry": false,
34+
"cwd": "${workspaceFolder}/parsec_root/server/",
35+
"environment": [],
36+
"externalConsole": false,
37+
"MIMode": "gdb",
38+
"setupCommands": [
39+
{
40+
"description": "Enable pretty-printing for gdb",
41+
"text": "-enable-pretty-printing",
42+
"ignoreFailures": true
43+
}
44+
]
45+
},
46+
{
47+
"name": "(Windows) Debug x64",
48+
"type": "cppvsdbg",
49+
"request": "launch",
50+
"program": "${workspaceFolder}/platforms/vs/x64/Debug/Parsec.exe",
51+
"args": [],
52+
"stopAtEntry": false,
53+
"cwd": "${workspaceFolder}/platforms/vs/x64/Debug",
54+
"environment": [],
55+
"console": "externalTerminal"
56+
}
57+
]
58+
}

.vscode/tasks.json

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "(Windows) x64 - Debug",
8+
"type": "shell",
9+
"command": "msbuild",
10+
"args": [
11+
"platforms/vs/Parsec.vcxproj",
12+
// Ask msbuild to generate full paths for file names.
13+
"/property:GenerateFullPaths=true",
14+
"/t:build",
15+
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
16+
"/consoleloggerparameters:NoSummary",
17+
"/property:Platform=x64",
18+
"-property:Configuration=Debug"
19+
],
20+
"group": "build",
21+
"presentation": {
22+
// Reveal the output only if unrecognized errors occur.
23+
"reveal": "silent"
24+
},
25+
// Use the standard MS compiler pattern to detect errors, warnings and infos
26+
"problemMatcher": "$msCompile"
27+
},
28+
{
29+
"label": "(Windows) x64 - Release",
30+
"type": "shell",
31+
"command": "msbuild",
32+
"args": [
33+
"platforms/vs/Parsec.vcxproj",
34+
// Ask msbuild to generate full paths for file names.
35+
"/property:GenerateFullPaths=true",
36+
"/t:build",
37+
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
38+
"/consoleloggerparameters:NoSummary",
39+
"/property:Platform=x64",
40+
"-property:Configuration=Release"
41+
],
42+
"group": "build",
43+
"presentation": {
44+
// Reveal the output only if unrecognized errors occur.
45+
"reveal": "silent"
46+
},
47+
// Use the standard MS compiler pattern to detect errors, warnings and infos
48+
"problemMatcher": "$msCompile"
49+
},
50+
{
51+
"label": "(Premake - client) x64 - Release",
52+
"type": "shell",
53+
"command": "make",
54+
"args": [
55+
"config=release_x64",
56+
],
57+
"group": "build",
58+
"presentation": {
59+
// Reveal the output only if unrecognized errors occur.
60+
"reveal": "always"
61+
},
62+
"options":{
63+
"cwd": "${workspaceFolder}/platforms/premake/build/client/",
64+
},
65+
66+
},
67+
{
68+
"label": "(Premake - client) x64 - Debug",
69+
"type": "shell",
70+
"command": "make",
71+
"args": [
72+
"config=debug_x64",
73+
],
74+
"group": "build",
75+
"presentation": {
76+
// Reveal the output only if unrecognized errors occur.
77+
"reveal": "always"
78+
},
79+
"options":{
80+
"cwd": "${workspaceFolder}/platforms/premake/build/client/",
81+
},
82+
83+
},
84+
{
85+
"label": "(Premake - server) x64 - Release",
86+
"type": "shell",
87+
"command": "make",
88+
"args": [
89+
"config=release_x64",
90+
],
91+
"group": "build",
92+
"presentation": {
93+
// Reveal the output only if unrecognized errors occur.
94+
"reveal": "always"
95+
},
96+
"options":{
97+
"cwd": "${workspaceFolder}/platforms/premake/build/server/",
98+
},
99+
100+
},
101+
{
102+
"label": "(Premake - server) x64 - Debug",
103+
"type": "shell",
104+
"command": "make",
105+
"args": [
106+
"config=debug_x64",
107+
],
108+
"group": "build",
109+
"presentation": {
110+
// Reveal the output only if unrecognized errors occur.
111+
"reveal": "always"
112+
},
113+
"options":{
114+
"cwd": "${workspaceFolder}/platforms/premake/build/server/",
115+
},
116+
117+
}
118+
]
119+
}

src/libparsec/obj_odt.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,6 +1332,9 @@ size_t ODT_CreateObject(ODT_GenObject32 *c32obj, dword flags, shader_s *shader)
13321332
// enter object into class array
13331333
ObjClasses[gobj->ObjectClass] = gobj;
13341334

1335+
// free our temp object from the beginning of the function.
1336+
FREEMEM(cobj);
1337+
13351338
// init class and type data of object
13361339
OBJ_InitClass(gobj->ObjectClass);
13371340
// OBJODT_DumpPoly(gobj);
@@ -1923,6 +1926,9 @@ size_t OD2_CreateObject(OD2_Root32 *cobj32, dword flags, shader_s *shader)
19231926
// init class and type data of object
19241927
OBJ_InitClass(gobj->ObjectClass);
19251928

1929+
// free temporary variable.
1930+
FREEMEM(cobj);
1931+
19261932
// return mem size of object
19271933
return objmemsize;
19281934
}

0 commit comments

Comments
 (0)