Assemberist / cppRpg

0 stars 0 forks source link

Change static code of effects calculation to generated from files code #5

Closed Assemberist closed 1 year ago

Assemberist commented 2 years ago

First 3 implemented elements takes almost all code in object.cpp. Also every implementation take much time. Calculation of first effect had required brain tension but all others can be added by template just with little changes. So this code can be generated automatic.

Assemberist commented 2 years ago

Implementation of #14 breaks old logic of effect calculation. So parser should be written in accordance with new object model behavior.

Assemberist commented 1 year ago

Generator can be created with flex+bison. But it will add 2 new dependencies. So this case should be optional.

Assemberist commented 1 year ago

Bison now can recognize all parts of .eff file. Translation should be implemented next but there the problems: 1) It is dificult to describe how different effects should iteract. 2) Implementation of effect compiler already takes about 4 effect implementation. Yeah it have simplified view but i can't guarantee that the compiler will take less space than implementation of other effects.

Assemberist commented 1 year ago

Building of if-else levels with braces is ready. But there is problem with names of variables.

Assemberist commented 1 year ago

Compiler of effects can not do anything so new file was created for describing of limitations and usage guide for the compler. Also it stores small notes.

Assemberist commented 1 year ago

Effect compiler is ready. One bag was found and several improvements were proposed in txt file, but the compiler is not prioritized goal. There is problem with delivery: generated code executed every time independently from real changes. But #27 was created, so delivery of code can be done without optimizations.