flat assembler
Message board for the users of flat assembler.
Index
> High Level Languages > Ultimate C Library - 700+ Functions, 75+ Examples, Graphics |
Author |
|
soul_master 30 Jun 2023, 20:31
Ultimate C Library (TinyCC) - 700+ Functions, 75+ Examples, Graphics, Icons, Fonts
My Ultimate Programming Package: Includes Editor, Compiler, Library (700+ functions!), 75+ Examples, Graphics, Fonts, Icons, etc. Download: https://github.com/starpow3r/ez * Easiest C programming package/library for TinyCC * 75+ Examples. Just one-click (NAME.BAT) to compile/build/run, and the program instantly appears in 1-3 seconds. No nonsense. Press Esc (Escape) to exit. * All the essentials needed to create programs, interfaces, games and graphics demonstrations. * Includes TinyCC compiler and Notepad++ editor * 700+ Library Functions! Hand written over the years. Functions use the simplest, most logical names that are easiest to remember - load_image, draw_image, open_file, save_file, load_font, text_copy, draw_text, draw_gradient. Draws everything from scratch in the language without using OS. Modern programmers are dependent on the OS for everything * Includes Custom Graphics, Fonts and Icons (/MEDIA/). * Portable algorithms for any system. Every single pixel, line, image, font, etc, is drawn directly to memory using only CPU instructions and no OS specific graphics * Tutorial: Introduction to C (/HELP/). See HELP/INDEX.HTML for tutorial, and HELP/REFERENCE.HTML for a list of functions * For TinyCC, the smallest fully featured C compiler. Many times faster than other compilers. Visual C++ disadvantages: Big (gigabytes!), wasteful, slow compile/build, illogical design, setup takes forever. * Author has been programming since 1988 at age 11 with BASIC on Commodore 64, then C/C++ and assembler in DOS mode 13h, then scripting languages (HTML, CSS, JS, PHP). Made countless programs, libraries, languages, compilers, assemblers (for various cpus), disassemblers, human intelligence demonstrations, world simulations, science programming, and much more. * Personal statement: "My code is entirely unique, unlike anything you've ever seen before. It is the easiest to understand and use, the clearest, most logical, concise, compact and efficient code ever written. You won't find code like this anywhere else online. I have the greatest love for programming that I want to share with the world. I sincerely hope my code helps and teaches programmers, and inspires them to be creative, innovative, and think differently". SETUP Just copy /TCC/ folder (in /BINARY/) to: C:/ (C:/TCC/TCC.EXE). See /BINARY/ for TinyCC and Notepad++. This example creates an image, loads it (space.bmp), and draws it in only 10 lines. What could be easier? C programmers rewrite 150-300+ lines of code to do this in WinAPI with WinMain for every project. Code: #include "visual.h" IMAGE image; event_create create_screen(512, 512+36); set_title("Draw Image"); load_image(&image, "space"); ende event_draw draw_image_at(&image, 0, 40); ende See HELP/INDEX.HTML for tutorial, and HELP/REFERENCE.HTML for a list of functions.
Last edited by soul_master on 19 Jan 2024, 22:21; edited 1 time in total |
||||||||||
30 Jun 2023, 20:31 |
|
soul_master 30 Jun 2023, 21:13
Create image manually from pixel[] array. See EXAMPLES/DRAW/CREATE_IMAGE.C/EXE
Code: // CREATE A SMALL EXAMPLE IMAGE MANUALLY FROM // AN ARRAY OF PIXELS/COLORS, THEN SET IMAGE // PIXELS, AND DRAW IT ENLARGED BY 4000% #include "visual.h" IMAGE image1; // small face image: 8x8x32 #define B 0 #define W 0xFFFFFF #define Y 0xFFFF00 color face[] = { W,W,B,B,B,B,W,W, // head outline W,B,Y,Y,Y,Y,B,W, B,Y,B,Y,Y,B,Y,B, // 2 eyes B,Y,B,Y,Y,B,Y,B, B,Y,Y,Y,Y,Y,Y,B, B,Y,B,B,B,B,Y,B, // mouth W,B,Y,Y,Y,Y,B,W, W,W,B,B,B,B,W,W // chin }; event_create create_screen(328, 360); set_title("Create Image"); create_image(&image1, 8, 8); set_image_pixels(&image1, face); ende event_draw move_image(&image1, 4, 36); draw_image_size_p(&image1, 4000); ende |
|||
30 Jun 2023, 21:13 |
|
sylware 01 Jul 2023, 16:17
I see only a rar file once cloned from github? (I don't have unrar on linux, can we get a .tar.xz or .tar.bz2 or .tar.gz?)
|
|||
01 Jul 2023, 16:17 |
|
revolution 01 Jul 2023, 16:26
sylware wrote: I don't have unrar on linux |
|||
01 Jul 2023, 16:26 |
|
Furs 01 Jul 2023, 17:25
Just use 7zip, it supports unrar.
But the code.rar seems to only have TCC and Notepad++ binaries…? Where's the actual code? |
|||
01 Jul 2023, 17:25 |
|
Picnic 30 Jul 2023, 09:40
Hello soul_master,
Impressive work mate. Everything ran flawlessly on my Windows 10 PC. I like that you chose TCC, I use it too occasionally (I got tired of the endless GBs of the studios). There is a lot of material to study. |
|||
30 Jul 2023, 09:40 |
|
soul_master 18 Sep 2023, 02:43
Picnic: Thanks. My code is not perfect. Always improving. Years ago, noticed a handful of small games on a page created by you. Nice.
Uploaded 2 repositories: https://github.com/starpow3r/ 1. "EZ" library with 75+ examples. Includes TCC and editor, 100s of FREE graphics, fonts, icons, etc. See /media/. 2. MDV: Multiple Document Viewer Updates: Renamed draw_box_z/fade_z/shade_z to draw_box/fade/shade. Removed temporary _z suffix. Created examples/control for custom controls (include/control/). Organized font.h into include/font/. Now easier to manage, and modular with defines to include only what's needed instead of the entire library (TCC inserts all functions inside the executable even if not used/referenced, so #ifdef is needed). Incorporated match (include/match.h). Created examples/parse/ for examples related to scripts and compilers. Updated custom console (examples/console/) to use main_c() with event interface. New examples/console/text tests functions in include/text.h. Fixed file.h > extract_file/name/ext/etc. Renamed temporary STYLE1 to GRAPHICS. Now, there are 2 styles, a generic GRAPHICS style for any shape, and a higher level STYLE for controls with text, image, etc. Upgraded code_2_html_visual (in examples/parse/). A visual interface that converts source code to HTML. Supports multiple languages: C, ASM, HTML, CSS, JS, PHP. Resolution 1920x1080. Toolbar: "Paste Source Code", "Copy Output HTML", "View in Browser". Main source is only about 700 lines. New draw_table examples in several colors/styles. See examples/font/draw_my_character2 that draws my custom character set in a big colorful table. Updated Notepad++ to support all keywords. |
|||
18 Sep 2023, 02:43 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.