Amaroq7 / SPMod

SourcePawn Scripting Engine for Half-Life 1 based games
GNU General Public License v3.0
27 stars 12 forks source link

Add engine funcs to api #57

Closed Amaroq7 closed 4 years ago

Amaroq7 commented 4 years ago

Expose engine funcs and globals for extensions. For now there're just a few of them, but it can be easily extended in the future when necessary.

Description

Adds new 3 classes which are exported to extensions. IEngineFuncs exports engine functions which cannot be hooked. IEngineFuncsHooked same as above but they can be hooked. IEngineGlobals exports engine globals.

I haven't added ...Core functions for getting those functions inside the core since they can be used directly and I believe there's no need to add extra complexity.

Motivation and Context

Extensions needs them to provide some basic functionality, like getting cmd params, getting game time etc.

How has this been tested?

It'll be tested when there's at least one functional extension.

Types of changes

Checklist:

nulxrd commented 4 years ago

LGTM