1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-13 03:00:42 +00:00
OpenDiablo2/d2common
lord 50d40fb5d3
D2loader (#714)
* adding logger implementation to d2common

* Adding file loader implementation

The file loader works in terms of `Sources` and `Assets`. A `Source` is
something like a filesystem that has a cache. An `Asset` is something
that implements `io.ReadSeeker` and has a few methods of its own.

There are currently `Source` implementations for MPQ archives and for the
host filesystem, meaning that one can specify a directory on the host fs to
load files from.

`Sources` are added to a loader with `loader.AddSource(path)`, where `path`
resolves somewhere on disk. In the case that the path points to an MPQ,
then an MPQ `Source` is created and added to the loader. If `path` resolves
to a directory, then a filesystem source is added.

Files are loaded with `loader.Load("data/global/excel/monstats.txt")`, and the
sources are searched in the order that they were added.

* adding tests for d2common/logger_test.go

* adding tests and testdata for d2loader

* logger lint fixes, fixed missing test case

* minor edits, lint fixes, changes some comments, embedded Logger into Loader

* moved d2loader into d2common (I dont think it belonged in d2core)

* removed my simple cache implementation in favor of our existing cache in d2common
2020-09-08 15:45:26 -04:00
..
d2calculation Add initial calculation string parser (#706) 2020-08-16 21:56:28 -04:00
d2data testing to see if this fixes the github build issues (#715) 2020-09-06 17:09:05 -04:00
d2debugutil Display HP/Mana stats when hovering over or clicking respective globe. Update d2debugutil to not use internal package for assets. (#709) 2020-08-24 15:50:33 -04:00
d2enum Only draw shadows for layers that should have them (#704) 2020-08-16 14:59:34 -04:00
d2fileformats testing to see if this fixes the github build issues (#715) 2020-09-06 17:09:05 -04:00
d2interface Only draw shadows for layers that should have them (#704) 2020-08-16 14:59:34 -04:00
d2loader D2loader (#714) 2020-09-08 15:45:26 -04:00
d2math Draw entities back to front within tiles (#705) 2020-08-16 14:59:03 -04:00
d2resource Added mini panel (#711) 2020-08-25 09:10:26 -04:00
bitmuncher.go fix lint errors in d2interface (#684) 2020-08-04 22:53:36 -04:00
bitstream_test.go lint fixes for the d2common package (#558) 2020-07-08 09:16:56 -04:00
bitstream.go fix lint errors in d2interface (#684) 2020-08-04 22:53:36 -04:00
cache.go Add static checks to help ensure implementations conform to interfaces (#582) 2020-07-13 09:05:04 -04:00
calcstring.go lint and minor refactor of d2common (#690) 2020-08-05 00:03:33 -04:00
data_dictionary.go Sound engine and sound environments (#652) 2020-07-30 16:17:26 -04:00
doc.go moving package comments into doc.go files (#534) 2020-07-03 18:33:46 -04:00
logger_test.go D2loader (#714) 2020-09-08 15:45:26 -04:00
logger.go D2loader (#714) 2020-09-08 15:45:26 -04:00
music_defs.go Updated music logic (#629) 2020-07-26 15:17:00 -04:00
path.go Implemented Position in Path and PathTile (#605) 2020-07-18 18:07:13 -04:00
Point.go lint fixes for the d2common package (#558) 2020-07-08 09:16:56 -04:00
rectangle.go lint fixes for the d2common package (#558) 2020-07-08 09:16:56 -04:00
rgba_color.go D2mapengine remove entity, minor edits (#694) 2020-08-05 21:27:45 -04:00
size.go lint fixes for the d2common package (#558) 2020-07-08 09:16:56 -04:00
stream_reader_test.go lint fixes for the d2common package (#558) 2020-07-08 09:16:56 -04:00
stream_reader.go remove most lint errors in d2common (#606) 2020-07-18 18:07:38 -04:00
stream_writer_test.go lint fixes for the d2common package (#558) 2020-07-08 09:16:56 -04:00
stream_writer.go remove most lint errors in d2common (#606) 2020-07-18 18:07:38 -04:00
stringutils.go lint fixes for the d2common package (#558) 2020-07-08 09:16:56 -04:00
text_dictionary.go lint and minor refactor of d2common (#690) 2020-08-05 00:03:33 -04:00
timeutils.go remove most lint errors in d2common (#606) 2020-07-18 18:07:38 -04:00