October 28, 2020, 04:54:29 AM

Author Topic: [bb] Userlib banks by Spinduluz [ 1+ years ago ]  (Read 1100 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] Userlib banks by Spinduluz [ 1+ years ago ]
« on: June 29, 2017, 12:28:42 AM »
Title : Userlib banks
Author : Spinduluz
Posted : 1+ years ago

Description : Firstly I probably have to apologize for my crappy english (soz dudez ;)

Well dont know if anyone will find this usefull. But I thought I might as well post it here rather than just let it rot away on my harddrive. It's basically a set of functions to handle banks in blitz, I cant quite remember how fast it is and so on (wrote it like 3 months ago).

The dll itself is written in C and the sourcecode is ofcourse included, if you find this userlib usefull you can just use/abuse it in anyway you want. Same goes with the code, use/abuse it (I dont care).

Well cant be arsed to write any instructions atm so if you think this might be something for you just try it (trial and error). Ow and I think that the dllInsert***** , dllReplace***** and dllDelete functions are abit untested so I would not be suprised if there are some bugs/issues with them (gah perhaps all functions). And before I forget, if you want to read/write a bank you have to use the dll functions for reading and writing.

Enjoy ... or not :P

Anyway, here are the functions.

dllCreateBank%(Size%)         
dllFreeBank(Bank%)         
dllResizeBank%(Bank%,Size%)      
dllBankSize%(Bank%)         
dllCopyBank(Src%,Srcoff%,Dst%,Dstoff%,Count%)
dllPokeFloat(Bank%,offset%,val#)   
dllPeekFloat#(Bank%,offset%)      
dllPokeByte(Bank%,offset%,val%)      
dllPeekByte%(Bank%,offset%)      
dllPokeShort(Bank%,offset%,val%)   
dllPeekShort%(Bank%,offset%)      
dllPokeInt(Bank%,offset%,val%)      
dllPeekInt%(Bank%,offset%)      
dllPeekStrlen%(Bank%,offset%)      
dllPokeString%(Bank%,offset%,val$)   
dllPeekString$(Bank%,offset%)      

dllDirectCreateBank%(Size%)      
dllDirectFreeBank(Bank%)      
dllDirectResizeBank%(Bank%,Size%)   
dllDirectBankSize%(Bank%)      
dllDirectPokeFloat(Bank%,val#)      
dllDirectPeekFloat#(Bank%)      
dllDirectPokeByte(Bank%,val%)      
dllDirectPeekByte%(Bank%)      
dllDirectPokeShort(Bank%,val%)      
dllDirectPeekShort%(Bank%)      
dllDirectPokeInt(Bank%,val%)      
dllDirectPeekInt%(Bank%)      
dllDirectPokeString%(Bank%,val$)   
dllDirectPeekString$(Bank%)      
dllDirectPokeSkip(Bank%,Pos%)      
dllDirectPokePos(Bank%,Pos%)      
dllDirectPeekPos%(Bank%)      

dllPokeStringPos(Bank%,offset%,val$,count%
dllDirectPokeStringPos(byte%,val$,count%)dllPeekStringPos$(Bank%,Offset%,Count%)dllDirectPeekStringPos$(Bank%,Count%)   

dllOpenFile%(FileName$)
dllReadFile%(FileName$)
dllWriteFile%(FileName$)
dllCloseFile(file%)
dllSeekFile(file%,Offset%)   
dllFilePos%(file%)   
dllEof%(file%)   
dllReadAvail%(file%)   
dllReadByte%(file%)   
dllReadShort%(file%)   
dllReadInt%(file%)   
dllReadFloat#(file%)   
dllReadString$(file%)   
dllReadLine$(file%)   
dllReadBytes%(Bank%,file%,Offset%,Count%)

dllWriteByte(file%,val%)   
dllWriteShort(file%,val%)
dllWriteInt(file%,val%)   
dllWriteFloat(file%,val%)
dllWriteString(file%,val$)   
dllWriteLine(file%,val$)   
dllWriteBytes%(Bank%,file%,Offset%,Count%)

dllFileSize%(file%)
dllReadBank%(FileName$,Offset%,Count%)

dllInsertFloat%(Bank%,Offset%,Val#)
dllInsertByte%(Bank%,Offset%,Val%)
dllInsertShort%(Bank%,Offset%,Val%)
dllInsertInt%(Bank%,Offset%,Val%)
dllInsertString%(Bank%,Offset%,Val$,char)

dllReplaceString%(Bank%,Offset%,Val$)
dllDeleteString%(Bank%,Offset%)   
dllDeleteFloat%(Bank%,Offset%)   
dllDeleteByte%(Bank%,Offset%)      
dllDeleteShort%(Bank%,Offset%)
dllDeleteInt%(Bank%,Offset%)


Code :
Code: BlitzBasic
  1. These files are long gone, some admin can delete this entry ... since it looks like I can't


Comments : none...

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal