Anders Jenbo
dc84643fe6
🚚 Move dx.cpp and sound.cpp back in to Source now that the name space is clean
2021-04-10 14:30:22 +02:00
Anders Jenbo
433edc63ea
♻️ Consistently use pragma once to guard the headers
2021-04-06 15:21:25 +02:00
Anders Jenbo
bfb3c11c2b
🎨 Change namespace to devilution
2021-04-06 15:21:25 +02:00
Anders Jenbo
a2656637e4
🎨 Format source
2021-03-31 00:52:47 +02:00
Juliano Leal Goncalves
800dbce066
♻️ Move options-related structs to new 'options.h' file
2021-03-27 03:26:44 +01:00
Gleb Mazovetskiy
70d1d633bd
Get rid of SCREEN_X / SCREEN_Y
...
GlobalOutputBuffer() now returns a clipped subregion
2021-03-17 23:37:58 +01:00
Gleb Mazovetskiy
cd59a1c323
Completely replace gpBuffer with CelOutputBuffer
...
`CelOutputBuffer` now contains an `SDL_Surface` and an `SDL_Rect`.
We now have access to SDL surface manipulation functions.
`gpBuffer` and `gpBufEnd` are completely gone 🧹
This results in some FPS loss (250 -> 195) recovered in a subsequent
commit.
2021-03-13 05:13:26 +01:00
Trihedraf
a4c34112af
🚩 Add ini toggle for FPS Limit. Enabled by default. ( #1165 )
2021-03-12 08:59:15 +01:00
Juliano Leal Goncalves
103cde53ff
♻️ Make options struct hierarchical
2021-03-10 10:11:42 +01:00
Anders Jenbo
d0248caf8d
💚 Fix SDL1 builds
2021-03-06 04:43:28 +01:00
Anders Jenbo
b8e38ec560
Correct typo
2021-03-02 12:17:13 +01:00
Gleb Mazovetskiy
21bb021641
Clean up gpBufEnd initialization
...
Initialization of `gpBufEnd` was done in a convoluted way
that only happened to work.
Cleans up initialization and moves it to dx.cpp.
2021-03-01 12:08:37 +01:00
Anders Jenbo
39999791b3
Revamp ini options and sync in multiplayer
...
[NetMsg]
F12=Now you DIE!
F11=Here's something for you.
F10=Follow me.
F9=I need help! Come Here!
[Game]
Speed=50
Fast Walk=1
Grab Input=0
Theo Quest=0
Cow Quest=0
[Audio]
Sound Volume=0
Music Volume=0
Walking Sound=1
[Graphics]
Fullscreen=1
Fit to Screen=1
Scaling Quality=2
Integer Scaling=0
Vertical Sync=1
Blended Transparency=1
Gamma Correction=100
Color Cycling=1
[Diablo]
Intro=0
[Hellfire]
Intro=0
SItem=
[Phone Book]
Entry1=127.0.0.1
[Network]
Bind Address=0.0.0.0
2021-03-01 11:52:26 +01:00
Anders Jenbo
36a196389b
Fix remaning basic compiler errors and warnings
2021-02-22 13:51:42 +01:00
Ivan Epifanov
85be8ed77e
[vita] Speed up. Add option to disable back touch
2021-02-21 20:30:34 +01:00
MrHuu
7e35651b2f
[3DS] CMake re-visited
...
Reflect latest devkitpro libctru / 3ds-sdl-1.2 changes
- Controls now use SDL_JOYSTICK with circlepad enabled
- Shutdown / suspend / sleep are functional
2021-02-21 00:31:13 +01:00
MrHuu
1fa8b6f4e4
[3DS] Initial port
2021-02-21 00:31:13 +01:00
Anders Jenbo
43b5dea6e5
Merge branch 'master' of github.com:diasurgical/devilution
2020-11-03 00:56:51 +01:00
Anders Jenbo
ad2ac2aeeb
Merge branch 'master' of github.com:diasurgical/devilution
2020-10-15 03:55:36 +02:00
Juliano Leal Goncalves
8d896d54f7
Softcode VSYNC setting. Enabled by default. ( #783 )
2020-09-02 22:45:39 +02:00
qndel
f66339a9ac
clean unused variables
2020-06-17 01:58:11 +02:00
Anders Jenbo
69ad34f58f
Consistently use NULL instead of nullptr
...
While nullptr does have extra checking, most of the code uses NULL and
nullptr makes it harder to port the code to some targets like the
original XBox
2020-05-14 11:44:15 +02:00
Manuel Alfayate Corchete
03662be548
Remove atexit() calls and implement a diablo_deinit() function instea… ( #694 )
...
* Remove atexit() calls and implement a diablo_deinit() function instead that cleans up every subsystem if it has been init before.
2020-04-08 13:27:02 +02:00
Anders Jenbo
3c5982083f
Merge branch 'master' of github.com:diasurgical/devilution
2020-04-06 12:05:13 +02:00
Robin Eklind
21e2d2f9de
Resolve CreatePalette name conflict
...
Fixes #641 .
2020-02-26 10:41:10 +01:00
Anders Jenbo
25993b4043
Merge branch 'master' of github.com:diasurgical/devilution
2020-02-14 23:03:31 +01:00
Gleb Mazovetskiy
803217538a
DiabloUI: Fix software scaling along the X axis
2020-02-09 20:20:41 +01:00
Gleb Mazovetskiy
b44343a92f
Merge pull request #588 from glebm/svid-mode
...
SDL1: Avoid software-scaling SVid when possible
2020-02-09 17:30:21 +00:00
Gleb Mazovetskiy
58fde28a2a
Blit: ifdef all SDL1 stretching code
...
OutputRequiresScaling is always false on SDL2 so we don't need SDL2
compatibility there
2020-02-09 16:40:04 +00:00
Gleb Mazovetskiy
114a166a01
Blit: Fix scaled output handling
...
Fixes #594
2020-02-09 14:55:27 +00:00
Gleb Mazovetskiy
ea32475ce9
SDL1: Avoid software-scaling SVid when possible
...
Set the video mode close to the SVid resolution while preserving aspect ratio.
Restore the video mode once the video has finished playing.
Also avoids allocating a tmp surface unless scaling.
2020-02-09 01:55:11 +00:00
Anders Jenbo
32d91cb446
Render menu directly to the output surface
...
Fixes fades not reset when switching to a new menu before fade had
ended.
Fixes incorrect start position for credits.
2020-02-09 02:33:33 +01:00
Anders Jenbo
edeca6574d
Replace tagRECT with SDL_Rect
2020-02-01 15:43:51 +01:00
Anders Jenbo
08aa6a860a
Move generic helpers out of miniwin
2020-02-01 13:56:08 +01:00
Anders Jenbo
67c58583d8
Implement fullscreen toggeling via alt+enter
2020-02-01 13:55:21 +01:00
Anders Jenbo
913de17a56
Use SDL_Color nativly instead of converting betwen it and PALETTEENTRY
2020-01-31 01:20:10 +01:00
Gleb Mazovetskiy
f3ad0c37e1
dx_create_back_buffer: Minor improvement for SDL2
...
Previously, we were copying the colors onto the surface's own palette
that was then immediately replaced by `palette`.
2020-01-29 23:25:04 +01:00
Anders Jenbo
c3f283429b
Fix high CPU load when game is minimized
2019-12-31 04:15:38 +01:00
Anders Jenbo
e577f9bdc7
Remove more old save game format code
...
Multiplayer save games from before 1.08 where using the system name as
the password, so they would need to be converted on the original machine
by 1.08-1.09b before they can be transfered to another system.
2019-12-26 22:22:49 +01:00
Anders Jenbo
a261e8ad65
Better frame delay pressision
...
- Most refresh rates aliging poorly with integer ms
- Adaptive frame limit for low spec devices
2019-11-29 02:05:41 +01:00
Anders Jenbo
0127478673
Improve frame delay for non-v-synced rendering
...
Thanks to @glebm for pointing out the issue, hopfuly this is a better
solution :)
2019-11-17 03:28:47 +01:00
Anders Jenbo
dffc89e41c
Limit FPS when upscaling is disabled
2019-11-13 23:32:36 +01:00
Gleb Mazovetskiy
ddce870dda
Handle scaling for SDL1 ( #370 )
...
Only some handheld devices support auto-scaling.
On desktop and some handhelds we need to downscale manually.
Hardware auto-scaler check for jz4760 provided by @jbanes and @scooterpsu
2019-11-07 00:54:55 +01:00
Anders Jenbo
215ff59e65
Merge branch 'master' of github.com:diasurgical/devilution
2019-11-01 00:06:53 +01:00
Anders Jenbo
4e8a8d2157
Merge remote-tracking branch 'refs/remotes/devilution/master'
2019-10-26 13:43:28 +02:00
Gleb Mazovetskiy
afaa25193a
Set surface size to be the logical size
2019-10-19 06:01:01 +02:00
Gleb Mazovetskiy
dd5bc39816
Get a fresh window surface before rendering to it ( #358 )
...
* Get a fresh window surface before rendering to it
It is possible that a window surface gets invalidated since we initially
obtained it. We need to call GetWindowSurface every time we want one,
instead of keeping a pointer to a possibly stale one.
See https://hg.libsdl.org/SDL/file/369b01006eb2/src/video/SDL_video.c#l2312
Fixes #351
2019-10-13 13:50:16 +02:00
Anders Jenbo
810b12a37d
Drop unused code
2019-10-13 00:08:24 +02:00
Anders Jenbo
a8e4db538f
Display SDL error messages in UI dialog
...
This will also end the application in most cases
2019-10-12 23:02:04 +02:00
Gleb Mazovetskiy
426c246535
Simplify SDL1/2 palette handling
...
SDL 1 and 2 handle surface palettes very differently.
This adds a few compatibility functions that do the right thing
depending on the SDL version.
2019-10-12 20:54:10 +02:00