News
All is going good, made a lot of progress thing will move from 0.0.X to 0.X.0, next version will be functional. Is working on text, but is ok. Because the same code that i'm using for text, will be the structure for graphics, will be just a matter of updating.
add assembly:
to get more performance out of some functions like printf, which we could use print_int or print_char no need for that much dynamic, at least for publish. For test printf will probably be ok, since we only testing things.
Add C++:
People are strong adepts of C++, and many library's are in C++, thinking in adding it to the project since C++ can communicate width C, is just a matter of adopting, the standards for variables names and functions.
Game engine in C and open source, The Box, structural programming
Small update
We have our first dependencys:
adding windows.h file which is very used, but is not included in c base don't now why and ansi.h to have colors for console also in code. Which may be working if you install some things, but it may be disable. In this case will make it always enable. Maybe in rasperi pi which less stuff not working. thinks like that…
Working in auto load files. Most annoying thing to include a file that you moved and forget to configure the include.
If you include width the code, it will search all your project, for the file before generate a error.
#include "variables.h" //avoid repeating variables
#include "path.h" // mount paths, auto includes, erros, etc...
file_name = "file_map.h"; // auto include file_map
path_folder = "application_structures";
build_path();
include_path();
error();
Can handle more things, like errors. It will be in variables and path to handle this stuff.
File browser
Making the file browser work tool.
it will load all the dependencys for us if you don't know, them no need to study, you can work width a more advanced file browser which will inform this things.
Still in development, we register dependencys, etc…
file_map_register = { // register dependencys, used in file browser
"variables.h", "dirent.h", ""
};
also find this code for the “engine”
while(scanf("%d", &main_option) != 0 )
the while will wait for user option, will be getting stuff until exit, found the code online very nice, maybe can improve it lather to some kind of other code.
Comment
More or less the stuff debated in the theory but working. Etc… Can't comment all things…
Thanks for support and feed back.
The CSS code style working
Some people say that CSS style have no uses, and they din't like it lol.
Can't auto include system libraries since they build auto include, so they are in the main folder, width main.c, they are just included directly. Let's say we are in a diferent operating sistem, that does not use “../” this type. It will work.
Now we see 2 folders included width a CSS rule, store_structures folder and application structure. Error works for both since they are including files.
This is direct code is not a example:
#include "variables.h" //avoid repeating variables
#include "path.h" // mount paths, auto includes, erros, etc...
#include "error.h" //load errors
path_folder = "store_structures"; // CSS rule
error_name = "unable to open file"; // CSS rule
file_name = "store_structure.h"; // auto include store structure
build_path();
include_path();
error();
//all files using store_structures folder
path_folder = "application_structures"; // CSS rule
file_name = "file_map.h"; // auto include file_map
build_path();
include_path();
error();
file_name = "variables_map.h"; // auto include file_map
build_path();
include_path();
error();
file_name = "color.h"; // auto include file_map
build_path();
include_path();
error();
file_name = "array.h"; // auto include store structure
build_path();
include_path();
error();
file_name = "string.h"; // auto include store structure
build_path();
include_path();
build_error();
file_name = "print.h"; // auto include store structure, more performance in print
build_path();
include_path();
build_error();
file_name = "type.h"; // auto include store structure, get type of things
build_path();
include_path();
build_error();
file_name = "font.h"; // auto include store structure, get type of things
build_path();
include_path();
build_error();
// All files using application structures folder
Preparing the lunch on the 0.1.x series
-Will at least be 100% working in text mode. (all possible things)
-A scatter code now goes in to files dump, think it was there from version 1, but it was no used. Now we see 2 files color.c width the box code, and color.c in files dump width scatter code or examples for that file. The code examples was in the file which take a lot of time to comment, so it was moved to a similar file.
-Will take a bit of more time this time to lunch the 0.1.x to have every thing working. But is going well.
-The network was thinking in FTP, so we have the data files in there, not edit, and temp files that are edit and for update. The data file are for download stable version of data to prevent people from deleting. This make the software work in a low budge option.
-projects.txt (data)
-projects_temp.txt(temp)
software will get projects.txt, and uplod to projets_temp.txt. Admin will aprove adiciones of data.
Found this how to integrate assembly in C, maybe is useful for some one, we can load assembly functions and compile assembly width C.
Read a post in Gamedev.net how learning assembly is very nice for games because the shadding language is in assembly. (don't know here the post is, probably more easy to read then my bad English).
https://stackoverflow.com/questions/6299749/any-sources-for-learning-assembly-programming-in-windows
“Most assembly language programming you would do, especially in a full-OS environment like Windows, will just be snippets anyway (as opposed to a 100% assembly program). The easiest way to get started is to write a C program as a test harness and have it call your assembly language functions. Here's a simple example:”
asm.s:
.text
.globl
_asm
_add_asm
_add:
mov %rdi, %rax
add
%rsi, %rax ret
example.c:
#include <stdio.h>
int asm_add(int, int);
int main(int argc, char **argv)
{
int a = 12;
int b = 6;
int c = asm_add(a, b);
printf("%d + %d = %d\n", a, b, c);
return 0;
}
Build and run (on my Mac with clang; modify for your compiler on windows):
$ clang -o example example.c asm.s
$ ./example
12 + 6 = 18