|
BASIC C
Feb 10, 2022 8:01:15 GMT -6
Post by rosy on Feb 10, 2022 8:01:15 GMT -6
BasicC manual: #include "Basic.h" #include "BasicSDL.h"
TTF_Font *Font; STRING name; int x,y,w,h; SDL_Texture *tex; SDL_Rect DSTt;
MAIN x=Rand(-3,3);y+=Rand(-3,3);w+=Rand(-3,3);h+=Rand(-3,3); Input$ (Name:,name) SDLOpen(640,400,0) LoadFont(Font,"zx81.ttf",32) FontStyle(Font,TTF_STYLE_ITALIC|TTF_STYLE_UNDERLINE) SDLColor(255,122,0,255) Text(Font,0,"BASIC C SDL",300,10) CopyImg(SDLTexture,tex) SDLColor(255,122,255,122) SDLBColor(111,122,255,122) FontStyle(Font,TTF_STYLE_NORMAL) TextImg(Font,1,name); Size(SDLTexture) SDLColor(255,255,255,255) DSTt.x=200;DSTt.y=100; DSTt.w=20;DSTt.h=10; Repeat CLS PutImg(tex,300,10) if (DSTt.x>500) x=-x; if (DSTt.x<0) x=-x; if (DSTt.y>300) y=-y; if (DSTt.y<0) y=-y; if (DSTt.w>500) w=-w; if (DSTt.w<0) w=-w; if (DSTt.h>300) h=-h; if (DSTt.h<0) h=-h; DSTt.x+=x;DSTt.y+=y;DSTt.w+=w;DSTt.h+=h; PutImgSize(SDLTexture,DSTt.x,DSTt.y,DSTt.w,DSTt.h) ShowPage GetEvents Until (Quit) SDLQuit ENDMAIN
I am asking for any comments ... Attachments:hello (23.09 KB)
|
|
|
BASIC C
Feb 10, 2022 10:58:00 GMT -6
Post by aurel on Feb 10, 2022 10:58:00 GMT -6
and how you run this C .h header file ? ..and where you find it ?
|
|
|
BASIC C
Feb 10, 2022 12:35:03 GMT -6
Post by rosy on Feb 10, 2022 12:35:03 GMT -6
After all, I turned on ... Just put it in the directory with the program. The call is in the first line.
|
|
|
BASIC C
Feb 10, 2022 13:08:04 GMT -6
Post by aurel on Feb 10, 2022 13:08:04 GMT -6
You are too short in explanation..are you crypting OK I put it int o MingW studio as project and compiled with 2 warrnings and as result i get this ..so what is this ?
|
|
|
BASIC C
Feb 10, 2022 13:20:27 GMT -6
Post by aurel on Feb 10, 2022 13:20:27 GMT -6
rosy as you can see i get time (tim) NULL 0 why is that ?
|
|
|
BASIC C
Feb 10, 2022 14:21:40 GMT -6
Post by rosy on Feb 10, 2022 14:21:40 GMT -6
Because I have a DEV C that automatically counts the time. You have to add the time.h library and rewrite the program a bit, and it's better to write it as .c because it's pure C.
|
|
|
BASIC C
Feb 10, 2022 17:11:24 GMT -6
Post by aurel on Feb 10, 2022 17:11:24 GMT -6
oh crap why you use DEV C and not MingW ...grrr well looks that take 14 seconds to finish
|
|
|
BASIC C
Feb 11, 2022 11:07:51 GMT -6
Post by rosy on Feb 11, 2022 11:07:51 GMT -6
I added counting time. Compile without messages on Linux, time 6 seconds on Q8400. The program in Linux is 16 KB and in Windows 300 KB ...
|
|
|
BASIC C
Feb 28, 2022 13:12:37 GMT -6
Post by rosy on Feb 28, 2022 13:12:37 GMT -6
I changed a lot, added SDL, so I put a different demo and Linux executable. As you can see - you can choose different text styles and it's easy to convert it to a image, I don't know why RC doesn't have it ... Other interesting differences: - Wait(In)Key remembers the last events - Instead of Update, I read the events (GetEvents) and refresh the screen (ShowPage) separately
|
|
|
BASIC C
Mar 15, 2022 11:50:30 GMT -6
Post by rosy on Mar 15, 2022 11:50:30 GMT -6
I added an instruction manual
|
|
|
BASIC C
Mar 16, 2022 3:15:57 GMT -6
Post by aurel on Mar 16, 2022 3:15:57 GMT -6
sory man but that manual i cannot translate so i repeat again .... rosy
And again ,,,and again...is that really hard to explain on english to you...
So please tell us next....
1.Which C compiler we must use to compile this program BasicC
2.Your executables are 64bit only ..
|
|
|
BASIC C
Mar 16, 2022 3:30:27 GMT -6
Post by rosy on Mar 16, 2022 3:30:27 GMT -6
|
|
|
BASIC C
Mar 16, 2022 6:48:18 GMT -6
Post by aurel on Mar 16, 2022 6:48:18 GMT -6
I used TDM / mingw shipped with DEV C++that is what i need to know ,,,and is TDM/gcc shipped with DEVC++ because i have MingW and cannot compile...so OKay! I will use TDM. ps ...yes translate somehowe not work for me i don't know why ?
|
|
|
BASIC C
Mar 16, 2022 9:41:01 GMT -6
Post by rosy on Mar 16, 2022 9:41:01 GMT -6
How can it not work ... try another ...
|
|
|
BASIC C
Mar 16, 2022 10:07:55 GMT -6
Post by aurel on Mar 16, 2022 10:07:55 GMT -6
Ok TDM-GCC 32bit installed version 10.3 then i install C-Free IDE 5.0 and set compiler path + buid and all other C crapp fine work ok! then i try and i figure that i dont have freakin SDL.h
so which SDL.h i need to use ?
|
|