Go Back   Angband Forums > Angband > Vanilla

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old June 21, 2007, 15:49   #1
Join Date: May 2007
Posts: 289
CJNyfalt is on a distinguished road
Analysis of the /lib directory and suggested changes.

Here's an analysis of the /lib directory structure with proposed changes.
I'm posting this for suggestions, comments and corrections.
I will later post a ticket for Vanilla and make changes for Sangband.

First we take a look at the directory structure:

Contains the high-score list.
Needs to be game-writeable, and should preferably be global.

Contains player ghost information on variants with them.
Needs to be game-writeable, and should preferably be global.

Contains the 'compiled' versions of the files in /lib/edit.
Should preferably be game-writeable and global.

Contains the text-version of the files in /lib/data.
Should be global.

Contains text files used by the game that neither fits in to
/lib/edit or /lib/help category.
Should be global.

Contains text files used by the in-game help.
Should be global.

Serves no useful in-game purpose. Used in some variants to
store text-files that aren't used in-game.
Should be removed. Eventual content should be moved to /doc.

Contains global preset preference files. Overrided by files in
Should be global.

Contains savegames.
Needs to be game-writable. Should preferably be user-specific.

Contains user editable preference files.
Should preferably be game-writable and user-specific.

Contains multimedia files.
Should be global.

Then we take a look at what certain defines do.

This replaces /lib/user with the path specified in the define.

This replaces apex, bone, save and data with subdirs of PRIVATE_USER_PATH.
This makes all game-writable dirs user-specific.

So far, so good, but what about save? I listed it above as preferably
user-specific. IMO, it should be user-specific always, if PRIVATE_USER_PATH
is defined. This would also allows us to remove the SAVEFILE_USE_UID code.

So to summarize my suggestions:
- Remove /lib/info, move eventual content to /doc.
- Use PRIVATE_USER_PATH/save for savefiles always if PRIVATE_USER_PATH is
- Remove the SAVEFILE_USE_UID code.
CJNyfalt is offline   Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 16:50.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.