How it works:
There are three main folders: "fire_emblem", "hsa_ufa", and "Resources". In the Eclipse version, "fire_emblem" and "hsa_ufa" are inside "Source Code" as java files and "bin" as class files.
The folder "hsa_ufa" was not made by me and it only facilitates working with a console (window) in the code. The only class I reference in the code is "Console.class".
The folder "Resources" holds all of the assets and files the engine uses (other than the code), and it is split up into three more folders."Images" holds all of the image files such as map sprites (one frame per image), UI visuals, text for phases, the maps themselves (yes the maps are currently just backgrounds, they will probably become tilesets in the future). If you want to add an animation or item icon, you would have to place it in here. This folder is pretty messy right now, it should be cleaned up in the future.
"Fonts" holds all of the images used in creating text as individual characters. When the program displays text, it creates a temporary image of the text it wants to display using the image files in this folder. There is a class that deals with fonts and creating text called "Text_constructor".
"Data Files" basically holds the ROM of the game. It currently holds four text files. The program reads each the text file when it needs to know anything from the stats of a weapon, to the map layout. Each file has elements that start something like " **Element_Start " and end with " **Element_End ", and once it finds what it needs it closes the file. All files have an end to the contents " ****FILE_END**** ", and afterwards the format of how the file works is explained by example."font_data.txt" holds the information on fonts. It lists off the fonts included in the game, where each font is given a number. Each font specifies which characters it contains and the length in pixels of each character. For the engine to recognize that a new font was made, this file must be edited.
"item_data.txt" holds the information on items. It lists off the items that the game has by section: weapons, staves, and consumables. Each item has a number, and it tells the program its name, what type of item it is, its stats, durability, and even which image in the "Image" folder corresponds to it. Any new items must be properly listed in this file.
"map_data.txt" holds the information on the contents of each map. It tells the program what terrain is in the map (any unspecified terrain is considered plains), where the player's starting formation is, what new units come in during the chapter (they currently start on the map, recruitment has not been implemented), and the location of enemies. The stats and inventory of each enemy is also specified here.
"unit_data.txt" holds the information on the units and classes. It has player units and generic units; the player units get their stats here (class growths are not a thing yet), and both the player and generic units have their map animations here (battle animations are not a feature yet), with the amount of frames per image and the filename for each image.
The folder "fire_emblem" holds the source code for the engine. It has a multitude of classes with different roles. I can make an in depth explanation later on if requested, but here are the basics:"FE_R_Main.java" is the class that runs the whole game, it contains the "public static void main(String args)". It has an internal clock which calculates when to start the next frame. It has an adjustable frame rate set to 60fps on default. This class initializes the program, it currently contains the title screen code (this is not ideal), and deals with what to do between maps. This class also deals with keyboard input and displaying the screen. All of the other classes go through here to receive input and to give output. This class also has the locations of the all the resources. "Esc" can be pressed at any time and this class will terminate the program.
"Map_mod.java" moderates everything in a map, the cursor, the units, the enemy AI, etc. It decides what phase it is, when classes should be able to act, and everything in a map.
"Army_AI.java" is the AI for any army that the computer controls.
"Map_unit.java" is the object from which unit instances are made. The units are stored in arrays.
"Map_ui.java" is the class that deals with any UI. Currently it only has UI for doing combat.
Those are the basics of the code I have made so far. I hope someone is eager enough to improve this or add on features, and look forward to updates in the future (which might not be so near). Once again please contact me if you have questions and I'd love to chat about this project here.