Skip to content

Issue #123 - Removing Macros#369

Open
Rederick5 wants to merge 280 commits intoMSRevive:devfrom
Rederick5:dev
Open

Issue #123 - Removing Macros#369
Rederick5 wants to merge 280 commits intoMSRevive:devfrom
Rederick5:dev

Conversation

@Rederick5
Copy link
Contributor

@Rederick5 Rederick5 commented Mar 24, 2026

This is partial completion. Changed a bit more than I probably should have, but standards indicate that changing to typesafe non-macros should be a good end goal, should it be able to be done safely.

For now, left a lot of the more complex macros, such as the loggers/message and engine callbacks alone.
Changed as many macro functions to class member/file functions / unrolled macros where possible.

Left thirdparty/public/engine files alone for the most part.

Changed all the vec3_t to Vector class, removed all #define constants I could with constexpr/enum where possible.
Resolved a few header inclusion issues / duplicated defines.

changed vector class to be able to be initialized as constexpr class objects.

I can compile without issue and some light testing indicates general stability, but comprehensive testing needs to be completed.

Script events in edana have tested successfully, etc.

FALSE is still cast as int
TRUE is still defined as int
NULL is still defines as int

future issue recommended to change these to true/false/nullptr/0 where applicable

Rederick5 added 30 commits March 8, 2026 17:02
Addeec constexpr to defined constants.
FIxed warning C5055 after enum changes.
Fixed wasrning on unintialized variables.
Templated clrmem() macro
moved include to top of file.
changed macros to class member functions.
changed defines to enum/constexpr.
moved function to global.h header.
changed final references of STAT_PROP to MAX_ prefix
odd location in if else required multiple initializations.
named some enums
changed define to constexpr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant