1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-09 17:30:43 +00:00
Commit Graph

491 Commits

Author SHA1 Message Date
Ziemas
0876a2953d NPC path: change mode before changing directions. (#271)
We need the data of the new mode before making a decision on what
direction to use.
2019-12-28 23:33:30 -05:00
nicholas-eden
d6769975cd Initial inventory handling (#270)
Add struct to display inventory panel.
Add struct to handle inventory and merchant grids.

Hook up `i` key to toggle inventory panel.
2019-12-28 23:32:53 -05:00
Alex Yatskov
c01bedaedf Do not advance state in render (#269)
* Do not advance state in render

* Update advance logic for sprite and region
2019-12-28 23:32:24 -05:00
Alex Yatskov
49b9a190f2 Render to surface, not ebiten texture (#268)
* Render to surface, not ebiten texture

* Fix debug text
2019-12-28 16:46:08 -05:00
Ziemas
0c2b7cfd8d Advance hero animations on char select screen. (#267) 2019-12-26 11:14:26 -05:00
Alex Yatskov
b7e50bf098 Add terminal, surface, assetmanager commands (#266)
* Add terminal, surface, assetmanager commands

* echo command

* add verbose logging

* more logging, word wrap

* add timescale command
2019-12-26 11:13:05 -05:00
Alex Yatskov
0ee937f01b Rename Paperdoll to Composite (#265)
Make AnimatedEntity use Composite
2019-12-24 01:48:45 -05:00
Alex Yatskov
1b03e691b9 High level resource caching; resource cleanup (#264)
* Work on resource loading

* Use new material flag name. (#261)

Update ebiten ref while at it

* Hopefully fix CI (#262)

* Don't try to copy config.json on travis (#263)

I doesn't exist anymore

* Update D2Shared references

* Fix character selection rect

Co-authored-by: Ziemas <ziemas@ziemas.se>
2019-12-21 20:53:18 -05:00
Ziemas
29c5839876 Don't try to copy config.json on travis (#263)
I doesn't exist anymore
2019-12-19 20:25:44 -05:00
Ziemas
18af81ace2 Hopefully fix CI (#262) 2019-12-19 20:15:11 -05:00
Ziemas
006dcddfb7 Use new material flag name. (#261)
Update ebiten ref while at it
2019-12-19 20:01:00 -05:00
Alex Yatskov
4ebe199a8e Move save game location to ~/.config/OpenDiablo2/Save (#258) 2019-12-17 23:20:06 -05:00
Alex Yatskov
d5a0038125 Configuration cleanup (#257)
* Cleanup config file loading, move defaults to code

* Default to fullscreen

* Cleanup

* Store configuration in UserConfigDir

* print config path on load and save
2019-12-17 21:32:37 -05:00
Alex Yatskov
cead000c3f Fix case sensitivity when loading MPQ files (#256)
* Fix case sensitivity when loading MPQ files

* remove print
2019-12-17 20:06:01 -05:00
Ziemas
21cead11b9 Frame atlas for DCC directions (#255)
Combine the animation frames of the current DCC direction into one
image.
2019-12-17 18:23:21 -05:00
Alex Yatskov
cc678ba747 Add asset manager (#253)
* Add asset manager

* Fix rebase

* Update asset manager to support mpq hash caching

* Update vendoring
2019-12-16 22:23:01 -05:00
nicholas-eden
d033c63e18 Initial in-game ui and keyboard controls (#254)
Move player movement out of `Game`, add arrow key movement.  Render bottom panel.
2019-12-16 11:04:39 -05:00
Alex Yatskov
61d63bc902 Remove ebiten reference in d2shared (#252)
* Remove ebiten reference in d2shared
* update d2shared reference to latest
2019-12-15 14:07:57 -05:00
Tim Sarbin
4eeac5c1d9
Add OSX support for path fixups. (#251) 2019-12-14 00:15:52 -05:00
Alex Yatskov
a194913609 Engine and region reorganization in preperation for spatial partitioning (#249)
* Engine and region reorg
* Remove unnecessary file diff
* Remove extra render of debug mesh
2019-12-13 00:33:11 -05:00
j0y
5b6da2434f Don't reset animation when changing direction (#248) 2019-12-09 17:25:29 -05:00
Alex Yatskov
413d95335a Add OpenDiablo2 non-windows bin to gitignore (#247) 2019-12-08 23:37:16 -05:00
Alex Yatskov
1262c80e6b Create viewport and camera types (#246) 2019-12-08 22:18:42 -05:00
nicholas-eden
9a8e16c411 Pause npcs at each target location for a random time (#245)
Loop through neutral animation a random number of repetitions before moving on.  Only run the skill animation once, it is not designed for looping.
2019-12-06 23:58:36 -05:00
Tim Sarbin
87e016617a
Fixed compile error (#244) 2019-12-06 17:52:35 -05:00
nicholas-eden
b5db51800c Setup NPCs to follow paths (#243)
Change location to contain canonical location, add field to get rounded location for tile rendering.
If NPC has path, loop through path.
2019-12-06 09:44:51 -05:00
Tim Sarbin
88b9fb6207
Updated D2Shared reference. (#242) 2019-12-02 19:16:57 -05:00
liberodark
e42b53f44e Update run.sh (#241) 2019-12-02 16:57:47 -05:00
j0y
c6235411b7 Add basic movement (#240)
* Add basic movement

* Calculate step length based on tick time between updates, teleport to target if within one step.

* Smooth camera, hero movement

removed float to int conversions in Render and IsoToScreen functions

* Render hero in the center of the screen (assuming 800x600 resolution)

* Revert changing Render() parameters type

* Render hero in the tile loop

hero will naturally render in front of the walls of the current tile but behind the walls of the tile below

* Smoother steps near target coordinates

remove jitter from trying to get one step away from target on both axis
2019-12-02 16:55:48 -05:00
Ziemas
51d78bfcbf Draw object layers in order and generally untangle the direction mess. (#239)
* Implement drawing COF Layers by priority

Hack it up by using always draw order for direction 0 until we get a
better handle on directions in the engine.

* Take directions in "cof directions"

Transform into dcc directions for loading frames.

* Set characters to dir 0 in char select.

Direction 0 is now facing down universally
2019-11-26 21:04:36 -05:00
Ziemas
4d655416c2 Cache each cof layer individually and set blending (#238) 2019-11-25 20:05:18 -05:00
Tim Sarbin
71f30a5714
Revert "Cache each cof layer individually and set blending (#235)" (#237)
This reverts commit 1bfbffc48d.
2019-11-25 19:58:30 -05:00
Ziemas
1bfbffc48d Cache each cof layer individually and set blending (#235)
* Cache each cof layer individually and set blending

* Draw layers in their correct order
2019-11-25 18:57:55 -05:00
nicholas-eden
19257abddb Extract sprite from dc6 from D2Shared (#234)
Remove processing of dc6 file type from sprite creation.  Use dc6 loader from D2Shared.
2019-11-24 17:58:23 -05:00
Ziemas
64c90312f7 Dumb debug printf removed (#233) 2019-11-24 01:16:36 -05:00
Ziemas
c0e931eb4f Animate floor tiles (#232)
* Caching functions decide if we get random tile

We might not always want to.

* The caching functions don't need to return images

* Cache all frames of animated tiles

Also some error checking

* Update animations before drawing floors

* Fix missing frame

Animate from index 0 to 9

* Update refs
2019-11-24 01:11:32 -05:00
liberodark
8a426ce6ca Update README.md (#231) 2019-11-23 14:45:26 -05:00
Ziemas
458b17bcc6 Only render visible regions (#230)
* Only render visible regions

This will need tweaking later to ensure there are no tiles popping in or
out of from regions coming in and out of view.

* Temp hack for act5 lava palette
2019-11-23 08:48:33 -05:00
Ziemas
48f81c82cd Update d2shared reference (#229) 2019-11-22 23:40:45 -05:00
Ziemas
5ba9470c3a Switch to using the TileType type for tiles. (#228) 2019-11-22 23:30:02 -05:00
Tim Sarbin
93a421c5ed
More CI fixes. (#225)
* Fix CI builds. Removed old go.sum stuff.
2019-11-21 22:31:58 -05:00
Tim Sarbin
3e55453450
Fix CI builds. Removed old go.sum stuff. (#224) 2019-11-21 22:26:08 -05:00
Tim Sarbin
e3e52fd36d
Updated ebiten ref. Removed tag generation. (#223) 2019-11-21 22:00:37 -05:00
Zuhayr Elahi
f88e3c0e33 Attempt to fix OpenDiablo2 deploy to master (#215)
* Remove on tag: true release
* Add configuration to release on master
* Add before_deploy step to tag build before release
2019-11-21 21:42:25 -05:00
負弌
30c3bb7330 Fix CJK render problem partially (#222)
* Fixed CJK render problem
* Add partial support of loading CJK fonts
2019-11-21 21:40:12 -05:00
liberodark
23e228d88b Update run.sh (#221)
Switch to bash
2019-11-21 20:34:54 -05:00
Ziemas
b0d753aef9 Changing the terminology of tile components. (#220)
Orientation > Type
MainIndex > Style
SubIndex > Sequence
2019-11-21 20:34:29 -05:00
Ziemas
90b5e8a334 Fix GetTiles being called for already cached tiles. (#219)
* Don't call GetTile from the render functions.
Don't bother trying to render uncached tiles.
* Added back randomization code
* Update refs
* Fix random tiles selection.
No sorting the input, no selecting 0 probability tiles if there are
other options.
2019-11-21 19:54:56 -05:00
Tim Sarbin
31cda81847
Added areas screenshot gif. (#218) 2019-11-20 22:37:08 -05:00
Tim Sarbin
a0a0600737
Updated module references. (#214) 2019-11-19 17:10:39 -05:00