Skip to content

Latest commit

 

History

History
135 lines (83 loc) · 4.32 KB

File metadata and controls

135 lines (83 loc) · 4.32 KB

3/28/24 - Initial Commit

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.

3/29/24 - Volume + Consistency Fix

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/cleanup method.
    • 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.

3/29/24 - More Sound Fixes

utils/Sound.hpp got yet another update:

  • Put every sound-related function in a namespace: Sound
  • Added open, openDevice, changeDevice, listDevices, and close methods

main.cpp:

  • Removed the extremely stupid variant from textures vector in main.hpp

3/29/24 - Forgot some things from last commit

utils/main.cpp:

  • Forgot to replace some name changes from utils/Sound.hpp onto the actual main file
  • Forgot to close the audio once the window cleans up

3/31/24 - Nodes and Other Stuff

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.
  • appendChild(NodeVariant p_child)?:
    • Returns void, and takes in a Node and appends it to the children vector, if it has one.

Individual nodes are (at the current moment):

NodeScene:

  • Constructor takes in no parameters.
  • Has no parent - not included in the NodeVariant variant 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, and SDL_Color color.
  • Constructor takes in Vector2f for posisition, Vector2f for size, SDL_Color for color, and Alignment for 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..?) debug CMake directory
  • Added (or is it removed..?) .vscode directory

This 'Node' system will be the framework of this engine, sort of like Godot(except much more inefficient).

4/1/24 - NodeImage

A Node for textures.

utils/Node.hpp:

  • Added a new NodeImage node.

All nodes:

  • All nodes that can be rendered now have an Alignment anchorPoint member property.
  • (this only affects NodeRect and NodeImage but shut up)

NodeImage:

  • Constructor takes in a const char* for the file location, a Vector2f for the position, a Vector2f for the size, and a Alignment for the anchor point.
  • Default constructor values are: Position={0,0}, Size={1,1}, Alignment=TopLeft
  • Cannot have children

Yep. That's it.

6/10/24 - Clean up

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.