Skip to content

Commit bdec3f3

Browse files
committed
DOS 3dfx port.
1 parent ae27c6d commit bdec3f3

85 files changed

Lines changed: 910 additions & 4827 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "src/dos-opengl"]
2+
path = src/dos-opengl
3+
url = https://github.com/Franticware/dos-opengl

README.md

Lines changed: 6 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# OpenMRac
22

3-
[![OpenMRac youtube video](media/openmrac-yt.jpg)](https://youtu.be/r3hLTo5Nu1g)
3+
![Screenshot](media/openmrac-3dfx-0.png)
44

55
OpenMRac is a split-screen racing game. It is a tweaked source release of [MultiRacer](https://www.franticware.com/multiracer).
66

7-
Programming was done by Vojtěch Salajka.
7+
Programming was done by Vojtěch Salajka.
88
Porting to big endian architectures for Amiga-like OSes was done by [Szilárd Biró](https://github.com/BSzili).
99

1010
⚠️ Beware! The source code is old and messy, plus most comments are in Czech 😁
@@ -15,59 +15,10 @@ Franticware claims rights to the name "MultiRacer" which should not be used by o
1515

1616
Game data files are in a separate repository under a different license: https://github.com/Franticware/OpenMRac-data
1717

18-
# Installation Instructions
18+
# DOS 3dfx Version
1919

20-
## Windows
20+
This branch contains DOS/DJGPP port of OpenMRac. It was tested working on DOS with 3dfx Voodoo 1, 486DX2 66 MHz, where it runs very slowly with audio stuttering, but seems stable. The screenshots were taken on real hardware.
2121

22-
Download here: https://www.franticware.com/openmrac
22+
It was also tested in DOSBox-X, where it is unstable. When it runs, the audio is OK.
2323

24-
## Linux
25-
26-
### Arch-based (Arch, Manjaro, EndeavourOS, ...)
27-
28-
Install **openmrac** package from AUR
29-
30-
### Debian-based (Debian, Raspberry Pi OS, Ubuntu, MX Linux, Mint, ...)
31-
32-
* Install **sox**
33-
* Install development packages for OpenGL, OpenAL, SDL 1.2, jpeg, png
34-
* Run the following to generate **openmrac.deb** package:
35-
36-
```
37-
mkdir openmrac-deb
38-
cd openmrac-deb
39-
git clone https://github.com/Franticware/OpenMRac.git
40-
git clone https://github.com/Franticware/OpenMRac-data.git
41-
cd OpenMRac/src
42-
make -f Makefile.linux deb
43-
cd ../../..
44-
```
45-
46-
* Install the package:
47-
48-
```
49-
sudo dpkg -i openmrac-deb/OpenMRac/src/debian/openmrac.deb
50-
```
51-
52-
Notes:
53-
54-
* For simplicity, the resulting package contains both binary and data files. Packagers for Linux distributions will probably want to create a separate package for game data. See existing [AUR packages](https://aur.archlinux.org/packages?O=0&K=openmrac) for inspiration.
55-
56-
* RFP for Debian can be found here: https://wiki.debian.org/Games/Suggested#OpenMRac
57-
58-
### Other (openSUSE, Fedora, ...)
59-
60-
```
61-
git clone https://github.com/Franticware/OpenMRac-data.git
62-
cd OpenMRac-data
63-
make install
64-
cd ..
65-
66-
git clone https://github.com/Franticware/OpenMRac.git
67-
cd OpenMRac/src
68-
make -f Makefile.linux install
69-
cd ../..
70-
```
71-
72-
## Mac OS X
73-
TODO
24+
![Screenshot](media/openmrac-3dfx-1.png)

media/openmrac-3dfx-0.png

223 KB
Loading

media/openmrac-3dfx-1.png

243 KB
Loading

media/openmrac-yt.jpg

-121 KB
Binary file not shown.

src/3dm.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ void T3dm::load(const char* fname, const char** o_names)
136136
{
137137
if (!gbuff_in.fgets(buff, 1024)) { b_eof = true; break; }
138138
// textury se zahazují (dodělat)
139-
strncpy(p_m[i+1], buff, 255);
139+
//strncpy(p_m[i+1], buff, 255);
140+
memcpy(p_m[i+1], buff, 255); p_m[i+1][255] = 0;
140141
p_m[i+1][255] = '\0';
141142
for (int j = strlen(p_m[i+1]); j != 0; --j)
142143
{

src/CWSDSTUB.EXE

22 KB
Binary file not shown.

src/Makefile.amiga

Lines changed: 0 additions & 78 deletions
This file was deleted.

src/Makefile.djgpp

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#ARCH = -march=i386 -mtune=i486
2+
ARCH =
3+
CFLAGS = \
4+
-DM_PI=3.14159265358979323846 \
5+
-I./dos-opengl/include \
6+
-I./dos-opengl/include/dmesa \
7+
-I./djgpp/jpeg \
8+
-I./djgpp/libpng \
9+
-O2 -Wall -Wextra -fno-exceptions -DNDEBUG $(ARCH)
10+
11+
LFLAGS = \
12+
-L./djgpp/jpeg/.libs -ljpeg \
13+
./djgpp/libpng/libpng16_static.lib \
14+
-L./djgpp/zlib -lz \
15+
-L./dos-opengl/lib/allegro -lalleg \
16+
-L./dos-opengl/lib/dmesa -L./dos-opengl/lib/glide3/ -lgl -lglide3i
17+
18+
CXX = i586-pc-msdosdjgpp-g++
19+
LINK = i586-pc-msdosdjgpp-g++
20+
EXE2COFF = /home/vojta/djgpp/i586-pc-msdosdjgpp/bin/exe2coff
21+
INTERM = interm
22+
TARGET = openmrac.exe
23+
OBJS := $(shell ls *.cpp | sed 's/.cpp/.djgpp.o/g' | tr '\n' ' ')
24+
25+
.PHONY: all clean
26+
27+
all: $(TARGET)
28+
29+
clean:
30+
rm -f *.o $(TARGET) $(INTERM).exe $(INTERM)
31+
32+
%.djgpp.o: %.cpp *.h
33+
$(CXX) -c $(CFLAGS) -o $@ $<
34+
35+
$(TARGET): $(OBJS)
36+
$(LINK) -o $(INTERM).exe $(OBJS) $(LFLAGS)
37+
$(EXE2COFF) $(INTERM).exe
38+
cat CWSDSTUB.EXE $(INTERM) > $(TARGET)

src/Makefile.haiku

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)