ilyakurdyukov / brickgame-4bit

Brick Game emulator (4-bit Holtek chip), runs in a terminal
11 stars 3 forks source link

use CMake #3

Open AndreiCherniaev opened 4 months ago

AndreiCherniaev commented 4 months ago

I try to add CMake build system but I don't know what is DECOMPILED

CMakeLists.txt

ilyakurdyukov commented 4 months ago

Why does such a simple program needs CMake?

DECOMPILED mode will recompile the ROM code into C code. For those who want to understand how the game works. There is a partially rewritten and commented version of the raw decompiled code. I didn't finish because I lost interest in it.

AndreiCherniaev commented 4 months ago

So you make two different applications? 1) brick game application 2) machine code to C code convertor application

Correct? If true then I think it's better to devide: make two Makefile or CMakeLists.txt

Ещё раз спасибо за ваш труд!

ilyakurdyukov commented 4 months ago

Can you explain why having two paths in one 30 line makefile is bad? So this mode is enabled with DECOMPILED=1, otherwise there will be two smaller makefiles, but you will need to call one with the -f option. Why would this be better? The next thing you suggest is to split brickgame.c into ten separate sources, because 1000 lines is a lot for one source?

These changes don't make anything better, it's a matter of style, you like a different style.

ilyakurdyukov commented 4 months ago

I can admit that I don't like it when people start changing my code to suit their style. But nothing prevents you from rewriting my project to suit your style and developing it as you like, I just don't want to accept such changes. I don't think I'll be developing this project any further myself, so consider it a vanilla version to start from (if you have any ideas on what to do next).

For example, I don’t like the way 7-zip is written. This is a great tool, but the source style is not good.

AndreiCherniaev commented 4 months ago

you make two different applications? 1) brick game application 2) machine code to C code convertor application

Correct?

ilyakurdyukov commented 4 months ago

This is a HELPER/GENERATOR that is used to build the GAME application. As found in many complex projects (for example OpenJDK, Qt6, LLVM). Nobody calls generators a different application.