-
Notifications
You must be signed in to change notification settings - Fork 2
Update #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: phobos-dev
Are you sure you want to change the base?
Update #1
Changes from all commits
f4b9881
c39099e
f9ebe17
61efafb
4b21ce9
46738a5
6493db2
f3bd2ff
6754259
3f4f5eb
e95611e
bb80345
f8ea778
6a0da40
709bf9d
7630681
015c65e
af85d84
9793fcb
4931481
bdd2193
8ff705f
6a7ccac
0c1798d
76eda83
690a7c0
08bcef4
6bbaa01
78531b1
70f854d
eea4966
e2dd825
629df44
b1134e3
6119e87
dc04da1
9e75ed4
70dd0be
9694f78
36aee93
70ffa73
fcf7341
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| /* | ||
| AircraftTrackerClass | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <GeneralDefinitions.h> | ||
| #include <ArrayClasses.h> | ||
| #include <TechnoClass.h> | ||
| #include <CellClass.h> | ||
|
|
||
| /** | ||
| * The game use this array when searching for and damaging air techno, | ||
| * when warhead explosion or greatest threat. | ||
| * JumpjetLoco, RocketLoco and FlyLoco will Add or Remove or Update this list. | ||
| * | ||
| */ | ||
| class AircraftTrackerClass | ||
| { | ||
| public: | ||
| static constexpr constant_ptr<AircraftTrackerClass, 0x887888u> const Instance{}; | ||
|
|
||
| //Destructor | ||
| ~AircraftTrackerClass() RX; | ||
|
|
||
| void Add_Entry(TechnoClass* pAircraft) | ||
| { JMP_THIS(0x4134A0); } | ||
|
|
||
| void Remove_Entry(TechnoClass* pAircraft) | ||
| { JMP_THIS(0x4135D0); } | ||
|
|
||
| void Update_Entry(TechnoClass* pAircraft, CellStruct lastCell, CellStruct curretCell) | ||
| { JMP_THIS(0x4138C0); } | ||
|
|
||
| int Search_Entry(CellClass* pCell, int cellSpread) | ||
| { JMP_THIS(0x412B40); } | ||
|
|
||
| protected: | ||
| //Constructor | ||
| AircraftTrackerClass() {} //don't need this | ||
|
|
||
| //=========================================================================== | ||
| //===== Properties ========================================================== | ||
| //=========================================================================== | ||
|
|
||
| public: | ||
| DECLARE_PROPERTY(DynamicVectorClass<TechnoClass*>, Technos); // All Techno in air | ||
| DECLARE_PROPERTY(DynamicVectorClass<TechnoClass*>, Current); // Searching for | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -127,14 +127,14 @@ class NOVTABLE BulletClass : public ObjectClass | |
|
|
||
| BulletTypeClass* Type; | ||
| TechnoClass* Owner; | ||
| bool unknown_B4; | ||
| bool IsInaccurate; | ||
| BulletData Data; | ||
| bool Bright; | ||
| DWORD unknown_E4; | ||
| BulletVelocity Velocity; | ||
| DWORD unknown_100; | ||
| bool unknown_104; | ||
| DWORD unknown_108; | ||
| bool CourseLocked; | ||
| int CourseLockedDuration; | ||
|
Comment on lines
+130
to
+137
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given the nature of these changes, it's recommended to conduct thorough testing, particularly focusing on serialization/deserialization processes and gameplay mechanics that involve bullet behavior. This will help ensure that the modifications do not introduce unintended side effects or regressions. Would you like assistance in formulating a testing strategy or implementing unit tests for these changes? |
||
| AbstractClass* Target; | ||
| int Speed; | ||
| int InheritedColor; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -338,6 +338,11 @@ class CCINIClass : public INIClass | |
| static constexpr reference<CCINIClass, 0x887208u> const INI_UIMD{}; | ||
| static constexpr reference<CCINIClass, 0x8870C0u> const INI_RA2MD{}; | ||
|
|
||
| // get the fileName | ||
| static constexpr reference<BYTE[], 0x826260u> const INI_Rules_FileName{}; | ||
| static constexpr reference<BYTE[], 0x82621Cu> const INI_AI_FileName{}; | ||
| static constexpr reference<BYTE[], 0x826254u> const INI_Art_FileName{}; | ||
|
Comment on lines
+342
to
+344
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The declarations for |
||
|
|
||
| //non-static | ||
| CCINIClass() : INIClass(false) | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -24,6 +24,31 @@ class TagClass; | |||||||||||||||||||||||||||||||||
| class TiberiumClass; | ||||||||||||||||||||||||||||||||||
| class PixelFXClass; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| enum class TileType : unsigned int | ||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||
| Unknown = 0, | ||||||||||||||||||||||||||||||||||
| Tunnel = 0x484AB0, | ||||||||||||||||||||||||||||||||||
| Water = 0x485060, | ||||||||||||||||||||||||||||||||||
| Blank = 0x486380, | ||||||||||||||||||||||||||||||||||
| Ramp = 0x4863A0, | ||||||||||||||||||||||||||||||||||
| Cliff = 0x4863D0, | ||||||||||||||||||||||||||||||||||
| Shore = 0x4865B0, | ||||||||||||||||||||||||||||||||||
| Wet = 0x4865D0, | ||||||||||||||||||||||||||||||||||
| MiscPave = 0x486650, | ||||||||||||||||||||||||||||||||||
| Pave = 0x486670, | ||||||||||||||||||||||||||||||||||
| DirtRoad = 0x486690, | ||||||||||||||||||||||||||||||||||
| PavedRoad = 0x4866D0, | ||||||||||||||||||||||||||||||||||
| PavedRoadEnd = 0x4866F0, | ||||||||||||||||||||||||||||||||||
| PavedRoadSlope = 0x486710, | ||||||||||||||||||||||||||||||||||
| Median = 0x486730, | ||||||||||||||||||||||||||||||||||
| Bridge = 0x486750, | ||||||||||||||||||||||||||||||||||
| WoodBridge = 0x486770, | ||||||||||||||||||||||||||||||||||
| ClearToSandLAT = 0x486790, | ||||||||||||||||||||||||||||||||||
| Green = 0x4867B0, | ||||||||||||||||||||||||||||||||||
| NotWater = 0x4867E0, | ||||||||||||||||||||||||||||||||||
| DestroyableCliff = 0x486900 | ||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| class NOVTABLE CellClass : public AbstractClass | ||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||
| public: | ||||||||||||||||||||||||||||||||||
|
|
@@ -178,6 +203,9 @@ class NOVTABLE CellClass : public AbstractClass | |||||||||||||||||||||||||||||||||
| void SetMapCoords(const CoordStruct& coords) | ||||||||||||||||||||||||||||||||||
| { JMP_THIS(0x485240); } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| int GetFloorHeightAdjust() const | ||||||||||||||||||||||||||||||||||
| { JMP_THIS(0x485080); } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| int GetFloorHeight(Point2D const& subcoords) const | ||||||||||||||||||||||||||||||||||
| { JMP_THIS(0x47B3A0); } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
|
|
@@ -192,6 +220,15 @@ class NOVTABLE CellClass : public AbstractClass | |||||||||||||||||||||||||||||||||
| return buffer; | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| // pass | ||||||||||||||||||||||||||||||||||
| bool IsClearToMove(SpeedType speedType, bool ignoreInfantry, bool ignoreVehicles, ZoneType zone, MovementZone movementZone, int level, bool alt) | ||||||||||||||||||||||||||||||||||
| { JMP_THIS(0x4834A0); } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| bool IsClearToMove(SpeedType speedType, MovementZone movementZone, bool ignoreInfantry = false, bool ignoreVehicles = false, int level = -1) | ||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||
| return IsClearToMove(speedType, ignoreInfantry, ignoreInfantry, ZoneType::None, movementZone, level, (bool)(this->Flags & CellFlags::CenterRevealed)); | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+223
to
+230
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The overloaded - return IsClearToMove(speedType, ignoreInfantry, ignoreInfantry, ZoneType::None, movementZone, level, (bool)(this->Flags & CellFlags::CenterRevealed));
+ return IsClearToMove(speedType, ignoreInfantry, ignoreVehicles, ZoneType::None, movementZone, level, (bool)(this->Flags & CellFlags::CenterRevealed));Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| void ActivateVeins() | ||||||||||||||||||||||||||||||||||
| { JMP_THIS(0x486920); } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
|
|
@@ -250,8 +287,8 @@ class NOVTABLE CellClass : public AbstractClass | |||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| // helper | ||||||||||||||||||||||||||||||||||
| bool ContainsBridge() const | ||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||
| return static_cast<bool>(this->Flags & CellFlags::BridgeHead); | ||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||
| return static_cast<bool>(this->Flags & CellFlags::BridgeHead); | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
| bool ContainsBridgeEx() const | ||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||
|
|
@@ -291,6 +328,31 @@ class NOVTABLE CellClass : public AbstractClass | |||||||||||||||||||||||||||||||||
| ISTILE(NotWater, 0x4867E0); | ||||||||||||||||||||||||||||||||||
| ISTILE(DestroyableCliff, 0x486900); | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| TileType GetTileType() | ||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_Tunnel()) return TileType::Tunnel; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_Water()) return TileType::Water; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_Blank()) return TileType::Blank; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_Ramp()) return TileType::Ramp; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_Cliff()) return TileType::Cliff; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_Shore()) return TileType::Shore; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_Wet()) return TileType::Wet; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_MiscPave()) return TileType::MiscPave; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_Pave()) return TileType::Pave; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_DirtRoad()) return TileType::DirtRoad; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_PavedRoad()) return TileType::PavedRoad; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_PavedRoadEnd()) return TileType::PavedRoadEnd; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_PavedRoadSlope()) return TileType::PavedRoadSlope; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_Median()) return TileType::Median; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_Bridge()) return TileType::Bridge; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_WoodBridge()) return TileType::WoodBridge; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_ClearToSandLAT()) return TileType::ClearToSandLAT; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_Green()) return TileType::Green; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_NotWater()) return TileType::NotWater; | ||||||||||||||||||||||||||||||||||
| if (Tile_Is_DestroyableCliff()) return TileType::DestroyableCliff; | ||||||||||||||||||||||||||||||||||
| return TileType::Unknown; | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+331
to
+354
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| static CoordStruct Cell2Coord(const CellStruct &cell, int z = 0) | ||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||
| CoordStruct ret; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
The search for references to
CourseLockedandCourseLockedDurationthroughout the codebase, excluding their declarations, did not yield any results. This indicates that, although these variables have been declared inBulletClass.h, they are not currently used elsewhere in the codebase. This could suggest that the implementation or integration of the logic handling these properties might be incomplete or not as intended. It's crucial to ensure that these new properties are correctly implemented and utilized within the codebase to fulfill their intended purpose.Analysis chain
The replacement of
unknown_104withCourseLockedandCourseLockedDurationintroduces more descriptive and potentially functional changes. This modification likely enhances the control over bullet behavior. It's crucial to verify that the logic handling these new properties is correctly implemented throughout the codebase, especially in methods that might interact with bullet course adjustments.Scripts Executed
The following scripts were executed for the analysis:
Script:
Length of output: 209
Script:
Length of output: 113