-
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 23 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
671847d
5d6759c
4d329fb
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 | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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: | ||||||||||||||||||||||||||||||||||
|
|
@@ -192,6 +217,15 @@ class NOVTABLE CellClass : public AbstractClass | |||||||||||||||||||||||||||||||||
| return buffer; | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| // pass | ||||||||||||||||||||||||||||||||||
| bool IsClearToMove(SpeedType speedType, bool ignoreInfantry, bool ignoreVehicles, ZoneType zone, MovementZone movementZone, int level, bool isBridge) | ||||||||||||||||||||||||||||||||||
| { 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, ContainsBridge()); | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
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); } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
|
|
@@ -291,6 +325,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; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ | |
| #include <Audio.h> | ||
| #include <ObjectTypeClass.h> | ||
| #include <TagClass.h> | ||
| #include <RulesClass.h> | ||
|
|
||
| #include <Helpers/Template.h> | ||
|
|
||
|
|
@@ -265,6 +266,16 @@ class NOVTABLE ObjectClass : public AbstractClass | |
| return ret; | ||
| } | ||
|
|
||
| DamageState TakeDamage(int damage, WarheadTypeClass* pWH, bool crewed, bool ignoreDefenses = true, ObjectClass* pAttacker = nullptr, HouseClass* pAttackingHouse = nullptr) | ||
| { | ||
| return ReceiveDamage(&damage, 0, pWH, pAttacker, ignoreDefenses, !crewed, pAttackingHouse); | ||
| } | ||
|
Comment on lines
+271
to
+274
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 first |
||
|
|
||
| DamageState TakeDamage(int damage, bool crewed, bool ignoreDefenses = true, ObjectClass* pAttacker = nullptr, HouseClass* pAttackingHouse = nullptr) | ||
| { | ||
| return TakeDamage(damage, RulesClass::Instance->C4Warhead, crewed, ignoreDefenses, pAttacker, pAttackingHouse); | ||
| } | ||
|
Comment on lines
+276
to
+279
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 second |
||
|
|
||
| //Constructor NEVER CALL IT DIRECTLY | ||
| /*ObjectClass() noexcept | ||
| { JMP_THIS(0x5F3900); }*/ | ||
|
|
||
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.
The declarations for
INI_Rules_FileName,INI_AI_FileName, andINI_Art_FileNameasstatic constexpr reference<BYTE[]>constants are added. Verify that the memory addresses these constants point to are correctly assigned and that the data types are appropriate for their usage.