I am an American. We do our dates this way. Get over it.
This is the initial commit. I have a window that renders some text, as well as many "helper" files for drawing / playing assets.
These are found in render/ for graphics and utils/ for everything else. I know naming a folder "utils" is probably not a good thing, but it works for me.
Added little descriptions to the changelog, like - Initial Commit.
Updated consistency between header files...
- method names are camelCase
- parameters are prefixed
p_and have no spaces or capitalization - slight grammar update to
render/RenderWindow.hpp/cleanupmethod.- Apparently, the verb form of this word is actually two seperate words. (all I did was change the U to capital lmao)
This consistency fix applies to: render/DrawnTexture.hpp, render/Font.hpp, render/RenderWindow.hpp, and utils/Sound.hpp
utils/Sound.hpp got another update, adding the ability to get and set volume of a sound.
utils/Sound.hpp got yet another update:
- Put every sound-related function in a namespace:
Sound - Added
open,openDevice,changeDevice,listDevices, andclosemethods
main.cpp:
- Removed the extremely stupid variant from
texturesvector inmain.hpp
utils/main.cpp:
- Forgot to replace some name changes from
utils/Sound.hpponto the actualmainfile - Forgot to close the audio once the window cleans up
New directory: nodes/:
nodes/Node.hpp
Additions:
nodes/Node.hpp:
All nodes contain these members:
render(RenderWindow& p_window):- Returns void, and handles all drawing for this node and its children.
children?:- A vector of
NodeVariants. Not all Nodes have children.
- A vector of
appendChild(NodeVariant p_child)?:- Returns void, and takes in a Node and appends it to the
childrenvector, if it has one.
- Returns void, and takes in a Node and appends it to the
Individual nodes are (at the current moment):
NodeScene:
- Constructor takes in no parameters.
- Has no parent - not included in the
NodeVariantvariant and can not be appended as a child. - Does not have any graphics on its own. Only renders its children.
NodeRect:
- Has 4 unique properties:
Alignment alignment,Vector2f pos,Vector2f size, andSDL_Color color. - Constructor takes in
Vector2ffor posisition,Vector2ffor size,SDL_Colorfor color, andAlignmentfor the anchor point of the rectangle. - Default values for constructor are:
Pos={0,0},Size={1,1},Color={255,255,255,255},Alignment=TopLeft - This node cannot have children.
NodeImage:
- Not worked on yet.
In other news, a few other files have also been updated.
render/Font.hpp:
- Added new font alignments (9 in total):
- TopLeft
- Top
- TopRight
- Left
- Center
- Right
- BottomLeft
- Bottom
- BottomRight
This, of course, trickles into all files that require this, namely render/DrawnTexture.hpp and render/RenderWindow.hpp.
build_linux.sh:
- Use "-d" flag to build for debug mode in a new "debug" directory.
- Yes, my code was so bad, I needed to add debugging. I can't tell if it's bad that I needed to add it at all, or that I only added it now.
.gitignore:
- Accidentally deleted the whole file and didn't want to redownload it
- Added (or is it removed..?)
debugCMake directory - Added (or is it removed..?)
.vscodedirectory
This 'Node' system will be the framework of this engine, sort of like Godot(except much more inefficient).
A Node for textures.
utils/Node.hpp:
- Added a new
NodeImagenode.
All nodes:
- All nodes that can be rendered now have an
Alignment anchorPointmember property. - (this only affects
NodeRectandNodeImagebut shut up)
NodeImage:
- Constructor takes in a
const char*for the file location, aVector2ffor the position, aVector2ffor the size, and aAlignmentfor the anchor point. - Default constructor values are:
Position={0,0},Size={1,1},Alignment=TopLeft - Cannot have children
Yep. That's it.
It's been too long. Not like anybody is watching this repository; but I lost motivation for a while and thought I might as well try again.
Added comments to every file. This is mainly to help me, the developer, with my Intellisense.