Skip to content

Commit 9b65b37

Browse files
author
DESKTOP-BTQVEBH\Robin
committed
Merge branch 'master' of github.com:raytools/ACP_Ray2
# Conflicts: # src/GLI/GLI.c # src/GLI/GLI.h
2 parents 1ceda76 + 9d267cb commit 9b65b37

File tree

25 files changed

+360
-75
lines changed

25 files changed

+360
-75
lines changed

.github/workflows/build.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: build-master
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
workflow_dispatch:
9+
10+
env:
11+
SOLUTION_PATH: .
12+
CONFIGURATION: Release
13+
PLATFORM: x86
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
build:
20+
runs-on: windows-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Add MSBuild to PATH
26+
uses: microsoft/setup-msbuild@v2
27+
28+
#- name: Restore NuGet packages
29+
# working-directory: ${{env.GITHUB_WORKSPACE}}
30+
# run: nuget restore ${{env.SOLUTION_PATH}}
31+
32+
- name: Build
33+
working-directory: ${{env.GITHUB_WORKSPACE}}
34+
# Add additional options to the MSBuild command line here (like platform or verbosity level).
35+
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
36+
run: msbuild /m /p:Configuration=${{env.CONFIGURATION}} /p:Platform=${{env.PLATFORM}} ${{env.SOLUTION_PATH}}
37+
38+
- name: Upload
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: ACP_Ray2-master
42+
path: bin/
43+
if-no-files-found: error
44+
45+
- name: Upload DLL
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: ACP_Ray2x-dll-master
49+
path: bin/lib/ACP_Ray2x.dll
50+
if-no-files-found: error

ACP_Ray2.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ cd .</Command>
219219
<ClInclude Include="src\basedef.h" />
220220
<ClInclude Include="src\CAM\CAM.h" />
221221
<ClInclude Include="src\CAM\CAM_Def.h" />
222+
<ClInclude Include="src\DNM\MEC.h" />
222223
<ClInclude Include="src\GAM\GAM_3dData.h" />
223224
<ClInclude Include="src\GAM\GAM_Def.h" />
224225
<ClInclude Include="src\GAM\GAM_ObjType.h" />
@@ -236,6 +237,7 @@ cd .</Command>
236237
<ClInclude Include="src\GLI\GLI_BigGlobals.h" />
237238
<ClInclude Include="src\GLI\GLI_Const.h" />
238239
<ClInclude Include="src\GLI\GLI_Def.h" />
240+
<ClInclude Include="src\GLI\GLI_Drv.h" />
239241
<ClInclude Include="src\GLI\GLI_Ext.h" />
240242
<ClInclude Include="src\GLI\GLI_Misc.h" />
241243
<ClInclude Include="src\GMT\GMT.h" />
@@ -288,6 +290,7 @@ cd .</Command>
288290
<ClCompile Include="src\CAM\CAM.c" />
289291
<ClCompile Include="src\dllmain.c" />
290292
<ClCompile Include="src\DNM\DNM.c" />
293+
<ClCompile Include="src\DNM\MEC.c" />
291294
<ClCompile Include="src\ERM\ERM.c" />
292295
<ClCompile Include="src\FIL\FIL.c" />
293296
<ClCompile Include="src\FON\FON.c" />
@@ -304,6 +307,7 @@ cd .</Command>
304307
<ClCompile Include="src\JFFTXT\JFFTXT.c" />
305308
<ClCompile Include="src\MMG\MMG.c" />
306309
<ClCompile Include="src\POS\POS.c" />
310+
<ClCompile Include="src\SCT\SCT.c" />
307311
<ClCompile Include="src\SND\SND.c" />
308312
<ClCompile Include="src\SND\SND_Ext.c" />
309313
<ClCompile Include="src\TMR\TMR.c" />

ACP_Ray2.vcxproj.filters

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,12 @@
231231
<ClInclude Include="src\GAM\GAM_3dData.h">
232232
<Filter>Header Files</Filter>
233233
</ClInclude>
234+
<ClInclude Include="src\GLI\GLI_Drv.h">
235+
<Filter>Header Files</Filter>
236+
</ClInclude>
237+
<ClInclude Include="src\DNM\MEC.h">
238+
<Filter>Header Files</Filter>
239+
</ClInclude>
234240
</ItemGroup>
235241
<ItemGroup>
236242
<ClCompile Include="src\AI\AI.c">
@@ -311,6 +317,12 @@
311317
<ClCompile Include="src\CAM\CAM.c">
312318
<Filter>Source Files</Filter>
313319
</ClCompile>
320+
<ClCompile Include="src\SCT\SCT.c">
321+
<Filter>Source Files</Filter>
322+
</ClCompile>
323+
<ClCompile Include="src\DNM\MEC.c">
324+
<Filter>Source Files</Filter>
325+
</ClCompile>
314326
</ItemGroup>
315327
<ItemGroup>
316328
<None Include="cpp.hint" />

src/ACP_Ray2.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ extern "C" {
2929
#include "AI/AI.h"
3030
#include "ALW/ALW.h"
3131
#include "DNM/DNM.h"
32+
#include "DNM/MEC.h"
3233
#include "GMT/GMT.h"
3334
#include "GEO/GEO.h"
3435
#include "PO/PO.h"
@@ -45,6 +46,12 @@ extern "C" {
4546
#include "AGO/AGO.h"
4647
#include "JFFTXT/JFFTXT.h"
4748

49+
/* Include the GLI driver DLL functions */
50+
/* To disable, define ACP_NO_DRV */
51+
#if !defined(ACP_NO_DRV)
52+
#include "GLI/GLI_Drv.h"
53+
#endif
54+
4855

4956
/****************************************************************************
5057
* Extensions

src/AGO/AGO.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99

1010
void (*AGO_vDisplayGAUGES)( GLD_tdstViewportAttributes *p_stVpt )
1111
= OFFSET(0x460670);
12-
void (*AGO_vAddParticle)(unsigned long PartType, MTH3D_tdstVector* p_stPosition, MTH3D_tdstVector* p_stDirection, void* hVisualMaterial, float parameter)
12+
13+
void (*AGO_vAddParticle)( unsigned long PartType, MTH3D_tdstVector *p_stPosition, MTH3D_tdstVector *p_stDirection, void *hVisualMaterial, float parameter )
1314
= OFFSET(0x463390);
14-
ACP_FUNC int* (*AGO_vCreatePart)(unsigned long parm_ulType, float* parm_a3_fPosition, float* parm_a3_fDirection, float TimeLimit, float fScaleX, float fScaleY, void* pVisualMaterial)
15+
void * (*AGO_vCreatePart)( unsigned long parm_ulType, float *parm_a3_fPosition, float *parm_a3_fDirection, float TimeLimit, float fScaleX, float fScaleY, void *pVisualMaterial )
1516
= OFFSET(0x4600C0);
16-
ACP_FUNC void (*AGO_vCreateTriangle)(float c1[3], float c2[3], float c3[3], void* VisualMat, float U1, float V1, float U2, float V2, float U3, float V3, float DelayTime, unsigned long Parameter)
17-
= OFFSET(0x466530);
17+
void (*AGO_vCreateTriangle)( float c1[3], float c2[3], float c3[3], void *VisualMat, float U1, float V1, float U2, float V2, float U3, float V3, float DelayTime, unsigned long Parameter )
18+
= OFFSET(0x466530);

src/AGO/AGO.h

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,28 @@
1010
#include "MTH.h"
1111

1212

13-
/* Part behavior*/
14-
#define AGO_TYPEMASK 0x000000FF
15-
#define AGO_STILL 0x00000000
16-
#define AGO_FALLING 0x00000001
17-
#define AGO_SINUSING 0x00000002
18-
#define AGO_MOVING 0x00000003
19-
#define AGO_GEISER 0x00000004
20-
#define AGO_FALLING_SLOW 0x00000005
21-
#define AGO_ROTATING_SLOW 0x00000006
22-
#define AGO_MOVINGSINXY 0x00000007
23-
#define AGO_SPIRALE 0x00000008
24-
#define AGO_MOVING_AND_SLOWING 0x00000009
25-
#define AGO_GOINGTO 0x0000000A
26-
#define AGO_MOVINGSINXYUP 0x0000000B
27-
#define AGO_2DSPIRALE 0x0000000C
28-
#define AGO_FASEGOINGTO 0x0000000E
29-
#define AGO_FIREWORKS 0x0000000F
30-
#define AGO_FALLING_MEGAFAST 0x00000010
31-
#define AGO_FRAME 0x00000011
32-
#define AGO_GOTO 0x00000012
13+
/* Part behavior */
14+
#define AGO_TYPEMASK 0x000000FF
15+
#define AGO_STILL 0x00000000
16+
#define AGO_FALLING 0x00000001
17+
#define AGO_SINUSING 0x00000002
18+
#define AGO_MOVING 0x00000003
19+
#define AGO_GEISER 0x00000004
20+
#define AGO_FALLING_SLOW 0x00000005
21+
#define AGO_ROTATING_SLOW 0x00000006
22+
#define AGO_MOVINGSINXY 0x00000007
23+
#define AGO_SPIRALE 0x00000008
24+
#define AGO_MOVING_AND_SLOWING 0x00000009
25+
#define AGO_GOINGTO 0x0000000A
26+
#define AGO_MOVINGSINXYUP 0x0000000B
27+
#define AGO_2DSPIRALE 0x0000000C
28+
#define AGO_FASEGOINGTO 0x0000000E
29+
#define AGO_FIREWORKS 0x0000000F
30+
#define AGO_FALLING_MEGAFAST 0x00000010
31+
#define AGO_FRAME 0x00000011
32+
#define AGO_GOTO 0x00000012
3333

34-
/* Scaling Behavior*/
34+
/* Scaling Behavior */
3535
#define AGO_SCALEMASK 0x00000F00
3636
#define AGO_SCALING_SLOW 0x00000100
3737
#define AGO_SCALING_MID 0x00000200
@@ -48,29 +48,28 @@
4848
#define AGO_BIG_RANDOM_SCALE 0x00000E00
4949
#define AGO_SMALL_RANDOM_SCALE 0x00000F00
5050

51+
/* Shading Behavior */
52+
#define AGO_SHADEMASK 0x0000F000
53+
#define AGO_SHADE_SLOW 0x00001000
54+
#define AGO_SHADE_MID 0x00002000
55+
#define AGO_SHADE_FAST 0x00003000
56+
#define AGO_SHADE_FASTEST 0x00004000
57+
#define AGO_SHADE_MEGAFAST 0x00005000
58+
#define AGO_SHADE_TWOFRAMES 0x00006000
59+
#define AGO_APPEAR 0x00007000
60+
#define AGO_WAIT 0x00008000
61+
#define AGO_RANDOM_SHADE 0x00009000
62+
#define AGO_UNSHADE 0x0000A000
5163

52-
/* Shading Behavior*/
53-
#define AGO_SHADEMASK 0x0000F000
54-
#define AGO_SHADE_SLOW 0x00001000
55-
#define AGO_SHADE_MID 0x00002000
56-
#define AGO_SHADE_FAST 0x00003000
57-
#define AGO_SHADE_FASTEST 0x00004000
58-
#define AGO_SHADE_MEGAFAST 0x00005000
59-
#define AGO_SHADE_TWOFRAMES 0x00006000
60-
#define AGO_APPEAR 0x00007000
61-
#define AGO_WAIT 0x00008000
62-
#define AGO_RANDOM_SHADE 0x00009000
63-
#define AGO_UNSHADE 0x0000A000
64-
65-
/* Part death & misc flags:*/
66-
#define AGO_TIMELIMITED 0x00010000
67-
#define AGO_ENDASPLOUF 0x00020000
68-
#define AGO_ZLIMITED 0x00040000
69-
#define AGO_ZELDA 0x00080000
70-
#define AGO_MUSTDIE 0x01000000
71-
#define AGO_FOLLOWZ 0x02000000
72-
#define AGO_LOOPANIM 0x04000000
73-
#define AGO_BASEDSCALE 0x08000000
64+
/* Part death & misc flags */
65+
#define AGO_TIMELIMITED 0x00010000
66+
#define AGO_ENDASPLOUF 0x00020000
67+
#define AGO_ZLIMITED 0x00040000
68+
#define AGO_ZELDA 0x00080000
69+
#define AGO_MUSTDIE 0x01000000
70+
#define AGO_FOLLOWZ 0x02000000
71+
#define AGO_LOOPANIM 0x04000000
72+
#define AGO_BASEDSCALE 0x08000000
7473

7574

7675
#define AGO_GEOMETRY_TYPE_MASK 0xF0000000
@@ -86,6 +85,7 @@
8685
*/
8786

8887
ACP_FUNC void (*AGO_vDisplayGAUGES)( GLD_tdstViewportAttributes *p_stVpt );
89-
ACP_FUNC void (*AGO_vAddParticle)(unsigned long PartType, MTH3D_tdstVector *p_stPosition, MTH3D_tdstVector *p_stDirection, void *hVisualMaterial, float parameter);
90-
ACP_FUNC int *(*AGO_vCreatePart)(unsigned long parm_ulType, float *parm_a3_fPosition, float *parm_a3_fDirection, float TimeLimit, float fScaleX, float fScaleY, void *pVisualMaterial);
91-
ACP_FUNC void (*AGO_vCreateTriangle)(float c1[3], float c2[3], float c3[3], void *VisualMat, float U1, float V1, float U2, float V2, float U3, float V3, float DelayTime, unsigned long Parameter);
88+
89+
ACP_FUNC void (*AGO_vAddParticle)( unsigned long PartType, MTH3D_tdstVector *p_stPosition, MTH3D_tdstVector *p_stDirection, void *hVisualMaterial, float parameter );
90+
ACP_FUNC /* AGO_Part */ void * (*AGO_vCreatePart)( unsigned long parm_ulType, float *parm_a3_fPosition, float *parm_a3_fDirection, float TimeLimit, float fScaleX, float fScaleY, void *pVisualMaterial );
91+
ACP_FUNC void (*AGO_vCreateTriangle)( float c1[3], float c2[3], float c3[3], void *VisualMat, float U1, float V1, float U2, float V2, float U3, float V3, float DelayTime, unsigned long Parameter );

src/AI/AI.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,15 @@ AI_tdstNodeInterpret *(*AI_fn_p_stEvalTree)(
1818

1919
void (*AI_fn_vReinitAI)( AI_tdstMind *p_stMind ) = OFFSET(0x466D00);
2020

21-
void (*AI_fn_vBrainAlloc)(HIE_tdstEngineObject* p_stObject) = OFFSET(0x417E10);
21+
void (*AI_fn_vBrainAlloc)( HIE_tdstEngineObject *p_stObject ) = OFFSET(0x417E10);
22+
23+
24+
/* ultra operator */
25+
26+
void (*AI_fn_vGetUltraOperatorPerso)(
27+
unsigned char bYouHaveRightToUseThisFunction,
28+
HIE_tdstSuperObject *hCurrentSuperObjPerso,
29+
HIE_tdstSuperObject **hNewSuperObjPerso
30+
) = OFFSET(0x4825B0);
31+
32+
unsigned char (*AI_fn_ucGetProcedureUltraOperator)( AI_tdeProcedureId eProcId ) = OFFSET(0x482680);

src/AI/AI.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,15 @@ ACP_FUNC AI_tdstNodeInterpret *(*AI_fn_p_stEvalTree)( HIE_tdstSuperObject *p_stS
7979

8080
ACP_FUNC void (*AI_fn_vReinitAI)( AI_tdstMind *p_stMind );
8181

82-
ACP_FUNC void (*AI_fn_vBrainAlloc)(HIE_tdstEngineObject *p_stObject);
82+
ACP_FUNC void (*AI_fn_vBrainAlloc)( HIE_tdstEngineObject *p_stObject );
83+
84+
85+
/* ultra operator */
86+
87+
ACP_FUNC void (*AI_fn_vGetUltraOperatorPerso)(
88+
unsigned char bYouHaveRightToUseThisFunction,
89+
HIE_tdstSuperObject *hCurrentSuperObjPerso,
90+
HIE_tdstSuperObject **hNewSuperObjPerso
91+
);
92+
93+
ACP_FUNC unsigned char (*AI_fn_ucGetProcedureUltraOperator)( AI_tdeProcedureId eProcId );

src/AI/AI_Def.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ typedef union AI_tduGetSetParamForNode AI_tduGetSetParamForNode;
1616
typedef struct AI_tdstGetSetParam AI_tdstGetSetParam;
1717
typedef struct AI_tdstNodeInterpret AI_tdstNodeInterpret;
1818
typedef struct AI_tdstTreeInterpret AI_tdstTreeInterpret;
19+
20+
21+
/* not yet defined */
22+
typedef enum AI_tdeProcedureId AI_tdeProcedureId;

src/DNM/MEC.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/****************************************************************************
2+
*
3+
* MEC - Mechanics module
4+
*
5+
****************************************************************************/
6+
7+
#include "MEC.h"
8+
9+
10+
void (*MEC_vInitTranslation)(
11+
DNM_tdstDynamics *p_stDynamic,
12+
HIE_tdstSuperObject *hSupObj,
13+
MTH3D_tdstVector *p_stVector
14+
) = OFFSET(0x432DA0);

0 commit comments

Comments
 (0)