Skip to content

Commit

Permalink
Merge branch 'master' of github.com:raytools/ACP_Ray2
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/GLI/GLI.c
#	src/GLI/GLI.h
  • Loading branch information
DESKTOP-BTQVEBH\Robin committed Nov 11, 2024
2 parents 1ceda76 + 9d267cb commit 9b65b37
Show file tree
Hide file tree
Showing 25 changed files with 360 additions and 75 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: build-master

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:

env:
SOLUTION_PATH: .
CONFIGURATION: Release
PLATFORM: x86

permissions:
contents: read

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2

#- name: Restore NuGet packages
# working-directory: ${{env.GITHUB_WORKSPACE}}
# run: nuget restore ${{env.SOLUTION_PATH}}

- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:Configuration=${{env.CONFIGURATION}} /p:Platform=${{env.PLATFORM}} ${{env.SOLUTION_PATH}}

- name: Upload
uses: actions/upload-artifact@v4
with:
name: ACP_Ray2-master
path: bin/
if-no-files-found: error

- name: Upload DLL
uses: actions/upload-artifact@v4
with:
name: ACP_Ray2x-dll-master
path: bin/lib/ACP_Ray2x.dll
if-no-files-found: error
4 changes: 4 additions & 0 deletions ACP_Ray2.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ cd .</Command>
<ClInclude Include="src\basedef.h" />
<ClInclude Include="src\CAM\CAM.h" />
<ClInclude Include="src\CAM\CAM_Def.h" />
<ClInclude Include="src\DNM\MEC.h" />
<ClInclude Include="src\GAM\GAM_3dData.h" />
<ClInclude Include="src\GAM\GAM_Def.h" />
<ClInclude Include="src\GAM\GAM_ObjType.h" />
Expand All @@ -236,6 +237,7 @@ cd .</Command>
<ClInclude Include="src\GLI\GLI_BigGlobals.h" />
<ClInclude Include="src\GLI\GLI_Const.h" />
<ClInclude Include="src\GLI\GLI_Def.h" />
<ClInclude Include="src\GLI\GLI_Drv.h" />
<ClInclude Include="src\GLI\GLI_Ext.h" />
<ClInclude Include="src\GLI\GLI_Misc.h" />
<ClInclude Include="src\GMT\GMT.h" />
Expand Down Expand Up @@ -288,6 +290,7 @@ cd .</Command>
<ClCompile Include="src\CAM\CAM.c" />
<ClCompile Include="src\dllmain.c" />
<ClCompile Include="src\DNM\DNM.c" />
<ClCompile Include="src\DNM\MEC.c" />
<ClCompile Include="src\ERM\ERM.c" />
<ClCompile Include="src\FIL\FIL.c" />
<ClCompile Include="src\FON\FON.c" />
Expand All @@ -304,6 +307,7 @@ cd .</Command>
<ClCompile Include="src\JFFTXT\JFFTXT.c" />
<ClCompile Include="src\MMG\MMG.c" />
<ClCompile Include="src\POS\POS.c" />
<ClCompile Include="src\SCT\SCT.c" />
<ClCompile Include="src\SND\SND.c" />
<ClCompile Include="src\SND\SND_Ext.c" />
<ClCompile Include="src\TMR\TMR.c" />
Expand Down
12 changes: 12 additions & 0 deletions ACP_Ray2.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@
<ClInclude Include="src\GAM\GAM_3dData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\GLI\GLI_Drv.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\DNM\MEC.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\AI\AI.c">
Expand Down Expand Up @@ -311,6 +317,12 @@
<ClCompile Include="src\CAM\CAM.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\SCT\SCT.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DNM\MEC.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="cpp.hint" />
Expand Down
7 changes: 7 additions & 0 deletions src/ACP_Ray2.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ extern "C" {
#include "AI/AI.h"
#include "ALW/ALW.h"
#include "DNM/DNM.h"
#include "DNM/MEC.h"
#include "GMT/GMT.h"
#include "GEO/GEO.h"
#include "PO/PO.h"
Expand All @@ -45,6 +46,12 @@ extern "C" {
#include "AGO/AGO.h"
#include "JFFTXT/JFFTXT.h"

/* Include the GLI driver DLL functions */
/* To disable, define ACP_NO_DRV */
#if !defined(ACP_NO_DRV)
#include "GLI/GLI_Drv.h"
#endif


/****************************************************************************
* Extensions
Expand Down
9 changes: 5 additions & 4 deletions src/AGO/AGO.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@

void (*AGO_vDisplayGAUGES)( GLD_tdstViewportAttributes *p_stVpt )
= OFFSET(0x460670);
void (*AGO_vAddParticle)(unsigned long PartType, MTH3D_tdstVector* p_stPosition, MTH3D_tdstVector* p_stDirection, void* hVisualMaterial, float parameter)

void (*AGO_vAddParticle)( unsigned long PartType, MTH3D_tdstVector *p_stPosition, MTH3D_tdstVector *p_stDirection, void *hVisualMaterial, float parameter )
= OFFSET(0x463390);
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)
void * (*AGO_vCreatePart)( unsigned long parm_ulType, float *parm_a3_fPosition, float *parm_a3_fDirection, float TimeLimit, float fScaleX, float fScaleY, void *pVisualMaterial )
= OFFSET(0x4600C0);
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)
= OFFSET(0x466530);
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 )
= OFFSET(0x466530);
92 changes: 46 additions & 46 deletions src/AGO/AGO.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@
#include "MTH.h"


/* Part behavior*/
#define AGO_TYPEMASK 0x000000FF
#define AGO_STILL 0x00000000
#define AGO_FALLING 0x00000001
#define AGO_SINUSING 0x00000002
#define AGO_MOVING 0x00000003
#define AGO_GEISER 0x00000004
#define AGO_FALLING_SLOW 0x00000005
#define AGO_ROTATING_SLOW 0x00000006
#define AGO_MOVINGSINXY 0x00000007
#define AGO_SPIRALE 0x00000008
#define AGO_MOVING_AND_SLOWING 0x00000009
#define AGO_GOINGTO 0x0000000A
#define AGO_MOVINGSINXYUP 0x0000000B
#define AGO_2DSPIRALE 0x0000000C
#define AGO_FASEGOINGTO 0x0000000E
#define AGO_FIREWORKS 0x0000000F
#define AGO_FALLING_MEGAFAST 0x00000010
#define AGO_FRAME 0x00000011
#define AGO_GOTO 0x00000012
/* Part behavior */
#define AGO_TYPEMASK 0x000000FF
#define AGO_STILL 0x00000000
#define AGO_FALLING 0x00000001
#define AGO_SINUSING 0x00000002
#define AGO_MOVING 0x00000003
#define AGO_GEISER 0x00000004
#define AGO_FALLING_SLOW 0x00000005
#define AGO_ROTATING_SLOW 0x00000006
#define AGO_MOVINGSINXY 0x00000007
#define AGO_SPIRALE 0x00000008
#define AGO_MOVING_AND_SLOWING 0x00000009
#define AGO_GOINGTO 0x0000000A
#define AGO_MOVINGSINXYUP 0x0000000B
#define AGO_2DSPIRALE 0x0000000C
#define AGO_FASEGOINGTO 0x0000000E
#define AGO_FIREWORKS 0x0000000F
#define AGO_FALLING_MEGAFAST 0x00000010
#define AGO_FRAME 0x00000011
#define AGO_GOTO 0x00000012

/* Scaling Behavior*/
/* Scaling Behavior */
#define AGO_SCALEMASK 0x00000F00
#define AGO_SCALING_SLOW 0x00000100
#define AGO_SCALING_MID 0x00000200
Expand All @@ -48,29 +48,28 @@
#define AGO_BIG_RANDOM_SCALE 0x00000E00
#define AGO_SMALL_RANDOM_SCALE 0x00000F00

/* Shading Behavior */
#define AGO_SHADEMASK 0x0000F000
#define AGO_SHADE_SLOW 0x00001000
#define AGO_SHADE_MID 0x00002000
#define AGO_SHADE_FAST 0x00003000
#define AGO_SHADE_FASTEST 0x00004000
#define AGO_SHADE_MEGAFAST 0x00005000
#define AGO_SHADE_TWOFRAMES 0x00006000
#define AGO_APPEAR 0x00007000
#define AGO_WAIT 0x00008000
#define AGO_RANDOM_SHADE 0x00009000
#define AGO_UNSHADE 0x0000A000

/* Shading Behavior*/
#define AGO_SHADEMASK 0x0000F000
#define AGO_SHADE_SLOW 0x00001000
#define AGO_SHADE_MID 0x00002000
#define AGO_SHADE_FAST 0x00003000
#define AGO_SHADE_FASTEST 0x00004000
#define AGO_SHADE_MEGAFAST 0x00005000
#define AGO_SHADE_TWOFRAMES 0x00006000
#define AGO_APPEAR 0x00007000
#define AGO_WAIT 0x00008000
#define AGO_RANDOM_SHADE 0x00009000
#define AGO_UNSHADE 0x0000A000

/* Part death & misc flags:*/
#define AGO_TIMELIMITED 0x00010000
#define AGO_ENDASPLOUF 0x00020000
#define AGO_ZLIMITED 0x00040000
#define AGO_ZELDA 0x00080000
#define AGO_MUSTDIE 0x01000000
#define AGO_FOLLOWZ 0x02000000
#define AGO_LOOPANIM 0x04000000
#define AGO_BASEDSCALE 0x08000000
/* Part death & misc flags */
#define AGO_TIMELIMITED 0x00010000
#define AGO_ENDASPLOUF 0x00020000
#define AGO_ZLIMITED 0x00040000
#define AGO_ZELDA 0x00080000
#define AGO_MUSTDIE 0x01000000
#define AGO_FOLLOWZ 0x02000000
#define AGO_LOOPANIM 0x04000000
#define AGO_BASEDSCALE 0x08000000


#define AGO_GEOMETRY_TYPE_MASK 0xF0000000
Expand All @@ -86,6 +85,7 @@
*/

ACP_FUNC void (*AGO_vDisplayGAUGES)( GLD_tdstViewportAttributes *p_stVpt );
ACP_FUNC void (*AGO_vAddParticle)(unsigned long PartType, MTH3D_tdstVector *p_stPosition, MTH3D_tdstVector *p_stDirection, void *hVisualMaterial, float parameter);
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);
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);

ACP_FUNC void (*AGO_vAddParticle)( unsigned long PartType, MTH3D_tdstVector *p_stPosition, MTH3D_tdstVector *p_stDirection, void *hVisualMaterial, float parameter );
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 );
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 );
13 changes: 12 additions & 1 deletion src/AI/AI.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,15 @@ AI_tdstNodeInterpret *(*AI_fn_p_stEvalTree)(

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

void (*AI_fn_vBrainAlloc)(HIE_tdstEngineObject* p_stObject) = OFFSET(0x417E10);
void (*AI_fn_vBrainAlloc)( HIE_tdstEngineObject *p_stObject ) = OFFSET(0x417E10);


/* ultra operator */

void (*AI_fn_vGetUltraOperatorPerso)(
unsigned char bYouHaveRightToUseThisFunction,
HIE_tdstSuperObject *hCurrentSuperObjPerso,
HIE_tdstSuperObject **hNewSuperObjPerso
) = OFFSET(0x4825B0);

unsigned char (*AI_fn_ucGetProcedureUltraOperator)( AI_tdeProcedureId eProcId ) = OFFSET(0x482680);
13 changes: 12 additions & 1 deletion src/AI/AI.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,15 @@ ACP_FUNC AI_tdstNodeInterpret *(*AI_fn_p_stEvalTree)( HIE_tdstSuperObject *p_stS

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

ACP_FUNC void (*AI_fn_vBrainAlloc)(HIE_tdstEngineObject *p_stObject);
ACP_FUNC void (*AI_fn_vBrainAlloc)( HIE_tdstEngineObject *p_stObject );


/* ultra operator */

ACP_FUNC void (*AI_fn_vGetUltraOperatorPerso)(
unsigned char bYouHaveRightToUseThisFunction,
HIE_tdstSuperObject *hCurrentSuperObjPerso,
HIE_tdstSuperObject **hNewSuperObjPerso
);

ACP_FUNC unsigned char (*AI_fn_ucGetProcedureUltraOperator)( AI_tdeProcedureId eProcId );
4 changes: 4 additions & 0 deletions src/AI/AI_Def.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ typedef union AI_tduGetSetParamForNode AI_tduGetSetParamForNode;
typedef struct AI_tdstGetSetParam AI_tdstGetSetParam;
typedef struct AI_tdstNodeInterpret AI_tdstNodeInterpret;
typedef struct AI_tdstTreeInterpret AI_tdstTreeInterpret;


/* not yet defined */
typedef enum AI_tdeProcedureId AI_tdeProcedureId;
14 changes: 14 additions & 0 deletions src/DNM/MEC.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/****************************************************************************
*
* MEC - Mechanics module
*
****************************************************************************/

#include "MEC.h"


void (*MEC_vInitTranslation)(
DNM_tdstDynamics *p_stDynamic,
HIE_tdstSuperObject *hSupObj,
MTH3D_tdstVector *p_stVector
) = OFFSET(0x432DA0);
16 changes: 16 additions & 0 deletions src/DNM/MEC.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/****************************************************************************
*
* MEC - Mechanics module
*
****************************************************************************/

#pragma once

#include "DNM_Def.h"

#include "HIE/HIE_Def.h"
#include "MTH.h"
#include "apidef.h"


ACP_FUNC void (*MEC_vInitTranslation)( DNM_tdstDynamics *p_stDynamic, HIE_tdstSuperObject *hSupObj, MTH3D_tdstVector *p_stVector );
19 changes: 16 additions & 3 deletions src/GAM/GAM.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#include "GAM.h"
#include "GAM_ObjType.h"
#include "GAM_StdGame.h"
#include "GAM_3dData.h"


/****************************************************************************
Expand Down Expand Up @@ -49,9 +51,6 @@ char * (*GAM_fn_p_szGetFirstLevelName)( void ) = OFFSET(0x404CF0);
void (*GAM_fn_vSetFirstLevelName)( char const *szName ) = OFFSET(0x404CC0);
void (*GAM_fn_vAskToChangeLevel)( char const *szLevelName, ACP_tdxBool bSaveGame ) = OFFSET(0x4054D0);

void (*GAM_fn_vStdGameAlloc)(HIE_tdstEngineObject* p_stObject) = OFFSET(0x413140);
void (*GAM_fn_v3dDataAlloc)(HIE_tdstEngineObject* p_stObject) = OFFSET(0x4180F0);

HANDLE (*GAM_fn_hGetWindowHandle)( void ) = OFFSET(0x401400);
BOOL (*GAM_fn_bCreateMainWindow)( HANDLE hInstance, int nShowCmd ) = OFFSET(0x402020);
long (CALLBACK *GAM_fn_WndProc)( HANDLE hWnd, unsigned int uMsg, unsigned int wParam, long lParam ) = OFFSET(0x4022D0);
Expand All @@ -62,3 +61,17 @@ long (CALLBACK *GAM_fn_WndProc)( HANDLE hWnd, unsigned int uMsg, unsigned int wP
****************************************************************************/

GAM_tdstObjectType *const GAM_g_stObjectTypes = OFFSET(0x5013E0);


/****************************************************************************
* GAM_StdGame.h
****************************************************************************/

void (*GAM_fn_vStdGameAlloc)( HIE_tdstEngineObject *p_stObject ) = OFFSET(0x413140);


/****************************************************************************
* GAM_3dData.h
****************************************************************************/

void (*GAM_fn_v3dDataAlloc)( HIE_tdstEngineObject *p_stObject ) = OFFSET(0x4180F0);
1 change: 1 addition & 0 deletions src/GAM/GAM.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "GAM_Def.h"
#include "GAM_StdGame.h"
#include "GAM_ZDx.h"
#include "GAM_3dData.h"

#include "HIE/HIE.h"
#include "GLI/GLI.h"
Expand Down
Loading

0 comments on commit 9b65b37

Please sign in to comment.