Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / How do you use "write/read dirblock"

Author
Message
Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 31st Jan 2004 00:28
I've figured out how to make a dirblock:

if file exist("objects.pk3")=0
open to write 1,"objects.pk3"
write dirblock 1,"objects"
close file 1
endif

but how do you extract them from the file?


Quote: "
Amd 2500+ | 1024mb pc2700 | A7N8X-X | Geforce4 ti 4200 128mb
"
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 31st Jan 2004 00:29
in the words of a mighy Warcraft 2 peasant:
"wha huh?"

Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 31st Jan 2004 00:31
Nevermind, I figured it out:

open to read 1,"objects.pk3"
make directory "objects"
set dir "objects"
read dirblock 1,"objects"
set dir ".."
close file 1


Quote: "
Amd 2500+ | 1024mb pc2700 | A7N8X-X | Geforce4 ti 4200 128mb
"
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 31st Jan 2004 00:32
no, i dont understand what you are trying to do? i want to know for my own benifit

Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 31st Jan 2004 00:34
Well, velocity x-treme has a directory, called "objects" that contains too many files to be extracted one-by-one. So I tried to use dirblocks (I now know how they work).
Ive made a nifty installer in DBC that reads them and places them at the install directory


Quote: "
Amd 2500+ | 1024mb pc2700 | A7N8X-X | Geforce4 ti 4200 128mb
"
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 31st Jan 2004 00:35
ahh i see. thx

Login to post a reply

Server time is: 2025-05-22 11:51:04
Your offset time is: 2025-05-22 11:51:04