-
Notifications
You must be signed in to change notification settings - Fork 48
Source Code
Alex Dixon edited this page Jan 16, 2021
·
17 revisions
Header files keep nice clean minimal procedural interfaces and cpp files hide the implementations, for this reason hopefully looking in the header files should provide decent code documentation through comments and clearly named functions.
There is a clang format for consistent style.
Other key points to coding style:
- Minimalistic.
- Data oriented.
- Shallow call stacks.
- Minimise dependencies in headers.
- Hide implementation in cpp files.
- Prefer pure functions.
- Limited use of dynamic polymorphism.
- Multithreaded systems using command buffers to communicate.
- Avoid over engineering.
pmtech is split into 2 static libraries, pen and put
This is to separate platform specific code from generic code, when coming to port a platform it is only necessary to ensure pen compiles and then everything in put comes along for the ride.
pen contains platform specific code and abstractions for the following:
- console
- data_struct
- file_system
- hash
- input
- memory
- os
- pen_json
- pen_string
- renderer
- str_utilities
- types
- timer
- threads
put contains platform agnostic code using the abstractions provided by pen, it contains the following modules: