Dll of GameEdit - Function Preview

Posted By: TripleX

Dll of GameEdit - Function Preview - 10/27/06 19:11

Hello,

as small apology for the big delay of GameEdit I've collected all sort of dll-functions into one gigantic DLL.

The functions are widly spreaded.. If you want to play media files with the standard edition, check the width of a string, use a much better file system than the gamestudio's one or check the width/height/format/mip-level amout of a bitmap without opening it.. just do it with this 3DGS-extension. Almost everything is possible

This is the last chance to post feature wishes. ATM I have 245 functions Here is a preview without documentation. I think the most function names are self-explanatory.
All functions listed here are working and are tested (with the development of GameEdit).

Contributions by other DLL-Autors are welcome

Code:

//extended file functions
dllfunction FOpen(str,mode_);
dllfunction FClose(id);
dllfunction FCloseAll();
dllfunction FEnd(id); //ende der Datei?
dllfunction FSeekFromCursor(id,num);
dllfunction FSeekFromStart(id,num);
dllfunction FSeekFromEnd(id,num);
dllfunction FWriteLong(id,long);
dllfunction FReadLong(id);
dllfunction FWriteFloat(id,long);
dllfunction FReadFloat(id);
dllfunction FWriteInt(id,long);
dllfunction FReadInt(id);
dllfunction FWriteDouble(id,long);
dllfunction FReadDouble(id);
dllfunction FWriteShort(id,long);
dllfunction FReadShort(id);
dllfunction FWriteBool(id,long);
dllfunction FReadBool(id);
dllfunction FWriteAsc(id,long);
dllfunction FReadAsc(id);
dllfunction FWriteVar(id,long);
dllfunction FReadVar(id);
dllfunction FWriteString(id,str);
dllfunction FWriteStringEx(id,str,num);
dllfunction FReadString(id,num,str);
dllfunction FReadFile(id,str);
dllfunction FSaveCursor(id,id2); //bis zu 128 positionen speichern
dllfunction FLoadCursor(id,id2); //bis zu 128 positionen speichern
dllfunction FGetCursor(id);
dllfunction FGetLengthFromId(id);
dllfunction FGetLengthFromFile(str);
dllfunction FGetLengthFromFileInMb(str);
dllfunction FEreaseBytes(bytestart,byteend,filestr);

//download functions
dllfunction DFile(str1,str2);
dllfunction DGetMaxProgess(id);
dllfunction DGetProgess(id);
dllfunction DGetTarget(id,str);
dllfunction DGetSource(id,str);
dllfunction DStop(id);

//Registry functions
dllfunction RgOpenKey(str); //zum hauptverzeichnis öffnen einfach "" übergeben
dllfunction RgCloseKey();
dllfunction RgCreateKey(str);
dllfunction RgRemoveKey(str);
dllfunction RgChangeRegion(num);
dllfunction RgRemoveValue(str);
dllfunction RgCreateValueStr(name,str);
dllfunction RgGetValueStr(name,str);
dllfunction RgCreateValueBin(name,str);
dllfunction RgGetValueBin(name);
dllfunction RgCreateValueVar(name,val);
dllfunction RgGetValueVar(name);
dllfunction RgEnumValues(txt);
dllfunction RgEnumKeys(txt);

//obj functions
dllfunction obj_gettype(obj);

//entity functions
dllfunction ent_getskill(ent,num);
dllfunction ent_setskill(ent,num,val);

//string functions
dllfunction str_getlength(str); //get max length
dllfunction str_getpath(str); //copys game folder into str
dllfunction str_islower(str);
dllfunction str_isupper(str);
dllfunction str_isabc(str);
dllfunction str_isnum(str);
dllfunction str_getasc(str,num);
dllfunction str_setasc(str,num,asc);
dllfunction str_tok_float(str,str2); //%f
dllfunction str_tok_int(str,str2); //%d
dllfunction str_tok_string(str,str2,str3); //%s

//windows dialog functions
dllfunction Dialog_OpenFile(title,types,direct);
dllfunction Dialog_SaveFile(title,types,direct,standardsave);
dllfunction Dialog_messagebox(title,inhalt,style,type);
dllfunction Dialog_SearchFolder(title,abs_,loc_);
dllfunction Dialog_enablefullscreen(on_off);

//open program functions
dllfunction open_ie(homepage);
dllfunction open_internet(homepage);
dllfunction open_notepad(file);
dllfunction open_program(program,file);
dllfunction open_file(file); //"" for game folder in explorer
dllfunction open_chm(chm_file);

//functions that change the acknex window
dllfunction window_minimize();
dllfunction window_setpos(xpos,ypos);
dllfunction window_settitle(title);
dllfunction window_gettitle(title);
dllfunction window_screenshot(str,&startpos,&extent,Type_);

//File functions
dllfunction Fl_Delete(str);
dllfunction Fl_Rename(str);
dllfunction Fl_SetAttributes(fl,attrib); //normal,readonly,hidden,system
dllfunction Fl_GetAttributes(fl);
dllfunction Fl_Copy(source,target_);
dllfunction Fl_GetCreationData(fl,&data); //5 array
dllfunction Fl_SetCreationData(fl,&data); //5 array
dllfunction Fl_SetReadData(fl,&data); //5 array
dllfunction Fl_GetName(str1,str2); //returns the relative path of a file

//folder functions
dllfunction Folder_Create(str);
dllfunction Folder_Remove(str); //failed mit inhalt
dllfunction Folder_RemoveEx(str); //mit inhalt
dllfunction Folder_RemoveContent(str); //nur inhalt
dllfunction Folder_RemoveContentEx(str,search_str); //search_str kann z.B. .tga sein

//functions getting informations about the PC
dllfunction PC_CpuSpeed();
dllfunction PC_GetHostName(name);
dllfunction PC_GetComputerName(name);
dllfunction PC_GetIp(ip_str);
dllfunction PC_GetRefreshRate();
dllfunction PC_GetAdamterName(str);
dllfunction PC_GetDriverName(str);
dllfunction PC_GetDriverVersion();
dllfunction PC_GetCPUUsage();

//bitmap functions
dllfunction bmp_getwidth(bmp);
dllfunction bmp_getheight(bmp);
dllfunction bmp_getsize(bmp,&vec);
dllfunction bmp_getinfo(bmp,&vec); //6 array, Width,Height,Format,Depth,MipLevels
dllfunction bmp_getformat(bmp);
dllfunction bmp_getmips(bmp);
dllfunction bmp_save(bmp,str); //nur bmp

//panel functions
dllfunction pan_getlayer(pan); //returns layer

//clipboard functions
dllfunction clipboard_copy(str);
dllfunction clipboard_paste(str);
dllfunction clipboard_clear(str);

//mp3 id3 functions
dllfunction mp3_getid3tags(str,txt); //txt mit 5 strings. title, artist, album, year, comment

//caps info functions
dllfunction caps_init();
dllfunction caps_VendorId();
dllfunction caps_SubSysID();
dllfunction caps_Revision();
dllfunction caps_DeviceID();
dllfunction caps_MaxTextureWidth();
dllfunction caps_MaxTextureHeight();
dllfunction caps_MaxAnisotrophy();
dllfunction caps_PixelShaderVersion();
dllfunction caps_VertexShaderVersion();

//windows info functions
dllfunction windows_getpath(str);
dllfunction windows_getversion();
dllfunction windows_getbuild();
dllfunction windows_GetDescription(str);

//check files/folders in a folder in many specific ways
dllfunction List_Files(folder,txt); //"*" for actual game folder
dllfunction List_Folders(folder,txt);
dllfunction List_FilesEx(folder,txt,ftype);
dllfunction List_FoldersEx(folder,txt,ftype);
dllfunction List_FilesCount(folder,ftype);
dllfunction List_FoldersCount(folder,ftype);
dllfunction List_FileNext(folder,str,type_,next); //type == "" wenn keine typauswahl, next = 0 beim start
dllfunction List_FolderNext(folder,str,searchstr,next); //* am ende

//math functions
dllfunction math_Rad2Deg(str);
dllfunction math_Deg2Rad(val,str);
dllfunction math_Num2Hexa(val,str);

//Gamma functions
dllfunction Gamma_Set(r,g,b);
dllfunction Gamma_SetRamp(&r,&g,&b); //256 arrays
dllfunction Gamma_GetRamp(&r,&g,&b); //256 arrays

//Ini functions
dllfunction Ii_WriteString(folder,name,val,file);
dllfunction Ini_WriteInt(folder,name,val,file);
dllfunction Ini_ReadString(folder,name,file,str_to_copy);
dllfunction Ini_ReadInt(folder,name,file);

//functions like ent_next for ALL object types. get pointer out of name. get name out of pointer
dllfunction bmp_getname(bmp,str);
dllfunction bmp_getpointer(str);
dllfunction bmp_next(bmp);
dllfunction str_getname(bmp,str);
dllfunction str_getpointer(str);
dllfunction str_next(str);
dllfunction view_getname(bmp,str);
dllfunction view_getpointer(str);
dllfunction view_next(str);
dllfunction mat_getname(bmp,str);
dllfunction mat_getpointer(str);
dllfunction mat_next(bmp);
dllfunction text_getname(bmp,str);
dllfunction text_getpointer(str);
dllfunction text_next(bmp);
dllfunction snd_getname(bmp,str);
dllfunction snd_getpointer(str);
dllfunction snd_next(bmp);
dllfunction font_getname(bmp,str);
dllfunction font_getpointer(str);
dllfunction font_next(bmp);

//text functions (for txt_create)
dllfunction text_setvisible(txt,val);
dllfunction text_settransparent(txt,val);
dllfunction text_setcenterx(txt,val);
dllfunction text_setcentery(txt,val);
dllfunction text_setcondensed(txt,val);
dllfunction text_setfilter(txt,val);
dllfunction text_setfont(txt,val);
dllfunction text_setalpha(txt,val);
dllfunction text_setoffsety(txt,val);
dllfunction text_setscalex(txt,val);
dllfunction text_setscaley(txt,val);
dllfunction text_setred(txt,val);
dllfunction text_setgreen(txt,val);
dllfunction text_setblue(txt,val);
dllfunction text_getvisible(txt);
dllfunction text_gettransparent(txt);
dllfunction text_getcenterx(txt);
dllfunction text_getcentery(txt);
dllfunction text_getcondensed(txt);
dllfunction text_getfilter(txt);
dllfunction text_getfont(txt);
dllfunction text_getalpha(txt,val);
dllfunction text_getoffsety(txt,val);
dllfunction text_getscalex(txt,val);
dllfunction text_getscaley(txt,val);
dllfunction text_getred(txt,val);
dllfunction text_getgreen(txt,val);
dllfunction text_getblue(txt,val);
dllfunction text_getstring(txt,num);
dllfunction text_setstring(txt,num,content);
dllfunction text_getstrings(txt);

dllfunction text_getstrwidth(txt,strnum,type_,&width_vec); //widthvec[0] = width, 1 = height

//change vars without having a pointer of them, just with the names of them (WITHOUT execute)
dllfunction V_Var2Var(str1,str2); //copys content of str2 into str1 (vars)
dllfunction V_SetVar(str1,str2);
dllfunction V_GetVar(str1);

dllfunction Font_FillArray(fname,hsize,width_array,type_); //3 = italic & bold, 2 = italic, 1 = bold, 0 = normal

//mp3 functions
dllfunction mp3_init(filename);
dllfunction mp3_play(id);
dllfunction mp3_playloop(id);
dllfunction mp3_stop(id);
dllfunction mp3_pause(id);
dllfunction mp3_resume(id);
dllfunction mp3_getposition(id);
dllfunction mp3_setposition(id,zeit);
dllfunction mp3_getplayback(id);
dllfunction mp3_setplayback(id,plaback);
dllfunction mp3_setbalance(id,vol);
dllfunction mp3_getlength(id);
dllfunction mp3_tune(id,vol,pan,loop);
dllfunction mp3_state(id);
dllfunction mp3_remove(id);
dllfunction mp3_inited(id);
dllfunction mp3_setvol(id,vol);
dllfunction mp3_getvol(id);
dllfunction mp3_looper(id);





have fun while reading.
I'm waiting for feature wishes.

sincerly
Timo Stark
Posted By: Shadow969

Re: Dll of GameEdit - Function Preview - 10/27/06 19:22

Impressive list
maybe add something like GetEngineDir()?
Posted By: Samb

Re: Dll of GameEdit - Function Preview - 10/28/06 06:48

die abspielgeschwindigkeit bei mp3 sachen...
die vermisse ich scho seit deiner bigDLL und hat mich schon 7 extra dateien gekostet
Posted By: beegee

Re: Dll of GameEdit - Function Preview - 10/28/06 12:05

Wow, this a fantastic list. There are some extremely useful functions.
Posted By: frazzle

Re: Dll of GameEdit - Function Preview - 10/28/06 12:13

Quote:

Wow, this a fantastic list. There are some extremely useful functions.




Same here TripleX, nice list !!
Btw, it took me about 5 min to read all the 240 functions so reading the list is helpfull and it doesn't take (relative) to long

Cheers

Frazzle
Posted By: capanno

Re: Dll of GameEdit - Function Preview - 10/28/06 13:49

One thing I really need is one that can rotate an image in a given dir. Like, I need to take a screenshot, rotate it and print it.

That would be awesome!
Posted By: TripleX

Re: Dll of GameEdit - Function Preview - 10/28/06 14:08

@samb: mp3_setplayback(id,tmp); mp3_getplayback(id);
Posted By: msl_manni

Re: Dll of GameEdit - Function Preview - 10/28/06 14:15

Functions that can retrive system information, like cpu-ID, HDD-CD-serial number etc for some copy protection.
Posted By: TWO

Re: Dll of GameEdit - Function Preview - 10/28/06 15:07

Dein Werk spricht für sich, klasse Arbeit! Hoff der Code wird irgendwann direkt in die Engine integriert.
Posted By: Samb

Re: Dll of GameEdit - Function Preview - 10/28/06 15:19

Quote:

@samb: mp3_setplayback(id,tmp); mp3_getplayback(id);



o_o
15 verfluchte minuten habe ich verschwendet mit soundeditieren.. ^^
Posted By: fogman

Re: Dll of GameEdit - Function Preview - 10/28/06 15:57

This is very nice from you! For me, the file functions are a great help. How many kb (MB..? ) has the dll at this moment?
Posted By: msl_manni

Re: Dll of GameEdit - Function Preview - 10/29/06 04:28

1). Functions that can retrive system information, like cpu-ID, HDD-CD-serial number etc for some copy protection .

2). Function to retrive animation frame name from a model file. I think there is no function to know the name of animation , of model for particular frame.

These are very needed functions .
Posted By: vlau

Re: Dll of GameEdit - Function Preview - 10/29/06 09:31

KeyMap(keyFrom, keyTo)
example :

KeyMap(key_a, key_b);
on_a = function_a; // now pressing b will call function_a.


KeySwap(keyA, keyB)
example :

KeySwap(key_a, key_b);
on_a = function_a; // now pressing b will call function_a
on_b = function_b; // now pressing a will call function_b

Then, keyboard remapping will be more convenient.
Posted By: TripleX

Re: Dll of GameEdit - Function Preview - 10/29/06 13:41

Code:

key_set (number, function);
Sets the given function to the key with the given scancode. This way keyboard remapping can be done very easily.
Parameters:
number scancode of key
function pointer of function assigned to the key with given scancode

Speed:
Fast
Example:
Example for remapping a key:
print("Please press key to assign function to");
while (key_any == 0) { wait(1); } // wait until a key is hit
str_cpy(my_str,"You have pressed ");
str_for_key(temp_str,key_lastpressed);
str_cat(my_str,temp_str);
print(my_str); // indicate which key
while (key_any == 1) { wait(1); } // wait until key is released
key_set(key_lastpressed,my_function); // assign function to key


Posted By: FRAJO

Re: Dll of GameEdit - Function Preview - 10/29/06 15:41

I could add a width function for true type fonts.

str_getwidthTTF( str , font );
Posted By: vlau

Re: Dll of GameEdit - Function Preview - 10/29/06 15:41

Yeah I know key_set exists in the engine. What I'm thinking
is there is a keyboard re-assignment program in your game
and the engine is able to hold remapped key info internally,
then you don't need to write codes for every new assigned keys
like the example I wrote above.
© 2024 lite-C Forums