Skip to content

Reducing Function Count #11

@Phantom139

Description

@Phantom139

As prior work for the Shade Lord boss revealed, we can recover a huge amount of functions from TWM2 by simply compiling existing functions into "library style" functions that employ the following code style:

function TWM2Lib_x(%functionName, %arg1, %arg2, %arg3, %argN) { switch$(%functionName) { case "Blah": //Code Here } }

Multiple tests using this methodology show no losses to performance are taken when employing this method on calls that are rapidly handled (I.E: Bosses), and since a large amount of the mod backend are one-and-done style functions, we can recover a huge number of them by employing this method. This will be tested on one of the central parts of the mod, MainControl.cs to see if this is a viable replacement for most of the codebase.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions