1
0
forked from 0ad/0ad
Commit Graph

229 Commits

Author SHA1 Message Date
94316413db rough initial implementation of revised L3 file block cache. works, considerable speedup.
also: async routines now fill a control block, instead of returning a
handle (that's now done by VFS)

This was SVN commit r1001.
2004-08-15 21:50:29 +00:00
48ecbe3c48 VFS wraps async IO control block in a handle (better separation of powers ;))
This was SVN commit r1000.
2004-08-15 21:49:17 +00:00
caedad6fc4 allow freeing 0 ptrs
This was SVN commit r999.
2004-08-15 21:48:34 +00:00
788b177e81 async routines now fill a control block, instead of returning a handle (that's now done by VFS)
This was SVN commit r998.
2004-08-15 21:47:47 +00:00
5ff6c98c95 bugfix in IO callback (was incorrectly reporting # bytes read); async routines now fill a control block, instead of returning a handle (that's now done by VFS)
This was SVN commit r997.
2004-08-15 21:47:32 +00:00
5edadf1433 don't cache handles that don't have a key (i.e. couldn't be found when reloading)
This was SVN commit r991.
2004-08-14 12:36:03 +00:00
3ba9855b2e wasn't converting native path to portable before sending to VFS.
fixes assert after screenshot write reported by stu

This was SVN commit r990.
2004-08-14 12:28:54 +00:00
7e1bcd5159 Slightly nicer cursor loading (using the resource system for caching)
This was SVN commit r986.
2004-08-12 17:36:48 +00:00
0b452320ef add callback for sync I/O (useful for reporting progress)
This was SVN commit r978.
2004-08-12 15:51:31 +00:00
df9dcc5711 opening files as a directory -> problem with dir_watch. solved
This was SVN commit r977.
2004-08-11 23:25:37 +00:00
04c4e7ae02 now case-insensitive; added tags to each path variable to tell what kind
also fixed some bugs, Zip loading is successfully integrated.

This was SVN commit r975.
2004-08-11 20:24:26 +00:00
1f2ebb678e slightly change file_enum interface (don't need flags); comments
This was SVN commit r974.
2004-08-11 20:23:22 +00:00
c5701c8299 add higher-level dox, fix some bugs, made case-insensitive
This was SVN commit r973.
2004-08-11 20:21:42 +00:00
e67ed4acc0 pass dir_watch the native path, so that it has a chance at working ;p
This was SVN commit r972.
2004-08-11 20:20:03 +00:00
93b40f835e improvement: don't cache if reload failed
This was SVN commit r971.
2004-08-11 20:19:31 +00:00
023592d23f bugfixes related to "lying about user's buffer" feature
also rearranged + cleaned up a bit

This was SVN commit r959.
2004-08-10 16:01:04 +00:00
7c36638fd0 minor bugfix / commenting
This was SVN commit r958.
2004-08-10 15:59:11 +00:00
e4867475dd no longer use LOC_ZIP
This was SVN commit r957.
2004-08-10 15:58:54 +00:00
b81d75a0f3 add file_io_complete call for polling.
also some bugfixes related to reading from zip

This was SVN commit r956.
2004-08-10 15:57:35 +00:00
59231be9a7 massive cleanup, commenting, hardening, bugfixes => mostly works :)
This was SVN commit r955.
2004-08-10 15:56:04 +00:00
6e1887ad8b removed LOC_ZIP (not needed; callback can determine via Loc.archive if it's a zip file)
This was SVN commit r954.
2004-08-10 15:55:24 +00:00
0b3361b6f5 several bugfixes for loading from Zip (currently broken)
This was SVN commit r950.
2004-08-09 16:46:57 +00:00
687aea271e fixed alignment (broken after last user_p change)
This was SVN commit r949.
2004-08-09 16:44:42 +00:00
abfe9faadc New zlib/libpng libraries
This was SVN commit r942.
2004-08-08 18:50:44 +00:00
7545ad13b8 Corrected cursor orientation
This was SVN commit r941.
2004-08-08 18:38:42 +00:00
ec7e3c890c texture loaders now flip png (always) and bmp+tga (if top-down)
also more clear TGA header use (struct instead of direct offset)

This was SVN commit r939.
2004-08-08 18:07:46 +00:00
5bdfaf5758 fix several bugs related to tag reset when reopening cached handles
This was SVN commit r938.
2004-08-08 18:04:03 +00:00
f08cd3466c increase REF_BITS to 16 (=> 64k refs possible)
This was SVN commit r936.
2004-08-08 16:40:59 +00:00
ca9174e1d8 update vfs_load; now returns handle with the correct file size (i.e. leaving out padding)
This was SVN commit r934.
2004-08-07 13:45:03 +00:00
58a0437e66 fix comment on not storing aiocb in struct File
This was SVN commit r933.
2004-08-07 13:44:28 +00:00
09cf9dce75 add support for lying about a memory handle's actual allocation (useful for the file code, which allocates extra room for padding yet wants to return the allocation's handle)
This was SVN commit r932.
2004-08-07 13:34:43 +00:00
58ae20116a due to mem fix, DDS file size is correct; assert that verifies that was moved here from ogl_tex and un-commented-out
This was SVN commit r931.
2004-08-07 13:33:30 +00:00
5026705fe8 moved DDS file size check to tex (it's file format-specific)
This was SVN commit r930.
2004-08-07 13:32:32 +00:00
c1dc584e22 use get_executable_path (sysdep) instead of relying solely on argv0
This was SVN commit r918.
2004-08-05 19:20:45 +00:00
bcbb2a36c7 missing brace - d'oh!
This was SVN commit r916.
2004-08-05 14:06:16 +00:00
a91b0d9368 only store HMem if FILE_CACHE
This was SVN commit r915.
2004-08-05 14:02:10 +00:00
d274e4c7f9 more comments; also SECTOR_SIZE constant added
This was SVN commit r914.
2004-08-05 14:01:49 +00:00
b2afef529c Introducing: The Pre-Game State. The game instance is not created on program load as before, but can be started by JS functions.
This was SVN commit r912.
2004-08-05 13:07:51 +00:00
338b849b4c FILE_CACHE flag: overrides default of not caching the file handle (see explanation in latest build thread)
This was SVN commit r910.
2004-08-05 12:48:13 +00:00
affb03cbc4 add flags param for future use (as in vfs_store)
This was SVN commit r909.
2004-08-05 12:47:40 +00:00
a1cf32474a RES_TEMP scope alias: RES_NO_CACHE
This was SVN commit r908.
2004-08-05 12:45:56 +00:00
f1c7af9a95 ignore .xmb files when reloading (not critical, just avoids output clutter)
This was SVN commit r890.
2004-08-03 12:56:44 +00:00
78d47d3016 fixed funny bug: file write handles were cached; VFS writes (eg. screenshots) led to reload -> wiped out file contents
temp solution: do not cache file writes; see latest build thread.

This was SVN commit r885.
2004-08-02 22:16:18 +00:00
06725f7613 be less annoying when tag security check is undermined
This was SVN commit r884.
2004-08-02 21:29:55 +00:00
8485fc3d82 cleanup; keep_open scheme that means resources will actually be cached (default is now to keep in mem). caching control is still missing
This was SVN commit r882.
2004-08-02 13:46:44 +00:00
4c3f1027dd small optimization: rounds offset down (and restores later) to avoid buffer copy in waio
This was SVN commit r881.
2004-08-02 13:45:35 +00:00
3e92b4a043 comment path conversion functions
This was SVN commit r880.
2004-08-02 13:44:48 +00:00
0d9523d921 fix aiocb struct size assumption (was included in resource control block; now allocated dynanmically)
This was SVN commit r876.
2004-08-01 20:23:53 +00:00
30553628ab remove dead code
This was SVN commit r875.
2004-08-01 20:23:11 +00:00
29f5d23dae no change
This was SVN commit r868.
2004-07-31 19:36:46 +00:00
a060a65a95 attempt to get Zip archives working (problem with directory traverse in VFS). not quite there yet
This was SVN commit r867.
2004-07-31 19:36:06 +00:00
7618033b3a no longer emulate FAM, due to a stupid design flaw. instead, implement sysdep/dir_watch interface
This was SVN commit r866.
2004-07-31 19:35:22 +00:00
bbb57ac6db Removed references to font.h
This was SVN commit r856.
2004-07-31 12:44:13 +00:00
fa4fc7f4ee change CVFSFile header path
This was SVN commit r855.
2004-07-31 11:38:13 +00:00
363fba9b94 moved from lib/res/ to ps/
This was SVN commit r854.
2004-07-31 11:36:44 +00:00
ab2b08d97b fix a problem that allowed use of non-open but cached resources
This was SVN commit r853.
2004-07-31 11:29:57 +00:00
2c23606c31 hook up aio; cleanup; commenting
This was SVN commit r850.
2004-07-31 11:03:17 +00:00
1d57c77aed greatly simplified (1500 -> 1000 lines) by stripping out previous overly complicated caching mechanism.
will replace with new, simpler cache that only stores temp buffers for
first and last block when reading from ZIp (everything else is covered
by handle manager cache)

This was SVN commit r848.
2004-07-31 02:02:44 +00:00
bc8ab4cc81 slight improvements in use of res code.
This was SVN commit r847.
2004-07-31 01:57:26 +00:00
f31bc328f2 Moved all cursor code into cursor.cpp
This was SVN commit r844.
2004-07-29 16:14:22 +00:00
36c502713b Used mem_free_h on the Handle returned by vfs_load
This was SVN commit r842.
2004-07-29 16:12:27 +00:00
7820919689 Added CVFSFile, a simple wrapper around vfs_load to allow slightly cleaner code elsewhere
This was SVN commit r841.
2004-07-29 16:10:33 +00:00
79eaacfba1 slight simplification seen while debugging
This was SVN commit r835.
2004-07-28 17:53:45 +00:00
386900c0fc Linux/GCC Compat
This was SVN commit r819.
2004-07-27 00:26:51 +00:00
c8514b7d28 OpenGL cursor (for non-Windows)
This was SVN commit r817.
2004-07-24 19:38:12 +00:00
fe1bee706b Fixed loads of /W4 warnings, because it's easier than doing anything useful. Added some asserts to check potentially dangerous assumptions, implemented a few missing bits of code, adjusted some comments, etc.
This was SVN commit r814.
2004-07-24 14:04:40 +00:00
kezz
1d44976b35 removing sound.cpp and sound.h as not needed at the moment due to switch to OpenAL
This was SVN commit r768.
2004-07-17 16:23:14 +00:00
8684287360 Linux fixes
This was SVN commit r763.
2004-07-15 19:59:27 +00:00
977693c7db GUI text renderer
This was SVN commit r745.
2004-07-13 22:48:53 +00:00
950db27b2c fix take-address-of-temporary bug
This was SVN commit r739.
2004-07-13 21:13:10 +00:00
21e685b1f6 fix refcount (now initialized to 1)
This was SVN commit r738.
2004-07-13 21:12:46 +00:00
dccdd0c747 Allow font unloading
This was SVN commit r734.
2004-07-12 20:08:34 +00:00
c27c765121 tiny comment and debug string change
This was SVN commit r719.
2004-07-12 14:22:17 +00:00
14aa03f3b0 Linux/GCC compat: wchar_t size fix for glCallLists
This was SVN commit r714.
2004-07-11 20:29:34 +00:00
1001aeacf5 Linux/GCC compat, headers and such
This was SVN commit r695.
2004-07-10 21:25:35 +00:00
4769a92894 Added newline at end
This was SVN commit r689.
2004-07-10 20:28:18 +00:00
d5197e3c77 revised mount logic; now stores the mount point and uses it to correctly convert from VFS to native paths
This was SVN commit r675.
2004-07-09 19:58:43 +00:00
af58e59633 pass FILE_NO_AIO at open instead of calling uncached_* (which ended up duplicating code)
This was SVN commit r674.
2004-07-09 19:57:59 +00:00
dc5e5dd774 PNG and BMP "encode" now operational
This was SVN commit r672.
2004-07-09 02:18:59 +00:00
41d8db6f81 add vfs_exists, uncached_io, and change IO interface to value-return buffer param (void**)
This was SVN commit r671.
2004-07-09 02:17:37 +00:00
306053c994 bring read interface into line with vfs_io (value-return buffer param)
This was SVN commit r670.
2004-07-09 02:14:21 +00:00
8306c53492 increase control block size to "plenty" until things settle
This was SVN commit r669.
2004-07-09 02:13:09 +00:00
226fd70292 now open files in binary mode on windows (thanks to philip for catching this)
This was SVN commit r661.
2004-07-08 15:10:26 +00:00
a779ef8595 common interface to texture format codecs; work started on encoders (to write textures)
This was SVN commit r658.
2004-07-08 14:40:24 +00:00
b7a05fd50b fix iterator invalidation bug triggered by multiple mount points; add vfs_uncached_io()
This was SVN commit r657.
2004-07-08 14:38:58 +00:00
875d78d10b reqnum = int; complain if watch failed
This was SVN commit r655.
2004-07-08 14:33:58 +00:00
0c05abb304 fixes for write code and new uncached_write routine (bypass cache, no file padding problem)
This was SVN commit r654.
2004-07-08 14:30:35 +00:00
bfafb8fce4 add to some comments
also removed redundant VFS file open flags

This was SVN commit r633.
2004-07-05 02:33:47 +00:00
7bb375ac69 completed support for writing files (hopefully). now adds them to the VFS tree.
also removed VFS file open flags, used file.h flags instead

This was SVN commit r632.
2004-07-05 02:32:43 +00:00
680d5dd7b4 revisions to file open flag comments. btw, these are now also used by VFS
This was SVN commit r631.
2004-07-05 02:31:32 +00:00
e9a7876e0d slight changes to open / stat interface to bring in line with SUS (and therefore POSIX, i hope)
also pass in pmode

This was SVN commit r630.
2004-07-05 02:30:53 +00:00
64444251d4 fixed bug (missing else) reported by philip. thanks!
This was SVN commit r615.
2004-06-30 18:47:15 +00:00
ddd7821425 res reload callback interface change: now also receives handle of object being reloaded. simplifies tex reload code
This was SVN commit r602.
2004-06-25 22:19:19 +00:00
766a0b4077 split tex code into (file format specific) loaders and opengl texture ops like upload()
This was SVN commit r601.
2004-06-25 22:18:03 +00:00
cc02e9ea97 more abstraction in VFS<->dir watch interface (thinking of using dazuko and/or FAM)
This was SVN commit r594.
2004-06-23 16:29:03 +00:00
fc476e04f6 stomped on numerous warnings
This was SVN commit r584.
2004-06-21 16:29:47 +00:00
24f0756712 bail if #chars = 0 (avoid BC warning); fix debug messages
This was SVN commit r574.
2004-06-21 12:49:37 +00:00
c01eb01dfb Linux fixedness
This was SVN commit r567.
2004-06-19 21:13:10 +00:00
aed6d949d5 new #included
This was SVN commit r566.
2004-06-19 21:12:39 +00:00
2299573567 now catches bad_alloc exceptions thrown during reloads (=> no need to wrap new in exception handler there)
This was SVN commit r558.
2004-06-19 14:45:46 +00:00