After you chdir(), can you chdir() back?

Started by MisterN, July 25, 2012, 06:29:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MisterN

Its the only way I can load levels, so I am content with it. ALL I NEED is a way to chdir() back a directory and/or to another one. How might I do that because the wiki doesn't say anything, and doing the "c:/" thing wont work for what I have in mind. Thanks
werg

Kloppix

In almost every operative system "cd .." will move you up one directory. In Bennu it's chdir("..")

For example if you are in /home/user1/myprogram/ and want to load a file in /home/user1/data it's

chdir("../data");



handsource-dyko

It's simply a matter of experimantation. How often do you use the dos prompt? For me it's obvious because of my old age! ;D I have no difficulties with dos or even a commodore 64. I remember the days before windows 95, and I had to use dos, so it's natural for me to know that stuff.  :D   

MisterN

Last time I used a dos prompt was to install the duke nukem trilogy on dos box lol
werg

SplinterGU

string cd()

return current directory/folder

string cd(string new_dir)

change directory and return if operations was ok.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

handsource-dyko

Quote from: DoctorN on July 25, 2012, 08:18:05 PM
Last time I used a dos prompt was to install the duke nukem trilogy on dos box lol

I know this is a bit off-topic, but did you have any difficulties with that? I have some experience with dosbox. Luckely you don't have to deal with config.sys and boot floppies. On real dos machines you'd had to make bootdisks for troublesome games. There's a very good launcher for dosbox called ampshell.  http://ampshell.tuxfamily.org/ With this you can create a unique configuration for each game. Very handy if you have a lot of different dos games using the most obscure hardware. So you can create a optimal config for every game.  Lethal weapon and Judge dredd are absolute pain to get working, even on a real dos machine. Some games are very picky or have weird bugs. Back in the day it was common that sound wouldn't work or that a particulair joystick was incompatible with a certain game. One thing microsoft did well with direct x was to standarise things and put an end to horrors of dos. It was both horrendous for gamers and developers because they had to reinvent the wheel everytime. Ohh... nostalgia. :)

MisterN

I mounted it and installed it. It took awhile just to mount and install it, but now I just have to drag and drop the .exe files onto dosbox.exe
werg