Skip to content

Commit

Permalink
Keep manual alignment & update CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Mozz3d committed Jan 19, 2025
1 parent c569af3 commit a6e38c1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
13 changes: 3 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,7 @@ one:
static constexpr const char* NAME = "vehicleBaseObject";
```

3. Remove `__declspec()` declaration:

```diff
- struct __declspec(align(0x10)) BaseObject : game::Object
+ struct BaseObject : game::Object
```

4. Declare the new member based on its offset and type:
3. Declare the new member based on its offset and type:

```diff
{
Expand All @@ -131,7 +124,7 @@ one:
};
```

5. Assert the offset of known members:
4. Assert the offset of known members:

```diff
};
Expand All @@ -145,7 +138,7 @@ using VehicleObject = vehicle::BaseObject;
} // namespace RED4ext
```

6. Remove these comments:
5. Remove these comments:

```diff
-// clang-format off
Expand Down
2 changes: 1 addition & 1 deletion include/RED4ext/Scripting/Natives/CMesh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct MeshAppearance;
struct MeshParameter;
} // namespace mesh

struct CMesh : res::StreamedResource
struct __declspec(align(0x10)) CMesh : res::StreamedResource
{
static constexpr const char* NAME = "CMesh";
static constexpr const char* ALIAS = NAME;
Expand Down
2 changes: 1 addition & 1 deletion include/RED4ext/Scripting/Natives/MorphTargetMesh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct CMesh;
struct IRenderResourceBlob;
struct ITexture;

struct MorphTargetMesh : res::StreamedResource
struct __declspec(align(0x10)) MorphTargetMesh : res::StreamedResource
{
static constexpr const char* NAME = "MorphTargetMesh";
static constexpr const char* ALIAS = NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct MorphTargetMesh;

namespace ent
{
struct MorphTargetSkinnedMeshComponent : ent::ISkinTargetComponent
struct __declspec(align(0x10)) MorphTargetSkinnedMeshComponent : ent::ISkinTargetComponent
{
static constexpr const char* NAME = "entMorphTargetSkinnedMeshComponent";
static constexpr const char* ALIAS = NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace RED4ext
{
namespace ent
{
struct SkinnedMeshComponent : ent::ISkinTargetComponent
struct __declspec(align(0x10)) SkinnedMeshComponent : ent::ISkinTargetComponent
{
static constexpr const char* NAME = "entSkinnedMeshComponent";
static constexpr const char* ALIAS = NAME;
Expand Down

0 comments on commit a6e38c1

Please sign in to comment.