Assemberist / cppRpg

0 stars 0 forks source link

Project structure update #29

Closed Assemberist closed 8 months ago

Assemberist commented 1 year ago

1) Code can be splitted to several parts. 2) Class za_mapo does not require access to all object class. So new class drawable_object can be created as base class for object and it can be used as reference in card.cpp.

Assemberist commented 1 year ago

Progress: using of is_alive in card.cpp is architect violation: card used only for drawing of card. It should check information from object. Corpses should be colored to gray color insetead (may be it should be implemented).

Assemberist commented 1 year ago

DEAD should not be effect. I guess new field in object should be introduced: bit field of states. And DEAD can be one from this states. I decide do that for perfomance puproses.

Assemberist commented 1 year ago

All comments and second part delivered to master. The issue will wait some time now.

Assemberist commented 1 year ago

1) Ncurses related parts (iser_ifc.cpp and includes) can be moved to separate block. 1.1) Initialisation of ncurses should be moved from main.cpp. 1.2) Possibility to choose graphical engine should be realysed.

2) Object system (object.cpp and includes) can be moved to separate part of project.

3) object don't need to know all values of enums (behavior, profession and i.e.) because it is business-logic. So part of them can be changed to integers. It allow don't include the enums to core and define it later in business-logic.

Assemberist commented 1 year ago

Ncurses related parts (iser_ifc.cpp and includes) can be moved to separate block.

Code replace is in progress. Just to remember: graph-engine functions should be renamed.

Assemberist commented 8 months ago

1 and 2 paragraphs done. New parameter (graphic engine) added to builder script, but it do not change anything right now because there is only one engine. Anyway builder script will be extended when it will be changed.

3 paragparh not needed rigth now. May be later it will be done.