Commit graph

2454 commits

Author SHA1 Message Date
rr-
225a0534a8 style: cosmetic updates
- Use float types where possible.
- Rename vertex to vertices for consistency.
- Remove `C3D_VTCF *vertex` for consistency.
2021-10-25 23:39:55 +02:00
rr-
0fcd9b70f9 specific: use decompiled HWR_ReleaseSurfaces 2021-10-25 23:39:55 +02:00
rr-
eb204ef20e port HWR_SetPalette 2021-10-25 23:39:55 +02:00
rr-
6c5143e230 docs: improve IDA stubs 2021-10-25 23:39:55 +02:00
rr-
da0fbdcea6 docs: mark 408ED8 as unused
It's the routine executed when the engine stumbles upon an unloaded
texture when drawing primitives, which I didn't port over as I don't
believe it is actually ever executed.
2021-10-25 23:39:55 +02:00
rr-
2671f8c766 port HWR_ZedClipper 2021-10-25 23:39:55 +02:00
rr-
5db9905d45 port HWR_DrawTexturedTriangle 2021-10-25 23:39:55 +02:00
rr-
f0b1a86eb3 port HWR_DrawTexturedQuad 2021-10-25 23:39:55 +02:00
rr-
93a43e6488 hwr: simplify texture mode management 2021-10-25 23:39:55 +02:00
rr-
df59c2d722 hwr: remove magic numbers 2021-10-25 23:39:55 +02:00
rr-
943de50f14 hwr: fix structure size 2021-10-25 23:39:55 +02:00
rr-
f88996f7ad port HWR_DrawSprite 2021-10-25 23:39:55 +02:00
rr-
7478db9465 input: change WINBOOL back to BOOL
Turns out it's a mingw-specific declaration, most likely incompatible
with other toolchains.
2021-10-25 18:03:20 +02:00
rr-
ff5226cd3f input: fix invalid signatures 2021-10-25 17:57:31 +02:00
rr-
cfb7bae0fd input: fix result not being defined 2021-10-25 17:57:31 +02:00
oziphantom
a7f1e56c21
input: add Xbox one controller support 2021-10-25 11:13:16 +02:00
rr-
72c3693af8 hwr: apply code review remarks 2021-10-24 19:12:15 +02:00
rr-
fa8cc4ce21 misc: fix typo 2021-10-24 19:12:15 +02:00
rr-
c69a13f0ac hwr: port glrage brightness patch 2021-10-24 19:12:15 +02:00
rr-
e47a4a5581 port HWR_DrawFlatTriangle 2021-10-24 19:12:15 +02:00
rr-
80f89a1674 port HWR_InsertObjectGT4 2021-10-24 19:12:15 +02:00
rr-
120325faae port HWR_InsertObjectGT3 2021-10-24 19:12:15 +02:00
rr-
8657f6eceb port HWR_InsertObjectG3 2021-10-24 19:12:15 +02:00
rr-
764168016e port HWR_InsertObjectG4 2021-10-24 19:12:15 +02:00
rr-
65c573619d port HWR_SelectTexture 2021-10-24 19:12:15 +02:00
rr-
6647d9e3e2 docs: mark DoNothing as decompiled
Its only usage was in PrintRooms, which is fully decompiled and working.
2021-10-24 19:12:15 +02:00
rr-
88cddcd971 port HWR_ClearSurfaceDepth 2021-10-24 19:12:15 +02:00
rr-
1fa5bd3ed5 port HWR_FMVInit 2021-10-24 19:12:15 +02:00
rr-
5b9b063758 port HWR_FMVDone 2021-10-24 19:12:15 +02:00
rr-
1198bbe41c port HWR_PrepareFMV 2021-10-24 19:12:15 +02:00
rr-
27b9ec466b port HWR_ShutdownHardware 2021-10-24 19:12:15 +02:00
rr-
e40849766e port HWR_InitialiseHardware 2021-10-24 19:12:15 +02:00
rr-
f79459b48f port HWR_ReleaseSurfaces 2021-10-24 19:12:15 +02:00
rr-
1f8567dd35 port HWR_GetSurfaceAndPitch 2021-10-24 19:12:15 +02:00
rr-
d913886d4b docs: mark HWR_SetupRenderContextAndRender2 as decompiled
It was inlined in HWR_SetHardwareVideoMode.
2021-10-24 19:12:15 +02:00
rr-
d4a963dcdc port HWR_PrintShadow 2021-10-24 19:12:15 +02:00
Marcin Kurczewski
1d3ac7ee09
docs: improve development guidelines 2021-10-23 00:00:39 +02:00
oziphantom
36288025a1
camera: add manual camera control 2021-10-22 16:41:41 +02:00
Marcin Kurczewski
5f7d908508
ci: automatically check formatting 2021-10-21 00:56:30 +02:00
rr-
44362e70d5
scripts: extend IDA importer 2021-10-19 23:46:12 +02:00
rr-
74edcabd1b
file: use sizeof() 2021-10-19 19:53:14 +02:00
rr-
6f9e1b1bc3
misc: use WALL_L constants 2021-10-19 19:50:47 +02:00
rr-
78377ba600
style: remove garbage comments 2021-10-19 18:04:04 +02:00
rr-
77e904e56d
build: simplify build pipeline a bit 2021-10-19 17:24:18 +02:00
rr-
f871f298a7
build: add pre-commit hooks 2021-10-19 16:54:06 +02:00
rr-
1e913b4a2d
objects: always initialise doors
This is a regression from cb928f93. It broke the demo playback after we
had started the game once – the door would remain not closed and it
would destroy wolves' pathfinding . At the same time it only makes sense
to do the anti-void check when closing the door during the game, not
immediately after loading a level or a save.

Closes #124
2021-10-19 16:10:57 +02:00
rr-
4aec137a6a
misc: bypass clang warning
Clang emits pointless warnings:

src/specific/ati.h:460:18: warning: function with no prototype cannot use the stdcall calling convention [-Wmissing-prototype-for-cc]

Turns out it's a bug in clang:

https://lists.llvm.org/pipermail/llvm-bugs/2016-May/047139.html

It can be worked around by adding dummy void parameter to the arglist.
2021-10-19 13:32:55 +02:00
rr-
2c00991535
misc: add *.def to gitignore 2021-10-19 13:28:24 +02:00
rr-
b96daac6de
misc: fix OG buffer overflow
Closes #134
2021-10-19 13:20:37 +02:00
oziphantom
fdf5f155fe
misc: MSVC build fixes
* Warning fix

taking the negative of a unsigned value is still positive on MSVC it seems. So I cast it to a signed value first.

* MSVC weirdness

for some reason maths.h doesn't define M_PI and you have to set this define to make it
Also in the ongoing war with "things other than MS" it will complain that strdup is not a true C standard name and you have to use _strdup, which gcc won't accept, so I just typedef.

* cannot perform maths on type void

gcc defaults void to a 1 byte pointer, so I cast to a char* here to perform the same result on other compilers.

* remove the mess VS makes

This removed all of the VS build folders and debug output. I've also included the sln, at the moment I don't think it is ready for everybody to use.
Fixed paths in the sln ( not sure if I can solve it, but there might be a better way to solve it )
Doesn't run the python build step, not a deal breaker for the most part but somebody doing a fresh grab would end up running into the issue and this will cause  problems for them.
But this will allow me to move between branches and cherry pick check-ins again.

* change GameAllocMemPointer to char*

This allows the + and -  maths done on alloc and free to compile in all compilers.
2021-10-19 01:13:03 +02:00