Compare commits
278
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4676885521 | ||
|
|
df10855483 | ||
|
|
dc6bf05f35 | ||
|
|
871545024d | ||
|
|
aeb172f2ab | ||
|
|
4fccb48d2a | ||
|
|
3e0150d4f3 | ||
|
|
7c1f17bb8d | ||
|
|
c8ae4a89d9 | ||
|
|
42b1f849c0 | ||
|
|
c0f24ebbbc | ||
|
|
de73c53665 | ||
|
|
908e073628 | ||
|
|
eaee95a026 | ||
|
|
456a380e3a | ||
|
|
c428472c6f | ||
|
|
feff5a7c17 | ||
|
|
ae306351ba | ||
|
|
03de30df3e | ||
|
|
e45c72f525 | ||
|
|
36c43d89e6 | ||
|
|
f34a47c50d | ||
|
|
24895874ed | ||
|
|
129f88b6a7 | ||
|
|
cb5c4e482e | ||
|
|
db2062ed1d | ||
|
|
45ee50b47d | ||
|
|
694a8eeb69 | ||
|
|
908bba2c8a | ||
|
|
88363cf45d | ||
|
|
509e7140e3 | ||
|
|
056f919bbe | ||
|
|
548cad76b2 | ||
|
|
e26fb91350 | ||
|
|
28685ea658 | ||
|
|
a69df8807d | ||
|
|
26fc417555 | ||
|
|
bb3dd435f0 | ||
|
|
16a531272f | ||
|
|
ba5b79e48a | ||
|
|
59470ddbd4 | ||
|
|
82c4191516 | ||
|
|
8a305d3c79 | ||
|
|
7c507c7b3b | ||
|
|
ca27dad6c1 | ||
|
|
383d55cac6 | ||
|
|
0e2ffdeb1d | ||
|
|
b84d101337 | ||
|
|
852aa74d62 | ||
|
|
aa06459c09 | ||
|
|
c07502bf5a | ||
|
|
f751161693 | ||
|
|
ed16c4fd9f | ||
|
|
41407538d4 | ||
|
|
5f394cd938 | ||
|
|
e5bae89d0f | ||
|
|
f749800276 | ||
|
|
5289027272 | ||
|
|
77f4d4ef3b | ||
|
|
a94740f5e9 | ||
|
|
ab27090ecf | ||
|
|
93d0106c28 | ||
|
|
27433f6fb5 | ||
|
|
f8e5049d76 | ||
|
|
2009cdeaeb | ||
|
|
0f43f19b71 | ||
|
|
1ac7852bd2 | ||
|
|
f5e7b65ae0 | ||
|
|
4c5d34e82c | ||
|
|
0dad927c05 | ||
|
|
f231417465 | ||
|
|
51b8dc9101 | ||
|
|
71e9c4f5af | ||
|
|
1acae3e4af | ||
|
|
4c04d09d18 | ||
|
|
b99cd88947 | ||
|
|
4a786449c4 | ||
|
|
aef6dcdbc9 | ||
|
|
0e9ec096c2 | ||
|
|
50ce3c4431 | ||
|
|
c6c1dbd066 | ||
|
|
ece8d9e80c | ||
|
|
fdcbd276e9 | ||
|
|
6d77672ee3 | ||
|
|
28aec6cad5 | ||
|
|
1f028f523e | ||
|
|
349bf06e4b | ||
|
|
e044db73f5 | ||
|
|
7555d689db | ||
|
|
a6438da531 | ||
|
|
8c6893cff6 | ||
|
|
af03b51191 | ||
|
|
178d8b7b53 | ||
|
|
de99a3036d | ||
|
|
5c613f6c8f | ||
|
|
59628377fa | ||
|
|
278f3c3ef6 | ||
|
|
3ba1596976 | ||
|
|
02f6fa0665 | ||
|
|
f4aec1d591 | ||
|
|
5c2a87dea6 | ||
|
|
d5aa9ae0f1 | ||
|
|
6096822cbb | ||
|
|
0030367649 | ||
|
|
66f67c91e8 | ||
|
|
c73c1af2d5 | ||
|
|
638e95325a | ||
|
|
66ce745e91 | ||
|
|
2b39d137b4 | ||
|
|
1ed616dcef | ||
|
|
24ef2819b0 | ||
|
|
a9732e9564 | ||
|
|
c262d3f532 | ||
|
|
ae456fee31 | ||
|
|
68f69049d4 | ||
|
|
e180918e48 | ||
|
|
951c090b35 | ||
|
|
a87e07155a | ||
|
|
da16ce3a23 | ||
|
|
64bdae5e5d | ||
|
|
4f91a0b234 | ||
|
|
bb0a59540f | ||
|
|
dd9d6de0d6 | ||
|
|
3de4c7cbad | ||
|
|
0eeacaf51e | ||
|
|
a4684b3004 | ||
|
|
9c014eb2ea | ||
|
|
37579187cc | ||
|
|
af8ce028ba | ||
|
|
9310a68cff | ||
|
|
89b8121282 | ||
|
|
b2260bbebb | ||
|
|
6a9aea4dd1 | ||
|
|
6f4dfb35fa | ||
|
|
459b2e62ce | ||
|
|
5765f3df5a | ||
|
|
8488da4b1a | ||
|
|
c82495f48b | ||
|
|
f55b8793ec | ||
|
|
b0b048c703 | ||
|
|
b7f1a0b631 | ||
|
|
513613d83b | ||
|
|
f2afc5135c | ||
|
|
3783e30a8a | ||
|
|
ff80a34627 | ||
|
|
38c96d5ec2 | ||
|
|
2ec467f062 | ||
|
|
b3106d55d1 | ||
|
|
90c3d02dbf | ||
|
|
48dc5461cd | ||
|
|
0843a586f8 | ||
|
|
8c8f96cf49 | ||
|
|
55afe9be7e | ||
|
|
fe54f2fba2 | ||
|
|
b12989f51c | ||
|
|
57990100c5 | ||
|
|
32504b9e8e | ||
|
|
ba3404d823 | ||
|
|
c9f50ca0c8 | ||
|
|
b6943ce92e | ||
|
|
41b78feef5 | ||
|
|
c9b6276a02 | ||
|
|
39a5165d91 | ||
|
|
e5a03dc3bb | ||
|
|
4deebf8912 | ||
|
|
fa8901f6b0 | ||
|
|
23512f0a6c | ||
|
|
b44548b7ac | ||
|
|
955812bd8d | ||
|
|
e4ac394d29 | ||
|
|
2b6185d7d6 | ||
|
|
2753052ee7 | ||
|
|
3c9292c137 | ||
|
|
e68136de3e | ||
|
|
e852c23441 | ||
|
|
031e8ee477 | ||
|
|
d7422b8ec9 | ||
|
|
0bbd8246cc | ||
|
|
9e8ddd5f9e | ||
|
|
3964d4e188 | ||
|
|
005af4362e | ||
|
|
f817676033 | ||
|
|
79140b3bdc | ||
|
|
48722ef591 | ||
|
|
6be5478fa8 | ||
|
|
953d9d15d6 | ||
|
|
0c56755e09 | ||
|
|
c166075754 | ||
|
|
90ff1c4fc0 | ||
|
|
1d0fedddfd | ||
|
|
f5b60c3f36 | ||
|
|
78ad3e9710 | ||
|
|
b03d5c53ed | ||
|
|
c5dce0e785 | ||
|
|
f85c7ef961 | ||
|
|
4d211f8f82 | ||
|
|
8d3435291b | ||
|
|
8f007155cd | ||
|
|
58a38ac6c4 | ||
|
|
1e1dbfc450 | ||
|
|
2eac9fc295 | ||
|
|
4416be2ddc | ||
|
|
10b52c11ac | ||
|
|
db732bd1bd | ||
|
|
146d4da72c | ||
|
|
20c570c97c | ||
|
|
e550edb93e | ||
|
|
fac4d3c2c0 | ||
|
|
7d2bcbd1ee | ||
|
|
f3bbb5af56 | ||
|
|
8e8ef04860 | ||
|
|
98b105c02a | ||
|
|
ccdb73f861 | ||
|
|
9cb150b8eb | ||
|
|
e6af82f450 | ||
|
|
7400eeac2a | ||
|
|
2656a87e46 | ||
|
|
202e24c69c | ||
|
|
c7d78fe948 | ||
|
|
f381239825 | ||
|
|
394beb7533 | ||
|
|
2ea1ac9331 | ||
|
|
34f8181e56 | ||
|
|
ab13b28106 | ||
|
|
7e5019bd36 | ||
|
|
423ca0eca0 | ||
|
|
939354f483 | ||
|
|
418ee2ce5f | ||
|
|
934184a006 | ||
|
|
e94ef8d9c3 | ||
|
|
ba985248ea | ||
|
|
65bd06aae5 | ||
|
|
2434acf825 | ||
|
|
b85a718500 | ||
|
|
a0e023527c | ||
|
|
a6dce95eca | ||
|
|
f05ac73df6 | ||
|
|
c90fe4627b | ||
|
|
0efedae2c3 | ||
|
|
a6d6c03a58 | ||
|
|
2d5664b54a | ||
|
|
a25b3f6e59 | ||
|
|
9edcbe22f4 | ||
|
|
8f4385c39b | ||
|
|
e383b0885d | ||
|
|
adcd62ed59 | ||
|
|
7cdf69c6a1 | ||
|
|
ee12d25a8f | ||
|
|
881c9f8e43 | ||
|
|
b1ac9f94cd | ||
|
|
9ab4d01b8c | ||
|
|
7378ca8479 | ||
|
|
a87a7ccbda | ||
|
|
4a5449905b | ||
|
|
3c8bdd7862 | ||
|
|
9b26f1fdcb | ||
|
|
76560f4179 | ||
|
|
f48fdda3f3 | ||
|
|
2c73593fcd | ||
|
|
4613ec48b3 | ||
|
|
3269b62225 | ||
|
|
7e8f6d759c | ||
|
|
75cfd382f6 | ||
|
|
e524d3edab | ||
|
|
8c9fb9f146 | ||
|
|
ff2fc6170d | ||
|
|
f27cb0ba8f | ||
|
|
58705fb184 | ||
|
|
487b71f82c | ||
|
|
2b1b4544f9 | ||
|
|
af1507b530 | ||
|
|
a193604d0f | ||
|
|
e359c8dcd0 | ||
|
|
f0d2685a60 | ||
|
|
f3de6c15eb | ||
|
|
53cea0a835 | ||
|
|
4b4d038ac8 | ||
|
|
9ba305eb77 |
No files matched your search
@@ -1,73 +0,0 @@
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
working_directory: /root/SRB2
|
||||
docker:
|
||||
- image: debian:stretch
|
||||
environment:
|
||||
CC: ccache gcc -m32
|
||||
PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig
|
||||
LIBGME_CFLAGS: -I/usr/include
|
||||
LIBGME_LDFLAGS: -lgme
|
||||
CCACHE_COMPRESS: true
|
||||
WFLAGS: -Wno-unsuffixed-float-constants
|
||||
GCC49: true
|
||||
#- image: ubuntu:trusty
|
||||
# environment:
|
||||
# CC: ccache gcc -m32
|
||||
# PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig
|
||||
# LIBGME_CFLAGS: -I/usr/include
|
||||
# LIBGME_LDFLAGS: -lgme
|
||||
# CCACHE_COMPRESS: true
|
||||
# WFLAGS: -Wno-unsuffixed-float-constants
|
||||
# GCC48: true
|
||||
steps:
|
||||
- run:
|
||||
name: Add i386 arch
|
||||
command: dpkg --add-architecture i386
|
||||
- run:
|
||||
name: Add STJr PPA
|
||||
command: |
|
||||
apt-get -qq update
|
||||
apt-get -qq -y install dirmngr
|
||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0B1702D71499D9C25F986507F240F4449D3B0EC6
|
||||
echo "deb http://ppa.launchpad.net/stjr/srb2/ubuntu trusty main" >> /etc/apt/sources.list
|
||||
- run:
|
||||
name: Update APT listing
|
||||
command: apt-get -qq update
|
||||
- run:
|
||||
name: Support S3 upload
|
||||
command: apt-get -qq -y install ca-certificates
|
||||
- restore_cache:
|
||||
keys:
|
||||
- v1-SRB2-APT
|
||||
- run:
|
||||
name: Install SDK
|
||||
command: apt-get -qq -y --no-install-recommends install git build-essential libpng-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 libcurl4-openssl-dev:i386 libopenmpt-dev:i386 gettext ccache wget gcc-multilib upx openssh-client
|
||||
- save_cache:
|
||||
key: v1-SRB2-APT
|
||||
paths:
|
||||
- /var/cache/apt/archives
|
||||
- checkout
|
||||
#- run:
|
||||
# name: Compile without network support and BLUA
|
||||
# command: make -C src LINUX=1 ERRORMODE=1 -k NONET=1 NO_LUA=1
|
||||
#- run:
|
||||
# name: wipe build
|
||||
# command: make -C src LINUX=1 cleandep
|
||||
- run:
|
||||
name: rebuild depend
|
||||
command: make -C src LINUX=1 clean
|
||||
- restore_cache:
|
||||
keys:
|
||||
- v1-SRB2-{{ .Branch }}-{{ checksum "objs/Linux/SDL/Release/depend.dep" }}
|
||||
- run:
|
||||
name: Compile
|
||||
command: make -C src LINUX=1 ERRORMODE=1 -k
|
||||
- store_artifacts:
|
||||
path: /root/SRB2/bin/Linux/Release/
|
||||
destination: bin
|
||||
- save_cache:
|
||||
key: v1-SRB2-{{ .Branch }}-{{ checksum "objs/Linux/SDL/Release/depend.dep" }}
|
||||
paths:
|
||||
- /root/.ccache
|
||||
-436
@@ -1,436 +0,0 @@
|
||||
default:
|
||||
image: debian:stable-slim
|
||||
|
||||
stages: # List of stages for jobs, and their order of execution
|
||||
- build
|
||||
|
||||
variables:
|
||||
GIT_STRATEGY: clone
|
||||
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH
|
||||
|
||||
.job_template: &job_build # This job runs in the build stage, which runs first.
|
||||
|
||||
stage: build
|
||||
|
||||
cache:
|
||||
- key: ccache-$CI_PROJECT_PATH_SLUG-$CI_JOB_NAME_SLUG
|
||||
fallback_keys:
|
||||
- cache-$CI_PROJECT_PATH_SLUG-$CI_DEFAULT_BRANCH
|
||||
- cache-$CI_PROJECT_PATH_SLUG-default
|
||||
paths:
|
||||
- ccache
|
||||
- ccache_statslog
|
||||
|
||||
- key: apt-$CI_JOB_IMAGE
|
||||
paths:
|
||||
- apt-cache
|
||||
unprotect: true
|
||||
|
||||
before_script:
|
||||
- - |
|
||||
# debconf
|
||||
echo -e "\e[0Ksection_start:`date +%s`:debconf[collapsed=true]\r\e[0KSetup debconf's environment"
|
||||
- export DEBIAN_FRONTEND="noninteractive"
|
||||
- export DEBIAN_PRIORITY="low"
|
||||
- export DEBCONF_NONINTERACTIVE_SEEN="true"
|
||||
- |
|
||||
# debconf
|
||||
echo -e "\e[0Ksection_end:`date +%s`:debconf\r\e[0K"
|
||||
- - |
|
||||
# dpkg_aa
|
||||
echo -e "\e[0Ksection_start:`date +%s`:dpkg_aa[collapsed=true]\r\e[0KAdding architectures to dpkg"
|
||||
- dpkg --add-architecture i386
|
||||
- dpkg --add-architecture amd64
|
||||
- dpkg --add-architecture arm64
|
||||
- |
|
||||
# dpkg_aa
|
||||
echo -e "\e[0Ksection_end:`date +%s`:dpkg_aa\r\e[0K"
|
||||
- - |
|
||||
# apt_conf
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_conf[collapsed=true]\r\e[0KSetting up APT conf"
|
||||
- export APT_CACHE_DIR=`pwd`/apt-cache
|
||||
- mkdir --parents --verbose $APT_CACHE_DIR/partial/
|
||||
- touch /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# apt.conf
|
||||
echo Adding options to apt.conf':'
|
||||
- |
|
||||
# APT::Install-Recommends
|
||||
echo APT::Install-Recommends "false"\; | tee --append /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# quit
|
||||
echo quiet "1"\; | tee --append /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# APT::Get::Assume-Yes
|
||||
echo APT::Get::Assume-Yes "true"\; | tee --append /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# Dir::Cache::Archives
|
||||
echo Dir::Cache::Archives "$APT_CACHE_DIR"\; | tee --append /etc/apt/apt.conf.d/99build
|
||||
- |
|
||||
# apt_conf
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_conf\r\e[0K"
|
||||
- - |
|
||||
# apt_update
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_update[collapsed=true]\r\e[0KUpdating APT listing"
|
||||
- apt-get update
|
||||
- |
|
||||
# apt_update
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_update\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_pre
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_pre[collapsed=true]\r\e[0KInstalling pre packages"
|
||||
- apt-get install apt-utils
|
||||
- |
|
||||
# apt_pre
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_pre\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_upgrade
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_upgrade[collapsed=true]\r\e[0KUpdating existing packages"
|
||||
- apt-get upgrade
|
||||
- |
|
||||
# apt_update
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_upgrade\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_common
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_common[collapsed=true]\r\e[0KInstalling common packages"
|
||||
- apt-get install make git ccache
|
||||
- |
|
||||
# apt_common
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_common\r\e[0K"
|
||||
|
||||
- - |
|
||||
# ccache_config
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config"
|
||||
- mkdir --parents --verbose ~/.ccache/
|
||||
- touch ~/.ccache/ccache.conf
|
||||
- |
|
||||
# cache.conf
|
||||
echo Adding ccache configution option
|
||||
- |
|
||||
# base_dir
|
||||
echo base_dir = $PWD | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# cache_dir
|
||||
echo cache_dir = $PWD/ccache | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# compiler_check
|
||||
echo compiler_check = content | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# stats_log
|
||||
echo stats_log = $PWD/ccache_statslog | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# max_size
|
||||
echo max_size = 50M | tee --append ~/.ccache/ccache.conf
|
||||
- |
|
||||
# ccache_config
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K"
|
||||
|
||||
- - |
|
||||
# cache_reset
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_reset[collapsed=true]\r\e[0KResetting ccache statistics"
|
||||
- ccache --zero-stats
|
||||
- ccache --show-stats
|
||||
- |
|
||||
# ccache_reset
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_reset\r\e[0K"
|
||||
|
||||
after_script:
|
||||
- - |
|
||||
# apt_clean
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages"
|
||||
- apt-get autoclean
|
||||
- |
|
||||
# apt_clean
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K"
|
||||
|
||||
- - |
|
||||
# ccache_stats
|
||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:"
|
||||
- ccache --show-stats --verbose
|
||||
- ccache --show-log-stats --verbose
|
||||
- |
|
||||
# ccahe_stats
|
||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K"
|
||||
|
||||
Debian testing GCC:
|
||||
<<: *job_build
|
||||
image: debian:testing-slim
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian GCC testing"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-gcc"
|
||||
|
||||
variables:
|
||||
CC: gcc
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Windows x86:
|
||||
<<: *job_build
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32"
|
||||
|
||||
variables:
|
||||
PREFIX: i686-w64-mingw32
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-mingw-w64-i686-win32
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 SDL=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW=1 SDL=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian stable:amd64:
|
||||
<<: *job_build
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian amd64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64"
|
||||
|
||||
variables:
|
||||
CC: x86_64-linux-gnu-gcc
|
||||
OBJCOPY: x86_64-linux-gnu-objcopy
|
||||
OBJDUMP: x86_64-linux-gnu-objdump
|
||||
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-x86-64-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian stable:i386:
|
||||
<<: *job_build
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian i386"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686"
|
||||
|
||||
variables:
|
||||
CC: i686-linux-gnu-gcc
|
||||
OBJCOPY: i686-linux-gnu-objcopy
|
||||
OBJDUMP: i686-linux-gnu-objdump
|
||||
PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-i686-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian stable:arm64:
|
||||
<<: *job_build
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian arm64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-aarch64"
|
||||
|
||||
variables:
|
||||
CC: aarch64-linux-gnu-gcc
|
||||
OBJCOPY: aarch64-linux-gnu-objcopy
|
||||
OBJDUMP: aarch64-linux-gnu-objdump
|
||||
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-aarch64-linux-gnu || apt-get install gcc
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 LINUX64=1 NONX86=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Windows x64:
|
||||
<<: *job_build
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Win64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64"
|
||||
|
||||
variables:
|
||||
PREFIX: x86_64-w64-mingw32
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install gcc-mingw-w64-x86-64-win32
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 SDL=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 MINGW64=1 SDL=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian stable Clang:
|
||||
<<: *job_build
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debian Clang"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang"
|
||||
|
||||
variables:
|
||||
CC: clang
|
||||
WFLAGS: -Wno-cast-align
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||
- apt-get install clang
|
||||
- |
|
||||
# apt_toolchain
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
|
||||
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1 || make --directory=src --keep-going CCACHE=1 ERRORMODE=1 NONX86=1
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
Debian testing Clang:
|
||||
extends: Debian stable Clang
|
||||
|
||||
image: debian:testing-slim
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "bin/"
|
||||
- "src/comptime.h"
|
||||
expose_as: "Debina Clang testing"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-clang"
|
||||
|
||||
variables:
|
||||
CC: clang
|
||||
WFLAGS: -Wno-cast-align -Wno-deprecated-non-prototype
|
||||
-712
@@ -1,712 +0,0 @@
|
||||
# Travis-CI Config
|
||||
#
|
||||
# You may use the Deployer to upload packages and builds to external servers.
|
||||
# See deployer/travis/deployer_defaults.sh for environment variables to configure.
|
||||
|
||||
language: c
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
matrix:
|
||||
include:
|
||||
################################
|
||||
# Test Buildbots
|
||||
# Deployer does not operate on these. See Deployer Buildbots, below.
|
||||
# These bots are disabled when a deployment is triggered by 'deployer' branch name AND DPL_TERMINATE_TESTS=1.
|
||||
# These bots remain enabled when a deployment is triggered by release tag.
|
||||
################################
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.4
|
||||
compiler: gcc-4.4
|
||||
env: GCC44=1
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#gcc-4.4 (Ubuntu/Linaro 4.4.7-8ubuntu1) 4.4.7
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.6
|
||||
compiler: gcc-4.6
|
||||
env: GCC46=1
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#gcc-4.6 (Ubuntu/Linaro 4.6.4-6ubuntu2) 4.6.4
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.7
|
||||
compiler: gcc-4.7
|
||||
env: GCC47=1
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#gcc-4.7
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
env: GCC48=1
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.8
|
||||
compiler: gcc-4.8
|
||||
env: GCC48=1
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-7
|
||||
compiler: gcc-7
|
||||
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wno-implicit-fallthrough" GCC72=1
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#gcc-7 (Ubuntu 7.2.0-1ubuntu1~14.04) 7.2.0 20170802
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-8
|
||||
compiler: gcc-8
|
||||
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wno-implicit-fallthrough -Wno-error=format-overflow -Wno-error=format-truncation" GCC81=1
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#gcc-8 (Ubuntu 7.2.0-1ubuntu1~14.04) 8.1.0
|
||||
- os: linux
|
||||
compiler: clang
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#clang version 3.5.0 (tags/RELEASE_350/final)
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- llvm-toolchain-precise-3.5
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- clang-3.5
|
||||
compiler: clang-3.5
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#Ubuntu clang version 3.5.0-4ubuntu2~trusty2 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- llvm-toolchain-precise-3.6
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- clang-3.6
|
||||
compiler: clang-3.6
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#Ubuntu clang version 3.6.2-svn240577-1~exp1 (branches/release_36) (based on LLVM 3.6.2)
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- llvm-toolchain-precise-3.7
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- clang-3.7
|
||||
compiler: clang-3.7
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#Ubuntu clang version 3.7.1-svn253571-1~exp1 (branches/release_37) (based on LLVM 3.7.1)
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- llvm-toolchain-precise-3.8
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- clang-3.8
|
||||
compiler: clang-3.8
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#clang version 3.8.1-svn271127-1~exp1 (branches/release_38)
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- llvm-toolchain-precise-3.9
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- clang-3.9
|
||||
compiler: clang-3.9
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#clang version 3.9.X
|
||||
# - os: linux
|
||||
# addons:
|
||||
# apt:
|
||||
# sources:
|
||||
# - llvm-toolchain-precise-4.0
|
||||
# - ubuntu-toolchain-r-test
|
||||
# packages:
|
||||
# - libsdl2-mixer-dev
|
||||
# - libpng-dev
|
||||
# - libgl1-mesa-dev
|
||||
# - libgme-dev
|
||||
# - p7zip-full
|
||||
# - clang-4.0
|
||||
# compiler: clang-4.0
|
||||
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
# #clang version 4.0.X
|
||||
# - os: linux
|
||||
# addons:
|
||||
# apt:
|
||||
# sources:
|
||||
# - llvm-toolchain-precise-5.0
|
||||
# - ubuntu-toolchain-r-test
|
||||
# packages:
|
||||
# - libsdl2-mixer-dev
|
||||
# - libpng-dev
|
||||
# - libgl1-mesa-dev
|
||||
# - libgme-dev
|
||||
# - p7zip-full
|
||||
# - clang-5.0
|
||||
# compiler: clang-5.0
|
||||
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
# #clang version 5.0.X
|
||||
# - os: osx
|
||||
# osx_image: beta-xcode6.1
|
||||
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
# #Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
|
||||
# - os: osx
|
||||
# osx_image: beta-xcode6.2
|
||||
# compiler: gcc
|
||||
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
# #Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
|
||||
## - os: osx
|
||||
## osx_image: beta-xcode6.3
|
||||
## if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
## #I think xcode.6.3 VM is broken, it does not boot
|
||||
# - os: osx
|
||||
# osx_image: xcode6.4
|
||||
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
# #Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
|
||||
# - os: osx
|
||||
# osx_image: xcode7
|
||||
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
# #Apple LLVM version 7.0.0 (clang-700.0.72)
|
||||
# - os: osx
|
||||
# osx_image: xcode7.1
|
||||
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
# #Apple LLVM version 7.0.0 (clang-700.1.76)
|
||||
# - os: osx
|
||||
# osx_image: xcode7.2
|
||||
# if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
# #Apple LLVM version 7.0.2 (clang-700.1.81)
|
||||
# - os: osx
|
||||
# osx_image: xcode7.3
|
||||
# #Apple LLVM version 7.3.0 (clang-703.0.31)
|
||||
# - os: osx
|
||||
# osx_image: xcode7.3
|
||||
# #Apple LLVM version 7.3.0 (clang-703.0.31)
|
||||
- os: osx
|
||||
if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/
|
||||
#Default: macOS 10.13 and Xcode 9.4.1
|
||||
|
||||
|
||||
################################
|
||||
# Deployer Buildbots - OSX
|
||||
################################
|
||||
- os: osx
|
||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
AND env(DPL_TERMINATE_MAIN) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=osx
|
||||
- _DPL_FTP_TARGET=1
|
||||
- _DPL_PACKAGE_BINARY=1
|
||||
#Apple LLVM version 7.3.0 (clang-703.0.31)
|
||||
|
||||
|
||||
################################
|
||||
# Deployer Buildbots - Linux assets
|
||||
# Set DPL_TERMINATE_ASSETS to disable all of these
|
||||
# List Ubuntu LTS next, newest to oldest
|
||||
# Then list non-LTS, newest to oldest
|
||||
################################
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.8
|
||||
compiler: gcc-4.8
|
||||
dist: xenial
|
||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
AND env(DPL_TERMINATE_ASSETS) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=bionic-asset
|
||||
- _DPL_DPUT_TARGET=1
|
||||
- _DPL_PACKAGE_SOURCE=1
|
||||
- _DPL_PACKAGE_MAIN=0
|
||||
- _DPL_PACKAGE_ASSET=1
|
||||
- PACKAGE_DISTRO=bionic
|
||||
#- PACKAGE_SUBVERSION=~18.04bionic
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
|
||||
################################
|
||||
# The below asset bots produce packages that occupy too much space.
|
||||
# It would be nice if the asset files were not included in the source package itself,
|
||||
# so these can deploy to each Ubuntu target without manual intervention.
|
||||
#
|
||||
# Currently, to get around Launchpad's space limitation,
|
||||
# copy the packages from *one* bot and the space usage is not increased.
|
||||
################################
|
||||
# - os: linux
|
||||
# addons:
|
||||
# apt:
|
||||
# packages:
|
||||
# - libsdl2-mixer-dev
|
||||
# - libpng-dev
|
||||
# - libgl1-mesa-dev
|
||||
# - libgme-dev
|
||||
# - p7zip-full
|
||||
# - gcc-4.8
|
||||
# compiler: gcc-4.8
|
||||
# dist: trusty
|
||||
# if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
# AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
# AND env(DPL_TERMINATE_ASSETS) != "1"
|
||||
# env:
|
||||
# - _DPL_JOB_ENABLED=1
|
||||
# - _DPL_JOB_NAME=trusty-asset
|
||||
# - _DPL_DPUT_TARGET=1
|
||||
# - _DPL_PACKAGE_SOURCE=1
|
||||
# - _DPL_PACKAGE_MAIN=0
|
||||
# - _DPL_PACKAGE_ASSET=1
|
||||
# - PACKAGE_DISTRO=trusty
|
||||
# #- PACKAGE_SUBVERSION=~14.04trusty
|
||||
# #gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
# - os: linux
|
||||
# addons:
|
||||
# apt:
|
||||
# packages:
|
||||
# - libsdl2-mixer-dev
|
||||
# - libpng-dev
|
||||
# - libgl1-mesa-dev
|
||||
# - libgme-dev
|
||||
# - p7zip-full
|
||||
# - gcc-4.8
|
||||
# compiler: gcc-4.8
|
||||
# dist: xenial
|
||||
# if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
# AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
# AND env(DPL_TERMINATE_ASSETS) != "1"
|
||||
# env:
|
||||
# - _DPL_JOB_ENABLED=1
|
||||
# - _DPL_JOB_NAME=disco-asset
|
||||
# - _DPL_DPUT_TARGET=1
|
||||
# - _DPL_PACKAGE_SOURCE=1
|
||||
# - _DPL_PACKAGE_MAIN=0
|
||||
# - _DPL_PACKAGE_ASSET=1
|
||||
# - PACKAGE_DISTRO=disco
|
||||
# #- PACKAGE_SUBVERSION=~19.04disco
|
||||
# #gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
# - os: linux
|
||||
# addons:
|
||||
# apt:
|
||||
# packages:
|
||||
# - libsdl2-mixer-dev
|
||||
# - libpng-dev
|
||||
# - libgl1-mesa-dev
|
||||
# - libgme-dev
|
||||
# - p7zip-full
|
||||
# - gcc-4.8
|
||||
# compiler: gcc-4.8
|
||||
# dist: xenial
|
||||
# if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
# AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
# AND env(DPL_TERMINATE_ASSETS) != "1"
|
||||
# env:
|
||||
# - _DPL_JOB_ENABLED=1
|
||||
# - _DPL_JOB_NAME=cosmic-asset
|
||||
# - _DPL_DPUT_TARGET=1
|
||||
# - _DPL_PACKAGE_SOURCE=1
|
||||
# - _DPL_PACKAGE_MAIN=0
|
||||
# - _DPL_PACKAGE_ASSET=1
|
||||
# - PACKAGE_DISTRO=cosmic
|
||||
# #- PACKAGE_SUBVERSION=~18.10cosmic
|
||||
# #gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
# - os: linux
|
||||
# addons:
|
||||
# apt:
|
||||
# packages:
|
||||
# - libsdl2-mixer-dev
|
||||
# - libpng-dev
|
||||
# - libgl1-mesa-dev
|
||||
# - libgme-dev
|
||||
# - p7zip-full
|
||||
# - gcc-4.8
|
||||
# compiler: gcc-4.8
|
||||
# dist: xenial
|
||||
# if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
# AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
# AND env(DPL_TERMINATE_ASSETS) != "1"
|
||||
# env:
|
||||
# - _DPL_JOB_ENABLED=1
|
||||
# - _DPL_JOB_NAME=xenial-asset
|
||||
# - _DPL_DPUT_TARGET=1
|
||||
# - _DPL_PACKAGE_SOURCE=1
|
||||
# - _DPL_PACKAGE_MAIN=0
|
||||
# - _DPL_PACKAGE_ASSET=1
|
||||
# - PACKAGE_DISTRO=xenial
|
||||
# #- PACKAGE_SUBVERSION=~16.04xenial
|
||||
# #gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
|
||||
|
||||
################################
|
||||
# Deployer Buildbots - Linux binaries
|
||||
# List Ubuntu LTS, newest to oldest
|
||||
# Then list non-LTS, newest to oldest
|
||||
################################
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.8
|
||||
compiler: gcc-4.8
|
||||
dist: xenial
|
||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
AND env(DPL_TERMINATE_MAIN) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=focal
|
||||
- _DPL_DPUT_TARGET=1
|
||||
- _DPL_PACKAGE_SOURCE=1
|
||||
- PACKAGE_DISTRO=focal
|
||||
- PACKAGE_SUBVERSION=~20.04focal
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.8
|
||||
compiler: gcc-4.8
|
||||
dist: xenial
|
||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
AND env(DPL_TERMINATE_MAIN) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=bionic
|
||||
- _DPL_DPUT_TARGET=1
|
||||
- _DPL_PACKAGE_SOURCE=1
|
||||
- PACKAGE_DISTRO=bionic
|
||||
- PACKAGE_SUBVERSION=~18.04bionic
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.8
|
||||
compiler: gcc-4.8
|
||||
dist: xenial
|
||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
AND env(DPL_TERMINATE_MAIN) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=xenial
|
||||
- _DPL_DPUT_TARGET=1
|
||||
- _DPL_PACKAGE_SOURCE=1
|
||||
- PACKAGE_DISTRO=xenial
|
||||
- PACKAGE_SUBVERSION=~16.04xenial
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.8
|
||||
compiler: gcc-4.8
|
||||
dist: trusty
|
||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
AND env(DPL_TERMINATE_MAIN) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=trusty
|
||||
- _DPL_DPUT_TARGET=1
|
||||
- _DPL_PACKAGE_SOURCE=1
|
||||
- PACKAGE_DISTRO=trusty
|
||||
- PACKAGE_SUBVERSION=~14.04trusty
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
- gcc-4.8
|
||||
compiler: gcc-4.8
|
||||
dist: xenial
|
||||
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
|
||||
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
|
||||
AND env(DPL_TERMINATE_MAIN) != "1"
|
||||
env:
|
||||
- _DPL_JOB_ENABLED=1
|
||||
- _DPL_JOB_NAME=eoan
|
||||
- _DPL_DPUT_TARGET=1
|
||||
- _DPL_PACKAGE_SOURCE=1
|
||||
- PACKAGE_DISTRO=eoan
|
||||
- PACKAGE_SUBVERSION=~19.10eoan
|
||||
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
|
||||
allow_failures:
|
||||
- compiler: clang-3.5
|
||||
- compiler: clang-3.6
|
||||
- compiler: clang-3.7
|
||||
- compiler: clang-3.8
|
||||
- compiler: clang-3.9
|
||||
- compiler: clang-4.0
|
||||
- compiler: clang-5.0
|
||||
|
||||
|
||||
cache:
|
||||
apt: true
|
||||
ccache: true
|
||||
directories:
|
||||
- $HOME/srb2_cache
|
||||
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- zlib1g-dev
|
||||
- libcurl4-openssl-dev
|
||||
- p7zip-full
|
||||
homebrew:
|
||||
taps:
|
||||
- mazmazz/srb2
|
||||
packages:
|
||||
- sdl2_mixer
|
||||
- game-music-emu
|
||||
- p7zip
|
||||
- cmake
|
||||
- curl
|
||||
update: true
|
||||
|
||||
|
||||
|
||||
before_install:
|
||||
# Initialize Deployer defaults
|
||||
- . ./deployer/travis/deployer_defaults.sh
|
||||
|
||||
# Initialize Deployer; check if Deployer is enabled
|
||||
# This needs to be run in the current shell so that $__DPL_ACTIVE is set for this session
|
||||
- . ./deployer/travis/deployer.sh
|
||||
|
||||
# Also check if we should now terminate -- see `deployer.sh` for conditions.
|
||||
# This should never happen on non-release buildbots when Deployer is not triggered.
|
||||
- if [[ "$__DPL_TRY_TERMINATE_EARLY" == "1" ]]; then
|
||||
if [[ "$__DPL_ACTIVE" != "1" ]]; then
|
||||
echo "Exiting early because this job is not deploying.";
|
||||
exit;
|
||||
fi;
|
||||
fi
|
||||
|
||||
# If we're triggered by release tag, force ASSET_FILES_OPTIONAL_GET=1
|
||||
- if [[ "$__DPL_TAG_ELIGIBLE" = "1" ]]; then
|
||||
ASSET_FILES_OPTIONAL_GET=1;
|
||||
fi;
|
||||
|
||||
|
||||
install:
|
||||
# Install OS X library dependencies via Homebrew
|
||||
# Do this differently for release buildbots:
|
||||
# * `brew install --build-bottle` builds libraries for x86_64's lowest common denominator CPU, core2
|
||||
# * `sdl2_mixer` requires options from the formula tap https://github.com/mazmazz/homebrew-srb2
|
||||
# * `brew postinstall` runs post-install scripts after building a bottle
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
if [[ "$__DPL_ACTIVE" == "1" ]]; then
|
||||
brew install --build-bottle sdl2 game-music-emu;
|
||||
brew install --build-bottle mazmazz/srb2/sdl2_mixer --with-flac --with-mpg123;
|
||||
brew postinstall sdl2 game-music-emu mazmazz/srb2/sdl2_mixer;
|
||||
fi;
|
||||
fi
|
||||
- mkdir -p $HOME/srb2_cache
|
||||
|
||||
|
||||
before_script:
|
||||
# OLDPWD is root repo folder
|
||||
- OLDPWD=$PWD
|
||||
- __ASSET_DIRECTORY="$OLDPWD/assets/installer"
|
||||
- mkdir -p "$__ASSET_DIRECTORY"
|
||||
- cd "$HOME/srb2_cache"
|
||||
|
||||
# Get stat command so we know what the cached archive date is.
|
||||
# stat is different for OSX
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
STATCMD="stat -f %m";
|
||||
else
|
||||
STATCMD="stat -c %y";
|
||||
fi
|
||||
|
||||
# Get asset files (required for MD5)
|
||||
# See `deployer_defaults.sh` for asset download path
|
||||
- if [[ "$ASSET_ARCHIVE_PATH" != "" ]]; then
|
||||
if [ -f "$(basename $ASSET_ARCHIVE_PATH)" ]; then
|
||||
echo "$(basename $ASSET_ARCHIVE_PATH) cache date -- $($STATCMD $(basename $ASSET_ARCHIVE_PATH))";
|
||||
fi;
|
||||
wget --verbose --server-response -N "$ASSET_ARCHIVE_PATH";
|
||||
7z x "$(basename $ASSET_ARCHIVE_PATH)" -o"$__ASSET_DIRECTORY" -aos;
|
||||
fi;
|
||||
|
||||
# Get optional files too
|
||||
- if [[ "$__DPL_ACTIVE" == "1" ]] && [[ "$ASSET_FILES_OPTIONAL_GET" == "1" ]] && [[ "$ASSET_ARCHIVE_OPTIONAL_PATH" != "" ]]; then
|
||||
if [ -f "$(basename $ASSET_ARCHIVE_OPTIONAL_PATH)" ]; then
|
||||
echo "$(basename $ASSET_ARCHIVE_OPTIONAL_PATH) cache date -- $($STATCMD $(basename $ASSET_ARCHIVE_OPTIONAL_PATH))";
|
||||
fi;
|
||||
wget --verbose --server-response -N "$ASSET_ARCHIVE_OPTIONAL_PATH";
|
||||
7z x "$(basename $ASSET_ARCHIVE_OPTIONAL_PATH)" -o"$__ASSET_DIRECTORY" -aos;
|
||||
fi;
|
||||
|
||||
# Go back to root repo folder
|
||||
- cd "$OLDPWD"
|
||||
|
||||
# Prepare CMake asset lists
|
||||
- SRB2_ASSET_HASHED=$(echo ${ASSET_FILES_HASHED// /\;})
|
||||
- SRB2_ASSET_DOCS=$(echo ${ASSET_FILES_DOCS// /\;})
|
||||
- SRB2_ASSET_DIRECTORY="$__ASSET_DIRECTORY"
|
||||
|
||||
# Prepare CMake
|
||||
- mkdir build
|
||||
- cd build
|
||||
- mkdir package
|
||||
- export CFLAGS="-Wall -W -Werror $WFLAGS"
|
||||
- export CCACHE_COMPRESS=true
|
||||
# If OS X, set -march=core2 to build compatible binaries with old Macs
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
export CFLAGS="${CFLAGS} -march=core2";
|
||||
fi;
|
||||
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/bin -DCPACK_PACKAGE_DIRECTORY=$PWD/package
|
||||
-DSRB2_ASSET_HASHED="${SRB2_ASSET_HASHED}" -DSRB2_ASSET_DOCS="${SRB2_ASSET_DOCS}"
|
||||
-DSRB2_ASSET_DIRECTORY="${SRB2_ASSET_DIRECTORY}"
|
||||
-DCPACK_PACKAGE_DESCRIPTION_SUMMARY="${PROGRAM_NAME}"
|
||||
-DCPACK_PACKAGE_VENDOR="${PROGRAM_VENDOR}"
|
||||
-DSRB2_SDL2_EXE_NAME="${PROGRAM_FILENAME}"
|
||||
|
||||
script:
|
||||
# Build our Makefile from Cmake!
|
||||
- if [[ "$__DPL_ACTIVE" == "1" ]]; then
|
||||
. ../deployer/travis/deployer_build.sh;
|
||||
else
|
||||
make -k;
|
||||
fi;
|
||||
|
||||
after_success:
|
||||
# Run the upload scripts
|
||||
# These do nothing if Deployer is not triggered
|
||||
- . ../deployer/travis/deployer_ftp.sh
|
||||
- . ../deployer/travis/deployer_dput.sh
|
||||
@@ -1,269 +0,0 @@
|
||||
# Doxyfile 1.4.3
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = SRB2
|
||||
PROJECT_NUMBER = 1.09
|
||||
OUTPUT_DIRECTORY = ./doc/SRB2
|
||||
CREATE_SUBDIRS = YES
|
||||
OUTPUT_LANGUAGE = English
|
||||
USE_WINDOWS_ENCODING = YES
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF = "The $name class" \
|
||||
"The $name widget" \
|
||||
"The $name file" \
|
||||
is \
|
||||
provides \
|
||||
specifies \
|
||||
contains \
|
||||
represents \
|
||||
a \
|
||||
an \
|
||||
the
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = YES
|
||||
STRIP_FROM_PATH =
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
DETAILS_AT_TOP = NO
|
||||
INHERIT_DOCS = YES
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 8
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
SUBGROUPING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = YES
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = NO
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = YES
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = YES
|
||||
SHOW_DIRECTORIES = YES
|
||||
FILE_VERSION_FILTER =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = ./src
|
||||
FILE_PATTERNS = *.c \
|
||||
*.cc \
|
||||
*.cxx \
|
||||
*.cpp \
|
||||
*.c++ \
|
||||
*.d \
|
||||
*.java \
|
||||
*.ii \
|
||||
*.ixx \
|
||||
*.ipp \
|
||||
*.i++ \
|
||||
*.inl \
|
||||
*.h \
|
||||
*.hh \
|
||||
*.hxx \
|
||||
*.hpp \
|
||||
*.h++ \
|
||||
*.idl \
|
||||
*.odl \
|
||||
*.cs \
|
||||
*.php \
|
||||
*.php3 \
|
||||
*.inc \
|
||||
*.m \
|
||||
*.mm \
|
||||
*.dox
|
||||
RECURSIVE = YES
|
||||
EXCLUDE = ./src/sdl/IMG_xpm.c \
|
||||
./src/sdl/SRB2DC/scramble.c
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS = */src/hardware/*/* \
|
||||
*/src/sdl/SDL_main/* \
|
||||
*/src/*/*_private.h \
|
||||
*/src/sdl/*/*help.? \
|
||||
*/src/md5.? \
|
||||
*/src/sdl/filter/*
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS = *
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = NO
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = NO
|
||||
REFERENCES_RELATION = NO
|
||||
#USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = NO
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
GENERATE_HTMLHELP = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = YES
|
||||
TREEVIEW_WIDTH = 250
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = NO
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = NO
|
||||
USE_PDFLATEX = NO
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = NO
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
XML_PROGRAMLISTING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED = DOXYGEN \
|
||||
HWRENDER \
|
||||
DIRECTFULLSCREEN \
|
||||
HW3SOUND \
|
||||
LOGMESSAGES \
|
||||
WALLSPLATS \
|
||||
FLOORSPLATS
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = YES
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = NO
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
GROUP_GRAPHS = YES
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = NO
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
CALL_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
MAX_DOT_GRAPH_DEPTH = 1000
|
||||
DOT_TRANSPARENT = NO
|
||||
DOT_MULTI_TARGETS = NO
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = NO
|
||||
@@ -1,103 +1,35 @@
|
||||
# SRB2Kart: Saturn
|
||||
# SRB2Kart-Saturn
|
||||
|
||||
SRB2Kart-Saturn is a modification of SRB2Kart with a focus on new Features, Fixes, Optimizations and general Improvements, all while retaining 100% compatibility with vanilla SRB2Kart.
|
||||
|
||||
[SRB2Kart](https://srb2.org/mods/) is a kart racing mod based on the 3D Sonic the Hedgehog fangame [Sonic Robo Blast 2](https://srb2.org/), based on a modified version of [Doom Legacy](http://doomlegacy.sourceforge.net/).
|
||||
|
||||
## Saturn Features (Take a look at the "Saturn Options" menu c;)
|
||||
For more information on Saturn´s features check out the changelogs on the [Releases](https://github.com/Indev450/SRB2Kart-Saturn/releases) page and the ingame "Saturn Options" menu.
|
||||
|
||||
- Sprites player rotation on slopes; going on hills, levitate, going down, and so on alters your sprites (configurable)
|
||||
- You can alter all the base kart HUD element offsets on the fly in the Saturn Options settings menu
|
||||
- `addfilelocal` Command, for those who want to use things like their custom hud in netgames (Same as addfile but completely client sided)
|
||||
- Palette rendering, make the OpenGL renderer (almost) look like software mode!
|
||||
- OpenMPT for Tracker module playback instead of GME
|
||||
- Fixes looping and sounds better
|
||||
- Allows filter configuration
|
||||
- Colourize your Kart HUD, to either your player color or whichever colour you like! (optional / requieres extra2.kart file)
|
||||
- The minimal brightness with Shaders can be configured, now you can seeeee in dark areas (0-255 , uses Sector brightness values)
|
||||
- Lua HUD hooks for Intermission (ex: You can make hostmod votes still visible during intermission!)
|
||||
- Lua HUD hooks for Vote Screen (ex: You can make hostmod votes still visible during map vote screen!)
|
||||
- Saltyhop! do a funny hop
|
||||
- Smaller Speedometer (optional / requieres extra.kart file)
|
||||
- Record Attack input display can now be used everywhere
|
||||
- Smaller minimap icons and also show player names on the minimap (toggable)
|
||||
- Support for animated votescreens!
|
||||
- `showmusiccredit` command, shows you the current music track again
|
||||
- `listskins` show a list of all skins currently loaded
|
||||
- Visual Portals from Haya's HEP Client
|
||||
- Horizonline effect in OpenGL (watch the endless bricks on SNES Bowsers Castle!)
|
||||
- Localskins! use whatever skin you like!
|
||||
- Toggable lowercase menu's also from Haya's HEP client
|
||||
- Everything that Galaxy has
|
||||
Also be sure to check the LUASTUFF file for more information on all the extra lua features Saturn has.
|
||||
|
||||
## Improvements / Bug fixes
|
||||
|
||||
- Replay size has been increased to 10MiB minimum, to make replay overflows very unlikely to happen
|
||||
- can be set to 100MiB max with `maxdemosize` command in console
|
||||
- Music changes now properly show the music credits (ex: Kart maps with easter eggs that alter the music)
|
||||
- The mapper still has to provide a MusicDEF for this to work.
|
||||
- Configurable chatlog length (yay can read those messages from 30 mins ago without opening log.txt)
|
||||
- Configurable timeout for waiting to join a full server (in vanilla this is capped to 5 minutes before it boots you out)
|
||||
- Characters now spin in skin selection menu (configurable)
|
||||
- HTTP Addon download speed has been raised dramatically
|
||||
- configurable with `downloadspeed` command
|
||||
- HWR Drawnodes have been refactored, this should fix a few rare crashes esp in regards to OpenGL Visportals
|
||||
- The Position Number in the corner is alot smaller now (half the size!)
|
||||
- Toggable Lap animation
|
||||
- Main menu shows the current renderer being used
|
||||
- MSAA and A2C Antialiasing support (Configurable in renderer.txt file)
|
||||
- A simple button to rejoin your last visited server
|
||||
- Ability to show ALL maps in the mapselect screen, this includes hidden or hellmaps "showallmaps yes/no"
|
||||
- Ability to toggle the Stagetitlecard "maptitles on/off"
|
||||
|
||||
## Performance / Debugging
|
||||
|
||||
- Access for `mobj_t` and `player_t` fields from Lua has been completely rewritten, for much better performance with many Lua scripts
|
||||
- Lua shows Tracebacks whenever an error occurs
|
||||
- The Lua Perfstats page now has multiple pages and is more organized (ps_thinkframe_page X in console)
|
||||
- People with lower end hardware can disable "screen textures" with "gr_screentextures" command, huge performance gain with minimal visual loss
|
||||
- Intermission backgrounds, heat wave effects and etc are broken with this
|
||||
- `ffloorclip`, exclusive to Software, which boosts performance on maps with many Floor over Floor sectors
|
||||
|
||||
## Technical fixes
|
||||
|
||||
- ZFigthing Textures in Opengl mode have been fixed in engine (well almost all of it)
|
||||
- FOFs intersecting with slopes have less issues and now render correctly in Opengl
|
||||
- Midtextures on slopes in Opengl are fixed, many weird guardrails and fences, aswell as some of those sticking out textures from the ground on some maps should be gone
|
||||
- The annoying depraction messages for `P_TeleportMove` and `P_AproxDistance` have been silenced
|
||||
- Silenced the annoying "cant find next map..." messages as theyre super useless and annoying anyways
|
||||
- Added a small cooldown on `map` command due to spamming causing a SIGSEGV
|
||||
- Many bugfixes to the Software renderer, so its much less prone to crashing
|
||||
- Many bugfixes to the OpenGL renderer (too many too list all of them here; check the changelogs for more information)
|
||||
- Bugfixes to the soundsystem, mainly regarding Sound muting
|
||||
- Refactored Zone Memory Allocations (helps a bit with large maps)
|
||||
- Many many more crash fixes and other bugfixes to the basegame (too many too list all of them here; check the changelogs for more information)
|
||||
|
||||
- Crash Backtraces have been replaced by libbacktrace (except for 32bit Windows builds)
|
||||
Crashlogs now contain alot more informations. and even more if your build has debug symbols
|
||||
Also allows 64bit Windows builds to produce Crashlogs!
|
||||
|
||||
## MISC
|
||||
- Bird's Camera Tilting feature is no longer turned on by default
|
||||
- Bird's warning on the title screen has been removed
|
||||
|
||||
## Bugs
|
||||
- On maps which change the song multiple times on map start (exp: Wandering Falls) may show multiple music credits appearing
|
||||
- A2C antialiasing makes transparent surfaces even more transparent
|
||||
- You tell us! c:
|
||||
|
||||
## Note
|
||||
Check the LUASTUFF file for more information on all the lua things Saturn has.
|
||||
We also have a Flatpak available on [Flathub](https://flathub.org/en/apps/org.srb2.SRB2Kart-Saturn)! (many thanks to riomccloud!)
|
||||
|
||||
## Dependencies
|
||||
- SDL2 (Linux/OS X only)
|
||||
- SDL2-Mixer (Linux/OS X only)
|
||||
- libupnp (Linux/OS X only)
|
||||
- libgme (Linux/OS X only)
|
||||
- libopenmpt (Linux/OS X only)
|
||||
- libbacktrace (Linux/OS X only)
|
||||
- libbacktrace (Linux/OS X only, optional, disable support with NOLIBBACKTRACE)
|
||||
- libupnp (Linux/OS X only, optional, enable support with HAVE_MINIUPNPC)
|
||||
|
||||
## Compiling
|
||||
|
||||
See [SRB2 Wiki/Source code compiling](http://wiki.srb2.org/wiki/Source_code_compiling). The compiling process for SRB2Kart is largely identical to SRB2.
|
||||
|
||||
Currently only the Makefile build system with GCC or Clang compiler is supported.
|
||||
|
||||
Visual C++ (MSVC) is unsupported.
|
||||
|
||||
64-bit Windows builds are supported and recommended over 32-bit builds, they will build automatically when using the MSYS2 MinGW 64-bit executable (requires the mingw-w64-x86_64-gcc package), no extra flags needed!
|
||||
The specific DLLs can be found under /libs/dll-binaries/(i686 for 32bit/x86_64 for 64-bit)/ or in the Release packages
|
||||
|
||||
Alternatively the [srb2bld](https://github.com/Bijman/srb2bld) script by Bijman can be used aswell!
|
||||
|
||||
## Disclaimer
|
||||
Kart Krew is in no way affiliated with SEGA or Sonic Team. We do not claim ownership of any of SEGA's intellectual property used in SRB2.
|
||||
-133
@@ -1,133 +0,0 @@
|
||||
version: 1.3.{branch}-{build}
|
||||
os: MinGW
|
||||
|
||||
environment:
|
||||
CC: ccache
|
||||
CCACHE_CC: i686-w64-mingw32-gcc
|
||||
CCACHE_CC_64: x86_64-w64-mingw32-gcc
|
||||
WINDRES: windres
|
||||
# c:\mingw-w64 i686 has gcc 6.3.0, so use c:\msys64 7.3.0 instead
|
||||
MINGW_SDK: c:\msys64\mingw32
|
||||
# c:\msys64 x86_64 has gcc 8.2.0, so use c:\mingw-w64 7.3.0 instead
|
||||
MINGW_SDK_64: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64
|
||||
CFLAGS: -Wall -W -Werror -Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3 -Wno-tautological-compare -Wno-error=suggest-attribute=noreturn
|
||||
UPX_ZIP: upx391w
|
||||
UPX_URL: http://upx.sourceforge.net/download/upx391w.zip
|
||||
CCACHE_EXE: ccache.exe
|
||||
CCACHE_URL: http://alam.srb2.org/ccache.exe
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_DIR: C:\Users\appveyor\.ccache
|
||||
# Disable UPX by default. The user can override this in their Appveyor project settings
|
||||
NOUPX: 1
|
||||
##############################
|
||||
# DEPLOYER VARIABLES
|
||||
# DPL_ENABLED=1 builds installers for branch names starting with `deployer`.
|
||||
# DPL_TAG_ENABLED=1 will also build installers for release tags. DPL_ENABLED=1 must also be set.
|
||||
# Set these in the Appveyor project settings
|
||||
##############################
|
||||
DPL_ENABLED: 0
|
||||
DPL_TAG_ENABLED: 0
|
||||
DPL_INSTALLER_NAME: srb2kart-v13
|
||||
# Asset handling is barebones vs. Travis Deployer. We operate on 7z only.
|
||||
# Include the README files and the OpenGL batch in the main and patch archives.
|
||||
# The x86/x64 archives contain the DLL binaries.
|
||||
ASSET_ARCHIVE_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-assets.7z
|
||||
ASSET_ARCHIVE_PATCH_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-patch-assets.7z
|
||||
ASSET_ARCHIVE_X86_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-x86-assets.7z
|
||||
ASSET_ARCHIVE_X64_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-x64-assets.7z
|
||||
ASSET_ARCHIVE_OPTIONAL_PATH: https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-optional-assets.7z
|
||||
# This is overridden to 1 for release tag builds
|
||||
ASSET_FILES_OPTIONAL_GET: 0
|
||||
# For patches, also include the X86/X64 DLLs.
|
||||
PACKAGE_PATCH_DLL_GET: 0
|
||||
# Delete all asset downloads so they can be redownloaded
|
||||
ASSET_CLEAN: 0
|
||||
|
||||
cache:
|
||||
- upx391w.zip
|
||||
- ccache.exe
|
||||
- C:\Users\appveyor\.ccache
|
||||
- C:\Users\appveyor\srb2_cache
|
||||
|
||||
install:
|
||||
- if [%CONFIGURATION%] == [SDL64] ( set "X86_64=1" )
|
||||
- if [%CONFIGURATION%] == [SDL64] ( set "CONFIGURATION=SDL" )
|
||||
- if [%X86_64%] == [1] ( set "MINGW_SDK=%MINGW_SDK_64%" )
|
||||
- if [%X86_64%] == [1] ( set "CCACHE_CC=%CCACHE_CC_64%" )
|
||||
|
||||
- if not exist "%UPX_ZIP%.zip" appveyor DownloadFile "%UPX_URL%" -FileName "%UPX_ZIP%.zip"
|
||||
- 7z x -y "%UPX_ZIP%.zip" -o%TMP% >null
|
||||
- robocopy /S /xx /ns /nc /nfl /ndl /np /njh /njs "%TMP%\%UPX_ZIP%" "%MINGW_SDK%\bin" upx.exe || exit 0
|
||||
|
||||
- if not exist "%CCACHE_EXE%" appveyor DownloadFile "%CCACHE_URL%" -FileName "%CCACHE_EXE%"
|
||||
- ccache -M 99M
|
||||
- xcopy /Y /V /I ccache.exe "%MINGW_SDK%\bin"
|
||||
|
||||
configuration:
|
||||
- SDL
|
||||
#- SDL64
|
||||
|
||||
before_build:
|
||||
- set "Path=%MINGW_SDK%\bin;%Path%"
|
||||
- if [%X86_64%] == [1] ( x86_64-w64-mingw32-gcc --version ) else ( i686-w64-mingw32-gcc --version )
|
||||
- mingw32-make --version
|
||||
- if not [%NOUPX%] == [1] ( upx -V )
|
||||
- ccache -V
|
||||
- ccache -s
|
||||
- if [%NOUPX%] == [1] ( set "NOUPX=NOUPX=1" ) else ( set "NOUPX=" )
|
||||
- if defined [%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%] ( set "COMMIT=%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%" ) else ( set "COMMIT=%APPVEYOR_REPO_COMMIT%" )
|
||||
- cmd: git rev-parse --short %COMMIT%>%TMP%/gitshort.txt
|
||||
- cmd: set /P GITSHORT=<%TMP%/gitshort.txt
|
||||
# for pull requests, take the owner's name only, if this isn't the same repo of course
|
||||
- set "REPO=%APPVEYOR_REPO_BRANCH%"
|
||||
- if not [%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%] == [] ( if not [%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%] == [%APPVEYOR_REPO_NAME%] ( for /f "delims=/" %%a in ("%APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME%") do set "REPO=%%a-%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH%" ) )
|
||||
- set "EXENAME=EXENAME=srb2win-%REPO%-%GITSHORT%.exe"
|
||||
- set "SRB2_MFLAGS=-C src WARNINGMODE=1 CCACHE=1 NOOBJDUMP=1 %NOUPX% %EXENAME%"
|
||||
- if [%X86_64%] == [1] ( set "MINGW_FLAGS=MINGW64=1 X86_64=1 GCC81=1" ) else ( set "MINGW_FLAGS=MINGW=1 GCC91=1" )
|
||||
- set "SRB2_MFLAGS=%SRB2_MFLAGS% %MINGW_FLAGS% %CONFIGURATION%=1"
|
||||
|
||||
build_script:
|
||||
- cmd: mingw32-make.exe %SRB2_MFLAGS% clean
|
||||
- cmd: mingw32-make.exe %SRB2_MFLAGS% ERRORMODE=1 -k
|
||||
|
||||
after_build:
|
||||
- if [%X86_64%] == [1] (
|
||||
set "BUILD_PATH=bin\Mingw64\Release"
|
||||
) else (
|
||||
set "BUILD_PATH=bin\Mingw\Release"
|
||||
)
|
||||
- if [%X86_64%] == [1] ( set "CONFIGURATION=%CONFIGURATION%64" )
|
||||
- ccache -s
|
||||
- set BUILD_ARCHIVE=%REPO%-%GITSHORT%-%CONFIGURATION%.7z
|
||||
- set BUILDSARCHIVE=%REPO%-%CONFIGURATION%.7z
|
||||
- cmd: 7z a %BUILD_ARCHIVE% %BUILD_PATH% -xr!.gitignore
|
||||
- appveyor PushArtifact %BUILD_ARCHIVE%
|
||||
- cmd: copy %BUILD_ARCHIVE% %BUILDSARCHIVE%
|
||||
- appveyor PushArtifact %BUILDSARCHIVE%
|
||||
##############################
|
||||
# DEPLOYER SCRIPT
|
||||
##############################
|
||||
- if [%DPL_ENABLED%] == [1] ( call "deployer\appveyor\deployer.bat" )
|
||||
|
||||
test: off
|
||||
|
||||
#deploy:
|
||||
# - provider: FTP
|
||||
# protocol: ftps
|
||||
# host:
|
||||
# secure: NsLJEPIBvmwCOj8Tg8RoRQ==
|
||||
# username:
|
||||
# secure: ejxi5mvk7oLYu7QtbYojajEPigMy0mokaKhuEVuDZcA=
|
||||
# password:
|
||||
# secure: Hbn6Uy3lT0YZ88yFJ3aW4w==
|
||||
# folder: appveyor
|
||||
# application:
|
||||
# active_mode: false
|
||||
# on:
|
||||
# branch: master
|
||||
# appveyor_repo_tag: true
|
||||
|
||||
|
||||
on_finish:
|
||||
#- cmd: echo xfreerdp /u:appveyor /cert-ignore +clipboard /v:<ip>:<port>
|
||||
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
@@ -1,70 +0,0 @@
|
||||
srb2 for Debian
|
||||
---------------
|
||||
|
||||
SRB2 Debian package!
|
||||
Hi there, to rebuild these packages just use debuild in the root source directory (not /src!).
|
||||
You can build these with or without a key if you want, but if you want to put these on a repo,
|
||||
generate your own GnuPG key as per the https://help.ubuntu.com/community/GnuPrivacyGuardHowto
|
||||
instructions and pass the -k<keyid> command to debuild. Make sure you export the key footprint
|
||||
and give them to your users to install with apt-key add. Thanks!
|
||||
|
||||
-- Callum Dickinson <gcfreak_ag20@hotmail.com> Fri, 26 Nov 2010 18:25:31 +1300
|
||||
|
||||
---------------
|
||||
|
||||
|
||||
Templating
|
||||
|
||||
Note that you MUST run [repo-root]/debian_template.sh before running debuild
|
||||
on these scripts! debian_template.sh fills these template files with working values.
|
||||
|
||||
You should also set PACKAGE_NAME_EMAIL="John Doe <jdoe@example.com>" to match
|
||||
the identity of the key you will use to sign the package.
|
||||
|
||||
|
||||
Building for Launchpad PPA
|
||||
|
||||
Use these steps to prepare building a source package for Launchpad:
|
||||
|
||||
1. cd [repo-root]
|
||||
2. git reset --hard; git clean -fd; git clean -fx;
|
||||
* Resets your repo folder to a committed state and removes untracked files
|
||||
* If you built srb2-data in the assets/ folder, MAKE SURE THAT FOLDER DOES NOT HAVE ASSETS,
|
||||
OR THEY MAY BE INCLUDED IN THE MAIN SOURCE PACKAGE!
|
||||
|
||||
Build the source package:
|
||||
|
||||
1. source [repo-root]/debian_template.sh
|
||||
* Initializes defaults for the package variables and fills in templates.
|
||||
2. debuild -S (builds the source package for Launchpad)
|
||||
|
||||
|
||||
Signing for Launchpad PPA
|
||||
|
||||
First, follow Callum's instructions to generate a GnuPG key with your identity. You will need
|
||||
to publish the fingerprint of that key to Ubuntu's key server.
|
||||
|
||||
https://help.ubuntu.com/community/GnuPrivacyGuardHowto#Uploading_the_key_to_Ubuntu_keyserver
|
||||
|
||||
Next, you will have to add that key fingerprint to your Launchpad account. Go to your Launchpad
|
||||
profile and click the yellow Edit button next to "OpenPGP keys". Once you add the key, you can
|
||||
upload signed source packages and publish them onto your PPA.
|
||||
|
||||
IF YOU UPLOAD A PACKAGE and Launchpad does NOT send you a confirmation or rejection email, that
|
||||
means your key is not set up correctly with your Launchpad account.
|
||||
|
||||
Finally, if your packages have not already been signed, follow these steps:
|
||||
|
||||
1. cd ..
|
||||
* Packages are located in the parent folder of where debuild was called
|
||||
2. debsign "srb2_[version]_source.changes"
|
||||
* You may need to specify -k [key-fingerprint]
|
||||
|
||||
|
||||
Uploading for Launchpad PPA
|
||||
|
||||
Follow the instructions at <https://help.launchpad.net/Packaging/PPA/Uploading> to upload
|
||||
to your PPA and have Launchpad build your binary deb packages.
|
||||
|
||||
|
||||
-- Marco Zafra <marco.a.zafra@gmail.com> Mon, 26 Nov 2018 21:13:00 -0500
|
||||
@@ -1,46 +0,0 @@
|
||||
srb2 for Debian
|
||||
---------------
|
||||
|
||||
Here it is! SRB2 v2.1.2 source code!
|
||||
|
||||
GNU/Linux
|
||||
~~~
|
||||
|
||||
Dependencies:
|
||||
SDL 1.2.7 or better (from libsdl.org)
|
||||
SDL_Mixer 1.2.2(.7 for file-less music playback) (from libsdl.org)
|
||||
Nasm (use NOASM=1 if you don't have it or have an non-i386 system, I think)
|
||||
libPNG 1.2.7
|
||||
Zlib 1.2.3
|
||||
The Xiph.org libogg and libvorbis libraries
|
||||
The OpenGL headers (from Mesa, usually shipped with your X.org or XFree
|
||||
installation, so you needn't worry, most likely)
|
||||
GCC 3.x toolchain and binutils
|
||||
GNU Make
|
||||
|
||||
Build instructions:
|
||||
|
||||
make -C src LINUX=1
|
||||
|
||||
Build instructions for non-X86 devices (such as X64):
|
||||
|
||||
make -C src LINUX=1 NONX86=1
|
||||
|
||||
Build instructions to build for Wii Linux/SRB2Wii on a PowerPC system,
|
||||
follow cross-compiling instructions for cross-compiling on a x86 system:
|
||||
|
||||
make -C src LINUX=1 WIILINUX=1
|
||||
|
||||
Build instructions to build for Pandora (Linux) on a ARM system,
|
||||
follow cross-compiling instructions for cross-compiling on a x86 system:
|
||||
|
||||
make -C src PANDORA=1
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
binaries will turn in up in bin/
|
||||
|
||||
note: read the src/makefile for more options
|
||||
|
||||
- Sonic Team Junior
|
||||
http://www.srb2.org
|
||||
@@ -1,5 +0,0 @@
|
||||
${PACKAGE_NAME} (${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION}) ${PACKAGE_DISTRO}; urgency=${PACKAGE_URGENCY}
|
||||
|
||||
* ${PROGRAM_NAME} v${PROGRAM_VERSION} program build
|
||||
|
||||
-- ${PACKAGE_NAME_EMAIL} ${__PACKAGE_DATETIME}
|
||||
@@ -1 +0,0 @@
|
||||
7
|
||||
@@ -1,51 +0,0 @@
|
||||
# SRB2 Debian package control file.
|
||||
|
||||
Source: ${PACKAGE_NAME}
|
||||
Section: games
|
||||
Priority: extra
|
||||
Maintainer: ${PACKAGE_GROUP_NAME_EMAIL}
|
||||
Build-Depends: debhelper (>= 7.0.50~),
|
||||
libsdl2-dev,
|
||||
libsdl2-mixer-dev,
|
||||
libpng-dev | libpng16-dev | libpng12-dev (>= 1.2.7),
|
||||
zlib1g-dev,
|
||||
libgme-dev,
|
||||
libcurl4-openssl-dev,
|
||||
libglu1-dev | libglu-dev,
|
||||
libosmesa6-dev | libgl-dev,
|
||||
nasm [i386]
|
||||
Standards-Version: 3.8.4
|
||||
Homepage: ${PACKAGE_WEBSITE}
|
||||
|
||||
Package: ${PACKAGE_NAME}
|
||||
Architecture: any
|
||||
Depends: ${SHLIBS_DEPENDS}, ${MISC_DEPENDS},
|
||||
${PACKAGE_NAME}-data (>> ${PACKAGE_ASSET_MINVERSION}), ${PACKAGE_NAME}-data (<< ${PACKAGE_ASSET_MAXVERSION}),
|
||||
libsdl2-2.0-0,
|
||||
libsdl2-mixer-2.0-0,
|
||||
zlib1g,
|
||||
libgme0,
|
||||
libcurl4,
|
||||
libpng | libpng16-16 | libpng12-0
|
||||
Description: A cross-platform 3D Sonic fangame
|
||||
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
|
||||
fangame built using a modified version of the Doom Legacy
|
||||
port of Doom. SRB2 is closely inspired by the original
|
||||
Sonic games from the Sega Genesis, and attempts to recreate
|
||||
the design in 3D. It features tons of levels, enemies, speed,
|
||||
and quite a lot of the fun that the original Sonic games provided.
|
||||
|
||||
|
||||
Package: ${PACKAGE_NAME}-dbg
|
||||
Architecture: any
|
||||
# FIXME: should be Depends: ${SHLIBS_DEPENDS}, ${MISC_DEPENDS}, srb2-data (= 2.1.14), srb2 but dh_shlibdeps is being an asshat
|
||||
Depends: libc6, ${MISC_DEPENDS}, ${PACKAGE_NAME}-data (>> ${PACKAGE_ASSET_MINVERSION}), ${PACKAGE_NAME}-data (<< ${PACKAGE_ASSET_MAXVERSION}), ${PACKAGE_NAME}
|
||||
Description: A cross-platform 3D Sonic fangame
|
||||
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
|
||||
fangame built using a modified version of the Doom Legacy
|
||||
port of Doom. SRB2 is closely inspired by the original
|
||||
Sonic games from the Sega Genesis, and attempts to recreate
|
||||
the design in 3D. It features tons of levels, enemies, speed,
|
||||
and quite a lot of the fun that the original Sonic games provided.
|
||||
This is a debug binary; its symbols will be loaded by gdb
|
||||
when the user starts the game with gdb for debugging.
|
||||
@@ -1,27 +0,0 @@
|
||||
This work was packaged for Debian by:
|
||||
|
||||
${PACKAGE_NAME_EMAIL} ${__PACKAGE_DATETIME}
|
||||
|
||||
It was downloaded from:
|
||||
|
||||
${PACKAGE_WEBSITE}
|
||||
|
||||
Upstream Author(s):
|
||||
|
||||
${PACKAGE_GROUP_NAME_EMAIL}
|
||||
|
||||
Copyright:
|
||||
|
||||
Copyright (C) 1998-2018 by Sonic Team Junior
|
||||
|
||||
License:
|
||||
|
||||
GNU General Public License, version 2
|
||||
|
||||
The Debian packaging is:
|
||||
|
||||
Copyright (C) 2010 Callum Dickinson <gcfreak_ag20@hotmail.com>
|
||||
Copyright (C) 2010-2018 by Sonic Team Junior <stjr@srb2.org>
|
||||
|
||||
and is licensed under the GPL version 2,
|
||||
see "/usr/share/common-licenses/GPL-2".
|
||||
@@ -1,4 +0,0 @@
|
||||
README.md
|
||||
assets/README.txt
|
||||
assets/LICENSE.txt
|
||||
assets/LICENSE-3RD-PARTY.txt
|
||||
@@ -1,172 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# GNU Make Debian package makefile for SRB2
|
||||
#
|
||||
# Copyright (C) 1998-2010 by Callum Dickinson
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# This file most likely will not need to be modified to make
|
||||
# branches of SRB2 capable of making their own Debian packages,
|
||||
# instead look at the /debian/control file for configuration.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# !!!!!!!!!! DEPLOYER NOTE !!!!!!!!!!
|
||||
#
|
||||
# Variables to be templated are curly-braced ${PACKAGE_INSTALL_PATH}
|
||||
# Variables used by the rules script are parenthese'd $(PKGDIR)
|
||||
# See [repo-root]/debian_template.sh
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
# user/group of to-be-installed files
|
||||
ROOT_USER := 0
|
||||
ROOT_GROUP := 0
|
||||
|
||||
# determine cross-compile (may need some work)
|
||||
CROSS_COMPILE_BUILD := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
CROSS_COMPILE_HOST := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
CROSS_COMPILE := $(shell test "$(CROSS_COMPILE_BUILD)" != "$(CROSS_COMPILE_HOST)" && echo "$(CROSS_COMPILE_HOST)")
|
||||
|
||||
MKDIR = mkdir -p
|
||||
MAKE = make
|
||||
INSTALL = install -o $(ROOT_USER) -g $(ROOT_GROUP) -m 644
|
||||
MV = mv
|
||||
RM = rm -rf
|
||||
STRIPARGS = --strip-unneeded
|
||||
ifdef CROSS_COMPILE
|
||||
STRIP = $(CROSS_COMPILE_HOST)-strip $(STRIPARGS)
|
||||
else
|
||||
STRIP = strip $(STRIPARGS)
|
||||
endif
|
||||
DIR := $(shell pwd)
|
||||
|
||||
# FIXME: hate hate hate head/tail hack :(
|
||||
CONTROLF = $(DIR)/debian/control
|
||||
PACKAGE = ${PACKAGE_NAME}
|
||||
DBGPKG = ${PACKAGE}-dbg
|
||||
TITLE = ${PROGRAM_NAME}
|
||||
SECTION = Games/Action
|
||||
EXENAME = ${PROGRAM_FILENAME}
|
||||
DBGNAME = debug/$(EXENAME)
|
||||
|
||||
PKGDIR = $(shell echo "${PACKAGE_INSTALL_PATH}" | sed -e 's/^\///')
|
||||
DBGDIR = usr/lib/debug/$(PKGDIR)
|
||||
LINKDIR = $(shell echo "${PACKAGE_LINK_PATH}" | sed -e 's/^\///')
|
||||
PIXMAPS_DIR = usr/share/pixmaps
|
||||
DESKTOP_DIR = usr/share/applications
|
||||
PREFIX = $(shell test "$(CROSS_COMPILE_BUILD)" != "$(CROSS_COMPILE_HOST)" && echo "PREFIX=$(CROSS_COMPILE_HOST)")
|
||||
OS = LINUX=1
|
||||
NONX86 = $(shell test "`echo $(CROSS_COMPILE_HOST) | grep 'i[3-6]86'`" || echo "NONX86=1")
|
||||
MAKEARGS = $(OS) $(NONX86) $(PREFIX) EXENAME=$(EXENAME) DBGNAME=$(DBGNAME) NOOBJDUMP=1 # SDL_PKGCONFIG=sdl2 PNG_PKGCONFIG=libpng
|
||||
MENUFILE1 = ?package($(PACKAGE)):needs="X11" section="$(SECTION)"
|
||||
MENUFILE2 = title="$(TITLE)" command="/$(PKGDIR)/$(PACKAGE)"
|
||||
BINDIR := $(DIR)/bin/Linux/Release
|
||||
|
||||
# FIXME pkg-config dir hacks
|
||||
# Launchpad doesn't need this; it actually makes i386 builds fail due to cross-compile
|
||||
# export PKG_CONFIG_LIBDIR = /usr/lib/$(CROSS_COMPILE_HOST)/pkgconfig
|
||||
LDFLAGS += "-Wl,-rpath=/usr/lib/$(CROSS_COMPILE_HOST)"
|
||||
|
||||
# Some libgme-dev packages don't use pkg-config yet, so include the linker flag ourselves
|
||||
PKG_CONFIG?=pkg-config
|
||||
LIBGME_PKGCONFIG?=libgme
|
||||
LIBGME_LDFLAGS?=$(shell $(PKG_CONFIG) $(LIBGME_PKGCONFIG) --libs)
|
||||
|
||||
ifeq ($(LIBGME_LDFLAGS),)
|
||||
MAKEARGS += LIBGME_LDFLAGS=-lgme
|
||||
endif
|
||||
|
||||
build:
|
||||
$(MKDIR) $(BINDIR)/debug
|
||||
$(MAKE) -C $(DIR)/src $(MAKEARGS)
|
||||
$(STRIP) $(BINDIR)/$(EXENAME)
|
||||
|
||||
binary-indep:
|
||||
# only here to kill Lintian warning
|
||||
echo "no need to do any arch-independent stuff"
|
||||
|
||||
binary-arch:
|
||||
# create ddirs
|
||||
$(MKDIR) $(DIR)/debian/tmp/$(PKGDIR) $(DIR)/debian/tmp/$(DBGDIR)
|
||||
$(MKDIR) $(DIR)/debian/tmp/$(PKGDIR) $(DIR)/debian/tmp/$(DESKTOP_DIR)
|
||||
$(MKDIR) $(DIR)/debian/tmp/$(PKGDIR) $(DIR)/debian/tmp/$(PIXMAPS_DIR)
|
||||
# install main binaries
|
||||
$(INSTALL) $(BINDIR)/$(EXENAME) $(DIR)/debian/tmp/$(PKGDIR)/$(PACKAGE)
|
||||
$(INSTALL) $(BINDIR)/$(DBGNAME) $(DIR)/debian/tmp/$(DBGDIR)/$(PACKAGE)
|
||||
# Install desktop file and banner image
|
||||
$(INSTALL) $(DIR)/srb2.png $(DIR)/debian/tmp/usr/share/pixmaps/${PROGRAM_FILENAME}.png
|
||||
$(INSTALL) $(DIR)/debian/srb2.desktop $(DIR)/debian/tmp/usr/share/applications/${PROGRAM_FILENAME}.desktop
|
||||
# add compiled binaries to include-binaries
|
||||
echo $(BINDIR)/$(EXENAME) >> $(DIR)/debian/source/include-binaries
|
||||
echo $(BINDIR)/$(EXENAME) >> $(DIR)/debian/source/include-binaries
|
||||
# Generate install folder files
|
||||
echo $(PKGDIR) > $(DIR)/debian/$(PACKAGE).install
|
||||
echo $(DESKTOP_DIR) >> $(DIR)/debian/$(PACKAGE).install
|
||||
echo $(PIXMAPS_DIR) >> $(DIR)/debian/$(PACKAGE).install
|
||||
echo $(DBGDIR) > $(DIR)/debian/$(DBGPKG).install
|
||||
# Launchpad only calls binary-arch, so just move everything up
|
||||
#binary: binary-arch
|
||||
# Generate .desktop specifications
|
||||
echo "`echo '$(MENUFILE1)\\'`" > $(DIR)/debian/menu
|
||||
echo " `echo '$(MENUFILE2)'`" >> $(DIR)/debian/menu
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs
|
||||
dh_installdocs
|
||||
# dh_installexamples
|
||||
dh_install --sourcedir=$(DIR)/debian/tmp
|
||||
dh_installmenu
|
||||
# dh_installdebconf
|
||||
# dh_installlogrotate
|
||||
# dh_installemacsen
|
||||
# dh_installpam
|
||||
# dh_installmime
|
||||
# dh_python
|
||||
# dh_installinit
|
||||
# dh_installcron
|
||||
# dh_installinfo
|
||||
# dh_installman
|
||||
dh_link $(PKGDIR)/$(EXENAME) $(LINKDIR)/$(EXENAME)
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
# dh_perl
|
||||
# dh_makeshlibs
|
||||
dh_installdeb
|
||||
-dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
binary: binary-arch
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(DIR)/src $(MAKEARGS) clean cleandep
|
||||
$(RM) $(BINDIR)/*
|
||||
$(RM) $(DIR)/debian/$(PACKAGE)/*
|
||||
$(RM) $(DIR)/debian/$(DBGPKG)/*
|
||||
$(RM) $(DIR)/debian/tmp/*
|
||||
$(RM) $(DIR)/debian/$(PACKAGE).install
|
||||
$(RM) $(DIR)/debian/$(DBGPKG).install
|
||||
$(RM) $(DIR)/debian/menu
|
||||
$(RM) $(DIR)/debian/files
|
||||
$(RM) $(DIR)/debian/source/include-binaries
|
||||
|
||||
.PHONY: all clean binary binary-indep build
|
||||
@@ -1 +0,0 @@
|
||||
3.0 (native)
|
||||
@@ -1,11 +0,0 @@
|
||||
tar-ignore = "assets/*.srb"
|
||||
tar-ignore = "assets/*.pk3"
|
||||
tar-ignore = "assets/*.dta"
|
||||
tar-ignore = "assets/*.wad"
|
||||
tar-ignore = "assets/*.kart"
|
||||
tar-ignore = "assets/debian/${PACKAGE_NAME}-data/*"
|
||||
tar-ignore = "assets/debian/tmp/*"
|
||||
tar-ignore = "*.obj"
|
||||
tar-ignore = "*.dep"
|
||||
tar-ignore = ".git/*"
|
||||
tar-ignore = ".git*"
|
||||
@@ -1,10 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=${PROGRAM_NAME}
|
||||
Comment=${PROGRAM_DESCRIPTION}
|
||||
Encoding=UTF-8
|
||||
Exec=${PACKAGE_INSTALL_PATH}/${PROGRAM_FILENAME}
|
||||
Icon=/usr/share/pixmaps/${PROGRAM_FILENAME}.png
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=false
|
||||
Categories=Application;Game;
|
||||
@@ -1,166 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Deployer for Travis-CI
|
||||
# Debian package templating
|
||||
#
|
||||
# Call this script BEFORE running debuild!
|
||||
# source ./debian_template.sh [clean] [main/asset]
|
||||
#
|
||||
# Before running this script,
|
||||
# you should also set PACKAGE_NAME_EMAIL="John Doe <jdoe@example.com>" to match
|
||||
# the identity of the key you will use to sign the package.
|
||||
#
|
||||
|
||||
# Get script's actual path
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
|
||||
# Recursive function for directory crawling
|
||||
# $1 = Directory root to crawl
|
||||
# $2 = Code to eval on file
|
||||
# $3 = Code to eval on directory
|
||||
# Exposes $dirtails, $dirlevel, and $dirtailname
|
||||
dirlevel=0 # initialize
|
||||
dirtails=()
|
||||
|
||||
# Utility function to make dira/dirb/dirc string
|
||||
makedirtailname () {
|
||||
dirtailname=""
|
||||
for tail in $dirtails; do
|
||||
if [[ "$dirtailname" == "" ]]; then
|
||||
dirtailname="/$tail";
|
||||
else
|
||||
dirtailname="$dirtailname/$tail";
|
||||
fi;
|
||||
done;
|
||||
}
|
||||
|
||||
evaldirectory () {
|
||||
if [ -d "$1" ]; then
|
||||
# Set contextual variables
|
||||
# dirtails is an array of directory basenames after the crawl root
|
||||
if (( $dirlevel > 0 )); then
|
||||
dirtails+=( "$(basename $1)" );
|
||||
else
|
||||
dirtails=();
|
||||
fi;
|
||||
dirlevel=$((dirlevel+1));
|
||||
|
||||
# Generate directory path after the crawl root
|
||||
makedirtailname;
|
||||
|
||||
# Eval our directory with the latest contextual info
|
||||
# Don't eval on root
|
||||
if (( $dirlevel > 1 )) && [[ "$3" != "" ]]; then
|
||||
eval "$3";
|
||||
fi;
|
||||
|
||||
# Iterate entries
|
||||
for name in $1/*; do
|
||||
if [ -d "$name" ]; then
|
||||
# Name is a directory, but don't eval yet
|
||||
# Recurse so our vars are updated
|
||||
evaldirectory "$name" "$2" "$3";
|
||||
|
||||
# Decrement our directory level and remove a dirtail
|
||||
unset 'dirtails[ ${#dirtails[@]}-1 ]';
|
||||
dirlevel=$((dirlevel-1));
|
||||
makedirtailname;
|
||||
else
|
||||
# Name is a file
|
||||
if [ -f "$name" ] && [[ "$2" != "" ]]; then
|
||||
eval "$2";
|
||||
fi;
|
||||
fi;
|
||||
done;
|
||||
|
||||
# Reset our variables; we're done iterating
|
||||
if (( $dirlevel == 1 )); then
|
||||
dirlevel=0;
|
||||
fi;
|
||||
fi;
|
||||
}
|
||||
|
||||
#
|
||||
# Initialize package parameter defaults
|
||||
#
|
||||
if [[ "$__DEBIAN_PARAMETERS_INITIALIZED" != "1" ]]; then
|
||||
. ${DIR}/deployer/travis/deployer_defaults.sh;
|
||||
fi;
|
||||
|
||||
# Clean up after ourselves; we only expect to run this script once
|
||||
# during buildboting
|
||||
__DEBIAN_PARAMETERS_INITIALIZED=0
|
||||
|
||||
# for envsubst
|
||||
export __PACKAGE_DATETIME="$(date '+%a, %d %b %Y %H:%M:%S %z')"
|
||||
export __PACKAGE_DATETIME_DIGIT="$(date -u '+%Y%m%d%H%M%S')"
|
||||
|
||||
if [[ "$PACKAGE_REVISION" == "" ]]; then
|
||||
PACKAGE_REVISION="-$__PACKAGE_DATETIME_DIGIT";
|
||||
__PACKAGE_REVISION_BY_DATE=1;
|
||||
export PACKAGE_REVISION=${PACKAGE_REVISION}; # for envsubst
|
||||
fi;
|
||||
|
||||
#
|
||||
# Clean the old debian/ directories
|
||||
#
|
||||
if [[ "$1" == "clean" ]]; then
|
||||
toclean=$2;
|
||||
else
|
||||
toclean=$1;
|
||||
fi;
|
||||
|
||||
if [[ "$toclean" == "" ]] || [[ "$toclean" == "main" ]]; then
|
||||
echo "Cleaning main package scripts";
|
||||
if [[ ! -f ${DIR}/debian ]]; then
|
||||
rm -rf ${DIR}/debian;
|
||||
fi;
|
||||
fi;
|
||||
if [[ "$toclean" == "" ]] || [[ "$toclean" == "asset" ]]; then
|
||||
echo "Cleaning asset package scripts";
|
||||
if [[ ! -f ${DIR}/assets/debian ]]; then
|
||||
rm -rf ${DIR}/assets/debian;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
#
|
||||
# Make new templates
|
||||
#
|
||||
if [[ "$1" != "clean" ]]; then
|
||||
totemplate=$1;
|
||||
|
||||
# HACK: ${shlibs:Depends} in the templates make the templating fail
|
||||
# So just define replacemment variables
|
||||
export SHLIBS_DEPENDS=${SHLIBS_DEPENDS};
|
||||
export MISC_DEPENDS=${MISC_DEPENDS};
|
||||
export DEBFILEVAR='$$file'; # used in assets/debian/rules
|
||||
|
||||
# Package parameters are exported for envsubst in deployer_defaults.sh
|
||||
|
||||
if [[ "$totemplate" == "" ]] || [[ "$totemplate" == "main" ]]; then
|
||||
echo "Generating main package scripts";
|
||||
fromroot=${DIR}/debian-template;
|
||||
toroot=${DIR}/debian;
|
||||
mkdir ${toroot};
|
||||
|
||||
evaldirectory ${fromroot} \
|
||||
"cat \$name | envsubst > ${toroot}\${dirtailname}/\$( basename \$name )" \
|
||||
"mkdir \"${toroot}\${dirtailname}\"";
|
||||
fi;
|
||||
|
||||
if [[ "$totemplate" == "" ]] || [[ "$totemplate" == "asset" ]]; then
|
||||
echo "Generating asset package scripts";
|
||||
fromroot=${DIR}/assets/debian-template;
|
||||
toroot=${DIR}/assets/debian;
|
||||
mkdir ${toroot};
|
||||
|
||||
# Root dir to crawl; file eval; directory eval
|
||||
evaldirectory ${fromroot} \
|
||||
"cat \$name | envsubst > ${toroot}\${dirtailname}/\$( basename \$name )" \
|
||||
"mkdir \"${toroot}\${dirtailname}\"";
|
||||
fi;
|
||||
fi;
|
||||
|
||||
if [[ "$__DPL_ACTIVE" != "1" ]] && [[ "$__PACKAGE_REVISION_BY_DATE" == "1" ]]; then
|
||||
unset PACKAGE_REVISION; # so we can reset the date on subsequent runs
|
||||
fi;
|
||||
@@ -1,195 +0,0 @@
|
||||
@setlocal enableextensions enabledelayedexpansion
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
: Appveyor Deployer
|
||||
: See appveyor.yml for default variables
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
: Evaluate whether we should be deploying
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
if not [%DPL_ENABLED%] == [1] (
|
||||
echo Deployer is not enabled...
|
||||
exit /b
|
||||
)
|
||||
|
||||
: Don't do DD installs because fmodex DLL handling is not implemented.
|
||||
if [%CONFIGURATION%] == [DD] (
|
||||
echo Deployer does not support DD builds...
|
||||
exit /b
|
||||
)
|
||||
|
||||
if [%CONFIGURATION%] == [DD64] (
|
||||
echo Deployer does not support DD builds...
|
||||
exit /b
|
||||
)
|
||||
|
||||
: Substring match from https://stackoverflow.com/questions/7005951/batch-file-find-if-substring-is-in-string-not-in-a-file
|
||||
: The below line says "if deployer is NOT in string"
|
||||
: Note that APPVEYOR_REPO_BRANCH for pull request builds is the BASE branch that PR is merging INTO
|
||||
if x%APPVEYOR_REPO_BRANCH:deployer=%==x%APPVEYOR_REPO_BRANCH% (
|
||||
if not [%APPVEYOR_REPO_TAG%] == [true] (
|
||||
echo Deployer is enabled but we are not in a release tag or a 'deployer' branch...
|
||||
exit /b
|
||||
) else (
|
||||
if not [%DPL_TAG_ENABLED%] == [1] (
|
||||
echo Deployer is not enabled for release tags...
|
||||
exit /b
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
: Release tags always get optional assets (music.dta)
|
||||
if [%APPVEYOR_REPO_TAG%] == [true] (
|
||||
set "ASSET_FILES_OPTIONAL_GET=1"
|
||||
)
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
: Get asset archives
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
if exist "C:\Users\appveyor\srb2_cache\archives\" (
|
||||
if [%ASSET_CLEAN%] == [1] (
|
||||
echo Cleaning asset archives...
|
||||
rmdir /s /q "C:\Users\appveyor\srb2_cache\archives"
|
||||
)
|
||||
)
|
||||
|
||||
if not exist "C:\Users\appveyor\srb2_cache\archives\" mkdir "C:\Users\appveyor\srb2_cache\archives"
|
||||
|
||||
goto EXTRACT_ARCHIVES
|
||||
|
||||
::::::::::::::::::::::::::::::::
|
||||
: ARCHIVE_NAME_PARTS
|
||||
: Call this like a function. %archivepath% is the path to extract parts from.
|
||||
::::::::::::::::::::::::::::::::
|
||||
|
||||
for %%a in (%archivepath%) do (
|
||||
set "file=%%~fa"
|
||||
set "filepath=%%~dpa"
|
||||
set "filename=%%~nxa"
|
||||
)
|
||||
|
||||
set "localarchivepath=C:\Users\appveyor\srb2_cache\archives\%filename%"
|
||||
|
||||
goto EOF
|
||||
|
||||
::::::::::::::::::::::::::::::::
|
||||
: EXTRACT_ARCHIVES
|
||||
::::::::::::::::::::::::::::::::
|
||||
|
||||
set "archivepath=%ASSET_ARCHIVE_PATH%"
|
||||
call :ARCHIVE_NAME_PARTS
|
||||
set "ASSET_ARCHIVE_PATH_LOCAL=%localarchivepath%"
|
||||
if not exist "%localarchivepath%" appveyor DownloadFile "%ASSET_ARCHIVE_PATH%" -FileName "%localarchivepath%"
|
||||
|
||||
set "archivepath=%ASSET_ARCHIVE_PATCH_PATH%"
|
||||
call :ARCHIVE_NAME_PARTS
|
||||
set "ASSET_ARCHIVE_PATCH_PATH_LOCAL=%localarchivepath%"
|
||||
if not exist "%localarchivepath%" appveyor DownloadFile "%ASSET_ARCHIVE_PATCH_PATH%" -FileName "%localarchivepath%"
|
||||
|
||||
if not [%X86_64%] == [1] (
|
||||
set "archivepath=%ASSET_ARCHIVE_X86_PATH%"
|
||||
call :ARCHIVE_NAME_PARTS
|
||||
set "ASSET_ARCHIVE_X86_PATH_LOCAL=!localarchivepath!"
|
||||
if not exist "!localarchivepath!" appveyor DownloadFile "%ASSET_ARCHIVE_X86_PATH%" -FileName "!localarchivepath!"
|
||||
)
|
||||
|
||||
if [%X86_64%] == [1] (
|
||||
set "archivepath=%ASSET_ARCHIVE_X64_PATH%"
|
||||
call :ARCHIVE_NAME_PARTS
|
||||
set "ASSET_ARCHIVE_X64_PATH_LOCAL=!localarchivepath!"
|
||||
if not exist "!localarchivepath!" appveyor DownloadFile "%ASSET_ARCHIVE_X64_PATH%" -FileName "!localarchivepath!"
|
||||
)
|
||||
|
||||
if [%ASSET_FILES_OPTIONAL_GET%] == [1] (
|
||||
set "archivepath=%ASSET_ARCHIVE_OPTIONAL_PATH%"
|
||||
call :ARCHIVE_NAME_PARTS
|
||||
set "ASSET_ARCHIVE_OPTIONAL_PATH_LOCAL=!localarchivepath!"
|
||||
if not exist "!localarchivepath!" appveyor DownloadFile "%ASSET_ARCHIVE_OPTIONAL_PATH%" -FileName "!localarchivepath!"
|
||||
)
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
: Build the installers
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
mkdir "assets\installer"
|
||||
mkdir "assets\patch"
|
||||
|
||||
7z x -y "%ASSET_ARCHIVE_PATH_LOCAL%" -o"assets\installer" >null
|
||||
7z x -y "%ASSET_ARCHIVE_PATCH_PATH_LOCAL%" -o"assets\patch" >null
|
||||
|
||||
: Copy optional files to full installer (music.dta)
|
||||
if [%ASSET_FILES_OPTIONAL_GET%] == [1] (
|
||||
7z x -y "%ASSET_ARCHIVE_OPTIONAL_PATH_LOCAL%" -o"assets\installer" >null
|
||||
)
|
||||
|
||||
: Copy EXE -- BUILD_PATH is from appveyor.yml
|
||||
robocopy /S /ns /nc /nfl /ndl /np /njh /njs "%BUILD_PATH%" "assets\installer" /XF "*.debug" ".gitignore"
|
||||
robocopy /S /ns /nc /nfl /ndl /np /njh /njs "%BUILD_PATH%" "assets\patch" /XF "*.debug" ".gitignore"
|
||||
|
||||
: Are we building DD? (we were supposed to exit earlier!)
|
||||
if [%CONFIGURATION%] == [DD] ( set "DPL_INSTALLER_NAME=%DPL_INSTALLER_NAME%-DD" )
|
||||
if [%CONFIGURATION%] == [DD64] ( set "DPL_INSTALLER_NAME=%DPL_INSTALLER_NAME%-DD" )
|
||||
|
||||
: If we are not a release tag, suffix the filename
|
||||
if not [%APPVEYOR_REPO_TAG%] == [true] (
|
||||
set "INSTALLER_SUFFIX=-%APPVEYOR_REPO_BRANCH%-%GITSHORT%-%CONFIGURATION%"
|
||||
) else (
|
||||
set "INSTALLER_SUFFIX="
|
||||
)
|
||||
|
||||
if not [%X86_64%] == [1] ( goto X86_INSTALL )
|
||||
|
||||
::::::::::::::::::::::::::::::::
|
||||
: X64_INSTALL
|
||||
::::::::::::::::::::::::::::::::
|
||||
|
||||
: Extract DLL binaries
|
||||
7z x -y "%ASSET_ARCHIVE_X64_PATH_LOCAL%" -o"assets\installer" >null
|
||||
if [%PACKAGE_PATCH_DLL_GET%] == [1] (
|
||||
7z x -y "!ASSET_ARCHIVE_X64_PATH_LOCAL!" -o"assets\patch" >null
|
||||
)
|
||||
|
||||
: Build the installer
|
||||
7z a -sfx7z.sfx "%DPL_INSTALLER_NAME%-x64-Installer%INSTALLER_SUFFIX%.exe" .\assets\installer\*
|
||||
|
||||
: Build the patch
|
||||
7z a "%DPL_INSTALLER_NAME%-x64-Patch%INSTALLER_SUFFIX%.zip" .\assets\patch\*
|
||||
|
||||
: Upload artifacts
|
||||
appveyor PushArtifact "%DPL_INSTALLER_NAME%-x64-Installer%INSTALLER_SUFFIX%.exe"
|
||||
appveyor PushArtifact "%DPL_INSTALLER_NAME%-x64-Patch%INSTALLER_SUFFIX%.zip"
|
||||
|
||||
: We only do x86 OR x64, one at a time, so exit now.
|
||||
goto EOF
|
||||
|
||||
::::::::::::::::::::::::::::::::
|
||||
: X86_INSTALL
|
||||
::::::::::::::::::::::::::::::::
|
||||
|
||||
: Extract DLL binaries
|
||||
7z x -y "%ASSET_ARCHIVE_X86_PATH_LOCAL%" -o"assets\installer" >null
|
||||
if [%PACKAGE_PATCH_DLL_GET%] == [1] (
|
||||
7z x -y "!ASSET_ARCHIVE_X86_PATH_LOCAL!" -o"assets\patch" >null
|
||||
)
|
||||
|
||||
: Build the installer
|
||||
7z a -sfx7z.sfx "%DPL_INSTALLER_NAME%-Installer%INSTALLER_SUFFIX%.exe" .\assets\installer\*
|
||||
|
||||
: Build the patch
|
||||
7z a "%DPL_INSTALLER_NAME%-Patch%INSTALLER_SUFFIX%.zip" .\assets\patch\*
|
||||
|
||||
: Upload artifacts
|
||||
appveyor PushArtifact "%DPL_INSTALLER_NAME%-Installer%INSTALLER_SUFFIX%.exe"
|
||||
appveyor PushArtifact "%DPL_INSTALLER_NAME%-Patch%INSTALLER_SUFFIX%.zip"
|
||||
|
||||
: We only do x86 OR x64, one at a time, so exit now
|
||||
goto EOF
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
: EOF
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
endlocal
|
||||
@@ -1,157 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Deployer for Travis-CI
|
||||
# Initialization
|
||||
#
|
||||
# Performs validity checks to ensure that Deployer is allowed to run
|
||||
# e.g., is an FTP hostname specified? Are we whitelisted by OSNAMES and BRANCHES?
|
||||
#
|
||||
# Set these environment variables in your Travis-CI settings, where they are stored securely.
|
||||
# See other shell scripts for more options.
|
||||
#
|
||||
# DPL_ENABLED = 1 (leave blank to disable)
|
||||
# DPL_TAG_ENABLED = 1 (run Deployer on all tags)
|
||||
# DPL_JOB_ENABLE_ALL = 1 (run Deployer on all jobs; leave blank to act on specific jobs, see below)
|
||||
# DPL_JOBNAMES = name1,name2 (whitelist of job names to allow uploading; leave blank to upload from all jobs)
|
||||
# DPL_OSNAMES = osx (whitelist of OS names to allow uploading; leave blank to upload from all OSes)
|
||||
# DPL_BRANCHES = master,branch1,branch2 (whitelist of branches to upload; leave blank to upload all branches)
|
||||
#
|
||||
# To enable Deployer on specific jobs, set _DPL_JOB_ENABLED=1 for that job. Example:
|
||||
# - matrix:
|
||||
# - os: osx
|
||||
# env:
|
||||
# - _DPL_JOB_ENABLED=1
|
||||
#
|
||||
# DO NOT set __DPL_ACTIVE, because that would bypass these validity checks.
|
||||
|
||||
# Validate Deployer state
|
||||
if [[ "$DPL_ENABLED" == "1" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
|
||||
# Test for base eligibility:
|
||||
# Are we in a deployer branch? Or
|
||||
# Are we in a release tag AND DPL_TAG_ENABLED=1?
|
||||
if [[ $TRAVIS_BRANCH == *"deployer"* ]]; then
|
||||
__DPL_BASE_ELIGIBLE=1;
|
||||
__DPL_TERMINATE_EARLY_ELIGIBLE=1;
|
||||
fi;
|
||||
|
||||
if [[ "$TRAVIS_TAG" != "" ]] && [[ "$DPL_TAG_ENABLED" == "1" ]]; then
|
||||
__DPL_BASE_ELIGIBLE=1;
|
||||
__DPL_TAG_ELIGIBLE=1;
|
||||
__DPL_TERMINATE_EARLY_ELIGIBLE=1;
|
||||
fi;
|
||||
|
||||
# Logging message for trigger word
|
||||
if [[ "$__DPL_TAG_ELIGIBLE" != "1" ]] && [[ "$DPL_TRIGGER" != "" ]]; then
|
||||
echo "Testing for trigger $DPL_TRIGGER, commit message: $TRAVIS_COMMIT_MESSAGE";
|
||||
echo "[${DPL_TRIGGER}]";
|
||||
echo "[${DPL_TRIGGER}-${_DPL_JOB_NAME}]";
|
||||
echo "[${DPL_TRIGGER}-${TRAVIS_OS_NAME}]";
|
||||
fi;
|
||||
|
||||
#
|
||||
# Search for the trigger word
|
||||
# Force enable if release tags are eligible
|
||||
#
|
||||
if [[ "$__DPL_TAG_ELIGIBLE" == "1" ]] || [[ "$DPL_TRIGGER" == "" ]] \
|
||||
|| [[ $TRAVIS_COMMIT_MESSAGE == *"[$DPL_TRIGGER]"* ]] \
|
||||
|| [[ $TRAVIS_COMMIT_MESSAGE == *"[${DPL_TRIGGER}-${_DPL_JOB_NAME}]"* ]] \
|
||||
|| [[ $TRAVIS_COMMIT_MESSAGE == *"[${DPL_TRIGGER}-${TRAVIS_OS_NAME}]"* ]]; then
|
||||
#
|
||||
# Whitelist by branch name
|
||||
# Force enable if release tags are eligible
|
||||
#
|
||||
if [[ "$__DPL_TAG_ELIGIBLE" == "1" ]] || [[ "$DPL_BRANCHES" == "" ]] || [[ $DPL_BRANCHES == *"$TRAVIS_BRANCH"* ]]; then
|
||||
# Set this so we only early-terminate builds when we are specifically deploying
|
||||
# Trigger string and branch are encompassing conditions; the rest are job-specific
|
||||
# This check only matters for deployer branches and when DPL_TERMINATE_TESTS=1,
|
||||
# because we're filtering non-deployer jobs.
|
||||
#
|
||||
# __DPL_TRY_TERMINATE_EARLY is invalidated in .travis.yml if __DPL_ACTIVE=1
|
||||
if [[ "$__DPL_TERMINATE_EARLY_ELIGIBLE" == "1" ]] && [[ "$DPL_TERMINATE_TESTS" == "1" ]]; then
|
||||
__DPL_TRY_TERMINATE_EARLY=1;
|
||||
fi;
|
||||
|
||||
#
|
||||
# Is the job enabled for deployment?
|
||||
#
|
||||
if [[ "$DPL_JOB_ENABLE_ALL" == "1" ]] || [[ "$_DPL_JOB_ENABLED" == "1" ]]; then
|
||||
#
|
||||
# Whitelist by job names
|
||||
#
|
||||
if [[ "$DPL_JOBNAMES" == "" ]] || [[ "$_DPL_JOB_NAME" == "" ]] || [[ $DPL_JOBNAMES == *"$_DPL_JOB_NAME"* ]]; then
|
||||
#
|
||||
# Whitelist by OS names
|
||||
#
|
||||
if [[ "$DPL_OSNAMES" == "" ]] || [[ $DPL_OSNAMES == *"$TRAVIS_OS_NAME"* ]]; then
|
||||
# Base Deployer is eligible for becoming active
|
||||
|
||||
# Are we building for Linux?
|
||||
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]] || [[ "$_DPL_PACKAGE_SOURCE" == "1" ]]; then
|
||||
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]] || [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
|
||||
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
__DPL_DEBIAN_ACTIVE=1;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
# Now check for deployment targets
|
||||
if [[ "$_DPL_FTP_TARGET" == "1" ]] && [[ "$DPL_FTP_HOSTNAME" != "" ]]; then
|
||||
if [[ "$TRAVIS_OS_HOST" == "linux" ]] && [[ "$DPL_FTP_PROTOCOL" == "ftp" ]]; then
|
||||
echo "Non-secure FTP will not work on Linux Travis-CI jobs!";
|
||||
echo "Try SFTP or another target. Details:";
|
||||
echo "https://blog.travis-ci.com/2018-07-23-the-tale-of-ftp-at-travis-ci";
|
||||
else
|
||||
if [[ "$__DPL_DEBIAN_ACTIVE" == "1" ]] || [[ "$_DPL_PACKAGE_BINARY" == "1" ]] || [[ "$_DPL_BINARY" == "1" ]]; then
|
||||
echo "Deployer FTP target is enabled";
|
||||
__DPL_FTP_ACTIVE=1;
|
||||
else
|
||||
echo "Deployer FTP target cannot be enabled: You must specify _DPL_PACKAGE_BINARY=1,";
|
||||
echo "and/or _DPL_BINARY=1 in your job's environment variables.";
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
if [[ "$_DPL_DPUT_TARGET" == "1" ]] && [[ "$__DPL_DEBIAN_ACTIVE" == "1" ]] \
|
||||
&& [[ "$DPL_DPUT_INCOMING" != "" ]]; then
|
||||
if [[ "$DPL_DPUT_METHOD" == "ftp" ]]; then
|
||||
echo "DPUT will not work with non-secure FTP on Linux Travis-CI jobs!";
|
||||
echo "Try SFTP or another method for DPUT. Details:";
|
||||
echo "https://blog.travis-ci.com/2018-07-23-the-tale-of-ftp-at-travis-ci";
|
||||
else
|
||||
echo "Deployer DPUT target is enabled";
|
||||
__DPL_DPUT_ACTIVE=1;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
# If any deployment targets are active, then so is the Deployer at large
|
||||
if [[ "$__DPL_FTP_ACTIVE" == "1" ]] || [[ "$__DPL_DPUT_ACTIVE" == "1" ]]; then
|
||||
__DPL_ACTIVE=1;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
else
|
||||
if [[ "$DPL_TRIGGER" != "" ]]; then
|
||||
echo "Testing for global trigger [$DPL_TRIGGER, commit message: $TRAVIS_COMMIT_MESSAGE";
|
||||
fi;
|
||||
if [[ "$DPL_TRIGGER" != "" ]] && [[ $TRAVIS_COMMIT_MESSAGE == *"[$DPL_TRIGGER"* ]]; then
|
||||
if [[ "$__DPL_TAG_ELIGIBLE" == "1" ]] || [[ "$DPL_BRANCHES" == "" ]] || [[ $DPL_BRANCHES == *"$TRAVIS_BRANCH"* ]]; then
|
||||
# This check only matters for deployer branches and when DPL_TERMINATE_TESTS=1,
|
||||
# because we're filtering non-deployer jobs.
|
||||
if [[ "$__DPL_TERMINATE_EARLY_ELIGIBLE" == "1" ]] && [[ "$DPL_TERMINATE_TESTS" == "1" ]]; then
|
||||
# Assume that some job received the trigger, so mark this for early termination
|
||||
__DPL_TRY_TERMINATE_EARLY=1;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
if [[ "$__DPL_TRY_TERMINATE_EARLY" == "1" ]] && [[ "$__DPL_ACTIVE" != "1" ]]; then
|
||||
echo "Deployer is active in another job";
|
||||
fi;
|
||||
|
||||
if [[ "$__DPL_TRY_TERMINATE_EARLY" != "1" ]] && [[ "$__DPL_ACTIVE" != "1" ]]; then
|
||||
echo "Deployer is not active";
|
||||
fi;
|
||||
@@ -1,190 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Deployer for Travis-CI
|
||||
# Build Script
|
||||
#
|
||||
# Builds the required targets depending on which sub-modules are enabled
|
||||
|
||||
if [[ "$__DPL_FTP_ACTIVE" == "1" ]] || [[ "$__DPL_DPUT_ACTIVE" == "1" ]]; then
|
||||
if [[ "$__DPL_DEBIAN_ACTIVE" == "1" ]]; then
|
||||
echo "Building Debian package(s)"
|
||||
|
||||
sudo apt-get install devscripts debhelper fakeroot secure-delete expect;
|
||||
|
||||
# Build source packages first, since they zip up the entire source folder,
|
||||
# binaries and all
|
||||
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]]; then
|
||||
. ../debian_template.sh main;
|
||||
OLDPWD=$PWD; # [repo]/build
|
||||
cd ..; # repo root
|
||||
|
||||
if [[ "$_DPL_PACKAGE_SOURCE" == "1" ]]; then
|
||||
echo "Building main source Debian package";
|
||||
expect <(cat <<EOD
|
||||
spawn debuild -S -us -uc;
|
||||
expect "continue anyway? (y/n)"
|
||||
send "y\r"
|
||||
interact
|
||||
EOD
|
||||
);
|
||||
fi;
|
||||
|
||||
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]]; then
|
||||
echo "Building main binary Debian package";
|
||||
expect <(cat <<EOD
|
||||
spawn debuild -us -uc;
|
||||
expect "continue anyway? (y/n)"
|
||||
send "y\r"
|
||||
interact
|
||||
EOD
|
||||
);
|
||||
fi;
|
||||
|
||||
cd $OLDPWD;
|
||||
fi;
|
||||
|
||||
# Also an asset package
|
||||
if [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
|
||||
. ../debian_template.sh asset;
|
||||
OLDPWD=$PWD; # [repo]/build
|
||||
cd ../assets;
|
||||
|
||||
# make sure the asset files exist, download them if they don't
|
||||
#echo "Checking asset files for asset Debian package";
|
||||
#debuild -T build;
|
||||
|
||||
if [[ "$_DPL_PACKAGE_SOURCE" == "1" ]]; then
|
||||
echo "Building asset source Debian package";
|
||||
expect <(cat <<EOD
|
||||
spawn debuild -S -us -uc;
|
||||
expect "continue anyway? (y/n)"
|
||||
send "y\r"
|
||||
interact
|
||||
EOD
|
||||
);
|
||||
fi;
|
||||
|
||||
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]]; then
|
||||
echo "Building asset binary Debian package";
|
||||
expect <(cat <<EOD
|
||||
spawn debuild -us -uc;
|
||||
expect "continue anyway? (y/n)"
|
||||
send "y\r"
|
||||
interact
|
||||
EOD
|
||||
);
|
||||
fi;
|
||||
|
||||
cd $OLDPWD;
|
||||
fi;
|
||||
|
||||
# Now sign our packages
|
||||
if [[ "$DPL_PGP_KEY_PRIVATE" != "" ]] && [[ "$DPL_PGP_KEY_PASSPHRASE" != "" ]]; then
|
||||
# Get the key to sign
|
||||
# Do this AFTER debuild so that we can specify the passphrase in command line
|
||||
echo "$DPL_PGP_KEY_PRIVATE" | base64 --decode > key.asc;
|
||||
echo "$DPL_PGP_KEY_PASSPHRASE" > phrase.txt;
|
||||
gpg --import key.asc;
|
||||
|
||||
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]]; then
|
||||
echo "Signing main package(s)";
|
||||
|
||||
PACKAGEFILENAME=${PACKAGE_NAME}_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
PACKAGEDBGFILENAME=${PACKAGE_NAME}-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGENIGHTLYDBGFILENAME=${PACKAGE_NAME}-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHDBGFILENAME=${PACKAGE_NAME}-patch-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHNIGHTLYDBGFILENAME=${PACKAGE_NAME}-patch-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
|
||||
PACKAGEFILENAMES=(
|
||||
$PACKAGEFILENAME
|
||||
$PACKAGEDBGFILENAME
|
||||
#$PACKAGENIGHTLYFILENAME
|
||||
#$PACKAGENIGHTLYDBGFILENAME
|
||||
#$PACKAGEPATCHFILENAME
|
||||
#$PACKAGEPATCHDBGFILENAME
|
||||
#$PACKAGEPATCHNIGHTLYFILENAME
|
||||
#$PACKAGEPATCHNIGHTLYDBGFILENAME
|
||||
);
|
||||
|
||||
# Main packages are in parent of root repo folder
|
||||
OLDPWD=$PWD; # [repo]/build
|
||||
cd ../..; # parent of repo root
|
||||
|
||||
for n in ${PACKAGEFILENAMES}; do
|
||||
for f in ./$n*.changes; do
|
||||
debsign --no-re-sign -p"gpg --passphrase-file $OLDPWD/phrase.txt --batch" "$f";
|
||||
done;
|
||||
done;
|
||||
|
||||
cd $OLDPWD;
|
||||
fi;
|
||||
|
||||
if [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
|
||||
echo "Signing asset package(s)";
|
||||
|
||||
PACKAGEFILENAME=${PACKAGE_NAME}-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
|
||||
PACKAGEFILENAMES=(
|
||||
$PACKAGEFILENAME
|
||||
#$PACKAGENIGHTLYFILENAME
|
||||
#$PACKAGEPATCHFILENAME
|
||||
#$PACKAGEPATCHNIGHTLYFILENAME
|
||||
)
|
||||
|
||||
# Asset packages are in root repo folder
|
||||
OLDPWD=$PWD; # [repo]/build
|
||||
cd ..; # repo root
|
||||
|
||||
for n in ${PACKAGEFILENAMES}; do
|
||||
for f in ./$n*.changes; do
|
||||
debsign --no-re-sign -p"gpg --passphrase-file $OLDPWD/phrase.txt --batch" "$f";
|
||||
done;
|
||||
done;
|
||||
|
||||
cd $OLDPWD;
|
||||
fi;
|
||||
|
||||
# Delete the keys :eyes:
|
||||
srm key.asc;
|
||||
srm phrase.txt;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
# all other OSes
|
||||
if [[ "$TRAVIS_OS_NAME" != "linux" ]]; then
|
||||
#
|
||||
# Check for binary building
|
||||
#
|
||||
if [[ "$_DPL_BINARY" == "1" ]]; then
|
||||
echo "Building a Binary";
|
||||
make -k;
|
||||
fi;
|
||||
|
||||
#
|
||||
# Check for package building
|
||||
#
|
||||
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]]; then
|
||||
echo "Building a Package";
|
||||
|
||||
# Make an OSX package; superuser is required for library bundling
|
||||
#
|
||||
# HACK: OSX packaging can't write libraries to .app package unless we're superuser
|
||||
# because the original library files don't have WRITE permission
|
||||
# Bug may be sidestepped by using CHMOD_BUNDLE_ITEMS=TRUE
|
||||
# But I don't know where this is set. Not `cmake -D...` because this var is ignored.
|
||||
# https://cmake.org/Bug/view.php?id=9284
|
||||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
sudo make -k package;
|
||||
else
|
||||
# Some day, when Windows is supported, we'll just make a standard package
|
||||
make -k package;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
@@ -1,105 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Deployer for Travis-CI
|
||||
# Default Variables
|
||||
#
|
||||
# Here are all of the user-set variables used by Deployer.
|
||||
# See the "Cross-platform deployment" page on SRB2 Wiki for documentation.
|
||||
|
||||
# Core Parameters
|
||||
: ${DPL_ENABLED} # Enable Deployer behavior; must be set for any deployment activity
|
||||
: ${DPL_TAG_ENABLED} # Trigger Deployer for all tag releases
|
||||
: ${DPL_JOB_ENABLE_ALL} # Enable all jobs for deployment
|
||||
: ${DPL_TERMINATE_TESTS} # Terminate all build test jobs (used in .travis.yml)
|
||||
: ${DPL_TRIGGER} # Use a [word] in the commit message to trigger Deployer
|
||||
: ${DPL_JOBNAMES} # Trigger Deployer by job name
|
||||
: ${DPL_OSNAMES} # Trigger Deployer by OS name (osx,linux)
|
||||
: ${DPL_BRANCHES} # Trigger Deployer by git branch name
|
||||
|
||||
# Job Parameters
|
||||
: ${_DPL_JOB_ENABLED} # Enable Deployer for this specific job. DPL_ENABLED must be set too.
|
||||
: ${_DPL_JOB_NAME} # Identifier for the job, used for logging and trigger word matching
|
||||
: ${_DPL_FTP_TARGET} # Deploy to FTP
|
||||
: ${_DPL_DPUT_TARGET} # Deploy to DPUT
|
||||
: ${_DPL_PACKAGE_SOURCE} # Build packages into a Source distribution. Linux only.
|
||||
: ${_DPL_PACKAGE_BINARY} # Build packages into a Binary distribution.
|
||||
: ${_DPL_PACKAGE_MAIN:=1} # Build main installation package. Linux only; OS X assumes this.
|
||||
: ${_DPL_PACKAGE_ASSET} # Build asset installation package. Linux only.
|
||||
|
||||
# Asset File Parameters
|
||||
: ${ASSET_ARCHIVE_PATH:=https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-assets.7z}
|
||||
: ${ASSET_ARCHIVE_OPTIONAL_PATH:=https://github.com/mazmazz/Kart-Public/releases/download/kart_assets/srb2kart-v102-optional-assets.7z}
|
||||
: ${ASSET_FILES_HASHED:=srb2.srb patch.kart gfx.kart textures.kart chars.kart maps.kart}
|
||||
: ${ASSET_FILES_DOCS:=README.txt HISTORY.txt LICENSE.txt LICENSE-3RD-PARTY.txt}
|
||||
: ${ASSET_FILES_OPTIONAL_GET:=0}
|
||||
|
||||
# FTP Parameters
|
||||
: ${DPL_FTP_PROTOCOL}
|
||||
: ${DPL_FTP_USER}
|
||||
: ${DPL_FTP_PASS}
|
||||
: ${DPL_FTP_HOSTNAME}
|
||||
: ${DPL_FTP_PORT}
|
||||
: ${DPL_FTP_PATH}
|
||||
|
||||
# DPUT Parameters
|
||||
: ${DPL_DPUT_DOMAIN:=ppa.launchpad.net}
|
||||
: ${DPL_DPUT_METHOD:=sftp}
|
||||
: ${DPL_DPUT_INCOMING}
|
||||
: ${DPL_DPUT_LOGIN:=anonymous}
|
||||
: ${DPL_SSH_KEY_PRIVATE} # Base64-encoded private key file. Used to sign repository uploads
|
||||
: ${DPL_SSH_KEY_PASSPHRASE} # Decodes the private key file.
|
||||
|
||||
# Package Parameters
|
||||
: ${PACKAGE_NAME:=srb2kart}
|
||||
: ${PACKAGE_VERSION:=1.0.2}
|
||||
: ${PACKAGE_SUBVERSION} # Highly recommended to set this to reflect the distro series target (e.g., ~18.04bionic)
|
||||
: ${PACKAGE_REVISION} # Defaults to UTC timestamp
|
||||
: ${PACKAGE_INSTALL_PATH:=/usr/games/SRB2Kart}
|
||||
: ${PACKAGE_LINK_PATH:=/usr/games}
|
||||
: ${PACKAGE_DISTRO:=trusty}
|
||||
: ${PACKAGE_URGENCY:=high}
|
||||
: ${PACKAGE_NAME_EMAIL:=Kart Krew <stjr@srb2.org>}
|
||||
: ${PACKAGE_GROUP_NAME_EMAIL:=Kart Krew <stjr@srb2.org>}
|
||||
: ${PACKAGE_WEBSITE:=<https://mb.srb2.org/showthread.php?p=802695>}
|
||||
|
||||
: ${PACKAGE_ASSET_MINVERSION:=1.0.1} # Number this the version BEFORE the actual required version, because we do a > check
|
||||
: ${PACKAGE_ASSET_MAXVERSION:=1.0.3} # Number this the version AFTER the actual required version, because we do a < check
|
||||
|
||||
: ${PROGRAM_NAME:=Sonic Robo Blast 2 Kart}
|
||||
: ${PROGRAM_VENDOR:=Kart Krew}
|
||||
: ${PROGRAM_VERSION:=1.0.2}
|
||||
: ${PROGRAM_DESCRIPTION:=A kart racing mod based on the 3D Sonic the Hedgehog fangame Sonic Robo Blast 2.}
|
||||
: ${PROGRAM_FILENAME:=srb2kart}
|
||||
|
||||
: ${DPL_PGP_KEY_PRIVATE} # Base64-encoded private key file. Used to sign Debian packages
|
||||
: ${DPL_PGP_KEY_PASSPHRASE} # Decodes the private key file.
|
||||
|
||||
# Export Asset and Package Parameters for envsubst templating
|
||||
|
||||
export ASSET_ARCHIVE_PATH="${ASSET_ARCHIVE_PATH}"
|
||||
export ASSET_ARCHIVE_OPTIONAL_PATH="${ASSET_ARCHIVE_OPTIONAL_PATH}"
|
||||
export ASSET_FILES_HASHED="${ASSET_FILES_HASHED}"
|
||||
export ASSET_FILES_DOCS="${ASSET_FILES_DOCS}"
|
||||
export ASSET_FILES_OPTIONAL_GET="${ASSET_FILES_OPTIONAL_GET}"
|
||||
|
||||
export PACKAGE_NAME="${PACKAGE_NAME}"
|
||||
export PACKAGE_VERSION="${PACKAGE_VERSION}"
|
||||
export PACKAGE_SUBVERSION="${PACKAGE_SUBVERSION}" # in case we have this
|
||||
export PACKAGE_REVISION="${PACKAGE_REVISION}"
|
||||
export PACKAGE_ASSET_MINVERSION="${PACKAGE_ASSET_MINVERSION}"
|
||||
export PACKAGE_ASSET_MAXVERSION="${PACKAGE_ASSET_MAXVERSION}"
|
||||
export PACKAGE_INSTALL_PATH="${PACKAGE_INSTALL_PATH}"
|
||||
export PACKAGE_LINK_PATH="${PACKAGE_LINK_PATH}"
|
||||
export PACKAGE_DISTRO="${PACKAGE_DISTRO}"
|
||||
export PACKAGE_URGENCY="${PACKAGE_URGENCY}"
|
||||
export PACKAGE_NAME_EMAIL="${PACKAGE_NAME_EMAIL}"
|
||||
export PACKAGE_GROUP_NAME_EMAIL="${PACKAGE_GROUP_NAME_EMAIL}"
|
||||
export PACKAGE_WEBSITE="${PACKAGE_WEBSITE}"
|
||||
|
||||
export PROGRAM_NAME="${PROGRAM_NAME}"
|
||||
export PROGRAM_VERSION="${PROGRAM_VERSION}"
|
||||
export PROGRAM_DESCRIPTION="${PROGRAM_DESCRIPTION}"
|
||||
export PROGRAM_FILENAME="${PROGRAM_FILENAME}"
|
||||
|
||||
# This file is called in debian_template.sh, so mark our completion so we don't run it again
|
||||
__DEBIAN_PARAMETERS_INITIALIZED=1
|
||||
@@ -1,133 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Deployer for Travis-CI
|
||||
# DPUT uploader (e.g., Launchpad PPA)
|
||||
#
|
||||
|
||||
if [[ "$__DPL_DPUT_ACTIVE" == "1" ]]; then
|
||||
# Install APT dependencies
|
||||
# paramiko required for ssh
|
||||
sudo apt-get install python-paramiko expect dput; # python-pip
|
||||
#pip install paramiko;
|
||||
|
||||
# Output the DPUT config
|
||||
# Dput only works if you're using secure FTP, so that's what we default to.
|
||||
cat > "./dput.cf" << EOM
|
||||
[deployer]
|
||||
fqdn = ${DPL_DPUT_DOMAIN}
|
||||
method = ${DPL_DPUT_METHOD}
|
||||
incoming = ${DPL_DPUT_INCOMING}
|
||||
login = ${DPL_DPUT_LOGIN}
|
||||
allow_unsigned_uploads = 0
|
||||
EOM
|
||||
|
||||
# Output SSH config
|
||||
# Don't let SSH prompt us for untrusted hosts
|
||||
cat >> "./ssh_config" << EOM
|
||||
|
||||
Host *
|
||||
StrictHostKeyChecking no
|
||||
UserKnownHostsFile=/dev/null
|
||||
PubKeyAuthentication yes
|
||||
IdentityFile ${PWD}/key.private
|
||||
IdentitiesOnly yes
|
||||
EOM
|
||||
sudo sh -c "cat < ${PWD}/ssh_config >> /etc/ssh/ssh_config";
|
||||
|
||||
# Get the private key
|
||||
echo "$DPL_SSH_KEY_PRIVATE" | base64 --decode > key.private;
|
||||
chmod 700 ./key.private;
|
||||
|
||||
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]]; then
|
||||
PACKAGEFILENAME=${PACKAGE_NAME}_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
PACKAGEDBGFILENAME=${PACKAGE_NAME}-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGENIGHTLYDBGFILENAME=${PACKAGE_NAME}-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHDBGFILENAME=${PACKAGE_NAME}-patch-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHNIGHTLYDBGFILENAME=${PACKAGE_NAME}-patch-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
|
||||
PACKAGEFILENAMES=(
|
||||
$PACKAGEFILENAME
|
||||
$PACKAGEDBGFILENAME
|
||||
#$PACKAGENIGHTLYFILENAME
|
||||
#$PACKAGENIGHTLYDBGFILENAME
|
||||
#$PACKAGEPATCHFILENAME
|
||||
#$PACKAGEPATCHDBGFILENAME
|
||||
#$PACKAGEPATCHNIGHTLYFILENAME
|
||||
#$PACKAGEPATCHNIGHTLYDBGFILENAME
|
||||
);
|
||||
|
||||
# Main packages are in parent of root repo folder
|
||||
OLDPWD=$PWD; # [repo]/build
|
||||
cd ../..;
|
||||
|
||||
# Enter passphrase if required
|
||||
for n in ${PACKAGEFILENAMES}; do
|
||||
for f in $n*.changes; do
|
||||
# Binary builds also generate source builds, so exclude the source
|
||||
# builds if desired
|
||||
if [[ "$_DPL_PACKAGE_SOURCE" != "1" ]]; then
|
||||
if [[ "$f" == *"_source"* ]] || [[ "$f" == *".tar.xz"* ]]; then
|
||||
continue;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
expect <(cat <<EOD
|
||||
spawn dput -c "${OLDPWD}/dput.cf" deployer "$f";
|
||||
expect "Enter passphrase for key"
|
||||
send "${DPL_SSH_KEY_PASSPHRASE}\r"
|
||||
interact
|
||||
EOD
|
||||
);
|
||||
done;
|
||||
done;
|
||||
|
||||
# Go back to [repo]/build folder
|
||||
cd $OLDPWD;
|
||||
fi;
|
||||
|
||||
if [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
|
||||
PACKAGEFILENAME=${PACKAGE_NAME}-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
|
||||
PACKAGEFILENAMES=(
|
||||
$PACKAGEFILENAME
|
||||
#$PACKAGENIGHTLYFILENAME
|
||||
#$PACKAGEPATCHFILENAME
|
||||
#$PACKAGEPATCHNIGHTLYFILENAME
|
||||
)
|
||||
|
||||
# Asset packages are in root repo folder
|
||||
OLDPWD=$PWD; # [repo]/build
|
||||
cd ..;
|
||||
|
||||
# Enter passphrase if required
|
||||
for n in ${PACKAGEFILENAMES}; do
|
||||
for f in $n*.changes; do
|
||||
# Binary builds also generate source builds, so exclude the source
|
||||
# builds if desired
|
||||
if [[ "$_DPL_PACKAGE_SOURCE" != "1" ]]; then
|
||||
if [[ "$f" == *"_source"* ]] || [[ "$f" == *".tar.xz"* ]]; then
|
||||
continue;
|
||||
fi;
|
||||
fi;
|
||||
expect <(cat <<EOD
|
||||
spawn dput -c "${OLDPWD}/dput.cf" deployer "$f";
|
||||
expect "Enter passphrase for key"
|
||||
send "${DPL_SSH_KEY_PASSPHRASE}\r"
|
||||
interact
|
||||
EOD
|
||||
);
|
||||
done;
|
||||
done;
|
||||
|
||||
# Go back to [repo]/build folder
|
||||
cd $OLDPWD;
|
||||
fi;
|
||||
|
||||
srm ./key.private;
|
||||
fi;
|
||||
@@ -1,137 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Deployer for Travis-CI
|
||||
# FTP Uploader
|
||||
#
|
||||
# Package files are uploaded to, e.g., ftp://username:password@example.com:21/path/to/upload/STJr/SRB2/master/460873812-151.1
|
||||
# With file `commit.txt` and folder(s) `bin` and `package`
|
||||
#
|
||||
# Set these environment variables in your Travis-CI settings, where they are stored securely.
|
||||
# See other shell scripts for more options.
|
||||
#
|
||||
# DPL_FTP_PROTOCOL = ftp (ftp or sftp or ftps or however your FTP URI begins)
|
||||
# DPL_FTP_USER = username
|
||||
# DPL_FTP_PASS = password
|
||||
# DPL_FTP_HOSTNAME = example.com
|
||||
# DPL_FTP_PORT = 21
|
||||
# DPL_FTP_PATH = path/to/upload (do not add trailing slash)
|
||||
|
||||
if [[ "$__DPL_FTP_ACTIVE" == "1" ]]; then
|
||||
if [[ "$TRAVIS_JOB_NAME" != "" ]]; then
|
||||
JOBNAME=$TRAVIS_JOB_NAME;
|
||||
else
|
||||
if [[ "$_DPL_JOB_NAME" != "" ]]; then
|
||||
JOBNAME=$_DPL_JOB_NAME;
|
||||
else
|
||||
JOBNAME=$TRAVIS_OS_NAME;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
# Generate commit.txt file
|
||||
echo "Travis-CI Build $TRAVIS_OS_NAME - $TRAVIS_REPO_SLUG/$TRAVIS_BRANCH - $TRAVIS_JOB_NUMBER - $JOBNAME" > "commit.txt";
|
||||
echo "Job ID $TRAVIS_JOB_ID" >> "commit.txt";
|
||||
echo "" >> "commit.txt";
|
||||
echo "Commit $TRAVIS_COMMIT" >> "commit.txt";
|
||||
echo "$TRAVIS_COMMIT_MESSAGE" >> "commit.txt";
|
||||
echo "" >> "commit.txt";
|
||||
|
||||
# Initialize FTP parameters
|
||||
if [[ "$DPL_FTP_PORT" == "" ]]; then
|
||||
DPL_FTP_PORT=21;
|
||||
fi;
|
||||
if [[ "$DPL_FTP_PROTOCOL" == "" ]]; then
|
||||
DPL_FTP_PROTOCOL=ftp;
|
||||
fi;
|
||||
__DPL_FTP_LOCATION=$DPL_FTP_PROTOCOL://$DPL_FTP_HOSTNAME:$DPL_FTP_PORT/$DPL_FTP_PATH/$TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/$TRAVIS_JOB_ID-$TRAVIS_JOB_NUMBER-$JOBNAME;
|
||||
|
||||
# Upload to FTP!
|
||||
echo "Uploading to FTP...";
|
||||
curl --ftp-create-dirs -T "commit.txt" -u $DPL_FTP_USER:$DPL_FTP_PASS "$__DPL_FTP_LOCATION/commit.txt";
|
||||
|
||||
if [[ "$__DPL_DEBIAN_ACTIVE" == "1" ]]; then
|
||||
if [[ "$_DPL_PACKAGE_MAIN" == "1" ]]; then
|
||||
PACKAGEFILENAME=${PACKAGE_NAME}_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
PACKAGEDBGFILENAME=${PACKAGE_NAME}-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGENIGHTLYDBGFILENAME=${PACKAGE_NAME}-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHDBGFILENAME=${PACKAGE_NAME}-patch-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHNIGHTLYDBGFILENAME=${PACKAGE_NAME}-patch-nightly-dbg_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
|
||||
PACKAGEFILENAMES=(
|
||||
$PACKAGEFILENAME
|
||||
$PACKAGEDBGFILENAME
|
||||
#$PACKAGENIGHTLYFILENAME
|
||||
#$PACKAGENIGHTLYDBGFILENAME
|
||||
#$PACKAGEPATCHFILENAME
|
||||
#$PACKAGEPATCHDBGFILENAME
|
||||
#$PACKAGEPATCHNIGHTLYFILENAME
|
||||
#$PACKAGEPATCHNIGHTLYDBGFILENAME
|
||||
);
|
||||
|
||||
# Main packages are in parent of root repo folder
|
||||
OLDPWD=$PWD; # [repo]/build
|
||||
cd ../..;
|
||||
|
||||
for n in ${PACKAGEFILENAMES}; do
|
||||
for f in ./$n*; do
|
||||
# Binary builds also generate source builds, so exclude the source
|
||||
# builds if desired
|
||||
if [[ "$_DPL_PACKAGE_SOURCE" != "1" ]]; then
|
||||
if [[ "$f" == *"_source"* ]] || [[ "$f" == *".tar.xz"* ]]; then
|
||||
continue;
|
||||
fi;
|
||||
fi;
|
||||
curl --ftp-create-dirs -T "$f" -u $DPL_FTP_USER:$DPL_FTP_PASS "$__DPL_FTP_LOCATION/package/main/$f";
|
||||
done;
|
||||
done;
|
||||
|
||||
# Go back to [repo]/build folder
|
||||
cd $OLDPWD;
|
||||
fi;
|
||||
|
||||
if [[ "$_DPL_PACKAGE_ASSET" == "1" ]]; then
|
||||
PACKAGEFILENAME=${PACKAGE_NAME}-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGENIGHTLYFILENAME=${PACKAGE_NAME}-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHFILENAME=${PACKAGE_NAME}-patch-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
#PACKAGEPATCHNIGHTLYFILENAME=${PACKAGE_NAME}-patch-nightly-data_${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION};
|
||||
|
||||
PACKAGEFILENAMES=(
|
||||
$PACKAGEFILENAME
|
||||
#$PACKAGENIGHTLYFILENAME
|
||||
#$PACKAGEPATCHFILENAME
|
||||
#$PACKAGEPATCHNIGHTLYFILENAME
|
||||
)
|
||||
|
||||
# Asset packages are in root repo folder
|
||||
OLDPWD=$PWD; # [repo]/build
|
||||
cd ..;
|
||||
|
||||
for n in ${PACKAGEFILENAMES}; do
|
||||
for f in ./$n*; do
|
||||
# Binary builds also generate source builds, so exclude the source
|
||||
# builds if desired
|
||||
if [[ "$_DPL_PACKAGE_SOURCE" != "1" ]]; then
|
||||
if [[ "$f" == *"_source"* ]] || [[ "$f" == *".tar.xz"* ]]; then
|
||||
continue;
|
||||
fi;
|
||||
fi;
|
||||
curl --ftp-create-dirs -T "$f" -u $DPL_FTP_USER:$DPL_FTP_PASS "$__DPL_FTP_LOCATION/package/asset/$f";
|
||||
done;
|
||||
done;
|
||||
|
||||
# Go back to [repo]/build folder
|
||||
cd $OLDPWD;
|
||||
fi;
|
||||
else
|
||||
if [[ "$_DPL_BINARY" == "1" ]]; then
|
||||
find bin -type f -exec curl -u $DPL_FTP_USER:$DPL_FTP_PASS --ftp-create-dirs -T {} $__DPL_FTP_LOCATION/{} \;;
|
||||
fi;
|
||||
|
||||
if [[ "$_DPL_PACKAGE_BINARY" == "1" ]]; then
|
||||
sudo rm -r package/_CPack_Packages
|
||||
find package -type f -exec curl -u $DPL_FTP_USER:$DPL_FTP_PASS --ftp-create-dirs -T {} $__DPL_FTP_LOCATION/{} \;;
|
||||
fi;
|
||||
fi;
|
||||
fi
|
||||
@@ -1,93 +0,0 @@
|
||||
================================================================
|
||||
How to add Low-res modes to your XF86Config under Linux MANUALLY
|
||||
================================================================
|
||||
|
||||
I TAKE NO RESPONSIBILITY FOR ANY DAMAGE DONE TO YOUR EQUIPMENT!!!
|
||||
|
||||
This document explains how to add low-res modes like 320x200 to your
|
||||
X-Server configuration, because some new setup tools for the X-Server
|
||||
do not support this. ONLY RECOMMENDED FOR USERS WHO KNOW WHAT THEY DO!
|
||||
|
||||
I do not take any responsibility for damage done to your monitor, your
|
||||
videocard, your harddisk, your cat, your dog or anything else!!!
|
||||
IMPORTANT IS, THAT YOUR "HorizSync" AND "VertRefresh" VALUES REALLY
|
||||
MATCH YOUR MONITOR! OTHERWISE YOUR MONITOR CAN BLOW UP!!!
|
||||
|
||||
OK, if you have read up to here, you either know what you do or really
|
||||
die-hard want those low-res modes. Here is what to do:
|
||||
Look up your XF86Config. Is is either in /etc or in /etc/X11. Here is
|
||||
what you have to add to the definition of your modeslines:
|
||||
|
||||
# Low-res Doublescan modes
|
||||
# If your chipset does not support doublescan, you get a 'squashed'
|
||||
# resolution like 320x400.
|
||||
|
||||
# 320x200 @ 70 Hz, 31.5 kHz hsync, 8:5 aspect ratio
|
||||
Modeline "320x200" 12.588 320 336 384 400 200 204 205 225 Doublescan
|
||||
# 320x240 @ 60 Hz, 31.5 kHz hsync, 4:3 aspect ratio
|
||||
Modeline "320x240" 12.588 320 336 384 400 240 245 246 262 Doublescan
|
||||
# 320x240 @ 72 Hz, 36.5 kHz hsync
|
||||
Modeline "320x240" 15.750 320 336 384 400 240 244 246 262 Doublescan
|
||||
# 400x300 @ 56 Hz, 35.2 kHz hsync, 4:3 aspect ratio
|
||||
ModeLine "400x300" 18 400 416 448 512 300 301 302 312 Doublescan
|
||||
# 400x300 @ 60 Hz, 37.8 kHz hsync
|
||||
Modeline "400x300" 20 400 416 480 528 300 301 303 314 Doublescan
|
||||
# 400x300 @ 72 Hz, 48.0 kHz hsync
|
||||
Modeline "400x300" 25 400 424 488 520 300 319 322 333 Doublescan
|
||||
|
||||
If your video card only supports a specific set of discrete dotclocks
|
||||
(RAMDAC) you may have to replace the dotclocks given here by one of the
|
||||
specified (e.g in the first modeline the dotclock is 12.588 MHz). I believe
|
||||
that nowadays all cards and monitors should work with these settings, but
|
||||
if you have outdated hardware you better check the frequencies yourself. If
|
||||
there is any uncertainty, please check the "XFree86 Video Timings HOWTO".
|
||||
|
||||
|
||||
Then have a look at the section "Screen" with the appropriate driver
|
||||
(usually either "svga" or "accel"). Under Subsection "Display" there
|
||||
are modes for the given color depth. Add the desired modes. As an
|
||||
example I give you my screens definition here with low-res modes in
|
||||
16 bit color depth:
|
||||
|
||||
Section "Screen"
|
||||
Driver "accel"
|
||||
Device "3D Charger"
|
||||
Monitor "Iiyama Pro 450"
|
||||
DefaultColorDepth 16
|
||||
|
||||
Subsection "Display"
|
||||
Depth 8
|
||||
Modes "1280x1024" "1024x768" "800x600" "640x480"
|
||||
ViewPort 0 0
|
||||
Virtual 1280 1024
|
||||
EndSubsection
|
||||
Subsection "Display"
|
||||
Depth 16
|
||||
Modes "1152x864" "1024x768" "800x600" "640x480" "400x300" "320x200" <- THIS IS ACTUALLY WHAT YOU WANT!!!
|
||||
ViewPort 0 0 ^^^^^^^^^^^^^^^^^^^
|
||||
Virtual 1152 864
|
||||
EndSubsection
|
||||
Subsection "Display"
|
||||
Depth 24
|
||||
Modes "800x600" "640x480"
|
||||
ViewPort 0 0
|
||||
Virtual 800 600
|
||||
EndSubsection
|
||||
Subsection "Display"
|
||||
Depth 32
|
||||
Modes "800x600" "640x480"
|
||||
ViewPort 0 0
|
||||
Virtual 800 600
|
||||
EndSubsection
|
||||
EndSection
|
||||
|
||||
Once again: important is, that you edit the correct Screen section.
|
||||
If you use the SVGA Server and edit the ACCEL Server, you might
|
||||
wonder where your new modes have gone.
|
||||
|
||||
If everything went fine and you want to say thank you, just write
|
||||
to "metzgermeister@users.sourceforge.net". If your monitor blew
|
||||
up and you want to kill me, find me playing Legacy or Q3A on the net
|
||||
and frag me (with your second monitor, hehe).
|
||||
|
||||
- metzgermeister
|
||||
@@ -1,212 +0,0 @@
|
||||
1-99 : Player Starts
|
||||
1 - Player 1 Start 1
|
||||
2 - Player 2 Start 2
|
||||
3 - Player 3 Start 3
|
||||
4 - Player 4 Start 4
|
||||
5 - Player 5 Start 4001
|
||||
6 - Player 6 Start 4002
|
||||
7 - Player 7 Start 4003
|
||||
8 - Player 8 Start 4004
|
||||
9 - Player 9 Start 4005
|
||||
10 - Player 10 Start 4006
|
||||
11 - Player 11 Start 4007
|
||||
12 - Player 12 Start 4008
|
||||
13 - Player 13 Start 4009
|
||||
14 - Player 14 Start 4010
|
||||
15 - Player 15 Start 4011
|
||||
16 - Player 16 Start 4012
|
||||
17 - Player 17 Start 4013
|
||||
18 - Player 18 Start 4014
|
||||
19 - Player 19 Start 4015
|
||||
20 - Player 20 Start 4016
|
||||
21 - Player 21 Start 4017
|
||||
22 - Player 22 Start 4018
|
||||
23 - Player 23 Start 4019
|
||||
24 - Player 24 Start 4020
|
||||
25 - Player 25 Start 4021
|
||||
26 - Player 26 Start 4022
|
||||
27 - Player 27 Start 4023
|
||||
28 - Player 28 Start 4024
|
||||
29 - Player 29 Start 4025
|
||||
30 - Player 30 Start 4026
|
||||
31 - Player 31 Start 4027
|
||||
32 - Player 32 Start 4028
|
||||
33 - Player Match Start 11
|
||||
34 - Red Team Start 87
|
||||
35 - Blue Team Start 89
|
||||
36 - Tag start New
|
||||
|
||||
100 - 199 : Enemies
|
||||
100 - Blue Crawla 3004
|
||||
101 - Red Crawla 9
|
||||
102 - GFZ Fish 58
|
||||
103 - Gold Buzz 5005
|
||||
104 - Red Buzz 5006
|
||||
105 - Jetty-Syn Bomber 3005
|
||||
106 - Jetty-Syn Gunner 22
|
||||
107 - Crawla Commander 21
|
||||
108 - Deton 71
|
||||
109 - Skim 56
|
||||
110 - THZ Turret 2004
|
||||
111 - Pop-up Turret 42
|
||||
|
||||
200 - 299 : Bosses and their associated items (if any)
|
||||
200 - Boss 1 16
|
||||
201 - Boss 2 2008
|
||||
290 - Boss Fly Point 17
|
||||
291 - EggTrap Center 2049
|
||||
|
||||
300 - 399 : Collectibles
|
||||
300 - Ring 2014
|
||||
301 - Homing Ring 69
|
||||
302 - Rail Ring 3003
|
||||
303 - Infinity Ring 80
|
||||
304 - Automatic Ring 26
|
||||
305 - Explosion Ring 54
|
||||
306 - Red CTF Flag 31
|
||||
307 - Blue CTF Flag 34
|
||||
308 - Special Stage Token 2013
|
||||
309 - Emerald 1 420
|
||||
310 - Emerald 2 421
|
||||
311 - Emerald 3 422
|
||||
312 - Emerald 4 423
|
||||
313 - Emerald 5 424
|
||||
314 - Emerald 6 425
|
||||
315 - Emerald 7 426
|
||||
316 - Hunting Emerald 1 64
|
||||
317 - Hunting Emerald 2 3002
|
||||
318 - Hunting Emerald 3 3001
|
||||
|
||||
400 - 499 : Boxes
|
||||
400 - Super Ring Box 2011
|
||||
401 - Grey Ring Box 2012
|
||||
402 - Ring Shield Box 48
|
||||
403 - Fire Shield Box 2002
|
||||
404 - Bomb Shield Box 2018
|
||||
405 - Jump Shield Box 35
|
||||
406 - Water Shield Box 2028
|
||||
407 - Sneaker Box 25
|
||||
408 - Invincibility Box 2022
|
||||
409 - 1-Up Box 41
|
||||
410 - Eggman Box 2005
|
||||
411 - Mixup Box 78
|
||||
412 - Question Box 3000
|
||||
|
||||
500 - 599 : Interactive Objects (friendly or otherwise - includes springs)
|
||||
500 - Bubble Patch 33
|
||||
501 - Level End Sign 86
|
||||
502 - Starpost 3006
|
||||
520 - Spike Ball -1
|
||||
521 - Special Stage Spike Ball 23
|
||||
522 - Ceiling Spike 67
|
||||
523 - Floor Spike 68
|
||||
540 - Fan 32
|
||||
541 - Steam Riser 30
|
||||
550 - Yellow Spring 28
|
||||
551 - Red Spring 79
|
||||
552 - Blue Spring 5004
|
||||
553 - Yellow Spring Down 65
|
||||
554 - Red Spring Down 66
|
||||
555 - Yellow Diagonal Spring 2015
|
||||
556 - Red Diagonal Spring 38
|
||||
557 - Yellow Diag Spring Down 20
|
||||
558 - Red Diag Spring Down 39
|
||||
|
||||
600 - 699 : Special placement patterns
|
||||
600 - Vertical Rigns - Stack of 5 (suitable for Yellow Spring) 84
|
||||
601 - Vertical Rings - Stack of 5 (suitable for Red Spring) 44
|
||||
602 - Diagonal rings (5) 76
|
||||
603 - Diagonal rings (10) 77
|
||||
604 - A ring of rings 47
|
||||
605 - A BIGGER ring of rings 2007
|
||||
606 - A ring of wing items 2048
|
||||
607 - A BIGGER ring of wing items 2010
|
||||
608 - A ring of rings and wings (alternating) 2046
|
||||
609 - A BIGGER ring of rings and wings (alternating) 2047
|
||||
|
||||
700 - 799 : Powerup indicators/environmental effects/miscellany
|
||||
700 - Ambient Water 1a (S) 2026
|
||||
701 - Ambient Water 1b (S) 2024
|
||||
702 - Ambient Water 2a (M) 2023
|
||||
703 - Ambient Water 2b (M) 2045
|
||||
704 - Ambient Water 3a (L) 83
|
||||
705 - Ambient Water 3b (L) 2019
|
||||
706 - Ambient Water 4a (XL) 2025
|
||||
707 - Ambient Water 4b (XL) 27
|
||||
708 - Random Ambient 1 14
|
||||
709 - Random Ambient 2 43
|
||||
750 - Chaos Spawner 8
|
||||
751 - Teleport Point 5003
|
||||
752 - Alternate View Point 5007
|
||||
753 - Zoom Tube Waypoint 18
|
||||
754 - Pusher 5001
|
||||
755 - Puller 5002
|
||||
756 - Street Light 2003
|
||||
|
||||
800 - 899 : Greenflower Scenery
|
||||
800 - Flower 1 36
|
||||
801 - Flower 2 70
|
||||
802 - Flower 3 73
|
||||
804 - Berry Bush 74
|
||||
805 - Bush 75
|
||||
|
||||
900 - 999 : Techno Hill Scenery
|
||||
900 - THZ Plant 2035
|
||||
901 - Alarm 2006
|
||||
|
||||
1000 - 1099 : Deep Sea Scenery
|
||||
1000 - Gargoyle 81
|
||||
|
||||
1100 - 1199 : Castle Eggman Scenery
|
||||
1100 - Ceiling Chain 49
|
||||
1101 - Torch Flame 24
|
||||
1102 - Eggman Statue 52
|
||||
1103 - CEZ Flower 2001
|
||||
|
||||
1200 - 1299 : Arid Canyon Scenery
|
||||
1300 - 1399 : Red Volcano Scenery
|
||||
1400 - 1499 : Dark City Scenery
|
||||
1500 - 1599 : Doom Ship Scenery
|
||||
1600 - 1699 : Egg Rock/Final Fight Scenery
|
||||
1700 - 1799 : NiGHTS Items
|
||||
1700 - Axis 72
|
||||
1701 - Axis Transfer (Normal) 61
|
||||
1702 - Axis Transfer (Line) 46
|
||||
1703 - Nights Drone 60
|
||||
1704 - Nights Bumper 82
|
||||
1705 - Hoop 57
|
||||
1706 - Nights Wing 37
|
||||
1707 - Super Loop Powerup 3007
|
||||
1708 - Drill Refill Powerup 3008
|
||||
1709 - Helper Powerup 3009
|
||||
1710 - Egg Capsule 40
|
||||
|
||||
1800 - 1849 : Mario Items
|
||||
1800 - Coin 10005
|
||||
1801 - Goomba 10000
|
||||
1802 - Blue Goomba 10001
|
||||
1803 - FireFlower 50
|
||||
1804 - Shell 10
|
||||
1805 - Puma 29
|
||||
1806 - Koopa 19
|
||||
1807 - Axe 12
|
||||
1808 - Mario Bush 1 10002
|
||||
1809 - Mario Bush 2 10003
|
||||
1810 - Toad 10004
|
||||
|
||||
1850 - 1899 : Christmas Items
|
||||
1850 - Xmas Pole 5
|
||||
1851 - Candy Cane 13
|
||||
1852 - Snowman 6
|
||||
|
||||
1900 - 1999 : Misc Scenery
|
||||
1900 - Stalagmite 0
|
||||
1901 - Stalagmite 1
|
||||
1902 - Stalagmite 2
|
||||
1903 - Stalagmite 3
|
||||
1904 - Stalagmite 4
|
||||
1905 - Stalagmite 5
|
||||
1906 - Stalagmite 6
|
||||
1907 - Stalagmite 7
|
||||
1908 - Stalagmite 8
|
||||
1909 - Stalagmite 9
|
||||
@@ -1,223 +0,0 @@
|
||||
Description OldNum NewNum Description
|
||||
Old Water 14 Removed
|
||||
|
||||
Level Parameters/Misc:
|
||||
Per-Sector Gravity 64 1
|
||||
Custom Exit 71 2
|
||||
Zoom Tube Parameters 18 3
|
||||
Speed Pad 65 4
|
||||
Camera Scanner 63 5
|
||||
Disable Linedef 73 6
|
||||
Flat Alignment 66 7
|
||||
Sector Special Parameters New 8
|
||||
Mace Parameters New 9
|
||||
Sprite Cull Height New 10
|
||||
Rope Hang Parameters New 11
|
||||
Rock Spawner Parameters New 12
|
||||
|
||||
PolyObjects
|
||||
Marks first line in PolyObject New 20
|
||||
Explicitly includes a PolyObject line New 21
|
||||
PolyObject: Parameters New 22
|
||||
PolyObject: Waving Flag New 31
|
||||
|
||||
Level-Load Effects:
|
||||
Instant Floor Lower 26 50
|
||||
Instant Ceiling Raise 24 51
|
||||
Continuously Falling Sector 88 52
|
||||
Continuous Floor/Ceiling Mover 2 53
|
||||
Continuous Floor Mover 3 54
|
||||
Continuous Ceiling Mover 4 55
|
||||
Continuous Two-Speed Floor/Ceiling Mover 6 56
|
||||
Continuous Two-Speed Floor Mover 7 57
|
||||
Continuous Two-Speed Ceiling Mover 8 58
|
||||
Activate Floating Platform 232 59
|
||||
Activate Floating Platform (Adjustable Speed) 233 60
|
||||
Crusher 1 (Ceiling to Floor) 43 61
|
||||
Crusher 2 (Floor to Ceiling) 50 62
|
||||
Fake Floor/Ceiling 242 63
|
||||
Appearing/Disappearing FOF New 64
|
||||
Bridge Thinker New 65
|
||||
|
||||
Floor Over Floors:
|
||||
"Floor Over Floor: Solid, Opaque, Shadowcasting " 25 100
|
||||
"Floor Over Floor: Solid, Opaque, Non-Shadowcasting " 33 101
|
||||
"Floor Over Floor: Solid, Translucent " 44 102
|
||||
"Floor Over Floor: Solid, Sides Only " 69 103
|
||||
"Floor Over Floor: Solid, No Sides " 51 104
|
||||
"Floor Over Floor: Solid, Invisible " 57 105
|
||||
|
||||
"Floor Over Floor: Water, Opaque " 48 120
|
||||
"Floor Over Floor: Water, Translucent " 45 121
|
||||
"Floor Over Floor: Water, Opaque, No Sides " 75 122
|
||||
"Floor Over Floor: Water, Translucent, No Sides " 74 123
|
||||
|
||||
"Floor Over Floor: Platform, Opaque " 59 140
|
||||
"Floor Over Floor: Platform, Translucent " 81 141
|
||||
"Floor Over Floor: Platform, Translucent, No Sides " 77 142
|
||||
|
||||
Floor Over Floor: Bobbing (Air) 38 150
|
||||
Floor Over Floor: Adjustable Bobbing (Air) 68 151
|
||||
Floor Over Floor: Reverse Adjustable Bobbing (Air) 72 152
|
||||
|
||||
"Floor Over Floor: Floating, Bobbing " 34 160
|
||||
|
||||
Floor Over Floor: Crumbling (Respawn) 36 170
|
||||
Floor Over Floor: Crumbling (No Respawn) 35 171
|
||||
"Floor Over Floor: Crumbling (Respawn), Platform " 79 172
|
||||
"Floor Over Floor: Crumbling (No Respawn), Platform " 80 173
|
||||
"Floor Over Floor: Crumbling (Respawn), Platform, Translucent " 82 174
|
||||
"Floor Over Floor: Crumbling (No Respawn), Platform, Translucent " 83 175
|
||||
"Floor Over Floor: Crumbling (Respawn), Floating, Bobbing " 39 176
|
||||
"Floor Over Floor: Crumbling (No Respawn), Floating, Bobbing " 1 177
|
||||
"Floor Over Floor: Crumbling (Respawn), Floating " 37 178
|
||||
"Floor Over Floor: Crumbling (No Respawn), Floating " 42 179
|
||||
"Floor Over Floor: Crumbling (Respawn), Bobbing (Air) " 40 180
|
||||
|
||||
"Floor Over Floor: Rising Platform, Solid, Opaque, Shadowcasting " 89 190
|
||||
"Floor Over Floor: Rising Platform, Solid, Opaque, Non-Shadowcasting " 90 191
|
||||
"Floor Over Floor: Rising Platform, Solid, Translucent " 91 192
|
||||
"Floor Over Floor: Rising Platform, Solid, Invisible " 94 193
|
||||
"Floor Over Floor: Rising Platform, Platform, Opaque " 92 194
|
||||
"Floor Over Floor: Rising Platform, Platform, Translucent " 93 195
|
||||
|
||||
Floor Over Floor: Light Block 49 200
|
||||
Floor Over Floor: Half Light Block 47 201
|
||||
Floor Over Floor: Fog Block 46 202
|
||||
|
||||
"Floor Over Floor: Intangible, Opaque " 62 220
|
||||
"Floor Over Floor: Intangible, Translucent " 52 221
|
||||
"Floor Over Floor: Intangible, Sides Only " 67 222
|
||||
"Floor Over Floor: Intangible, Invisible " 58 223
|
||||
|
||||
Floor Over Floor: Mario Block 41 250
|
||||
Floor Over Floor: Thwomp Block 54 251
|
||||
Floor Over Floor: Shatter Block 76 252
|
||||
"Floor Over Floor: Shatter Block, Translucent " 86 253
|
||||
Floor Over Floor: Bustable Block 55 254
|
||||
Floor Over Floor: Spin Bust Block 78 255
|
||||
"Floor Over Floor: Spin Bust Block, Translucent " 84 256
|
||||
Floor Over Floor: Quicksand Block 56 257
|
||||
Floor Over Floor: Laser Block 53 258
|
||||
Floor Over Floor: Custom 87 259
|
||||
|
||||
Linedef Executor Triggers:
|
||||
Trigger Linedef Executor (Continuous) 96 300
|
||||
Trigger Linedef Executor (Each Time) 97 301
|
||||
Trigger Linedef Executor (Once) 98 302
|
||||
Trigger Linedef Executor (Ring Count - Continuous) 95 303
|
||||
Trigger Linedef Executor (Ring Count - Once) 99 304
|
||||
Trigger Linedef Executor (Character Ability - Continuous) 19 305
|
||||
Trigger Linedef Executor (Character Ability - Each Time) 20 306
|
||||
Trigger Linedef Executor (Character Ability - Once) 21 307
|
||||
"Trigger Linedef Executor (Race Only, Once) " 9 308
|
||||
Trigger Linedef Executor (CTF Red Team - Continuous) 10 309
|
||||
Trigger Linedef Executor (CTF Red Team - Each Time) 11 310
|
||||
Trigger Linedef Executor (CTF Blue Team - Continuous) 12 311
|
||||
Trigger Linedef Executor (CTF Blue Team - Each Time) 13 312
|
||||
Trigger Linedef Executor (No More Enemies - Once) 15 313
|
||||
Trigger Linedef Executor (# of Pushables - Continuous) New 314
|
||||
Trigger Linedef Executor (# of Pushables - Once) New 315
|
||||
Trigger Linedef Executors (PolyObject - Land On) New 316
|
||||
Trigger Linedef Executor (Level Load) New 399
|
||||
|
||||
Linedef Executor Options:
|
||||
Linedef Executor: Set Tagged Sector's Floor Height/Pic 101 400
|
||||
Linedef Executor: Set Tagged Sector's Ceiling Height/Pic 102 401
|
||||
Linedef Executor: Set Tagged Sector's Light Level 103 402
|
||||
Linedef Executor: Move Tagged Sector's Floor 106 403
|
||||
Linedef Executor: Move Tagged Sector's Ceiling 107 404
|
||||
Linedef Executor: Lower Floor by Line 108 405
|
||||
Linedef Executor: Raise Floor by Line 109 406
|
||||
Linedef Executor: Lower Ceiling by Line 110 407
|
||||
Linedef Executor: Raise Ceiling by Line 111 408
|
||||
Linedef Executor: Change Calling Sector's Tag 112 409
|
||||
Linedef Executor: Change Front Sector's Tag 114 410
|
||||
Linedef Executor: Stop Plane Movement 116 411
|
||||
Linedef Executor: Teleport Player to Tagged Sector 104 412
|
||||
Linedef Executor: Change Music 105 413
|
||||
Linedef Executor: Play SFX 115 414
|
||||
Linedef Executor: Run Script 113 415
|
||||
Linedef Executor: Start Adjustable Fire Flicker 119 416
|
||||
Linedef Executor: Start Adjustable Glowing Light 120 417
|
||||
Linedef Executor: Start Adjustable Strobe Flash (unsynchronized) New 418
|
||||
Linedef Executor: Start Adjustable Strobe Flash (synchronized) New 419
|
||||
Linedef Executor: Fade Light Level 117 420
|
||||
Linedef Executor: Stop Lighting Effect 118 421
|
||||
Linedef Executor: Cut-Away View 121 422
|
||||
Linedef Executor: Change Sky 123 423
|
||||
Linedef Executor: Change Weather 124 424
|
||||
Linedef Executor: Change Object State 125 425
|
||||
Linedef Executor: Stop Object 122 426
|
||||
Linedef Executor: Award Score 126 427
|
||||
Linedef Executor: Start Platform Movement 127 428
|
||||
Linedef Executor: Crush Ceiling Once New 429
|
||||
Linedef Executor: Crush Floor Once New 430
|
||||
Linedef Executor: Crush Floor & Ceiling Once New 431
|
||||
Linedef Executor: Enable 2D Mode New 432
|
||||
Linedef Executor: Disable 2D Mode New 433
|
||||
Linedef Executor: Award Custom Power New 434
|
||||
Linedef Executor: Stop Conveyor New 435
|
||||
Linedef Executor: Start Conveyor New 436
|
||||
Linedef Executor: Disable Player Movement New 437
|
||||
|
||||
Linedef Executor: Execute Linedef Executor New 450
|
||||
|
||||
Linedef Executor: PolyObject: Door Slide New 480
|
||||
Linedef Executor: PolyObject: Door Swing New 481
|
||||
Linedef Executor: PolyObject: Move XY New 482
|
||||
Linedef Executor: PolyObject: Move XY w/ override New 483
|
||||
Linedef Executor: PolyObject: Rotate Right New 484
|
||||
Linedef Executor: PolyObject: Rotate Right w/ override New 485
|
||||
Linedef Executor: PolyObject: Rotate Left New 486
|
||||
Linedef Executor: PolyObject: Rotate Left w/ override New 487
|
||||
Linedef Executor: PolyObject: Start waypoint movement New 488
|
||||
Linedef Executor: PolyObject: Make Invisible New 489
|
||||
Linedef Executor: PolyObject: Make Visible New 490
|
||||
|
||||
Scrollers/Pushers:
|
||||
Scroll Wall First Side Left 100 500
|
||||
Scroll Wall First Side Opposite Direction 85 501
|
||||
Scroll Wall According to Linedef 254 502
|
||||
Acc Scroll Wall According to Linedef 218 503
|
||||
Disp Scroll Wall According to Linedef 249 504
|
||||
Scroll Texture by Offsets 255 505
|
||||
|
||||
Scroll Floor Texture 251 510
|
||||
Acc Scroll Floor Texture 215 511
|
||||
Disp Scroll Floor Texture 246 512
|
||||
Scroll Ceiling Texture 250 513
|
||||
Acc Scroll Ceiling Texture 214 514
|
||||
Disp Scroll Ceiling Texture 245 515
|
||||
|
||||
Carry Objects on Floor (no scroll) 252 520
|
||||
Acc Carry Objects on Floor 216 521
|
||||
Disp Carry Objects on Floor 247 522
|
||||
Carry Objects on Ceiling 203 523
|
||||
Acc Carry Objects on Ceiling 205 524
|
||||
Disp Carry Objects on Ceiling 201 525
|
||||
|
||||
Scroll Floor Texture and Carry Objects 253 530
|
||||
Acc Scroll Floor Texture and Carry Objects 217 531
|
||||
Disp Scroll Floor Texture and Carry Objects 248 532
|
||||
Scroll Ceiling Texture and Carry Objects 202 533
|
||||
Acc Scroll Ceiling Texture and Carry Objects 204 534
|
||||
Disp Scroll Ceiling Texture and Carry Objects 200 535
|
||||
|
||||
Friction 223 540
|
||||
Horizontal Wind 224 541
|
||||
Upwards Wind 229 542
|
||||
Downwards Wind 230 543
|
||||
Horizontal Current 225 544
|
||||
Upwards Current 227 545
|
||||
Downwards Current 228 546
|
||||
Boom Push/Pull Thing 226 547
|
||||
|
||||
Lighting:
|
||||
Floor Lighting 213 600
|
||||
Ceiling Lighting 5 601
|
||||
Adjustable Pulsating Light 60 602
|
||||
Adjustable Flickering Light 61 603
|
||||
Adjustable Blinking Light (unsynchronized) New 604
|
||||
Adjustable Blinking Light (synchronized) New 605
|
||||
Colormap 16 606
|
||||
Binary file not shown.
@@ -1,78 +0,0 @@
|
||||
Removed:
|
||||
- Buttons 1-20 690-709
|
||||
- Button 21 (THZ2 A/740 B/741 D/742 E/745 710
|
||||
- Close Door Blazing (Tag 743) 711
|
||||
- Raise Ceiling to Highest (Tag 744) 981
|
||||
- THZ2 Slime Raise (B/712 W713 P714 D715 S716) 986
|
||||
|
||||
Stuff to Remove/Change:
|
||||
- Light Blinks On Every 0.5 Seconds 2 Add Linedef Combine
|
||||
- Light Blinks On Every 1 Second 3 Add Linedef Combine
|
||||
- Light Pulses Smoothly 8 Remove
|
||||
- Light Blinks On Every 0.5 Seconds (Sync) 12 Add Linedef Combine
|
||||
- Lights Blinks On Every 1 Second (Sync) 13 Add Linedef Combine
|
||||
- Light Flickers Like Fire 17 Remove
|
||||
? - Damage (Fire) and Current 519 Remove (convert to combination)
|
||||
? - Damage (Water) and Current 984 Remove (convert to combination)
|
||||
|
||||
Section 1:
|
||||
1 - Damage (Generic) 11
|
||||
2 - Damage (Water) 983
|
||||
3 - Damage (Fire) 7
|
||||
4 - Damage (Electrical) 18
|
||||
5 - Spikes 4
|
||||
6 - Death Pit (Camera Mod) 16
|
||||
7 - Death Pit (No Camera Mod) 5
|
||||
8 - Instant Kill 10
|
||||
9 - Ring Drainer (Floor Touch) 978
|
||||
10 - Ring Drainer (No Floor Touch) 980
|
||||
11 - Special Stage Damage 9
|
||||
12 - Space Countdown 6
|
||||
13 - Ramp Sector (Increase step-up) 992
|
||||
14 - Non-Ramp Sector (Don't step-down) 996
|
||||
15 - Bouncy Sector (FOF Control Only) 14
|
||||
|
||||
Section 2: << 4
|
||||
1 - Trigger Linedef Exec (Pushable Objects) 971
|
||||
2 - Trigger LD Exec (Anywhere in Sec/All Pls) 972
|
||||
3 - Trigger Linedef Exec (Floor Touch/All Pls) 973
|
||||
4 - Trigger Linedef Exec (Anywhere in Sec) 974
|
||||
5 - Trigger Linedef Exec (Floor Touch) 975
|
||||
6 - Trigger Linedef Exec (Emerald Check) 967
|
||||
7 - Trigger Linedef Exec (NiGHTS Mare) 968
|
||||
8 - Check for linedef executor on FOFs (ANY) 970
|
||||
9 - Egg Trap Capsule 666
|
||||
10 - Special Stage Time/Rings, Par 990
|
||||
11 - Custom Global Gravity 991
|
||||
|
||||
Section 3: << 8
|
||||
1 - Ice/Sludge (required?!) 256
|
||||
2 - Wind/Current (required?!) 512
|
||||
3 - Ice/Sludge and Wind/Current 768
|
||||
4 - Conveyor Belt 985
|
||||
5 - Speed Pad (No Spin) 976
|
||||
6 - Speed Pad (Spin) 977
|
||||
7 - Bustable Block Sprite Parameter 1500-1515
|
||||
8 - "
|
||||
9 - "
|
||||
10 - "
|
||||
11 - "
|
||||
12 - "
|
||||
13 - "
|
||||
14 - "
|
||||
15 - "
|
||||
|
||||
Section 4: << 12
|
||||
1 - Starpost Activator 993
|
||||
2 - Special Stage Goal Combine 33
|
||||
2 - Exit Sector Combine 982
|
||||
2 - No Tag Zone Combine 987
|
||||
2 - CTF: Flag Return Combine 995
|
||||
3 - CTF: Red Team Base 988
|
||||
4 - CTF: Blue Team Base 989
|
||||
5 - Fan Sector 997
|
||||
6 - Super Sonic Transform 969
|
||||
7 - Spinner 979
|
||||
8 - Zoom Tube Start 998
|
||||
9 - Zoom Tube End 999
|
||||
10 - Finish Line 994
|
||||
-307
@@ -1,307 +0,0 @@
|
||||
SRB2
|
||||
Release v1.09, ? 2005.
|
||||
|
||||
Last Updated: June 2005
|
||||
|
||||
Original game & sources by: Id Software.
|
||||
Additions: (c)1998 by: Fabrice Denis & Boris Pereira
|
||||
(c)1999 by: Fabrice Denis, Boris Pereira & Thierry Van Elsuwe
|
||||
(c)2000 by: Boris Pereira & Thierry Van Elsuwe
|
||||
(c)2004 By: AJ, Graue, Alam Arias, Logan Arias & Andrew Clunis
|
||||
|
||||
Special thanks to Steven McGranahan, Lee Killough, Robert Bäuml and Bell Kin for
|
||||
their large contribution and to other DooM LEGACY & SRB2 Team members.
|
||||
|
||||
Web site: http://www.SRB2.org/
|
||||
e-mail: none@none.com
|
||||
|
||||
OpenGL specific:
|
||||
Web site: http://legacy.newdoom.com/gl
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
F.A.Q.
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
|
||||
If you have any trouble with SRB2, you might find a solution
|
||||
here.
|
||||
|
||||
If you find a solution to a problem that was not listed here,
|
||||
please tell us so that we can update the FAQ and help other people!
|
||||
|
||||
Mail your hardware/software problems to:
|
||||
|
||||
None@none.com subject: FAQ
|
||||
|
||||
|
||||
--------
|
||||
CONTENTS
|
||||
--------
|
||||
|
||||
[0] Miscellaneous
|
||||
[1] Mouse/Joystick/Keyboard
|
||||
[2] Video
|
||||
[3] Sound
|
||||
[4] Network
|
||||
[5] Troubleshooting
|
||||
|
||||
|
||||
-----------------
|
||||
[0] MISCELLANEOUS
|
||||
-----------------
|
||||
|
||||
* under win95 or OS/2, I don't have enough memory. How can i handle with ?
|
||||
|
||||
Tell win95 to put more dpmi memory for your dos box.
|
||||
Or use the -mb option.
|
||||
|
||||
|
||||
|
||||
---------------------------
|
||||
[1] MOUSE/JOYSTICK/KEYBOARD
|
||||
---------------------------
|
||||
|
||||
* My mouse/joystick does not work in SRB2.
|
||||
|
||||
First, check that the mouse/joystick is activated : go at the
|
||||
console and type either 'use_mouse' (or use the respective
|
||||
menuitem) or 'use_joystick'.
|
||||
|
||||
If it tells '0' or off than the mouse/joystick is not used,
|
||||
set the variable to 1. eg: 'use_mouse 1'.
|
||||
|
||||
For the joystick, different values will support different
|
||||
types of joystick, check the console documentation for the
|
||||
command 'use_joystick' for more.
|
||||
|
||||
Even if the mouse or joystick is activated, you have to
|
||||
set up the contols into the Setup Controls menu. That is:
|
||||
tell what use you will make of the mouse/joystick buttons.
|
||||
|
||||
|
||||
---------
|
||||
[2] VIDEO
|
||||
---------
|
||||
|
||||
|
||||
* Where are the other video modes ? I have only '320x200' in the
|
||||
Video Modes menu.
|
||||
|
||||
DOS
|
||||
---
|
||||
|
||||
SRB2 adds new video modes only if a VESA2 (or better) driver
|
||||
is present. The VESA2 driver is a standard of 'talking' between a
|
||||
program and the huge amount of different graphics cards
|
||||
available today.
|
||||
|
||||
If you don't have a VESA2 driver, you can download UNIVBE, or
|
||||
SMART DISPLAY DOCTOR from
|
||||
|
||||
http://www.scitechsoft.com/products/ent/free_titles.html
|
||||
|
||||
or if you have an S3 based card, you can download the free
|
||||
software called 'S3VBE'.
|
||||
|
||||
ftp://ftp.externet.hu/pub/mirror/sac/graph/s3vbe318.zip
|
||||
ftp://ftp.digsys.bg/pub/simtelnet/msdos/graphics/s3vbe318.zip
|
||||
http://www.filesearching.com/cgi-bin/s?q=s3vbe318.zip
|
||||
http://www.google.com/search?q=s3vbe318.zip
|
||||
|
||||
* The game doesn't restore the video mode I have chosen the last time
|
||||
I played SRB2.
|
||||
|
||||
The current video mode has to be made the 'default' so that it is
|
||||
saved to the config : press the key 'D' on the Video Options menu
|
||||
to set the current video mode the default.
|
||||
|
||||
* I have some problems with OpenGL mode
|
||||
|
||||
Have a look at the FAQ for OpenGL on the glLegacy web site:
|
||||
|
||||
http://www.doomnation.com/gllegacy/faqe.htm
|
||||
|
||||
# Linux: I only have a 1024x768 (or 800x600, 1280x1024, ...) resolution
|
||||
in fullscreen mode under X and SRB2 is really really slow. Can I
|
||||
have lower resolutions like 320x200 in fullscreen mode as well?
|
||||
|
||||
Probably yes. SRB2 can only use the resolutions offered by the
|
||||
X-Server. So if all fullscreen modes have a very high resolution you
|
||||
have to modify /etc/XF86Config (or /etc/X11/XF86Config). Use XF86Setup
|
||||
(or the appropriate tool coming with your distribution - sax,
|
||||
xf86config, ...) to do this.
|
||||
If you do not succeed there, you can enter them manually into your
|
||||
XF86Config file. ONLY RECOMMENDED FOR USERS WHO KNOW WHAT THEY DO!
|
||||
For a short guide on how to do this, have a look at the file
|
||||
"Doublescan.txt".
|
||||
In case of doubt consult the XFree86-HOWTO (or ask your system
|
||||
administrator :).
|
||||
|
||||
# Linux: I cannot have any fullscreen modes at all!
|
||||
|
||||
You have only modes above 1024x768 in your XF86Config. Proceed as
|
||||
described above.
|
||||
|
||||
# Linux: After a certain idle time my screensaver jams the display of
|
||||
SRB2. I can still operate SRB2, but I do not see what's happening
|
||||
and the screensaver won't go away.
|
||||
|
||||
You probably have KDE. The KDE screensaver does not obey the screensaver
|
||||
rules (at least mine, version 1.1). The solution is to deactivate the
|
||||
KDE screensaver and use another screensaver (like the xscreensaver,
|
||||
e.g.). But the hell, when you started SRB2 you should have played it
|
||||
as well and not left it alone!!!
|
||||
|
||||
---------
|
||||
[3] SOUND
|
||||
---------
|
||||
|
||||
+ DOS:I can't have CD audio music, why ?
|
||||
|
||||
Make sure that the MSCDEX driver version 2.0 or later is loaded.
|
||||
If it says 'MSCDEX version xxx' at game startup, and you still
|
||||
don't hear the cd music, then probably your card doesn't respond
|
||||
when SRB2 tries to set the cd volume. If so, make sure your sound
|
||||
card's mixer have the cd volume set up so that you can hear something.
|
||||
|
||||
+ When the CD plays, the game is very 'jerky'. It doesn't do that when
|
||||
I type 'cd off' in the console.
|
||||
|
||||
You have an old/bad cd driver, that can take up to a second to
|
||||
respond to cd driver commands. Either get the latest version of
|
||||
your driver, or turn cd update off. Check 'cd_udpate' in the
|
||||
console documentation for more.
|
||||
|
||||
* DOS:How can I *ALWAYS* disable the sounds or music of the game ?
|
||||
|
||||
Edit the allegro.cfg file and set digicard/midicard to 0 (none)
|
||||
|
||||
* DOS:My sterero sound is reversed, how can I set it the right way ?
|
||||
|
||||
Change the console variable 'stereoreverse' to either 1 or 0.
|
||||
Or, you can edit the allegro.cfg file, and set the 'flip_pan' variable.
|
||||
|
||||
|
||||
* DOS:The sounds are too 'slow', or 'low-pitched'
|
||||
|
||||
It seems to be a problem of the auto-detection of some 8bit sound
|
||||
cards. You will have to set manually the 'sb_freq' value in the
|
||||
allegro.cfg file to a lower value : 11906, 16129.
|
||||
|
||||
* DOS:SRB2 doesn't play any sound/music, but I have a sound
|
||||
blaster genuine/compatible card.
|
||||
|
||||
If you have a genuine or compatible SoundBlaster card, it is very
|
||||
important that you set the BLASTER environment variable.
|
||||
|
||||
If you are playing under DOS, and never installed your sound card
|
||||
under DOS, run the setup of your sound card for DOS.
|
||||
|
||||
Check if the BLASTER variable was set: type 'SET' under dos
|
||||
(or DOSbox)
|
||||
|
||||
Do you see something like 'BLASTER=A220 I5 D1 ...' ?
|
||||
|
||||
Yes? If you don't hear sounds/music, then tweak the settings in the
|
||||
allegro.cfg file until you get something, first try changing the
|
||||
type of the sound card, it is not always properly detected.
|
||||
|
||||
No? You have to set this variable in order that your sound card is
|
||||
detected. Run the setup that was shipped with your sound card, and
|
||||
make sure you run the setup for DOS too, it will usually add a
|
||||
line of the type 'SET BLASTER=... ...' in the autoexec.bat file.
|
||||
|
||||
|
||||
* DOS:How can I have better midi music on my 8bit sound card ?
|
||||
|
||||
Use the DIGMID driver, it is supported in SRB2.
|
||||
|
||||
What the hell is this? Well, the Gravis Ultrasound uses digital
|
||||
samples to play midi music. On a simple 8bit card, you can use digital
|
||||
samples too, which will sound usually better than what is output
|
||||
by the poor fm synthesis chip of 8bit cards.
|
||||
|
||||
You will need to get a Gravis Ultrasound patch set, you can find
|
||||
several ones for free on internet, it consists of a bunch of '.pat'
|
||||
files which are the digital samples to play the midi instruments
|
||||
(eg: piano, conga, guitar, ect.).
|
||||
|
||||
Check the Allegro homepage for some links to GUS patches:
|
||||
http://alleg.sourceforge.net/digmid.html
|
||||
http://alleg.sourceforge.net/
|
||||
http://www.talula.demon.co.uk/allegro/digmid.html
|
||||
http://www.talula.demon.co.uk/allegro/
|
||||
|
||||
Now to activate the DIGMID driver:
|
||||
|
||||
Set the 'midi_card' value to 8 (DIGMID) in the allegro.cfg file.
|
||||
Make sure you leave the 'digi_voices' blank, or set it to a low
|
||||
value, because the midi music will use digital voices.
|
||||
At the end of the allegro.cfg file, set the 'patches' value
|
||||
to the path, where you have installed a Gravis Ultrasound midi
|
||||
patch set. eg: patches = d:\music\midipat\
|
||||
|
||||
# Linux: CD music does not work or only works when run as root.
|
||||
|
||||
We do not encourage you to run SRB2 as root (you never know
|
||||
what SRB2 can do to your system - it's a mighty piece of code :).
|
||||
There is a common problem with ATAPI CD-rom drives, which are
|
||||
treated as harddisks. Usually there is a link /dev/cdrom pointing to
|
||||
device hd[b,c,d]. As harddisks are not supposed to be read directly
|
||||
via this device (especially not by a common user), there are no read
|
||||
permissions for "all". For CD-roms you can savely set read permissions
|
||||
unless you are very paranoid. Assuming your CD-rom drive is /dev/hdc,
|
||||
set permissions with "chmod +r /dev/hdc" (as root). SCSI CD-rom drives
|
||||
should not have this problem. But if they do, proceed as described
|
||||
with ATAPI drives.
|
||||
|
||||
# Linux: The CD music volume is not set properly.
|
||||
|
||||
Go to the console and type "jigglecdvolume 1".
|
||||
|
||||
-----------
|
||||
[4] NETWORK
|
||||
-----------
|
||||
|
||||
* Where can I find Internet servers ?
|
||||
|
||||
For the moment there is one public server.
|
||||
http://srb2.servegame.org/ Master server web page
|
||||
srb2.servegame.org:28910 current Master Server
|
||||
|
||||
* When I start SRB2 with -server or -connect it say :
|
||||
"BinToPort: Address already in use (EADDRINUSE)"
|
||||
|
||||
It appears only when SRB2 crashes or when you leave with ctrl-break.
|
||||
use -udpport 12345 (or any other free slot) on both sides (client and
|
||||
server).
|
||||
|
||||
This can also happens when there is already a SRB2 running on your
|
||||
computer if you whant to try two SRB2 running on the same computer
|
||||
use -clientport 12345 (or any other free slot). Then the second will
|
||||
connect to the first one.
|
||||
|
||||
* Do you use the tcp protocol ?
|
||||
|
||||
No, we use the udp protocol which is faster, but don't worry udp is a
|
||||
part of the internet protocol.
|
||||
|
||||
|
||||
-------------------
|
||||
[5] Troubleshooting
|
||||
-------------------
|
||||
|
||||
# Linux: SRB2 is hung in fullscreen mode and won´t let me leave.
|
||||
What shall I do?
|
||||
|
||||
Some people press the reset button, but hey, we are not in the
|
||||
stoneage of operating systems! There are two "proper" ways to
|
||||
get out: kill your X-Server. You can usually do this by pressing
|
||||
"CTRL-ALT-BACKSPACE". But if you have other open applications with
|
||||
important data (probably hacked away on your diploma thesis for 3
|
||||
weeks without saving once) you can also kill SRB2 directly. Press
|
||||
"CTRL-ALT-F2" and you will get to a console. Log in, type
|
||||
"killall llxSRB2" and switch back to the X-Server with "CTRL-ALT-F7".
|
||||
Some X-Server crash on this procedure - blame the X-Server for the
|
||||
loss of 3 weeks work on your diploma thesis :)
|
||||
@@ -1,68 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
Sonic Robo Blast 2 Manual
|
||||
</title>
|
||||
<link rel="stylesheet" type="text/css" href="srb2manstyle.css">
|
||||
<!-- Borrowed some javascript code so the height of the iframe is equal to the size of the document - Sonict -->
|
||||
<script type="text/javascript">
|
||||
/* free code from dyn-web.com */
|
||||
|
||||
function getDocHeight(doc) {
|
||||
doc = doc || document;
|
||||
// from http://stackoverflow.com/questions/1145850/get-height-of-entire-document-with-javascript
|
||||
var body = doc.body, html = doc.documentElement;
|
||||
var height = Math.max( body.scrollHeight, body.offsetHeight,
|
||||
html.clientHeight, html.scrollHeight, html.offsetHeight );
|
||||
return height;
|
||||
}
|
||||
|
||||
function setIframeHeight(id) {
|
||||
var ifrm = document.getElementById(id);
|
||||
var doc = ifrm.contentDocument? ifrm.contentDocument: ifrm.contentWindow.document;
|
||||
ifrm.style.visibility = 'hidden';
|
||||
ifrm.style.height = "10px"; // reset to minimal height in case going from longer to shorter doc
|
||||
ifrm.style.height = getDocHeight( doc ) + "px";
|
||||
ifrm.style.visibility = 'visible';
|
||||
}
|
||||
</script>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
<p class="c1">
|
||||
<img src="manual_img/sonicname2.png" alt="SONIC" width="136" height="36">
|
||||
<br>
|
||||
<img src="manual_img/srb2banner.png" alt="ROBO BLAST 2" width="224" height="43">
|
||||
</p>
|
||||
<p class="c1">
|
||||
<big><big><strong>Manual</strong></big></big>
|
||||
</p>
|
||||
<table class="cf" align="center">
|
||||
<tr><td class="c">
|
||||
<ul class="hmenu">
|
||||
<li class="hmenu"><a class="hmenu" href="intro.htm" target="ifrm">Main</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="items.htm" target="ifrm">Items</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="playerabilities.htm" target="ifrm">Player Abilities</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="basicplay.htm" target="ifrm">Gameplay</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="surroundings.htm" target="ifrm">Surroundings</a></li>
|
||||
</ul>
|
||||
</td></tr>
|
||||
<tr><td class="c">
|
||||
<ul class="hmenu">
|
||||
<li class="hmenu"><a class="hmenu" href="multiplayer.htm" target="ifrm">Multiplayer</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="zones.htm" target="ifrm">Zones</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="controls.htm" target="ifrm">Controls</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="consolecommands.htm" target="ifrm">Console Commands</a></li>
|
||||
<li class="hmenu"><a class="hmenu" href="misc.htm" target="ifrm">Misc</a></li>
|
||||
</ul>
|
||||
</td></tr>
|
||||
</table>
|
||||
<hr>
|
||||
<p class="c1">
|
||||
<!-- The "onload" property of the iframe makes an error when validated through the W3C validation checker. -->
|
||||
<!-- This will not be fixed as it isn't worth the time to fix it up properly. - Sonict -->
|
||||
<iframe id="ifrm" name="ifrm" src="intro.htm" onload="setIframeHeight(this.id)"> </iframe>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,39 +0,0 @@
|
||||
SVN-RULES
|
||||
|
||||
- As you can see, there is sub-directory in the repository, one for eatch
|
||||
platform (djgpp (dos),win32,SDL) the root directory is for all platform,
|
||||
so take care of the order we have put in.
|
||||
- do not commit/upload tests of bugged code, try to fix a maximum of know
|
||||
bugs and update know bugs list in source.txt. If you must commit your source
|
||||
make your code in #ifdef so we can disable it
|
||||
- SRB2 is a modification of doom/Doom Legacy source. We allow additionnal feature
|
||||
and visual addition.
|
||||
- Maximize communications between members, do not impose your changes, if your
|
||||
are not sure about a feature/change, talk about it in irc://irc.esper.net/srb2 chat room.
|
||||
|
||||
CODE-RULES
|
||||
|
||||
- We use no tab, 4 space indent, and tab size 8 (in case some tab have filtred
|
||||
and for makefile)
|
||||
- Self documented code, variable and function must have a name that help
|
||||
understand the code, so do not call variable and function a,b, a2, ...
|
||||
- the usage of extern in a c file is prohibited, except for declaration of a
|
||||
function with body (so it is like public keyword in c++)
|
||||
Also function protos haren't allowed for external function, put it un the
|
||||
corresponding h file.
|
||||
- Try to minimize #ifdef usage for :
|
||||
- code readability
|
||||
- the main code is for all port so if something is good for a platform all
|
||||
platform can benefit by this feature
|
||||
- Take care of platform dependent code, we would like to have code that work
|
||||
on Dos, Win32, SDL, ... little and big endian, software/Glide/OpenGl.
|
||||
|
||||
GOOD PRACTICE
|
||||
|
||||
- Try to put as mush static variable and function on module so it help to
|
||||
understand the role of the varaible/function in the module also this
|
||||
help the compiler to optimize
|
||||
- minimise global variable
|
||||
- make a log of your work, so you don't need to put a lot of comment in
|
||||
the code, this will also help us to update the what's new section of doc
|
||||
when doing final release
|
||||
-240
@@ -1,240 +0,0 @@
|
||||
|
||||
1. Compile SRB2
|
||||
2. Explanation of the code
|
||||
2.1 The memory model
|
||||
2.2 Hardware Texture model
|
||||
|
||||
1. Compile SRB2
|
||||
=================
|
||||
|
||||
DOS
|
||||
---
|
||||
|
||||
need:
|
||||
- djgpp 2.03 (http://www.delorie.com/djgpp/)
|
||||
- allegro 3.12 (http://alleg.sourceforge.net/index.html)
|
||||
(
|
||||
- libsocket 0.7.4 (beta 4) or better
|
||||
for use with Winsock 1.1 (example Windows 3.1)
|
||||
(http://www.phekda.freeserve.co.uk/richdawe/lsck/lsck.htm)
|
||||
OR
|
||||
- Wattcp-32 v2.2 dev.rel 6 or better
|
||||
For use with a packet driver
|
||||
(http://www.bgnett.no/~giva/)
|
||||
(http://groups.yahoo.com/group/watt-32/)
|
||||
(http://groups.yahoo.com/group/watt-32/files/v2.2/)
|
||||
)
|
||||
- bcd 1.03 (inlcude in this package)
|
||||
- gcc 2.95.2 is recommended
|
||||
- nasm 0.98 (or better) (http://nasm.sourceforge.net/)
|
||||
|
||||
compile:
|
||||
make
|
||||
make WATTCP=1 (to make a Wattcp-32 version)
|
||||
|
||||
debug:
|
||||
when craching SRB2 will return eip
|
||||
type make asm, then you will have a 8 megs srb2.s (a assembler file)
|
||||
the you can find the faulting instruction and function
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Linux/SDL
|
||||
-----
|
||||
|
||||
need:
|
||||
- tested with gcc 2.95 and 3.X.
|
||||
- SDL 1.2
|
||||
- SDL_mixer 1.2
|
||||
- ibogg and libvorbis (http://Xiph.org/)
|
||||
- nasm 0.98 (or better)(http://nasm.sourceforge.net/) only with 2.95, else add CC30=1
|
||||
|
||||
compile
|
||||
make LINUX=1
|
||||
|
||||
debug:
|
||||
gdb ?
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Win32
|
||||
-----
|
||||
|
||||
need :
|
||||
- glide 3.x sdk (optional) (http://www.3dfx.com)
|
||||
- directx6 sdk (or higher) (http://www.micosoft.com/directx)
|
||||
- nasm 0.98 (or better) (http://nasm.sourceforge.net/)
|
||||
- use src\win32\wLegacy.dsp
|
||||
- VC6 should also work with VC5, and VS.NET 200X
|
||||
|
||||
debug:
|
||||
press on "step over" with the release version (there is some debug info
|
||||
on it). Then change the eip in the regster window when you will type
|
||||
enter the edi will go to the faulting instruction. don't forget that
|
||||
you can follow the stack for calls.
|
||||
You can also use trace with the debug version but add -win and -nomouse.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Win32/minGW/SDL
|
||||
-----
|
||||
|
||||
need:
|
||||
- tested with gcc 2.95 and 3.X.
|
||||
- can also use Dev-C++ 5.0 beta 9 (4.9.9.0) from http://www.bloodshed.net/dev/devcpp.html
|
||||
- SDL 1.2
|
||||
- SDL_mixer 1.2
|
||||
|
||||
compile
|
||||
make minGW=1 SDL=1
|
||||
or use src\SDL\Win32SDL.dev with Dev-C++ 4.9.9.0 or later
|
||||
|
||||
debug:
|
||||
gdb ?
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
WinCE/SDL WIP
|
||||
-----
|
||||
|
||||
need:
|
||||
- ActiveSync 3.8
|
||||
http://www.microsoft.com/windowsmobile/downloads/activesync38.mspx
|
||||
|
||||
- ActiveSync 3.7.1, if 3.8 isn't available for your language
|
||||
http://www.microsoft.com/windowsmobile/downloads/activesync37.mspx
|
||||
|
||||
- eMbedded Visual Tools 3.0 - 2002 Edition
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=f663bf48-31ee-4cbe-aac5-0affd5fb27dd
|
||||
|
||||
- Pocket PC 2000 SDK
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=bb3f4d7b-de2a-4e1a-a175-26a68c301ac4
|
||||
|
||||
- Pocket PC 2002 SDK (eMVT 3.0 2002 Ed. comes with this)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=2dbee84a-bd94-4167-b817-2b2e548b2e92
|
||||
|
||||
- Pocket PC 2002 SDK Emulator Images (eMVT 3.0 2002 Ed. comes with this)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=25f4de97-ae80-477a-9df1-496b85b3d3e3
|
||||
|
||||
- eMbedded Visual C++ 4.0
|
||||
http://www.microsoft.com/downloads/details.aspx?familyid=1DACDB3D-50D1-41B2-A107-FA75AE960856
|
||||
|
||||
- eMbedded Visual C++ 4.0 SP3 (Win CE 4.0-4.2)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=5bb36f3e-5b3d-419a-9610-2fe53815ae3b
|
||||
|
||||
OR
|
||||
|
||||
- eMbedded Visual C++ 4.0 SP4 (No SH3 support,Win CE 4.0-5.0 support)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=4a4ed1f4-91d3-4dbe-986e-a812984318e5
|
||||
|
||||
- eMbedded Visual C++ 4.0 Update 5625 (SP4 only)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=aa282a6d-6f57-436d-8c10-0ec02d94f5b1
|
||||
|
||||
- Windows CE: Standard Software Development Kit
|
||||
http://www.microsoft.com/downloads/details.aspx?familyid=a08f6991-16b0-4019-a174-0c40e6d25fe7
|
||||
|
||||
- SDK for Windows Mobile 2003-based Pocket PCs
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyId=9996B314-0364-4623-9EDE-0B5FBB133652
|
||||
|
||||
- Emulator Images for Windows Mobile 2003 Second Edition software for Pocket PC
|
||||
http://www.microsoft.com/downloads/details.aspx?familyid=5C53E3B5-F2A2-47D7-A41D-825FD68EBB6C
|
||||
|
||||
- Microsoft Device Emulator 1.0 Community Preview
|
||||
http://beta.microsoft.com Use Guest ID "MSDEVICE" to access the Community Preview website
|
||||
|
||||
- Windows CE Utilities for Visual Studio .NET 2003 Add-on Pack 1.1
|
||||
(if you also have VS 2003 installed, you need this to install Win CE 5.0 SDK, else no need)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyId=7EC99CA6-2095-4086-B0CC-7C6C39B28762
|
||||
|
||||
- Windows CE 5.0: Standard Software Development Kit (eMC++ 4 SP4 only)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyID=fa1a3d66-3f61-4ddc-9510-ae450e2318c3
|
||||
|
||||
- SDL 1.27 (use patch and zip in tools\SDL1.2.7_CE)
|
||||
|
||||
compile
|
||||
use src\SDL\WinCE\SRB2CE.vcw
|
||||
|
||||
debug:
|
||||
?
|
||||
|
||||
|
||||
2. Explanation of the code
|
||||
==========================
|
||||
|
||||
2.1 The memory model (original) (z_zone.c) (by BP)
|
||||
--------------------
|
||||
|
||||
SRB2 allocate a heap of 6/32/48 megs at begining and provide a Z_Malloc function
|
||||
to allocate in this heap.
|
||||
|
||||
Z_Malloc( int size,int tag,void* user )
|
||||
|
||||
size is the size in byte
|
||||
tag can be : PU_STATIC allocated static (like malloc do)
|
||||
call Z_Free to free it
|
||||
PU_LEVEL same as static but the zone is "tagged" with the
|
||||
tag PU_LEVEL, when calling
|
||||
Z_FreeTag (PU_LEVEL, PU_LEVEL) all zone tagged
|
||||
with PU_LEVEL are freed (at the end of the level)
|
||||
PU_CACHE this one _can_ be freed automatiquely by one other
|
||||
call to Z_Malloc. the *user point to a pointer
|
||||
to this zone so when freed automatiquely the
|
||||
pointer is set to NULL so eatch time you use it
|
||||
you must check if the pointer is not NULL and
|
||||
reload it.
|
||||
|
||||
(...)
|
||||
|
||||
2.2 Hardware Texture model (by BP)
|
||||
--------------------------
|
||||
|
||||
Eatch texture/patch/flats/pic in SRB2 are converted to hardware texture at
|
||||
runtime (the GlideMipmap_s structure (hw_data.h)). I will call hardware
|
||||
texture a gr_texture so there is no confusion.
|
||||
|
||||
To remind you :
|
||||
- Texture are set of patch and are associate to linedefs (walls) can be
|
||||
upper, lower or middle texture. It can have hole on it.
|
||||
- patch are sprites (the doom patch are run of vertical lines)
|
||||
- flats are used for floors and ceiling of sectors and have size of 64x64
|
||||
it can't have hole on it
|
||||
- pic are new legacy format for picture, it can only handle plain texture
|
||||
like flats it is now used for hud in full screen for the main picture
|
||||
of legacy and for coronas (the format was extended to handle 32 bit color
|
||||
or intensity + alpha, not all are implemented at this time)
|
||||
|
||||
Since patch, flat and pic are basic structure represented by only one lump in
|
||||
the wad, the wad loader allocate for eatch lump a GlideMipmap_s (cache3Dfx)
|
||||
and init data field to NULL. Since the data structure is allocated in
|
||||
PU_3DFXCACHE (like PU_CACHE) the data will be initilised when needed
|
||||
(hw_cache.c).
|
||||
|
||||
The GlideMipmap_s structures for textures are initialized on
|
||||
HWR_PrepLevelCache (hw_cache.c) it is called in P_SetupLevel (load level)
|
||||
the number of textures is computed with TEXTURE1, TEXTURE2 lumps since this
|
||||
can be changed in runtime in SRB2 (load a wad while runing) it must be
|
||||
reallocated. Well, at this time it is realloceted at eatch level start. We
|
||||
can do better, since numtextures change only when a wad is loaded.
|
||||
|
||||
The 3dfx driver use glide3, it load gr_texture in gr_texture memory of the
|
||||
card in fifo order when there is no more place it remove the first gr_texture,
|
||||
the downloaded field of GlideMipmap_s go to false and when needed it is
|
||||
reloaded in gr_texture memory. In OpenGl, since OpenGl keep texture in there
|
||||
own memory and handle gr_texture memory of the card we no more need to
|
||||
redownload it but if we not free time to time gr_texture memory in opengl,
|
||||
it will get alot of memory, so the gr_texture memory is cleared at eatch
|
||||
new level (same time of texture reallocation). Opengl and 3dfx link the
|
||||
loaded gr_texture with the nextmipmap field of GlideMipmap_s so before clear
|
||||
textures of the heap we MUST free gr_texture memory of OpenGl or 3dfx !
|
||||
|
||||
SRB2 can also draw patch with a differant colormap (thanks to Hurdler).
|
||||
When needed it create the same gr_texture but just with a differant colormap.
|
||||
This one is linked with the original in the GlideMipmap_s with the
|
||||
nextcolormap field.
|
||||
|
||||
So when a polygone with a gr_texture must be drawn, first we check if the
|
||||
gr_textures is not allready loaded in hadware memory (downloaded field) if
|
||||
not then we check if gr_texture data is there (not grabbed by z_malloc
|
||||
function) if not we must recompute it eatch type of gr_texture (texture,
|
||||
patch, flat, pic have there own methode) the we can send the gr_texture
|
||||
to 3dfx or OpenGl.
|
||||
-1992
File diff suppressed because it is too large.
Load diff
@@ -5,13 +5,13 @@
|
||||
# met:
|
||||
|
||||
# (1) Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
|
||||
# (2) Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
|
||||
# distribution.
|
||||
|
||||
# (3) The name of the author may not be used to
|
||||
# endorse or promote products derived from this software without
|
||||
# specific prior written permission.
|
||||
@@ -26,4 +26,4 @@
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -10,8 +10,18 @@ The libbacktrace library may be linked into a program or library and
|
||||
used to produce symbolic backtraces.
|
||||
Sample uses would be to print a detailed backtrace when an error
|
||||
occurs or to gather detailed profiling information.
|
||||
|
||||
In general the functions provided by this library are async-signal-safe,
|
||||
meaning that they may be safely called from a signal handler.
|
||||
That said, on systems that use `dl_iterate_phdr`, such as GNU/Linux,
|
||||
the first call to a libbacktrace function will call `dl_iterate_phdr`,
|
||||
which is not in general async-signal-safe. Therefore, programs
|
||||
that call libbacktrace from a signal handler should ensure that they
|
||||
make an initial call from outside of a signal handler.
|
||||
Similar considerations apply when arranging to call libbacktrace
|
||||
from within malloc; `dl_iterate_phdr` can also call malloc,
|
||||
so make an initial call to a libbacktrace function outside of
|
||||
malloc before trying to call libbacktrace functions within malloc.
|
||||
|
||||
The libbacktrace library is provided under a BSD license.
|
||||
See the source files for the exact license text.
|
||||
@@ -25,7 +35,7 @@ will work.
|
||||
See the source file backtrace-supported.h.in for the macros that it
|
||||
defines.
|
||||
|
||||
As of October 2020, libbacktrace supports ELF, PE/COFF, Mach-O, and
|
||||
As of July 2024, libbacktrace supports ELF, PE/COFF, Mach-O, and
|
||||
XCOFF executables with DWARF debugging information.
|
||||
In other words, it supports GNU/Linux, *BSD, macOS, Windows, and AIX.
|
||||
The library is written to make it straightforward to add support for
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,41 @@
|
||||
# libbacktrace.la - a libtool library file
|
||||
# Generated by libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# The name that we can dlopen(3).
|
||||
dlname=''
|
||||
|
||||
# Names of this library.
|
||||
library_names=''
|
||||
|
||||
# The name of the static archive.
|
||||
old_library='libbacktrace.a'
|
||||
|
||||
# Linker flags that can not go in dependency_libs.
|
||||
inherited_linker_flags=''
|
||||
|
||||
# Libraries that this one depends upon.
|
||||
dependency_libs=''
|
||||
|
||||
# Names of additional weak libraries provided by this library
|
||||
weak_library_names=''
|
||||
|
||||
# Version information for libbacktrace.
|
||||
current=0
|
||||
age=0
|
||||
revision=0
|
||||
|
||||
# Is this an already installed library?
|
||||
installed=no
|
||||
|
||||
# Should we warn about portability when linking against -modules?
|
||||
shouldnotlink=no
|
||||
|
||||
# Files to dlopen/dlpreopen
|
||||
dlopen=''
|
||||
dlpreopen=''
|
||||
|
||||
# Directory that this library needs to be installed in:
|
||||
libdir='/mingw64/lib'
|
||||
@@ -0,0 +1,41 @@
|
||||
# libbacktrace.la - a libtool library file
|
||||
# Generated by libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# The name that we can dlopen(3).
|
||||
dlname=''
|
||||
|
||||
# Names of this library.
|
||||
library_names=''
|
||||
|
||||
# The name of the static archive.
|
||||
old_library='libbacktrace.a'
|
||||
|
||||
# Linker flags that can not go in dependency_libs.
|
||||
inherited_linker_flags=''
|
||||
|
||||
# Libraries that this one depends upon.
|
||||
dependency_libs=''
|
||||
|
||||
# Names of additional weak libraries provided by this library
|
||||
weak_library_names=''
|
||||
|
||||
# Version information for libbacktrace.
|
||||
current=0
|
||||
age=0
|
||||
revision=0
|
||||
|
||||
# Is this an already installed library?
|
||||
installed=yes
|
||||
|
||||
# Should we warn about portability when linking against -modules?
|
||||
shouldnotlink=no
|
||||
|
||||
# Files to dlopen/dlpreopen
|
||||
dlopen=''
|
||||
dlpreopen=''
|
||||
|
||||
# Directory that this library needs to be installed in:
|
||||
libdir='/mingw64/lib'
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 153 KiB |
+1
-6
@@ -442,12 +442,7 @@ if(${SRB2_CONFIG_HAVE_PNG} AND ${SRB2_CONFIG_HAVE_ZLIB})
|
||||
set(SRB2_HAVE_PNG ON)
|
||||
add_definitions(-DHAVE_PNG)
|
||||
add_definitions(-D_LARGEFILE64_SOURCE)
|
||||
set(SRB2_PNG_SOURCES apng.c)
|
||||
set(SRB2_PNG_HEADERS apng.h)
|
||||
prepend_sources(SRB2_PNG_SOURCES)
|
||||
prepend_sources(SRB2_PNG_HEADERS)
|
||||
source_group("Main" FILES ${SRB2_CORE_SOURCES} ${SRB2_CORE_HEADERS}
|
||||
${SRB2_PNG_SOURCES} ${SRB2_PNG_HEADERS})
|
||||
source_group("Main" FILES ${SRB2_CORE_SOURCES} ${SRB2_CORE_HEADERS})
|
||||
else()
|
||||
message(WARNING "You have specified that PNG is available but it was not found. SRB2Kart may not compile correctly.")
|
||||
endif()
|
||||
|
||||
+22
-13
@@ -49,6 +49,7 @@
|
||||
# Already enabled by default for 32-bit
|
||||
# Windows.
|
||||
# NOCURL=1 - Disable libcurl--HTTP capability.
|
||||
# NOHOLEPUNCH=1 - Disable holepunch capability.
|
||||
# NOLIBGME=1 - Disable game music emu, retro VGM support.
|
||||
# NOOPENMPT=1 - Disable module (tracker) music support.
|
||||
# NOMIXER=1 - Disable SDL Mixer (audio playback).
|
||||
@@ -69,6 +70,7 @@
|
||||
# VALGRIND=1 - Enable Valgrind memory debugging support.
|
||||
# PROFILEMODE=1 - Enable performance profiling (gprof).
|
||||
# USEASAN=1 - Enable building with Address Sanitizer.
|
||||
# USEUBSAN=1 - Enable building with Undefined Behavior Sanitizer.
|
||||
# NOLIBBACKTRACE=1 - Disable using Libbacktrace for crashlog traces.
|
||||
#
|
||||
# General flags for building:
|
||||
@@ -243,10 +245,14 @@ ifdef STATIC
|
||||
libs+=-static
|
||||
endif
|
||||
|
||||
ifneq (,$(filter $(CC) $(CXX),gcc g++))
|
||||
opts+=-mno-ms-bitfields
|
||||
endif
|
||||
|
||||
# build with profiling information
|
||||
ifdef PROFILEMODE
|
||||
opts+=-pg
|
||||
LDFLAGS+=-pg
|
||||
libs+=-pg
|
||||
endif
|
||||
|
||||
ifdef DEBUGMODE
|
||||
@@ -256,29 +262,32 @@ debug_opts=-DNDEBUG
|
||||
opts+=-O3
|
||||
ifdef USELTO
|
||||
# compile with LTO
|
||||
ifdef MINGW
|
||||
opts+=-flto=auto -g
|
||||
LDFLAGS+=-flto=auto -g
|
||||
else
|
||||
opts+=-flto=auto
|
||||
LDFLAGS+=-flto=auto
|
||||
endif
|
||||
libs+=-flto=auto
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef USEASAN
|
||||
# compile with asan
|
||||
ifdef MINGW
|
||||
opts+=-fsanitize=address -g
|
||||
libs+=-fsanitize=address -g
|
||||
else
|
||||
opts+=-fsanitize=address
|
||||
libs+=-fsanitize=address
|
||||
endif
|
||||
|
||||
ifdef USEUBSAN
|
||||
# compile with asan
|
||||
opts+=-fsanitize=undefined
|
||||
libs+=-fsanitize=undefined
|
||||
endif
|
||||
|
||||
ifeq ($(CC),clang)
|
||||
LDFLAGS+= -fuse-ld=lld
|
||||
ifneq (,$(filter $(CC) $(CXX),clang clang++))
|
||||
libs+=-fuse-ld=lld
|
||||
endif
|
||||
|
||||
ifdef MINGW
|
||||
# mingw needs this passed AFTER lto and the likes were passed
|
||||
# otherwise libbacktrace may break
|
||||
opts+=-g
|
||||
libs+=-g
|
||||
endif
|
||||
|
||||
# debug_opts also get passed to windres
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
makedir:=$(makedir)/Dummy
|
||||
|
||||
sources+=$(call List,dummy/Sourcefile)
|
||||
|
||||
NOHW=1
|
||||
@@ -6,7 +6,8 @@ passthru_opts+=\
|
||||
NOHW NOMD5 NOPOSTPROCESSING\
|
||||
MOBJCONSISTANCY PACKETDROP ZDEBUG\
|
||||
HAVE_MINIUPNPC\
|
||||
HAVE_DISCORDRPC DEVELOP
|
||||
HAVE_DISCORDRPC DEVELOP\
|
||||
NOHOLEPUNCH\
|
||||
|
||||
# build with debugging information
|
||||
ifdef DEBUGMODE
|
||||
@@ -18,8 +19,10 @@ ifndef NOHW
|
||||
opts+=-DHWRENDER
|
||||
|
||||
ifndef NOSCREENFBO
|
||||
ifndef STATIC_OPENGL
|
||||
opts+=-DUSE_FBO_OGL
|
||||
endif
|
||||
endif
|
||||
|
||||
sources+=$(call List,hardware/Sourcefile)
|
||||
endif
|
||||
@@ -28,14 +31,12 @@ ifndef NOMD5
|
||||
sources+=md5.c
|
||||
endif
|
||||
|
||||
ifndef NONET
|
||||
ifndef NOSATURNJOIN
|
||||
opts+=-DDOSATURNJOIN
|
||||
endif
|
||||
ifndef NOSATURNPAK
|
||||
opts+=-DDOSATURNPAK
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef NOZLIB
|
||||
ifndef NOPNG
|
||||
@@ -50,7 +51,6 @@ ifdef LINUX
|
||||
opts+=-D_LARGEFILE64_SOURCE
|
||||
endif
|
||||
opts+=-DHAVE_PNG
|
||||
sources+=apng.c
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -19,9 +19,7 @@ else ifeq (${DEDICATED},1)
|
||||
EXENAME?=srb2haikud
|
||||
endif
|
||||
|
||||
ifndef NONET
|
||||
libs+=-lnetwork
|
||||
endif
|
||||
|
||||
define _set =
|
||||
$(1)_CFLAGS?=$($(1)_opts)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
makedir:=$(makedir)/SDL
|
||||
|
||||
opts+=-DDIRECTFULLSCREEN -DHAVE_SDL
|
||||
opts+=-DHAVE_SDL
|
||||
sources+=$(call List,sdl/Sourcefile)
|
||||
|
||||
NOUPNP=1
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
# Mingw, if you don't know, that's Win32/Win64
|
||||
#
|
||||
|
||||
sources+=$(call List,win32/Sourcefile)
|
||||
|
||||
ifndef MINGW64
|
||||
EXENAME?=srb2kart-saturn_32bit.exe
|
||||
else
|
||||
@@ -95,7 +97,7 @@ LIBBACKTRACE_libs:=-L$(lib)/lib/x86_64 -lbacktrace
|
||||
$(eval $(call _set,LIBBACKTRACE))
|
||||
else
|
||||
lib:=../libs/drmingw
|
||||
opts+=-I$(lib)/include
|
||||
opts+=-I$(lib)/include -DHAVE_DRMINGW
|
||||
libs+=-L$(lib)/lib/win32 -lmgwhelp -lexchndl
|
||||
endif
|
||||
|
||||
|
||||
+2
-1
@@ -34,6 +34,7 @@ m_misc.c
|
||||
m_perfstats.c
|
||||
m_queue.c
|
||||
m_random.c
|
||||
m_curl.c
|
||||
mserv.c
|
||||
http-mserv.c
|
||||
qs22j.c
|
||||
@@ -52,7 +53,7 @@ r_data.c
|
||||
r_draw.c
|
||||
r_fps.cpp
|
||||
r_main.cpp
|
||||
r_patch.c
|
||||
r_patch.cpp
|
||||
r_patchrotation.c
|
||||
r_plane.cpp
|
||||
r_segs.cpp
|
||||
|
||||
+8
-1
@@ -265,6 +265,11 @@ static void AM_findMinMaxBoundaries(void)
|
||||
max_w = minimapinfo.map_w << MAPBITS;
|
||||
max_h = minimapinfo.map_h << MAPBITS;
|
||||
|
||||
if (max_w == 0)
|
||||
max_w = 1;
|
||||
if (max_h == 0)
|
||||
max_h = 1;
|
||||
|
||||
a = FixedDiv(f_w<<FRACBITS, max_w);
|
||||
b = FixedDiv(f_h<<FRACBITS, max_h);
|
||||
|
||||
@@ -354,7 +359,9 @@ static void AM_LevelInit(void)
|
||||
AM_findMinMaxBoundaries();
|
||||
scale_mtof = FixedDiv(min_scale_mtof*10, 7*FRACUNIT);
|
||||
if (scale_mtof > max_scale_mtof)
|
||||
scale_mtof = min_scale_mtof;
|
||||
scale_mtof = max_scale_mtof;
|
||||
if (scale_mtof == 0)
|
||||
scale_mtof = 1;
|
||||
scale_ftom = FixedDiv(FRACUNIT, scale_mtof);
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ void I_Error(const char *error, ...)
|
||||
char logbuf[8192];
|
||||
|
||||
va_start(argptr, error);
|
||||
vsprintf(logbuf, error, argptr);
|
||||
vsnprintf(logbuf, 8192, error, argptr);
|
||||
va_end(argptr);
|
||||
|
||||
LOGE(logbuf);
|
||||
@@ -166,7 +166,7 @@ void I_OutputMsg(const char *fmt, ...)
|
||||
char logbuf[8192];
|
||||
|
||||
va_start(argptr, fmt);
|
||||
vsprintf(logbuf, fmt, argptr);
|
||||
vsnprintf(logbuf, 8192, fmt, argptr);
|
||||
va_end(argptr);
|
||||
|
||||
LOGD(logbuf);
|
||||
|
||||
@@ -42,7 +42,6 @@ INT32 VID_SetMode(INT32 modenum)
|
||||
vid.modenum = 0;
|
||||
vid.width = 320;
|
||||
vid.height = 240;
|
||||
vid.buffer = android_surface;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -65,7 +64,7 @@ void I_WaitVBL(INT32 count)
|
||||
(void)count;
|
||||
}
|
||||
|
||||
void I_ReadScreen(UINT8 *scr)
|
||||
void I_ReadScreen(UINT8 * restrict scr, INT32 scale)
|
||||
{
|
||||
(void)scr;
|
||||
}
|
||||
|
||||
-289
@@ -1,289 +0,0 @@
|
||||
/*
|
||||
Copyright 2019, James R.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "apng.h"
|
||||
|
||||
#define APNG_INFO_acTL 0x20000U
|
||||
|
||||
#define APNG_WROTE_acTL 0x10000U
|
||||
|
||||
struct apng_info_def
|
||||
{
|
||||
png_uint_32 mode;
|
||||
png_uint_32 valid;
|
||||
|
||||
png_uint_32 num_frames;
|
||||
png_uint_32 num_plays;
|
||||
|
||||
long start_acTL;/* acTL is written here */
|
||||
|
||||
png_flush_ptr output_flush_fn;
|
||||
apng_seek_ptr output_seek_fn;
|
||||
apng_tell_ptr output_tell_fn;
|
||||
|
||||
apng_set_acTL_ptr set_acTL_fn;
|
||||
};
|
||||
|
||||
/* PROTOS (FUCK COMPILER) */
|
||||
void apng_seek (png_structp, apng_const_infop, size_t);
|
||||
size_t apng_tell (png_structp, apng_const_infop);
|
||||
#ifdef PNG_WRITE_FLUSH_SUPPORTED
|
||||
void apng_flush (png_structp, apng_infop);
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
void apng_default_flush (png_structp);
|
||||
#endif/* PNG_STDIO_SUPPORTED */
|
||||
#endif/* PNG_WRITE_FLUSH_SUPPORTED */
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
void apng_default_seek (png_structp, size_t);
|
||||
size_t apng_default_tell (png_structp);
|
||||
#endif/* PNG_STDIO_SUPPORTED */
|
||||
void apng_write_IEND (png_structp);
|
||||
void apng_write_acTL (png_structp, png_uint_32, png_uint_32);
|
||||
#ifndef PNG_WRITE_APNG_SUPPORTED
|
||||
png_uint_32 apng_set_acTL_dummy (png_structp, png_infop,
|
||||
png_uint_32, png_uint_32);
|
||||
#endif/* PNG_WRITE_APNG_SUPPORTED */
|
||||
|
||||
apng_infop
|
||||
apng_create_info_struct (png_structp pngp)
|
||||
{
|
||||
apng_infop ainfop;
|
||||
(void)pngp;
|
||||
if (( ainfop = calloc(1, sizeof (apng_info)) ))
|
||||
{
|
||||
apng_set_write_fn(pngp, ainfop, 0, 0, 0, 0, 0);
|
||||
apng_set_set_acTL_fn(pngp, ainfop, 0);
|
||||
}
|
||||
return ainfop;
|
||||
}
|
||||
|
||||
void
|
||||
apng_destroy_info_struct (png_structp pngp, apng_infopp ainfopp)
|
||||
{
|
||||
(void)pngp;
|
||||
if (!( pngp && ainfopp ))
|
||||
return;
|
||||
|
||||
free((*ainfopp));
|
||||
}
|
||||
|
||||
void
|
||||
apng_seek (png_structp pngp, apng_const_infop ainfop, size_t l)
|
||||
{
|
||||
(*(ainfop->output_seek_fn))(pngp, l);
|
||||
}
|
||||
|
||||
size_t
|
||||
apng_tell (png_structp pngp, apng_const_infop ainfop)
|
||||
{
|
||||
return (*(ainfop->output_tell_fn))(pngp);
|
||||
}
|
||||
|
||||
#ifdef PNG_WRITE_FLUSH_SUPPORTED
|
||||
void
|
||||
apng_flush (png_structp pngp, apng_infop ainfop)
|
||||
{
|
||||
if (ainfop->output_flush_fn)
|
||||
(*(ainfop->output_flush_fn))(pngp);
|
||||
}
|
||||
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
void
|
||||
apng_default_flush (png_structp pngp)
|
||||
{
|
||||
if (!( pngp ))
|
||||
return;
|
||||
|
||||
fflush((png_FILE_p)png_get_io_ptr);
|
||||
}
|
||||
#endif/* PNG_STDIO_SUPPORTED */
|
||||
#endif/* PNG_WRITE_FLUSH_SUPPORTED */
|
||||
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
void
|
||||
apng_default_seek (png_structp pngp, size_t l)
|
||||
{
|
||||
if (!( pngp ))
|
||||
return;
|
||||
|
||||
if (fseek((png_FILE_p)png_get_io_ptr(pngp), (long)l, SEEK_SET) == -1)
|
||||
png_error(pngp, "Seek Error");
|
||||
}
|
||||
|
||||
size_t
|
||||
apng_default_tell (png_structp pngp)
|
||||
{
|
||||
long l;
|
||||
|
||||
if (!( pngp ))
|
||||
{
|
||||
png_error(pngp, "Call to apng_default_tell with NULL pngp failed");
|
||||
}
|
||||
|
||||
if (( l = ftell((png_FILE_p)png_get_io_ptr(pngp)) ) == -1)
|
||||
png_error(pngp, "Tell Error");
|
||||
|
||||
return (size_t)l;
|
||||
}
|
||||
#endif/* PNG_STDIO_SUPPORTED */
|
||||
|
||||
void
|
||||
apng_set_write_fn (png_structp pngp, apng_infop ainfop, png_voidp iop,
|
||||
png_rw_ptr write_f, png_flush_ptr flush_f,
|
||||
apng_seek_ptr seek_f, apng_tell_ptr tell_f)
|
||||
{
|
||||
if (!( pngp && ainfop ))
|
||||
return;
|
||||
|
||||
png_set_write_fn(pngp, iop, write_f, flush_f);
|
||||
|
||||
#ifdef PNG_WRITE_FLUSH_SUPPORTED
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
if (!flush_f)
|
||||
ainfop->output_flush_fn = &apng_default_flush;
|
||||
else
|
||||
#endif/* PNG_STDIO_SUPPORTED */
|
||||
ainfop->output_flush_fn = flush_f;
|
||||
#endif/* PNG_WRITE_FLUSH_SUPPORTED */
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
if (!seek_f)
|
||||
ainfop->output_seek_fn = &apng_default_seek;
|
||||
else
|
||||
#endif/* PNG_STDIO_SUPPORTED */
|
||||
ainfop->output_seek_fn = seek_f;
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
if (!seek_f)
|
||||
ainfop->output_tell_fn = apng_default_tell;
|
||||
else
|
||||
#endif/* PNG_STDIO_SUPPORTED */
|
||||
ainfop->output_tell_fn = tell_f;
|
||||
}
|
||||
|
||||
void
|
||||
apng_write_IEND (png_structp pngp)
|
||||
{
|
||||
png_byte chunkc[] = "IEND";
|
||||
png_write_chunk(pngp, chunkc, 0, 0);
|
||||
}
|
||||
|
||||
void
|
||||
apng_write_acTL (png_structp pngp, png_uint_32 frames, png_uint_32 plays)
|
||||
{
|
||||
png_byte chunkc[] = "acTL";
|
||||
png_byte buf[8];
|
||||
png_save_uint_32(buf, frames);
|
||||
png_save_uint_32(buf + 4, plays);
|
||||
png_write_chunk(pngp, chunkc, buf, 8);
|
||||
}
|
||||
|
||||
png_uint_32
|
||||
apng_set_acTL (png_structp pngp, png_infop infop, apng_infop ainfop,
|
||||
png_uint_32 frames, png_uint_32 plays)
|
||||
{
|
||||
(void)pngp;
|
||||
(void)infop;
|
||||
if (!( pngp && infop && ainfop ))
|
||||
return 0;
|
||||
|
||||
ainfop->num_frames = frames;
|
||||
ainfop->num_plays = plays;
|
||||
|
||||
ainfop->valid |= APNG_INFO_acTL;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
apng_write_info_before_PLTE (png_structp pngp, png_infop infop,
|
||||
apng_infop ainfop)
|
||||
{
|
||||
if (!( pngp && infop && ainfop ))
|
||||
return;
|
||||
|
||||
png_write_info_before_PLTE(pngp, infop);
|
||||
|
||||
if (( ainfop->valid & APNG_INFO_acTL )&&!( ainfop->mode & APNG_WROTE_acTL ))
|
||||
{
|
||||
ainfop->start_acTL = apng_tell(pngp, ainfop);
|
||||
|
||||
apng_write_acTL(pngp, 0, 0);
|
||||
/* modified for runtime dynamic linking */
|
||||
(*(ainfop->set_acTL_fn))(pngp, infop, PNG_UINT_31_MAX, 0);
|
||||
|
||||
ainfop->mode |= APNG_WROTE_acTL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
apng_write_info (png_structp pngp, png_infop infop,
|
||||
apng_infop ainfop)
|
||||
{
|
||||
apng_write_info_before_PLTE(pngp, infop, ainfop);
|
||||
png_write_info(pngp, infop);
|
||||
}
|
||||
|
||||
void
|
||||
apng_write_end (png_structp pngp, png_infop infop, apng_infop ainfop)
|
||||
{
|
||||
(void)infop;
|
||||
apng_write_IEND(pngp);
|
||||
apng_seek(pngp, ainfop, ainfop->start_acTL);
|
||||
apng_write_acTL(pngp, ainfop->num_frames, ainfop->num_plays);
|
||||
|
||||
#ifdef PNG_WRITE_FLUSH_SUPPORTED
|
||||
#ifdef PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED
|
||||
apng_flush(pngp, infop);
|
||||
#endif/* PNG_WRITE_FLUSH_SUPPORTED */
|
||||
#endif/* PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED */
|
||||
}
|
||||
|
||||
#ifndef PNG_WRITE_APNG_SUPPORTED
|
||||
png_uint_32
|
||||
apng_set_acTL_dummy (png_structp pngp, png_infop infop,
|
||||
png_uint_32 frames, png_uint_32 plays)
|
||||
{
|
||||
(void)pngp;
|
||||
(void)infop;
|
||||
(void)frames;
|
||||
(void)plays;
|
||||
return 0;
|
||||
}
|
||||
#endif/* PNG_WRITE_APNG_SUPPORTED */
|
||||
|
||||
/* Dynamic runtime linking capable! (Hopefully.) */
|
||||
void
|
||||
apng_set_set_acTL_fn (png_structp pngp, apng_infop ainfop,
|
||||
apng_set_acTL_ptr set_acTL_f)
|
||||
{
|
||||
(void)pngp;
|
||||
if (!ainfop->set_acTL_fn)
|
||||
#ifndef PNG_WRITE_APNG_SUPPORTED
|
||||
ainfop->set_acTL_fn = &apng_set_acTL_dummy;
|
||||
#else
|
||||
ainfop->set_acTL_fn = &png_set_acTL;
|
||||
#endif/* PNG_WRITE_APNG_SUPPORTED */
|
||||
else
|
||||
ainfop->set_acTL_fn = set_acTL_f;
|
||||
}
|
||||
-80
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
Copyright 2019, James R.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef APNG_H
|
||||
#define APNG_H
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#ifndef _LARGEFILE64_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _LFS64_LARGEFILE
|
||||
#define _LFS64_LARGEFILE
|
||||
#endif
|
||||
|
||||
#ifndef _FILE_OFFSET_BITS
|
||||
#define _FILE_OFFSET_BITS 0
|
||||
#endif
|
||||
|
||||
#include <png.h>
|
||||
|
||||
typedef struct apng_info_def apng_info;
|
||||
typedef apng_info * apng_infop;
|
||||
typedef const apng_info * apng_const_infop;
|
||||
typedef apng_info * * apng_infopp;
|
||||
|
||||
typedef void (*apng_seek_ptr)(png_structp, size_t);
|
||||
typedef size_t (*apng_tell_ptr)(png_structp);
|
||||
|
||||
typedef png_uint_32 (*apng_set_acTL_ptr)(png_structp, png_infop,
|
||||
png_uint_32, png_uint_32);
|
||||
|
||||
apng_infop apng_create_info_struct (png_structp png_ptr);
|
||||
|
||||
void apng_destroy_info_struct (png_structp png_ptr,
|
||||
apng_infopp info_ptr_ptr);
|
||||
|
||||
/* Call the following functions in place of the libpng counterparts. */
|
||||
|
||||
png_uint_32 apng_set_acTL (png_structp png_ptr, png_infop info_ptr,
|
||||
apng_infop ainfo_ptr,
|
||||
png_uint_32 num_frames, png_uint_32 num_plays);
|
||||
|
||||
void apng_write_info_before_PLTE (png_structp png_ptr, png_infop info_ptr,
|
||||
apng_infop ainfo_ptr);
|
||||
void apng_write_info (png_structp png_ptr, png_infop info_ptr,
|
||||
apng_infop ainfo_ptr);
|
||||
|
||||
void apng_write_end (png_structp png_ptr, png_infop info_ptr,
|
||||
apng_infop ainfo_ptr);
|
||||
|
||||
void apng_set_write_fn (png_structp png_ptr, apng_infop ainfo_ptr,
|
||||
png_voidp io_ptr,
|
||||
png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn,
|
||||
apng_seek_ptr output_seek_fn, apng_tell_ptr output_tell_fn);
|
||||
|
||||
void apng_set_set_acTL_fn (png_structp png_ptr, apng_infop ainfo_ptr,
|
||||
apng_set_acTL_ptr set_acTL_fn);
|
||||
|
||||
#endif/* APNG_H */
|
||||
@@ -10,8 +10,13 @@
|
||||
/// \file b_bot.h
|
||||
/// \brief Basic bot handling
|
||||
|
||||
#ifndef __B_BOT__
|
||||
#define __B_BOT__
|
||||
|
||||
void B_BuildTiccmd(player_t *player, ticcmd_t *cmd);
|
||||
void B_KeysToTiccmd(mobj_t *mo, ticcmd_t *cmd, boolean forward, boolean backward, boolean left, boolean right, boolean strafeleft, boolean straferight, boolean jump, boolean spin);
|
||||
boolean B_CheckRespawn(player_t *player);
|
||||
void B_MoveBlocked(player_t *player);
|
||||
void B_RespawnBot(INT32 playernum);
|
||||
|
||||
#endif
|
||||
+4
-2
@@ -24,6 +24,8 @@
|
||||
|
||||
#include "lauxlib.h"
|
||||
|
||||
#include "../doomdef.h"
|
||||
|
||||
|
||||
#define FREELIST_REF 0 /* free list of references */
|
||||
|
||||
@@ -40,7 +42,7 @@ LUALIB_API int luaL_argerror (lua_State *L, int narg, const char *extramsg) {
|
||||
if (!lua_getstack(L, 0, &ar)) /* no stack frame? */
|
||||
return luaL_error(L, "bad argument #%d (%s)", narg, extramsg);
|
||||
lua_getinfo(L, "n", &ar);
|
||||
if (strcmp(ar.namewhat, "method") == 0) {
|
||||
if (fastcmp(ar.namewhat, "method")) {
|
||||
narg--; /* do not count `self' */
|
||||
if (narg == 0) /* error is in the self argument itself? */
|
||||
return luaL_error(L, "calling " LUA_QS " on bad self (%s)",
|
||||
@@ -97,7 +99,7 @@ LUALIB_API int luaL_checkoption (lua_State *L, int narg, const char *def,
|
||||
luaL_checkstring(L, narg);
|
||||
int i;
|
||||
for (i=0; lst[i]; i++)
|
||||
if (strcmp(lst[i], name) == 0)
|
||||
if (fastcmp(lst[i], name))
|
||||
return i;
|
||||
return luaL_argerror(L, narg,
|
||||
lua_pushfstring(L, "invalid option " LUA_QS, name));
|
||||
|
||||
@@ -46,10 +46,6 @@
|
||||
** =======================================================
|
||||
*/
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4324)
|
||||
#endif
|
||||
|
||||
/* chain list of long jump buffers */
|
||||
struct lua_longjmp {
|
||||
struct lua_longjmp *previous;
|
||||
@@ -57,10 +53,6 @@ struct lua_longjmp {
|
||||
volatile int status; /* error code */
|
||||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(default : 4324)
|
||||
#endif
|
||||
|
||||
void luaD_seterrorobj (lua_State *L, int lerrcode, StkId oldtop) {
|
||||
switch (lerrcode) {
|
||||
case LUA_ERRMEM: {
|
||||
|
||||
@@ -48,12 +48,6 @@ LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize);
|
||||
LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize);
|
||||
LUAI_FUNC void luaD_growstack (lua_State *L, int n);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifndef ATTRNORETURN
|
||||
#define ATTRNORETURN __declspec(noreturn)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ATTRNORETURN
|
||||
#define ATTRNORETURN
|
||||
#endif
|
||||
|
||||
+5
-3
@@ -161,12 +161,13 @@ static int io_tostring (lua_State *L) {
|
||||
|
||||
static int StartsWith(const char *a, const char *b) // this is wolfs being lazy yet again
|
||||
{
|
||||
if(strncmp(a, b, strlen(b)) == 0) return 1;
|
||||
if (strncmp(a, b, strlen(b)) == 0) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int io_open (lua_State *L) {
|
||||
static int io_open(lua_State *L)
|
||||
{
|
||||
FILE **pf;
|
||||
const char *filename = luaL_checkstring(L, 1);
|
||||
int pass = 0;
|
||||
@@ -178,12 +179,13 @@ static int io_open (lua_State *L) {
|
||||
|
||||
for (i = 0; i < (sizeof (whitelist) / sizeof(const char *)); i++)
|
||||
{
|
||||
if (!stricmp(&filename[length - strlen(whitelist[i])], whitelist[i]))
|
||||
if (fasticmp(&filename[length - strlen(whitelist[i])], whitelist[i]))
|
||||
{
|
||||
pass = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (l_unlikely(strstr(filename, "..") || strchr(filename, ':') || StartsWith(filename, "\\")
|
||||
|| StartsWith(filename, "/") || !pass))
|
||||
{
|
||||
|
||||
@@ -11,12 +11,8 @@
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define INT32 __int32
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#define INT32 int32_t
|
||||
#endif
|
||||
|
||||
#ifndef __cplusplus
|
||||
#ifndef min // Double-Check with WATTCP-32's cdefs.h
|
||||
@@ -570,9 +566,6 @@
|
||||
#define luai_numshl(a,b) ((unsigned)(a)<<(unsigned)(b))
|
||||
#define luai_numshr(a,b) ((unsigned)(a)>>(unsigned)(b))
|
||||
#define luai_numnot(a) (~((unsigned)(a)))
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4244)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -589,24 +582,11 @@
|
||||
#if defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI) && !defined(__SSE2__) && \
|
||||
(defined(__i386) || defined (_M_IX86) || defined(__i386__))
|
||||
|
||||
/* On a Microsoft compiler, use assembler */
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
#define lua_number2int(i,d) __asm fld d __asm fistp i
|
||||
#define lua_number2integer(i,n) lua_number2int(i, n)
|
||||
|
||||
/* the next trick should work on any Pentium, but sometimes clashes
|
||||
with a DirectX idiosyncrasy */
|
||||
#else
|
||||
|
||||
union luai_Cast { double l_d; long l_l; };
|
||||
#define lua_number2int(i,d) \
|
||||
{ volatile union luai_Cast u; u.l_d = (d) + 6755399441055744.0; (i) = u.l_l; }
|
||||
#define lua_number2integer(i,n) lua_number2int(i, n)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* this option always works, but may be slow */
|
||||
#else
|
||||
#define lua_number2int(i,d) ((i)=(int)(d))
|
||||
|
||||
+66
-65
@@ -359,7 +359,7 @@ size_t COM_CheckParm(const char *check)
|
||||
size_t i;
|
||||
|
||||
for (i = 1; i < com_argc; i++)
|
||||
if (!strcasecmp(check, com_argv[i]))
|
||||
if (fasticmp(check, com_argv[i]))
|
||||
return i;
|
||||
return 0;
|
||||
}
|
||||
@@ -456,7 +456,7 @@ void COM_AddCommand(const char *name, com_func_t func)
|
||||
// fail if the command already exists
|
||||
for (cmd = com_commands; cmd; cmd = cmd->next)
|
||||
{
|
||||
if (!stricmp(name, cmd->name)) //case insensitive now that we have lower and uppercase!
|
||||
if (fasticmp(name, cmd->name)) //case insensitive now that we have lower and uppercase!
|
||||
{
|
||||
// don't I_Error for Lua commands
|
||||
// Lua commands can replace game commands, and they have priority.
|
||||
@@ -492,7 +492,7 @@ int COM_AddLuaCommand(const char *name)
|
||||
// command already exists
|
||||
for (cmd = com_commands; cmd; cmd = cmd->next)
|
||||
{
|
||||
if (!stricmp(name, cmd->name)) //case insensitive now that we have lower and uppercase!
|
||||
if (fasticmp(name, cmd->name)) //case insensitive now that we have lower and uppercase!
|
||||
{
|
||||
// replace the built in command.
|
||||
cmd->function = COM_Lua_f;
|
||||
@@ -519,7 +519,7 @@ static boolean COM_Exists(const char *com_name)
|
||||
xcommand_t *cmd;
|
||||
|
||||
for (cmd = com_commands; cmd; cmd = cmd->next)
|
||||
if (!stricmp(com_name, cmd->name))
|
||||
if (fasticmp(com_name, cmd->name))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -571,7 +571,7 @@ static void COM_ExecuteString(char *ptext)
|
||||
// check functions
|
||||
for (cmd = com_commands; cmd; cmd = cmd->next)
|
||||
{
|
||||
if (!stricmp(com_argv[0], cmd->name)) //case insensitive now that we have lower and uppercase!
|
||||
if (fasticmp(com_argv[0], cmd->name)) //case insensitive now that we have lower and uppercase!
|
||||
{
|
||||
cmd->function();
|
||||
return;
|
||||
@@ -581,7 +581,7 @@ static void COM_ExecuteString(char *ptext)
|
||||
// check aliases
|
||||
for (a = com_alias; a; a = a->next)
|
||||
{
|
||||
if (!stricmp(com_argv[0], a->name))
|
||||
if (fasticmp(com_argv[0], a->name))
|
||||
{
|
||||
if (recursion > MAX_ALIAS_RECURSION)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Alias recursion cycle detected!\n"));
|
||||
@@ -700,6 +700,7 @@ static void COM_Echo_f(void)
|
||||
|
||||
for (i = 1; i < COM_Argc(); i++)
|
||||
CONS_Printf("%s ", COM_Argv(i));
|
||||
|
||||
CONS_Printf("\n");
|
||||
}
|
||||
|
||||
@@ -708,16 +709,14 @@ static void COM_Echo_f(void)
|
||||
static void COM_CEcho_f(void)
|
||||
{
|
||||
size_t i;
|
||||
char cechotext[1024] = "";
|
||||
char cechotext[1024] = {0};
|
||||
|
||||
for (i = 1; i < COM_Argc(); i++)
|
||||
{
|
||||
strncat(cechotext, COM_Argv(i), sizeof(cechotext)-1);
|
||||
strncat(cechotext, " ", sizeof(cechotext)-1);
|
||||
strlcat(cechotext, COM_Argv(i), sizeof(cechotext)-1);
|
||||
strlcat(cechotext, " ", sizeof(cechotext)-1);
|
||||
}
|
||||
|
||||
cechotext[sizeof(cechotext) - 1] = '\0';
|
||||
|
||||
HU_DoCEcho(cechotext);
|
||||
}
|
||||
|
||||
@@ -837,7 +836,7 @@ static void COM_Help_f(void)
|
||||
if (cvar->PossibleValue)
|
||||
{
|
||||
{
|
||||
if (!stricmp(cvar->PossibleValue[0].strvalue, "MIN") && !stricmp(cvar->PossibleValue[1].strvalue, "MAX"))
|
||||
if (fasticmp(cvar->PossibleValue[0].strvalue, "MIN") && fasticmp(cvar->PossibleValue[1].strvalue, "MAX"))
|
||||
{
|
||||
if (floatmode)
|
||||
{
|
||||
@@ -880,7 +879,7 @@ static void COM_Help_f(void)
|
||||
{
|
||||
for (cmd = com_commands; cmd; cmd = cmd->next)
|
||||
{
|
||||
if (strcmp(cmd->name, help))
|
||||
if (!fastcmp(cmd->name, help))
|
||||
continue;
|
||||
|
||||
CONS_Printf("\x82""Command %s:\n", cmd->name);
|
||||
@@ -940,6 +939,8 @@ static void COM_Find_f(void)
|
||||
}
|
||||
|
||||
help = COM_Argv(1);
|
||||
if (!help)
|
||||
return;
|
||||
helplen = strlen(help);
|
||||
CONS_Printf("\x82""Variables:\n");
|
||||
matchesany = false;
|
||||
@@ -1175,7 +1176,7 @@ consvar_t *CV_FindVar(const char *name)
|
||||
consvar_t *cvar;
|
||||
|
||||
for (cvar = consvar_vars; cvar; cvar = cvar->next)
|
||||
if (!stricmp(name,cvar->name))
|
||||
if (fasticmp(name,cvar->name))
|
||||
return cvar;
|
||||
|
||||
return NULL;
|
||||
@@ -1365,7 +1366,7 @@ static void Setvalue(consvar_t *var, const char *valstr, boolean stealth)
|
||||
v = INT32_MIN; // Invalid integer trigger
|
||||
}
|
||||
|
||||
if (var->PossibleValue[0].strvalue && !stricmp(var->PossibleValue[0].strvalue, "MIN")) // bounded cvar
|
||||
if (var->PossibleValue[0].strvalue && fasticmp(var->PossibleValue[0].strvalue, "MIN")) // bounded cvar
|
||||
{
|
||||
#define MINVAL 0
|
||||
#define MAXVAL 1
|
||||
@@ -1378,21 +1379,21 @@ static void Setvalue(consvar_t *var, const char *valstr, boolean stealth)
|
||||
|
||||
// search for other
|
||||
for (i = MAXVAL+1; var->PossibleValue[i].strvalue; i++)
|
||||
if (v == var->PossibleValue[i].value || !stricmp(var->PossibleValue[i].strvalue, valstr))
|
||||
if (v == var->PossibleValue[i].value || fasticmp(var->PossibleValue[i].strvalue, valstr))
|
||||
{
|
||||
var->value = var->PossibleValue[i].value;
|
||||
var->string = var->PossibleValue[i].strvalue;
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if ((v != INT32_MIN && v < var->PossibleValue[MINVAL].value) || !stricmp(valstr, "MIN"))
|
||||
if ((v != INT32_MIN && v < var->PossibleValue[MINVAL].value) || fasticmp(valstr, "MIN"))
|
||||
{
|
||||
v = var->PossibleValue[MINVAL].value;
|
||||
valstr = var->PossibleValue[MINVAL].strvalue;
|
||||
override = true;
|
||||
overrideval = v;
|
||||
}
|
||||
else if ((v != INT32_MIN && v > var->PossibleValue[MAXVAL].value) || !stricmp(valstr, "MAX"))
|
||||
else if ((v != INT32_MIN && v > var->PossibleValue[MAXVAL].value) || fasticmp(valstr, "MAX"))
|
||||
{
|
||||
v = var->PossibleValue[MAXVAL].value;
|
||||
valstr = var->PossibleValue[MAXVAL].strvalue;
|
||||
@@ -1410,7 +1411,7 @@ static void Setvalue(consvar_t *var, const char *valstr, boolean stealth)
|
||||
|
||||
// check first strings
|
||||
for (i = 0; var->PossibleValue[i].strvalue; i++)
|
||||
if (!stricmp(var->PossibleValue[i].strvalue, valstr))
|
||||
if (fasticmp(var->PossibleValue[i].strvalue, valstr))
|
||||
goto found;
|
||||
if (v != INT32_MIN)
|
||||
{
|
||||
@@ -1423,9 +1424,9 @@ static void Setvalue(consvar_t *var, const char *valstr, boolean stealth)
|
||||
if (var->PossibleValue == CV_OnOff || var->PossibleValue == CV_YesNo)
|
||||
{
|
||||
overrideval = -1;
|
||||
if (!stricmp(valstr, "on") || !stricmp(valstr, "yes"))
|
||||
if (fasticmp(valstr, "on") || fasticmp(valstr, "yes"))
|
||||
overrideval = 1;
|
||||
else if (!stricmp(valstr, "off") || !stricmp(valstr, "no"))
|
||||
else if (fasticmp(valstr, "off") || fasticmp(valstr, "no"))
|
||||
overrideval = 0;
|
||||
|
||||
if (overrideval != -1)
|
||||
@@ -1609,7 +1610,7 @@ void CV_ResetCheatNetVars(void)
|
||||
// Returns true if the variable's current value is its default value
|
||||
boolean CV_IsSetToDefault(consvar_t *v)
|
||||
{
|
||||
return (!(strcmp(v->defaultvalue, v->string)));
|
||||
return (fastcmp(v->defaultvalue, v->string));
|
||||
}
|
||||
|
||||
// If any cheats CVars are not at their default settings, return true.
|
||||
@@ -1621,7 +1622,7 @@ UINT8 CV_CheatsEnabled(void)
|
||||
consvar_t *cvar;
|
||||
|
||||
for (cvar = consvar_vars; cvar; cvar = cvar->next)
|
||||
if ((cvar->flags & CV_CHEAT) && strcmp(cvar->defaultvalue, cvar->string))
|
||||
if ((cvar->flags & CV_CHEAT) && !fastcmp(cvar->defaultvalue, cvar->string))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -1642,7 +1643,7 @@ static void CV_SetCVar(consvar_t *var, const char *value, boolean stealth)
|
||||
if (!var->string)
|
||||
I_Error("CV_Set: %s no string set!\n", var->name);
|
||||
#endif
|
||||
if (!var || !var->string || !value || !stricmp(var->string, value))
|
||||
if (!var || !var->string || !value || fasticmp(var->string, value))
|
||||
return; // no changes
|
||||
|
||||
if (var->flags & CV_NETVAR)
|
||||
@@ -1652,21 +1653,21 @@ static void CV_SetCVar(consvar_t *var, const char *value, boolean stealth)
|
||||
UINT8 *p = buf;
|
||||
if (!(server || (IsPlayerAdmin(consoleplayer))))
|
||||
{
|
||||
CONS_Printf(M_GetText("Only the server or admin can change: %s %s\n"), var->name, var->string);
|
||||
CONS_Alert(CONS_NOTICE, "Only the server or admin can change: %s %s\n", var->name, var->string);
|
||||
return;
|
||||
}
|
||||
|
||||
if (var == &cv_kartencore && !M_SecretUnlocked(SECRET_ENCORE))
|
||||
{
|
||||
CONS_Printf(M_GetText("You haven't unlocked Encore Mode yet!\n"));
|
||||
CONS_Alert(CONS_NOTICE, "You haven't unlocked Encore Mode yet!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (var == &cv_kartspeed && !M_SecretUnlocked(SECRET_HARDSPEED))
|
||||
{
|
||||
if (!stricmp(value, "Hard") || atoi(value) == 2)
|
||||
if (fasticmp(value, "Hard") || atoi(value) == 2)
|
||||
{
|
||||
CONS_Printf(M_GetText("You haven't unlocked this yet!\n"));
|
||||
CONS_Alert(CONS_NOTICE, "You haven't unlocked this yet!\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1683,14 +1684,13 @@ static void CV_SetCVar(consvar_t *var, const char *value, boolean stealth)
|
||||
else
|
||||
Setvalue(var, value, stealth);
|
||||
}
|
||||
else if ((var->flags & CV_NOTINNET) && netgame)
|
||||
{
|
||||
CONS_Alert(CONS_NOTICE, "This variable can't be changed while in netgame: %s %s\n", var->name, var->string);
|
||||
return;
|
||||
}
|
||||
else
|
||||
if ((var->flags & CV_NOTINNET) && netgame)
|
||||
{
|
||||
CONS_Printf(M_GetText("This variable can't be changed while in netgame: %s %s\n"), var->name, var->string);
|
||||
return;
|
||||
}
|
||||
else
|
||||
Setvalue(var, value, stealth);
|
||||
Setvalue(var, value, stealth);
|
||||
}
|
||||
|
||||
/** Sets a value to a variable without calling its callback function.
|
||||
@@ -1773,7 +1773,7 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
||||
newvalue = var->value - 1;
|
||||
do
|
||||
{
|
||||
if(increment > 0) // Going up!
|
||||
if (increment > 0) // Going up!
|
||||
{
|
||||
if (++newvalue == NUMMAPS)
|
||||
newvalue = -1;
|
||||
@@ -1787,7 +1787,7 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
||||
if (newvalue == oldvalue)
|
||||
break; // don't loop forever if there's none of a certain gametype
|
||||
|
||||
if(!mapheaderinfo[newvalue])
|
||||
if (newvalue >= 0 && !mapheaderinfo[newvalue])
|
||||
continue; // Don't allocate the header. That just makes memory usage skyrocket.
|
||||
|
||||
} while (!M_CanShowLevelInList(newvalue, gt));
|
||||
@@ -1799,7 +1799,7 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
||||
}
|
||||
#define MINVAL 0
|
||||
#define MAXVAL 1
|
||||
else if (var->PossibleValue[MINVAL].strvalue && !strcmp(var->PossibleValue[MINVAL].strvalue, "MIN"))
|
||||
else if (var->PossibleValue[MINVAL].strvalue && fastcmp(var->PossibleValue[MINVAL].strvalue, "MIN"))
|
||||
{ // SRB2Kart
|
||||
#ifdef PARANOIA
|
||||
if (!var->PossibleValue[MAXVAL].strvalue)
|
||||
@@ -1916,13 +1916,14 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
||||
max = (M_SecretUnlocked(SECRET_HARDSPEED) ? 3 : 2);
|
||||
}
|
||||
#ifdef PARANOIA
|
||||
if (currentindice == -1)
|
||||
I_Error("CV_AddValue: current value %d not found in possible value\n",
|
||||
var->value);
|
||||
if (currentindice == -1 || max == 0)
|
||||
I_Error("CV_AddValue: current value %d not found in possible value\n", var->value);
|
||||
#endif
|
||||
|
||||
newindice = (currentindice + increment + max) % max;
|
||||
CV_Set(var, var->PossibleValue[newindice].strvalue);
|
||||
if (max > 0)
|
||||
{
|
||||
newindice = (currentindice + increment + max) % max;
|
||||
CV_Set(var, var->PossibleValue[newindice].strvalue);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1970,12 +1971,12 @@ static boolean CV_FilterJoyAxisVars(consvar_t *v, const char *valstr)
|
||||
{
|
||||
if (joyaxis_default[i])
|
||||
{
|
||||
if (!stricmp(v->name, "joyaxis_fire"))
|
||||
if (fasticmp(v->name, "joyaxis_fire"))
|
||||
{
|
||||
if (joyaxis_count[i] > 7) return false;
|
||||
else if (joyaxis_count[i] == 7) return true;
|
||||
|
||||
if (!stricmp(valstr, "None")) joyaxis_count[i]++;
|
||||
if (fasticmp(valstr, "None")) joyaxis_count[i]++;
|
||||
else joyaxis_default[i] = false;
|
||||
}
|
||||
// reset all axis settings to defaults
|
||||
@@ -2007,37 +2008,37 @@ static boolean CV_FilterJoyAxisVars(consvar_t *v, const char *valstr)
|
||||
// Block the Xbox DInput default axes and reset to the current defaults
|
||||
static boolean CV_FilterJoyAxisVars2(consvar_t *v, const char *valstr)
|
||||
{
|
||||
if (!stricmp(v->name, "joyaxis_turn") && !stricmp(valstr, "X-Axis"))
|
||||
if (fasticmp(v->name, "joyaxis_turn") && fasticmp(valstr, "X-Axis"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis2_turn") && !stricmp(valstr, "X-Axis"))
|
||||
if (fasticmp(v->name, "joyaxis2_turn") && fasticmp(valstr, "X-Axis"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis3_turn") && !stricmp(valstr, "X-Axis"))
|
||||
if (fasticmp(v->name, "joyaxis3_turn") && fasticmp(valstr, "X-Axis"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis4_turn") && !stricmp(valstr, "X-Axis"))
|
||||
if (fasticmp(v->name, "joyaxis4_turn") && fasticmp(valstr, "X-Axis"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis_aim") && !stricmp(valstr, "Y-Axis"))
|
||||
if (fasticmp(v->name, "joyaxis_aim") && fasticmp(valstr, "Y-Axis"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis2_aim") && !stricmp(valstr, "Y-Axis"))
|
||||
if (fasticmp(v->name, "joyaxis2_aim") && fasticmp(valstr, "Y-Axis"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis3_aim") && !stricmp(valstr, "Y-Axis"))
|
||||
if (fasticmp(v->name, "joyaxis3_aim") && fasticmp(valstr, "Y-Axis"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis4_aim") && !stricmp(valstr, "Y-Axis"))
|
||||
if (fasticmp(v->name, "joyaxis4_aim") && fasticmp(valstr, "Y-Axis"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis_fire") && !stricmp(valstr, "None"))
|
||||
if (fasticmp(v->name, "joyaxis_fire") && fasticmp(valstr, "None"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis2_fire") && !stricmp(valstr, "None"))
|
||||
if (fasticmp(v->name, "joyaxis2_fire") && fasticmp(valstr, "None"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis3_fire") && !stricmp(valstr, "None"))
|
||||
if (fasticmp(v->name, "joyaxis3_fire") && fasticmp(valstr, "None"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis4_fire") && !stricmp(valstr, "None"))
|
||||
if (fasticmp(v->name, "joyaxis4_fire") && fasticmp(valstr, "None"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis_drift") && !stricmp(valstr, "None"))
|
||||
if (fasticmp(v->name, "joyaxis_drift") && fasticmp(valstr, "None"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis2_drift") && !stricmp(valstr, "None"))
|
||||
if (fasticmp(v->name, "joyaxis2_drift") && fasticmp(valstr, "None"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis3_drift") && !stricmp(valstr, "None"))
|
||||
if (fasticmp(v->name, "joyaxis3_drift") && fasticmp(valstr, "None"))
|
||||
return false;
|
||||
if (!stricmp(v->name, "joyaxis4_drift") && !stricmp(valstr, "None"))
|
||||
if (fasticmp(v->name, "joyaxis4_drift") && fasticmp(valstr, "None"))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -2054,8 +2055,8 @@ static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr)
|
||||
|
||||
if (GETMAJOREXECVERSION(cv_execversion.value) < 8) // 8 = 1.4
|
||||
{
|
||||
if (!stricmp(v->name, "masterserver") // Replaces a hack in MasterServer_OnChange for the original SRB2 MS.
|
||||
|| !stricmp(v->name, "gamma")) // Too easy to accidentially change in prior versions.
|
||||
if (fasticmp(v->name, "masterserver") // Replaces a hack in MasterServer_OnChange for the original SRB2 MS.
|
||||
|| fasticmp(v->name, "gamma")) // Too easy to accidentially change in prior versions.
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2138,7 +2139,7 @@ void CV_SaveVariables(FILE *f)
|
||||
char stringtowrite[MAXTEXTCMD+1];
|
||||
|
||||
// Silly hack for Min/Max vars
|
||||
if (!strcmp(cvar->string, "MAX") || !strcmp(cvar->string, "MIN"))
|
||||
if (fastcmp(cvar->string, "MAX") || fastcmp(cvar->string, "MIN"))
|
||||
{
|
||||
if (cvar->flags & CV_FLOAT)
|
||||
sprintf(stringtowrite, "%f", FixedToFloat(cvar->value));
|
||||
|
||||
+26
-47
@@ -69,14 +69,9 @@ static boolean consoleready; // console prompt is ready
|
||||
INT32 con_destlines; // vid lines used by console at final position
|
||||
static INT32 con_curlines; // vid lines currently used by console
|
||||
|
||||
INT32 con_clipviewtop; // (useless)
|
||||
|
||||
static UINT8 con_hudlines; // number of console heads up message lines
|
||||
static UINT32 con_hudtime[MAXHUDLINES]; // remaining time of display for hud msg lines
|
||||
|
||||
INT32 con_clearlines; // top screen lines to refresh when view reduced
|
||||
boolean con_hudupdate; // when messages scroll, we need a backgrnd refresh
|
||||
|
||||
// console text output
|
||||
static char *con_line; // console text output current line
|
||||
static size_t con_cx; // cursor position in current line
|
||||
@@ -393,9 +388,6 @@ void CON_Init(void)
|
||||
|
||||
Lock_state();
|
||||
|
||||
//note: CON_Ticker should always execute at least once before D_Display()
|
||||
con_clipviewtop = -1; // -1 does not clip
|
||||
|
||||
con_hudlines = atoi(cons_hudlines.defaultvalue);
|
||||
|
||||
Unlock_state();
|
||||
@@ -479,18 +471,18 @@ static void CON_RecalcSize(void)
|
||||
|
||||
switch (cv_constextsize.value)
|
||||
{
|
||||
case V_NOSCALEPATCH:
|
||||
con_scalefactor = 1;
|
||||
break;
|
||||
case V_SMALLSCALEPATCH:
|
||||
con_scalefactor = vid.smalldupx;
|
||||
break;
|
||||
case V_MEDSCALEPATCH:
|
||||
con_scalefactor = vid.meddupx;
|
||||
break;
|
||||
default: // Full scaling
|
||||
con_scalefactor = vid.dupx;
|
||||
break;
|
||||
case V_NOSCALEPATCH:
|
||||
con_scalefactor = 1;
|
||||
break;
|
||||
case V_SMALLSCALEPATCH:
|
||||
con_scalefactor = vid.smalldup;
|
||||
break;
|
||||
case V_MEDSCALEPATCH:
|
||||
con_scalefactor = vid.meddup;
|
||||
break;
|
||||
default: // Full scaling
|
||||
con_scalefactor = vid.dup;
|
||||
break;
|
||||
}
|
||||
|
||||
con_recalc = false;
|
||||
@@ -607,7 +599,7 @@ static void CON_MoveConsole(void)
|
||||
}
|
||||
|
||||
// Not instant - Increment fracmovement fractionally
|
||||
fracmovement += FixedMul(cons_speed.value*vid.fdupy, (cv_uncappedhud.value ? renderdeltatics : FRACUNIT));
|
||||
fracmovement += FixedMul(cons_speed.value*vid.fdup, (cv_uncappedhud.value ? renderdeltatics : FRACUNIT));
|
||||
|
||||
if (con_curlines < con_destlines) // Move the console downwards
|
||||
{
|
||||
@@ -727,7 +719,8 @@ void CON_ToggleOff(void)
|
||||
con_curlines = 0;
|
||||
CON_ClearHUD();
|
||||
con_forcepic = 0;
|
||||
con_clipviewtop = -1; // remove console clipping of view
|
||||
|
||||
I_SetTextInput(false);
|
||||
|
||||
Unlock_state();
|
||||
}
|
||||
@@ -768,28 +761,24 @@ void CON_Ticker(void)
|
||||
{
|
||||
con_destlines = 0;
|
||||
CON_ClearHUD();
|
||||
I_SetTextInput(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
CON_ChangeHeight();
|
||||
}
|
||||
|
||||
// clip the view, so that the part under the console is not drawn
|
||||
con_clipviewtop = -1;
|
||||
if (cons_backpic.value) // clip only when using an opaque background
|
||||
{
|
||||
if (con_curlines > 0)
|
||||
con_clipviewtop = con_curlines - viewwindowy - 1 - 10;
|
||||
// NOTE: BIG HACK::SUBTRACT 10, SO THAT WATER DON'T COPY LINES OF THE CONSOLE
|
||||
// WINDOW!!! (draw some more lines behind the bottom of the console)
|
||||
if (con_clipviewtop < 0)
|
||||
con_clipviewtop = -1; // maybe not necessary, provided it's < 0
|
||||
I_SetTextInput(true);
|
||||
}
|
||||
}
|
||||
|
||||
// check if console ready for prompt
|
||||
if (con_destlines >= minheight)
|
||||
{
|
||||
consoleready = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
consoleready = false;
|
||||
}
|
||||
|
||||
// make overlay messages disappear after a while
|
||||
for (i = 0; i < con_hudlines; i++)
|
||||
@@ -1021,7 +1010,7 @@ boolean CON_Responder(event_t *ev)
|
||||
Lock_state();
|
||||
|
||||
// Only add command to history if it differs from previous one
|
||||
if (strcmp(input.buffer, inputlines[(inputline-1) & 31]))
|
||||
if (!fastcmp(input.buffer, inputlines[(inputline-1) & 31]))
|
||||
{
|
||||
inputline = (inputline+1) & 31;
|
||||
M_TextInputInit(&input, inputlines[inputline], CON_MAXPROMPTCHARS);
|
||||
@@ -1090,9 +1079,6 @@ static void CON_Linefeed(void)
|
||||
|
||||
con_line = &con_buffer[(con_cy%con_totallines)*con_width];
|
||||
memset(con_line, ' ', con_width);
|
||||
|
||||
// make sure the view borders are refreshed if hud messages scroll
|
||||
con_hudupdate = true; // see HU_Erase()
|
||||
}
|
||||
|
||||
// Outputs text into the console text buffer
|
||||
@@ -1272,7 +1258,7 @@ void CONS_Alert(alerttype_t level, const char *fmt, ...)
|
||||
txt = malloc(8192);
|
||||
|
||||
va_start(argptr, fmt);
|
||||
vsprintf(txt, fmt, argptr);
|
||||
vsnprintf(txt, 8192, fmt, argptr);
|
||||
va_end(argptr);
|
||||
|
||||
switch (level)
|
||||
@@ -1308,7 +1294,7 @@ void CONS_Debug(INT32 debugflags, const char *fmt, ...)
|
||||
txt = malloc(8192);
|
||||
|
||||
va_start(argptr, fmt);
|
||||
vsprintf(txt, fmt, argptr);
|
||||
vsnprintf(txt, 8192, fmt, argptr);
|
||||
va_end(argptr);
|
||||
|
||||
// Again I am lazy, oh well
|
||||
@@ -1479,9 +1465,6 @@ static void CON_DrawHudlines(void)
|
||||
//V_DrawCharacter(x, y, (p[c]&0xff) | cv_constextsize.value | V_NOSCALESTART, !cv_allcaps.value);
|
||||
y += charheight;
|
||||
}
|
||||
|
||||
// top screen lines that might need clearing when view is reduced
|
||||
con_clearlines = y; // this is handled by HU_Erase();
|
||||
}
|
||||
|
||||
// draw the console background, text, and prompt if enough place
|
||||
@@ -1499,10 +1482,6 @@ static void CON_DrawConsole(void)
|
||||
if (con_curlines <= 0)
|
||||
return;
|
||||
|
||||
//FIXME: refresh borders only when console bg is translucent
|
||||
con_clearlines = con_curlines; // clear console draw from view borders
|
||||
con_hudupdate = true; // always refresh while console is on
|
||||
|
||||
// draw console background
|
||||
if (cons_backpic.value || con_forcepic)
|
||||
{
|
||||
|
||||
@@ -30,14 +30,9 @@ extern boolean con_recalc;
|
||||
|
||||
extern boolean con_startup;
|
||||
|
||||
// top clip value for view render: do not draw part of view hidden by console
|
||||
extern INT32 con_clipviewtop;
|
||||
|
||||
// 0 means console if off, or moving out
|
||||
extern INT32 con_destlines;
|
||||
|
||||
extern INT32 con_clearlines; // lines of top of screen to refresh
|
||||
extern boolean con_hudupdate; // hud messages have changed, need refresh
|
||||
extern UINT32 con_scalefactor; // console text scale factor
|
||||
|
||||
extern consvar_t cons_backcolor, cons_menuhighlight;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// BLANKART
|
||||
// SONIC ROBO BLAST 2 KART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2024 by Ronald "Eidolon" Kinard
|
||||
// Copyright (C) 2024 by Kart Krew
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// BLANKART
|
||||
// SONIC ROBO BLAST 2 KART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2024 by Ronald "Eidolon" Kinard
|
||||
// Copyright (C) 2024 by Kart Krew
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// BLANKART
|
||||
// SONIC ROBO BLAST 2 KART
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2024 by Ronald "Eidolon" Kinard
|
||||
// Copyright (C) 2024 by Kart Krew
|
||||
|
||||
+68
-151
@@ -54,11 +54,9 @@
|
||||
#include "d_main.h"
|
||||
#include "r_fps.h"
|
||||
|
||||
#ifdef CLIENT_LOADINGSCREEN
|
||||
// cl loading screen
|
||||
#include "v_video.h"
|
||||
#include "f_finale.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DISCORDRPC
|
||||
#include "discord.h"
|
||||
@@ -340,7 +338,7 @@ static void WriteNetXCmd(UINT8 *cmd, netxcmd_t id, const void *param, size_t npa
|
||||
|
||||
void SendNetXCmdForPlayer(UINT8 playerid, netxcmd_t id, const void *param, size_t nparam)
|
||||
{
|
||||
if (localtextcmd[playerid][0]+2+nparam > MAXTEXTCMD)
|
||||
if (textcmdbuf[playerid] != NULL || localtextcmd[playerid][0]+2+nparam > MAXTEXTCMD)
|
||||
{
|
||||
textcmdbuf_t *buf = textcmdbuf[playerid];
|
||||
|
||||
@@ -375,17 +373,13 @@ void SendNetXCmdForPlayer(UINT8 playerid, netxcmd_t id, const void *param, size_
|
||||
{
|
||||
WriteNetXCmd(buf->cmd, id, param, nparam);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
WriteNetXCmd(localtextcmd[playerid], id, param, nparam);
|
||||
}
|
||||
|
||||
/*UINT8 GetFreeXCmdSize(UINT8 playerid)
|
||||
{
|
||||
// -1 for the size and another -1 for the ID.
|
||||
return (UINT8)(localtextcmd[playerid][0] - 2);
|
||||
}*/
|
||||
|
||||
// Frees all textcmd memory for the specified tic
|
||||
static void D_FreeTextcmd(tic_t tic)
|
||||
{
|
||||
@@ -424,7 +418,8 @@ static UINT8* D_GetExistingTextcmd(tic_t tic, INT32 playernum)
|
||||
if (textcmdtic)
|
||||
{
|
||||
UINT8 *cmd = textcmdtic->playercmds[playernum];
|
||||
if (cmd) return cmd;
|
||||
if (cmd)
|
||||
return cmd;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -462,6 +457,7 @@ static void ExtraDataTicker(void)
|
||||
INT32 i;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (playeringame[i] || i == 0)
|
||||
{
|
||||
UINT8 *bufferstart = D_GetExistingTextcmd(gametic, i);
|
||||
@@ -476,8 +472,7 @@ static void ExtraDataTicker(void)
|
||||
{
|
||||
if (*curpos < MAXNETXCMD && listnetxcmd[*curpos])
|
||||
{
|
||||
const UINT8 id = *curpos;
|
||||
curpos++;
|
||||
const UINT8 id = *curpos++;
|
||||
DEBFILE(va("executing x_cmd %s ply %u ", netxcmdnames[id - 1], i));
|
||||
(listnetxcmd[id])(&curpos, i);
|
||||
DEBFILE("done\n");
|
||||
@@ -489,12 +484,14 @@ static void ExtraDataTicker(void)
|
||||
SendKick(i, KICK_MSG_CON_FAIL);
|
||||
DEBFILE(va("player %d kicked [gametic=%u] reason as follows:\n", i, gametic));
|
||||
}
|
||||
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Got unknown net command [%s]=%d (max %d)\n"), sizeu1(curpos - bufferstart), *curpos, bufferstart[0]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If you are a client, you can safely forget the net commands for this tic
|
||||
// If you are the server, you need to remember them until every client has been aknowledged,
|
||||
@@ -826,7 +823,7 @@ static void resynch_read_player(resynch_pak *rsp)
|
||||
P_SetThingPosition(players[i].mo);
|
||||
}
|
||||
|
||||
static inline void resynch_write_ctf(resynchend_pak *rst)
|
||||
static void resynch_write_ctf(resynchend_pak *rst)
|
||||
{
|
||||
mobj_t *mflag;
|
||||
UINT8 i, j;
|
||||
@@ -866,7 +863,7 @@ static inline void resynch_write_ctf(resynchend_pak *rst)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void resynch_read_ctf(resynchend_pak *p)
|
||||
static void resynch_read_ctf(resynchend_pak *p)
|
||||
{
|
||||
UINT8 i;
|
||||
|
||||
@@ -1104,10 +1101,6 @@ static void SV_AcknowledgeResynchAck(INT32 node, UINT8 rsg)
|
||||
|
||||
static INT16 Consistancy(void);
|
||||
|
||||
#ifndef NONET
|
||||
#define JOININGAME
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CL_SEARCHING,
|
||||
@@ -1117,9 +1110,7 @@ typedef enum
|
||||
CL_LOADFILES,
|
||||
CL_SETUPFILES,
|
||||
CL_WAITJOINRESPONSE,
|
||||
#ifdef JOININGAME
|
||||
CL_DOWNLOADSAVEGAME,
|
||||
#endif
|
||||
CL_CONNECTED,
|
||||
CL_ABORTED,
|
||||
CL_VIEWSERVER,
|
||||
@@ -1171,8 +1162,6 @@ static void CV_LoadPlayerNames(UINT8 **p)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CLIENT_LOADINGSCREEN
|
||||
|
||||
//
|
||||
// CL_DrawConnectionStatus
|
||||
//
|
||||
@@ -1210,7 +1199,6 @@ static inline void CL_DrawConnectionStatus(void)
|
||||
|
||||
switch (cl_mode)
|
||||
{
|
||||
#ifdef JOININGAME
|
||||
case CL_DOWNLOADSAVEGAME:
|
||||
if (filedownload.current != -1)
|
||||
{
|
||||
@@ -1236,7 +1224,6 @@ static inline void CL_DrawConnectionStatus(void)
|
||||
else
|
||||
cltext = M_GetText("Waiting to download game state...");
|
||||
break;
|
||||
#endif
|
||||
case CL_ASKFULLFILELIST:
|
||||
case CL_CONFIRMCONNECT:
|
||||
case CL_LEGACYREQUESTFAILED:
|
||||
@@ -1509,7 +1496,6 @@ static inline void CL_DrawConnectionStatus(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static boolean CL_AskFileList(INT32 firstfile)
|
||||
{
|
||||
@@ -1517,7 +1503,7 @@ static boolean CL_AskFileList(INT32 firstfile)
|
||||
netbuffer->packettype = PT_TELLFILESNEEDED;
|
||||
netbuffer->u.filesneedednum = firstfile;
|
||||
|
||||
return HSendPacket(servernode, false, 0, sizeof (INT32));
|
||||
return HSendPacket(servernode, false, 0, sizeof(INT32));
|
||||
}
|
||||
|
||||
/** Sends a special packet to declare how many players in local
|
||||
@@ -1670,12 +1656,7 @@ static void SV_SendPlayerInfo(INT32 node)
|
||||
|
||||
netbuffer->u.playerinfo[i].node = i;
|
||||
|
||||
// Can't really change this because net compatibility, but the warning is annoying
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstringop-truncation"
|
||||
strncpy(netbuffer->u.playerinfo[i].name, (const char *)&player_names[i], MAXPLAYERNAME+1);
|
||||
#pragma GCC diagnostic pop
|
||||
netbuffer->u.playerinfo[i].name[MAXPLAYERNAME] = '\0';
|
||||
strlcpy(netbuffer->u.playerinfo[i].name, (const char *)&player_names[i], MAXPLAYERNAME+1);
|
||||
|
||||
//fetch IP address
|
||||
//No, don't do that, you fuckface.
|
||||
@@ -1877,7 +1858,6 @@ static boolean SV_SendServerConfig(INT32 node)
|
||||
return waspacketsent;
|
||||
}
|
||||
|
||||
#ifdef JOININGAME
|
||||
#define SAVEGAMESIZE (768*1024)
|
||||
|
||||
#ifdef SATURNPAK
|
||||
@@ -1900,7 +1880,7 @@ static void SV_SendSaveGame(INT32 node, boolean resending)
|
||||
UINT8 *buffertosend;
|
||||
|
||||
// first save it in a malloced buffer
|
||||
save.buffer = (UINT8 *)malloc(SAVEGAMESIZE);
|
||||
save.buffer = (UINT8 *)Z_Malloc(SAVEGAMESIZE, PU_STATIC, NULL);
|
||||
if (!save.buffer)
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("No more free memory for savegame\n"));
|
||||
@@ -1915,7 +1895,7 @@ static void SV_SendSaveGame(INT32 node, boolean resending)
|
||||
length = save.p - save.buffer;
|
||||
if (length > SAVEGAMESIZE)
|
||||
{
|
||||
free(save.buffer);
|
||||
Z_Free(save.buffer);
|
||||
save.p = NULL;
|
||||
I_Error("Savegame buffer overrun");
|
||||
}
|
||||
@@ -1933,8 +1913,7 @@ static void SV_SendSaveGame(INT32 node, boolean resending)
|
||||
if ((compressedlen = lzf_compress(save.buffer + sizeof(UINT32), length - sizeof(UINT32), compressedsave + sizeof(UINT32), length - sizeof(UINT32) - 1)))
|
||||
{
|
||||
// Compressing succeeded; send compressed data
|
||||
|
||||
free(save.buffer);
|
||||
Z_Free(save.buffer);
|
||||
|
||||
// State that we're compressed.
|
||||
buffertosend = compressedsave;
|
||||
@@ -1975,7 +1954,7 @@ static void SV_SavedGame(void)
|
||||
sprintf(tmpsave, "%s" PATHSEP TMPSAVENAME, srb2home);
|
||||
|
||||
// first save it in a malloced buffer
|
||||
save.p = save.buffer = (UINT8 *)malloc(SAVEGAMESIZE);
|
||||
save.p = save.buffer = (UINT8 *)Z_Malloc(SAVEGAMESIZE, PU_STATIC, NULL);
|
||||
if (!save.p)
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("No more free memory for savegame\n"));
|
||||
@@ -1987,7 +1966,7 @@ static void SV_SavedGame(void)
|
||||
length = save.p - save.buffer;
|
||||
if (length > SAVEGAMESIZE)
|
||||
{
|
||||
free(save.buffer);
|
||||
Z_Free(save.buffer);
|
||||
save.p = NULL;
|
||||
I_Error("Savegame buffer overrun");
|
||||
}
|
||||
@@ -1996,7 +1975,7 @@ static void SV_SavedGame(void)
|
||||
if (!FIL_WriteFile(tmpsave, save.buffer, length))
|
||||
CONS_Printf(M_GetText("Didn't save %s for netgame"), tmpsave);
|
||||
|
||||
free(save.buffer);
|
||||
Z_Free(save.buffer);
|
||||
save.p = NULL;
|
||||
}
|
||||
|
||||
@@ -2111,9 +2090,7 @@ static void CL_ReloadReceivedSavegame(void)
|
||||
CONS_Printf(M_GetText("Game state reloaded\n"));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef NONET
|
||||
static void SendAskInfo(INT32 node)
|
||||
{
|
||||
tic_t asktime;
|
||||
@@ -2197,7 +2174,7 @@ static void SL_InsertServer(serverinfo_pak* info, SINT8 node)
|
||||
if (info->subversion != SUBVERSION)
|
||||
return; // Close, but no cigar.
|
||||
|
||||
if (strcmp(info->application, SRB2APPLICATION))
|
||||
if (!fastcmp(info->application, SRB2APPLICATION))
|
||||
return;/* that's a different mod */
|
||||
|
||||
i = serverlistcount++;
|
||||
@@ -2242,7 +2219,7 @@ void CL_QueryServerList (msg_server_t *server_list)
|
||||
// thwart nefarious servers who lie to the MS.
|
||||
|
||||
/* lol bruh, that version COMES from the servers */
|
||||
//if (strcmp(version, server_list[i].version) == 0)
|
||||
//if (fastcmp(version, server_list[i].version))
|
||||
{
|
||||
INT32 node = I_NetMakeNodewPort(server_list[i].ip, server_list[i].port);
|
||||
if (node == -1)
|
||||
@@ -2287,7 +2264,6 @@ void CL_TimeoutServerList(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // ifndef NONET
|
||||
|
||||
static void CL_ConfirmConnect(void)
|
||||
{
|
||||
@@ -2318,7 +2294,6 @@ static void CL_ConfirmConnect(void)
|
||||
|
||||
static void M_ConfirmConnect(event_t *ev)
|
||||
{
|
||||
#ifndef NONET
|
||||
if (ev->type == ev_keydown)
|
||||
{
|
||||
if (ev->data1 == ' ' || ev->data1 == 'y' || ev->data1 == KEY_ENTER || ev->data1 == gamecontrol[0][gc_accelerate][0] || ev->data1 == gamecontrol[0][gc_accelerate][1])
|
||||
@@ -2333,9 +2308,6 @@ static void M_ConfirmConnect(event_t *ev)
|
||||
M_ClearMenus(true);
|
||||
}
|
||||
}
|
||||
#else
|
||||
(void)ev;
|
||||
#endif
|
||||
}
|
||||
|
||||
void CL_AbortConnection(void)
|
||||
@@ -2430,29 +2402,25 @@ static boolean CL_FinishedFileList(void)
|
||||
if (!filedownload.http_failed)
|
||||
#endif
|
||||
{
|
||||
#ifndef NONET
|
||||
filedownload.completednum = 0;
|
||||
filedownload.completedsize = 0;
|
||||
|
||||
filedownload.totalnum = 0;
|
||||
filedownload.totalsize = 0;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < fileneedednum; i++)
|
||||
{
|
||||
if (fileneeded[i].status == FS_NOTFOUND || fileneeded[i].status == FS_MD5SUMBAD)
|
||||
{
|
||||
#ifndef NONET
|
||||
filedownload.totalnum++;
|
||||
filedownload.totalsize += fileneeded[i].totalsize;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef NONET
|
||||
if (filedownload.totalsize>>20 >= 10)
|
||||
downloadsize = Z_StrDup(va("%uM",filedownload.totalsize>>20));
|
||||
else
|
||||
downloadsize = Z_StrDup(va("%uK",filedownload.totalsize>>10));
|
||||
#endif
|
||||
|
||||
if (cv_showdownloadprompt.value)
|
||||
{
|
||||
@@ -2506,7 +2474,6 @@ static boolean CL_FinishedFileList(void)
|
||||
*/
|
||||
static boolean CL_ServerConnectionSearchTicker(tic_t *asksent)
|
||||
{
|
||||
#ifndef NONET
|
||||
INT32 i;
|
||||
|
||||
// serverlist is updated by GetPacket function
|
||||
@@ -2525,6 +2492,7 @@ static boolean CL_ServerConnectionSearchTicker(tic_t *asksent)
|
||||
if (i < 0)
|
||||
return true;
|
||||
}
|
||||
|
||||
joinnode = i;
|
||||
|
||||
// Quit here rather than downloading files and being refused later.
|
||||
@@ -2545,6 +2513,7 @@ static boolean CL_ServerConnectionSearchTicker(tic_t *asksent)
|
||||
CONS_Printf("We received a http url from the server, however it will not be used as this build lacks curl support (%s)\n", serverlist[i].info.httpsource);
|
||||
#endif
|
||||
D_ParseFileneeded(serverlist[i].info.fileneedednum, serverlist[i].info.fileneeded, 0);
|
||||
|
||||
if (serverlist[i].info.kartvars & SV_LOTSOFADDONS)
|
||||
{
|
||||
cl_mode = CL_ASKFULLFILELIST;
|
||||
@@ -2569,11 +2538,6 @@ static boolean CL_ServerConnectionSearchTicker(tic_t *asksent)
|
||||
SendAskInfo(servernode);
|
||||
*asksent = I_GetTime() + NEWTICRATE;
|
||||
}
|
||||
#else
|
||||
(void)asksent;
|
||||
// No netgames, so we skip this state.
|
||||
cl_mode = CL_ASKJOIN;
|
||||
#endif // ifndef NONET/else
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -2593,10 +2557,6 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
||||
boolean waitmore;
|
||||
INT32 i;
|
||||
|
||||
#ifdef NONET
|
||||
(void)tmpsave;
|
||||
#endif
|
||||
|
||||
switch (cl_mode)
|
||||
{
|
||||
case CL_SEARCHING:
|
||||
@@ -2715,12 +2675,12 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
||||
), NULL, MM_NOTHING);
|
||||
return false;
|
||||
}
|
||||
#ifdef JOININGAME
|
||||
|
||||
// prepare structures to save the file
|
||||
// WARNING: this can be useless in case of server not in GS_LEVEL
|
||||
// but since the network layer doesn't provide ordered packets...
|
||||
CL_PrepareDownloadSaveGame(tmpsave);
|
||||
#endif
|
||||
|
||||
if (I_GetTime() >= *asksent && CL_SendJoin())
|
||||
{
|
||||
*asksent = I_GetTime() + NEWTICRATE*3;
|
||||
@@ -2733,7 +2693,6 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
||||
cl_mode = CL_ASKJOIN;
|
||||
}
|
||||
break;
|
||||
#ifdef JOININGAME
|
||||
case CL_DOWNLOADSAVEGAME:
|
||||
// At this state, the first (and only) needed file is the gamestate
|
||||
if (fileneeded[0].status == FS_FOUND)
|
||||
@@ -2745,7 +2704,6 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
||||
} // don't break case continue to CL_CONNECTED
|
||||
else
|
||||
break;
|
||||
#endif
|
||||
case CL_CONNECTED:
|
||||
case CL_CONFIRMCONNECT: //logic is handled by M_ConfirmConnect
|
||||
default:
|
||||
@@ -2808,7 +2766,6 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
||||
}
|
||||
*oldtic = I_GetTime();
|
||||
|
||||
#ifdef CLIENT_LOADINGSCREEN
|
||||
if (client && cl_mode != CL_CONNECTED && cl_mode != CL_ABORTED)
|
||||
{
|
||||
F_TitleScreenTicker(true);
|
||||
@@ -2825,10 +2782,6 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
||||
if (moviemode)
|
||||
M_SaveFrame();
|
||||
}
|
||||
#else
|
||||
CON_Drawer();
|
||||
I_UpdateNoVsync();
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2848,26 +2801,17 @@ static void CL_ConnectToServer(void)
|
||||
{
|
||||
INT32 pnumnodes, nodewaited = doomcom->numnodes, i;
|
||||
tic_t oldtic;
|
||||
#ifndef NONET
|
||||
tic_t asksent;
|
||||
#endif
|
||||
#ifdef JOININGAME
|
||||
char tmpsave[264];
|
||||
|
||||
sprintf(tmpsave, "%s" PATHSEP TMPSAVENAME, srb2home);
|
||||
#endif
|
||||
|
||||
#ifdef CLIENT_LOADINGSCREEN
|
||||
filedownload.current = -1;
|
||||
#endif
|
||||
|
||||
cl_mode = CL_SEARCHING;
|
||||
|
||||
#ifdef JOININGAME
|
||||
// Don't get a corrupt savegame error because tmpsave already exists
|
||||
if (FIL_FileExists(tmpsave) && unlink(tmpsave) == -1)
|
||||
I_Error("Can't delete %s\n", tmpsave);
|
||||
#endif
|
||||
|
||||
if (netgame)
|
||||
{
|
||||
@@ -2889,7 +2833,6 @@ static void CL_ConnectToServer(void)
|
||||
ClearAdminPlayers();
|
||||
pnumnodes = 1;
|
||||
oldtic = 0;
|
||||
#ifndef NONET
|
||||
asksent = 0;
|
||||
firstconnectattempttime = I_GetTime();
|
||||
|
||||
@@ -2922,16 +2865,11 @@ static void CL_ConnectToServer(void)
|
||||
map_icon_read = 0;
|
||||
map_icon_missing = 0xffffffff;
|
||||
map_icon_last_request = I_GetTime();
|
||||
#endif
|
||||
|
||||
do
|
||||
{
|
||||
// If the connection was aborted for some reason, leave
|
||||
#ifndef NONET
|
||||
if (!CL_ServerConnectionTicker(tmpsave, &oldtic, &asksent))
|
||||
#else
|
||||
if (!CL_ServerConnectionTicker((char*)NULL, &oldtic, (tic_t *)NULL))
|
||||
#endif
|
||||
{
|
||||
if (P_PartialAddGetStage() >= 0)
|
||||
P_MultiSetupWadFiles(true); // in case any partial adds were done
|
||||
@@ -2948,16 +2886,14 @@ static void CL_ConnectToServer(void)
|
||||
}
|
||||
while (!(cl_mode == CL_CONNECTED && (client || (server && nodewaited <= pnumnodes))));
|
||||
|
||||
#ifndef NONET
|
||||
if (netgame)
|
||||
F_StartWaitingPlayers();
|
||||
#endif
|
||||
|
||||
DEBFILE(va("Synchronisation Finished\n"));
|
||||
|
||||
displayplayers[0] = consoleplayer;
|
||||
}
|
||||
|
||||
#ifndef NONET
|
||||
static void Command_ShowBan(void) //Print out ban list
|
||||
{
|
||||
size_t i;
|
||||
@@ -3279,7 +3215,7 @@ static void Command_connect(void)
|
||||
|
||||
server = false;
|
||||
|
||||
if (!stricmp(COM_Argv(1), "self"))
|
||||
if (fasticmp(COM_Argv(1), "self"))
|
||||
{
|
||||
servernode = 0;
|
||||
server = true;
|
||||
@@ -3289,7 +3225,7 @@ static void Command_connect(void)
|
||||
else
|
||||
{
|
||||
// used in menu to connect to a server in the list
|
||||
if (netgame && !stricmp(COM_Argv(1), "node"))
|
||||
if (netgame && fasticmp(COM_Argv(1), "node"))
|
||||
{
|
||||
servernode = (SINT8)atoi(COM_Argv(2));
|
||||
}
|
||||
@@ -3304,7 +3240,7 @@ static void Command_connect(void)
|
||||
netgame = true;
|
||||
multiplayer = true;
|
||||
|
||||
if (!stricmp(COM_Argv(1), "any"))
|
||||
if (fasticmp(COM_Argv(1), "any"))
|
||||
servernode = BROADCASTADDR;
|
||||
else if (I_NetMakeNodewPort && COM_Argc() >= 3)
|
||||
servernode = I_NetMakeNodewPort(COM_Argv(1), COM_Argv(2));
|
||||
@@ -3328,6 +3264,7 @@ static void Command_connect(void)
|
||||
splitscreen = cv_splitplayers.value-1;
|
||||
SplitScreen_OnChange();
|
||||
}
|
||||
|
||||
botingame = false;
|
||||
botskin = 0;
|
||||
CL_ConnectToServer();
|
||||
@@ -3343,8 +3280,6 @@ static void Command_Packetstat(void)
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void ResetNode(INT32 node);
|
||||
|
||||
//
|
||||
@@ -3476,10 +3411,8 @@ void CL_Reset(void)
|
||||
memset(fileneeded, 0, sizeof(fileneeded));
|
||||
memset(packetstat, 0, sizeof(packetstat));
|
||||
|
||||
#ifndef NONET
|
||||
filedownload.totalnum = 0;
|
||||
filedownload.totalsize = 0;
|
||||
#endif
|
||||
firstconnectattempttime = 0;
|
||||
serverisfull = false;
|
||||
connectiontimeout = (tic_t)cv_nettimeout.value; //reset this temporary hack
|
||||
@@ -3497,7 +3430,6 @@ void CL_Reset(void)
|
||||
// D_StartTitle should get done now, but the calling function will handle it
|
||||
}
|
||||
|
||||
#ifndef NONET
|
||||
static void Command_GetPlayerNum(void)
|
||||
{
|
||||
INT32 i;
|
||||
@@ -3824,7 +3756,6 @@ static void Command_Kick(void)
|
||||
else
|
||||
CONS_Printf(M_GetText("Only the server or a remote admin can use this.\n"));
|
||||
}
|
||||
#endif
|
||||
|
||||
static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
||||
{
|
||||
@@ -4182,10 +4113,6 @@ consvar_t cv_allownewplayer = {"allowjoin", "On", CV_SAVE|CV_CALL, CV_OnOff, Joi
|
||||
consvar_t cv_allownewsaturnplayer = {"allowsaturnjoin", "On", CV_HIDEN, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#endif
|
||||
|
||||
#ifdef VANILLAJOINNEXTROUND
|
||||
consvar_t cv_joinnextround = {"joinnextround", "Off", CV_SAVE|CV_NETVAR, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; /// \todo not done
|
||||
#endif
|
||||
|
||||
static CV_PossibleValue_t maxplayers_cons_t[] = {{2, "MIN"}, {MAXPLAYERS, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_maxplayers = {"maxplayers", "8", CV_SAVE|CV_CALL, maxplayers_cons_t, Joinable_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
@@ -4230,7 +4157,10 @@ static void Joinable_OnChange(void)
|
||||
UINT8 maxplayer;
|
||||
|
||||
if (!server)
|
||||
{
|
||||
CONS_Alert(CONS_NOTICE, ("Only the server can change: %s %s\n"), cv_allownewplayer.name, cv_allownewplayer.string);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef SATURNJOIN
|
||||
// disabling joins should also disable saturn joins unless its called with CV_StealthSet and vice versa to make life a bit easier
|
||||
@@ -4252,7 +4182,6 @@ void D_ClientServerInit(void)
|
||||
DEBFILE(va("- - -== SRB2Kart v%d.%d "VERSIONSTRING" debugfile ==- - -\n",
|
||||
VERSION, SUBVERSION));
|
||||
|
||||
#ifndef NONET
|
||||
COM_AddCommand("getplayernum", Command_GetPlayerNum);
|
||||
COM_AddCommand("kick", Command_Kick);
|
||||
COM_AddCommand("ban", Command_Ban);
|
||||
@@ -4278,17 +4207,13 @@ void D_ClientServerInit(void)
|
||||
#ifdef _DEBUG
|
||||
COM_AddCommand("numnodes", Command_Numnodes);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
RegisterNetXCmd(XD_KICK, Got_KickCmd);
|
||||
RegisterNetXCmd(XD_ADDPLAYER, Got_AddPlayer);
|
||||
RegisterNetXCmd(XD_REMOVEPLAYER, Got_RemovePlayer);
|
||||
#ifndef NONET
|
||||
#ifdef DUMPCONSISTENCY
|
||||
CV_RegisterVar(&cv_dumpconsistency);
|
||||
#endif
|
||||
D_LoadBan(false);
|
||||
#endif
|
||||
|
||||
gametic = 0;
|
||||
localgametic = 0;
|
||||
@@ -4725,11 +4650,22 @@ void SV_StopServer(void)
|
||||
Y_EndIntermission();
|
||||
if (gamestate == GS_VOTING)
|
||||
Y_EndVote();
|
||||
gamestate = wipegamestate = GS_NULL;
|
||||
|
||||
G_SetGamestate(GS_NULL);
|
||||
wipegamestate = GS_NULL;
|
||||
|
||||
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||
{
|
||||
localtextcmd[i][0] = 0;
|
||||
|
||||
while (textcmdbuf[i] != NULL)
|
||||
{
|
||||
textcmdbuf_t *buf = textcmdbuf[i];
|
||||
textcmdbuf[i] = textcmdbuf[i]->next;
|
||||
Z_Free(buf);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = firstticstosend; i < firstticstosend + BACKUPTICS; i++)
|
||||
D_Clearticcmd(i);
|
||||
|
||||
@@ -4883,18 +4819,17 @@ static void HandleConnect(SINT8 node)
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef NONET
|
||||
boolean newnode = false;
|
||||
#endif
|
||||
|
||||
// client authorised to join
|
||||
nodewaiting[node] = (UINT8)(netbuffer->u.clientcfg.localplayers - playerpernode[node]);
|
||||
|
||||
if (!nodeingame[node])
|
||||
{
|
||||
gamestate_t backupstate = gamestate;
|
||||
#ifndef NONET
|
||||
|
||||
newnode = true;
|
||||
#endif
|
||||
|
||||
SV_AddNode(node);
|
||||
|
||||
/// \note Wait what???
|
||||
@@ -4903,10 +4838,6 @@ static void HandleConnect(SINT8 node)
|
||||
// you get a free second before desynch checks. use it wisely.
|
||||
SV_InitResynchVars(node);
|
||||
|
||||
#ifdef VANILLAJOINNEXTROUND
|
||||
if (cv_joinnextround.value && gameaction == ga_nothing)
|
||||
G_SetGamestate(GS_WAITINGPLAYERS);
|
||||
#endif
|
||||
if (!SV_SendServerConfig(node))
|
||||
{
|
||||
G_SetGamestate(backupstate);
|
||||
@@ -4924,7 +4855,6 @@ static void HandleConnect(SINT8 node)
|
||||
DEBFILE("new node joined\n");
|
||||
}
|
||||
|
||||
#ifdef JOININGAME
|
||||
if (nodewaiting[node])
|
||||
{
|
||||
if (node && newnode)
|
||||
@@ -4935,12 +4865,6 @@ static void HandleConnect(SINT8 node)
|
||||
|
||||
SV_AddWaitingPlayers();
|
||||
}
|
||||
#else
|
||||
#ifndef NONET
|
||||
// I guess we have no use for this if we aren't doing mid-level joins?
|
||||
(void)newnode;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4972,7 +4896,6 @@ static void HandleTimeout(SINT8 node)
|
||||
M_StartMessage(M_GetText("Server Timeout\n\nPress Esc\n"), NULL, MM_NOTHING);
|
||||
}
|
||||
|
||||
#ifndef NONET
|
||||
/** Called when a PT_SERVERINFO packet is received
|
||||
*
|
||||
* \param node The packet sender
|
||||
@@ -5281,11 +5204,8 @@ static void PT_ServerCFG(SINT8 node)
|
||||
playernode[(UINT8)serverplayer] = servernode;
|
||||
|
||||
if (netgame)
|
||||
#ifdef JOININGAME
|
||||
CONS_Printf(M_GetText("Join accepted, waiting for complete game state...\n"));
|
||||
#else
|
||||
CONS_Printf(M_GetText("Join accepted, waiting for next level change...\n"));
|
||||
#endif
|
||||
|
||||
DEBFILE(va("Server accept join gametic=%u mynode=%d\n", gametic, mynode));
|
||||
|
||||
#ifdef SATURNPAK
|
||||
@@ -5308,16 +5228,13 @@ static void PT_ServerCFG(SINT8 node)
|
||||
scp = netbuffer->u.servercfg.varlengthinputs;
|
||||
CV_LoadPlayerNames(&scp);
|
||||
CV_LoadNetVars(&scp);
|
||||
#ifdef JOININGAME
|
||||
|
||||
/// \note Wait. What if a Lua script uses some global custom variables synched with the NetVars hook?
|
||||
/// Shouldn't them be downloaded even at intermission time?
|
||||
/// Also, according to HandleConnect, the server will send the savegame even during intermission...
|
||||
/// Sryder 2018-07-05: If we don't want to send the player config another way we need to send the gamestate
|
||||
/// At almost any gamestate there could be joiners... So just always send gamestate?
|
||||
cl_mode = ((server) ? CL_CONNECTED : CL_DOWNLOADSAVEGAME);
|
||||
#else
|
||||
cl_mode = CL_CONNECTED;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void PT_FileFragmentFromAwayNode(SINT8 node)
|
||||
@@ -5345,8 +5262,6 @@ static void PT_RequestFile(SINT8 node)
|
||||
Net_CloseConnection(node); // nope
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef SATURNPAK
|
||||
static void PT_WillResendGamestate(void)
|
||||
{
|
||||
@@ -5484,11 +5399,8 @@ static void PT_ClientCmd(INT32 netconsole, SINT8 node)
|
||||
{
|
||||
tic_t realend, realstart;
|
||||
|
||||
if (client)
|
||||
return;
|
||||
|
||||
// Ignore tics from those not synched
|
||||
if (resynch_inprogress[node])
|
||||
if (client || resynch_inprogress[node])
|
||||
return;
|
||||
|
||||
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||
@@ -5644,7 +5556,8 @@ static void PT_ClientCmd(INT32 netconsole, SINT8 node)
|
||||
--resynch_score[node];
|
||||
#else
|
||||
// Check player consistancy during the level
|
||||
if (realstart <= gametic && realstart > gametic - BACKUPTICS+1 && gamestate == GS_LEVEL
|
||||
if (gamestate == GS_LEVEL
|
||||
&& (realstart <= gametic && realstart + BACKUPTICS - 1 > gametic)
|
||||
&& consistancy[realstart%BACKUPTICS] != SHORT(netbuffer->u.clientpak.consistancy))
|
||||
{
|
||||
SV_RequireResynch(node);
|
||||
@@ -5652,10 +5565,13 @@ static void PT_ClientCmd(INT32 netconsole, SINT8 node)
|
||||
if (cv_resynchattempts.value && resynch_score[node] <= (unsigned)cv_resynchattempts.value*250)
|
||||
{
|
||||
if (cv_blamecfail.value)
|
||||
{
|
||||
CONS_Printf(M_GetText("Synch failure for player %d (%s); expected %hd, got %hd\n"),
|
||||
netconsole+1, player_names[netconsole],
|
||||
consistancy[realstart%BACKUPTICS],
|
||||
SHORT(netbuffer->u.clientpak.consistancy));
|
||||
}
|
||||
|
||||
DEBFILE(va("Restoring player %d (synch failure) [%update] %d!=%d\n",
|
||||
netconsole, realstart, consistancy[realstart%BACKUPTICS],
|
||||
SHORT(netbuffer->u.clientpak.consistancy)));
|
||||
@@ -6052,16 +5968,17 @@ static void GetPackets(void)
|
||||
{
|
||||
node = (SINT8)doomcom->remotenode;
|
||||
|
||||
if (netbuffer->packettype == PT_CLIENTJOIN && server)
|
||||
if (server && netbuffer->packettype == PT_CLIENTJOIN)
|
||||
{
|
||||
if (!levelloading) // Otherwise just ignore
|
||||
{
|
||||
HandleConnect(node);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (node == servernode && client && cl_mode != CL_SEARCHING)
|
||||
if (client && node == servernode && cl_mode != CL_SEARCHING)
|
||||
{
|
||||
if (netbuffer->packettype == PT_SERVERSHUTDOWN)
|
||||
{
|
||||
@@ -6075,13 +5992,11 @@ static void GetPackets(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef NONET
|
||||
if (netbuffer->packettype == PT_SERVERINFO)
|
||||
{
|
||||
HandleServerInfo(node);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*if (netbuffer->packettype == PT_PLAYERINFO)
|
||||
continue; // We do nothing with PLAYERINFO, that's for the MS browser. Not quite true anymore :p*/
|
||||
@@ -6122,7 +6037,8 @@ static INT16 Consistancy(void)
|
||||
{
|
||||
if (!playeringame[i])
|
||||
ret ^= 0xCCCC;
|
||||
else if (!players[i].mo || gamestate != GS_LEVEL);
|
||||
else if (!players[i].mo || gamestate != GS_LEVEL)
|
||||
;
|
||||
else
|
||||
{
|
||||
ret += players[i].mo->x;
|
||||
@@ -6131,6 +6047,7 @@ static INT16 Consistancy(void)
|
||||
ret *= i+1;
|
||||
}
|
||||
}
|
||||
|
||||
// I give up
|
||||
// Coop desynching enemies is painful
|
||||
if (gamestate == GS_LEVEL)
|
||||
@@ -6971,7 +6888,7 @@ void NetKeepAlive(void)
|
||||
|
||||
UpdatePingTable();
|
||||
|
||||
// Sryder: What is FILESTAMP??? << lmao
|
||||
// Sryder: What is FILESTAMP??? << lmao
|
||||
|
||||
GetPackets();
|
||||
|
||||
@@ -7241,7 +7158,7 @@ void CL_ClearRewinds(void)
|
||||
while ((head = rewindhead))
|
||||
{
|
||||
rewindhead = rewindhead->next;
|
||||
free(head);
|
||||
Z_Free(head);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7253,7 +7170,7 @@ rewind_t *CL_SaveRewindPoint(size_t demopos)
|
||||
if (rewindhead && rewindhead->leveltime + REWIND_POINT_INTERVAL > leveltime)
|
||||
return NULL;
|
||||
|
||||
rewind = (rewind_t *)malloc(sizeof (rewind_t));
|
||||
rewind = (rewind_t *)Z_Malloc(sizeof(rewind_t), PU_STATIC, NULL);
|
||||
if (!rewind)
|
||||
return NULL;
|
||||
|
||||
@@ -7276,7 +7193,7 @@ rewind_t *CL_RewindToTime(tic_t time)
|
||||
while (rewindhead && rewindhead->leveltime > time)
|
||||
{
|
||||
rewind = rewindhead->next;
|
||||
free(rewindhead);
|
||||
Z_Free(rewindhead);
|
||||
rewindhead = rewind;
|
||||
}
|
||||
|
||||
|
||||
+2
-28
@@ -133,10 +133,6 @@ void Command_Droprate(void);
|
||||
void Command_Numnodes(void);
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
// Client to server packet
|
||||
typedef struct
|
||||
{
|
||||
@@ -176,10 +172,6 @@ typedef struct
|
||||
ticcmd_t cmd, cmd2, cmd3, cmd4;
|
||||
} ATTRPACK client4cmd_pak;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4200)
|
||||
#endif
|
||||
|
||||
// Server to client packet
|
||||
// this packet is too large
|
||||
typedef struct
|
||||
@@ -372,10 +364,6 @@ typedef struct {
|
||||
UINT8 data[0]; // Size is variable using hardware_MAXPACKETLENGTH
|
||||
} ATTRPACK filetx_pak;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(default : 4200)
|
||||
#endif
|
||||
|
||||
#define MAXAPPLICATION 16
|
||||
|
||||
typedef struct
|
||||
@@ -519,10 +507,6 @@ typedef struct
|
||||
} u; // This is needed to pack diff packet types data together
|
||||
} ATTRPACK doomdata_t;
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
#define MAXSERVERLIST (MAXNETNODES-1)
|
||||
typedef struct
|
||||
{
|
||||
@@ -599,9 +583,6 @@ extern tic_t lowest_lag;
|
||||
extern consvar_t cv_mindelay, cv_gentlemens;
|
||||
|
||||
extern consvar_t
|
||||
#ifdef VANILLAJOINNEXTROUND
|
||||
cv_joinnextround,
|
||||
#endif
|
||||
cv_netticbuffer, cv_allownewplayer,
|
||||
#ifdef SATURNJOIN
|
||||
cv_allownewsaturnplayer,
|
||||
@@ -658,16 +639,9 @@ void D_QuitNetGame(void);
|
||||
//? How many ticks to run?
|
||||
boolean TryRunTics(tic_t realtic);
|
||||
|
||||
// extra data for lmps
|
||||
// these functions scare me. they contain magic.
|
||||
/*boolean AddLmpExtradata(UINT8 **demo_p, INT32 playernum);
|
||||
void ReadLmpExtraData(UINT8 **demo_pointer, INT32 playernum);*/
|
||||
|
||||
#ifndef NONET
|
||||
// translate a playername in a player number return -1 if not found and
|
||||
// print a error message in the console
|
||||
SINT8 nametonum(const char *name);
|
||||
#endif
|
||||
|
||||
extern char motd[254], server_context[8];
|
||||
extern UINT8 playernode[MAXPLAYERS];
|
||||
@@ -679,7 +653,6 @@ INT32 D_NumPlayers(void);
|
||||
void D_ResetTiccmds(void);
|
||||
|
||||
tic_t GetLag(INT32 node);
|
||||
//UINT8 GetFreeXCmdSize(UINT8 playerid);
|
||||
|
||||
extern UINT8 hu_resynching;
|
||||
#ifdef SATURNPAK
|
||||
@@ -687,7 +660,8 @@ extern UINT8 hu_redownloadinggamestate;
|
||||
#endif
|
||||
extern boolean hu_stopped; // kart, true when the game is stopped for players due to a disconnecting or connecting player
|
||||
|
||||
typedef struct rewind_s {
|
||||
typedef struct rewind_s
|
||||
{
|
||||
UINT8 savebuffer[(768*1024)];
|
||||
tic_t leveltime;
|
||||
size_t demopos;
|
||||
|
||||
+206
-191
@@ -97,15 +97,15 @@
|
||||
UINT8 window_notinfocus = false;
|
||||
|
||||
static char *startupiwadfiles[MAX_WADFILES];
|
||||
static size_t startupiwadcount = 0;
|
||||
static char *startuppwads[MAX_WADFILES];
|
||||
static size_t startuppwadcount = 0;
|
||||
|
||||
// autoloading
|
||||
static char *autoloadwadfiles[MAX_WADFILES];
|
||||
static char *autoloadwadfilespost[MAX_WADFILES];
|
||||
boolean autoloading;
|
||||
boolean autoloaded;
|
||||
boolean postautoloaded = false;
|
||||
boolean wasautoloaded = false;
|
||||
static size_t autoloadcount = 0;
|
||||
static size_t postloadcount = 0;
|
||||
//
|
||||
|
||||
boolean devparm = false; // started game with -devparm
|
||||
@@ -113,7 +113,9 @@ boolean devparm = false; // started game with -devparm
|
||||
boolean singletics = false; // timedemo
|
||||
boolean lastdraw = false;
|
||||
|
||||
#ifdef MOTIONBLUR
|
||||
INT32 postimgparam[MAXSPLITSCREENPLAYERS];
|
||||
#endif
|
||||
|
||||
// These variables are only true if
|
||||
// whether the respective sound system is disabled
|
||||
@@ -347,78 +349,76 @@ static void D_Renderview(void)
|
||||
}
|
||||
}
|
||||
|
||||
// Draw over the fourth screen so you don't have to stare at a HOM :V
|
||||
if (splitscreen == 2)
|
||||
{
|
||||
// V_DrawPatchFill, but for the fourth screen only
|
||||
patch_t *pat = W_CachePatchName("SRB2BACK", PU_CACHE);
|
||||
INT32 dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy);
|
||||
INT32 x, y, pw = SHORT(pat->width) * dupz, ph = SHORT(pat->height) * dupz;
|
||||
|
||||
for (x = vid.width>>1; x < vid.width; x += pw)
|
||||
{
|
||||
for (y = vid.height>>1; y < vid.height; y += ph)
|
||||
V_DrawScaledPatch(x, y, V_NOSCALESTART, pat);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i <= splitscreen; i++)
|
||||
{
|
||||
const boolean issplitscreen = (i > 0);
|
||||
|
||||
if (!P_MobjWasRemoved(players[displayplayers[i]].mo) || players[displayplayers[i]].playerstate == PST_DEAD)
|
||||
{
|
||||
viewssnum = i;
|
||||
|
||||
if (!issplitscreen) // Initialize for P1
|
||||
switch (i)
|
||||
{
|
||||
viewwindowy = viewwindowx = 0;
|
||||
objectsdrawn = 0;
|
||||
case 1:
|
||||
if (splitscreen > 1)
|
||||
{
|
||||
viewwindowx = viewwidth;
|
||||
viewwindowy = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
viewwindowx = 0;
|
||||
viewwindowy = viewheight;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
viewwindowx = 0;
|
||||
viewwindowy = viewheight;
|
||||
break;
|
||||
case 3:
|
||||
viewwindowx = viewwidth;
|
||||
viewwindowy = viewheight;
|
||||
break;
|
||||
default: // Initialize for P1
|
||||
viewwindowy = viewwindowx = 0;
|
||||
objectsdrawn = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
HWR_RenderPlayerView();
|
||||
R_RestoreLevelInterpolators();
|
||||
continue;
|
||||
}
|
||||
else if (rendermode == render_soft)
|
||||
#endif
|
||||
if (issplitscreen) // Splitscreen-specific
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 1:
|
||||
if (splitscreen > 1)
|
||||
{
|
||||
viewwindowx = viewwidth;
|
||||
viewwindowy = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
viewwindowx = 0;
|
||||
viewwindowy = viewheight;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
viewwindowx = 0;
|
||||
viewwindowy = viewheight;
|
||||
break;
|
||||
case 3:
|
||||
viewwindowx = viewwidth;
|
||||
viewwindowy = viewheight;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
R_RenderPlayerView(&players[displayplayers[i]]);
|
||||
}
|
||||
|
||||
if (!issplitscreen)
|
||||
R_ApplyViewMorph();
|
||||
if (rendermode == render_soft)
|
||||
{
|
||||
if (i == 0)
|
||||
R_ApplyViewMorph();
|
||||
|
||||
V_DoPostProcessor(i, postimgparam[i]);
|
||||
#ifdef MOTIONBLUR
|
||||
V_DoPostProcessor(i, postimgparam[i]);
|
||||
#else
|
||||
V_DoPostProcessor(i, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
// Draw over the fourth screen so you don't have to stare at a HOM :V
|
||||
if (splitscreen == 2)
|
||||
{
|
||||
// V_DrawPatchFill, but for the fourth screen only
|
||||
patch_t *pat = W_CachePatchName("SRB2BACK", PU_PATCH);
|
||||
INT32 x, y, pw = SHORT(pat->width) * vid.dup, ph = SHORT(pat->height) * vid.dup;
|
||||
|
||||
for (x = vid.width>>1; x < vid.width; x += pw)
|
||||
{
|
||||
for (y = vid.height>>1; y < vid.height; y += ph)
|
||||
V_DrawScaledPatch(x, y, V_NOSCALESTART, pat);
|
||||
}
|
||||
}
|
||||
|
||||
R_RestoreLevelInterpolators();
|
||||
@@ -523,19 +523,16 @@ static boolean D_Display(void)
|
||||
case GS_LEVEL:
|
||||
if (!gametic)
|
||||
break;
|
||||
HU_Erase();
|
||||
AM_Drawer();
|
||||
break;
|
||||
|
||||
case GS_INTERMISSION:
|
||||
Y_IntermissionDrawer();
|
||||
HU_Erase();
|
||||
HU_Drawer();
|
||||
break;
|
||||
|
||||
case GS_VOTING:
|
||||
Y_VoteDrawer();
|
||||
HU_Erase();
|
||||
HU_Drawer();
|
||||
break;
|
||||
|
||||
@@ -550,7 +547,6 @@ static boolean D_Display(void)
|
||||
|
||||
case GS_CUTSCENE:
|
||||
F_CutsceneDrawer();
|
||||
HU_Erase();
|
||||
HU_Drawer();
|
||||
break;
|
||||
|
||||
@@ -560,7 +556,6 @@ static boolean D_Display(void)
|
||||
|
||||
case GS_EVALUATION:
|
||||
F_GameEvaluationDrawer();
|
||||
HU_Erase();
|
||||
HU_Drawer();
|
||||
break;
|
||||
|
||||
@@ -570,7 +565,6 @@ static boolean D_Display(void)
|
||||
|
||||
case GS_CREDITS:
|
||||
F_CreditDrawer();
|
||||
HU_Erase();
|
||||
HU_Drawer();
|
||||
break;
|
||||
|
||||
@@ -587,7 +581,6 @@ static boolean D_Display(void)
|
||||
{
|
||||
// I don't think HOM from nothing drawing is independent...
|
||||
F_WaitingPlayersDrawer();
|
||||
HU_Erase();
|
||||
HU_Drawer();
|
||||
}
|
||||
case GS_TIMEATTACK:
|
||||
@@ -610,7 +603,7 @@ static boolean D_Display(void)
|
||||
{
|
||||
if (rendermode == render_soft)
|
||||
{
|
||||
VID_BlitLinearScreen(vid.screens[0], vid.screens[1], vid.width, vid.height, vid.width, vid.rowbytes);
|
||||
VID_BlitLinearScreen(vid.screens[0], vid.screens[1], vid.width, vid.height, vid.width, vid.width);
|
||||
}
|
||||
|
||||
lastdraw = false;
|
||||
@@ -774,8 +767,8 @@ void D_SRB2Loop(void)
|
||||
// capbudget is the minimum precise_t duration of a single loop iteration
|
||||
precise_t capbudget;
|
||||
precise_t enterprecise = I_GetPreciseTime();
|
||||
precise_t finishprecise = enterprecise;
|
||||
|
||||
memset(&g_dc, 0, sizeof(g_dc));
|
||||
Z_Frame_Reset();
|
||||
|
||||
// Casting the return value of a function is bad practice (apparently)
|
||||
@@ -891,12 +884,6 @@ void D_SRB2Loop(void)
|
||||
// always update console and hud
|
||||
// otherwise it may take minutes to open it
|
||||
CON_Drawer();
|
||||
|
||||
if (gamestate == GS_LEVEL)
|
||||
{
|
||||
ST_Drawer();
|
||||
HU_Drawer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -918,7 +905,7 @@ void D_SRB2Loop(void)
|
||||
}
|
||||
#endif
|
||||
// Fully completed frame made.
|
||||
finishprecise = I_GetPreciseTime();
|
||||
precise_t finishprecise = I_GetPreciseTime();
|
||||
|
||||
// Use the time before sleep for frameskip calculations:
|
||||
// post-sleep time is literally being intentionally wasted
|
||||
@@ -933,9 +920,16 @@ void D_SRB2Loop(void)
|
||||
//
|
||||
// Wipes run an inner loop and artificially increase
|
||||
// the measured time.
|
||||
if (!ranwipe && (frameskip < 3) && (deltatics > 1.0))
|
||||
if (cv_frameskip.value)
|
||||
{
|
||||
frameskip++;
|
||||
if (!ranwipe && (frameskip < 3) && (deltatics > 1.0))
|
||||
{
|
||||
frameskip++;
|
||||
}
|
||||
else
|
||||
{
|
||||
frameskip = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -973,8 +967,11 @@ void D_ClearState(void)
|
||||
{
|
||||
INT32 i;
|
||||
|
||||
demo.title = false;
|
||||
|
||||
// okay, stop now
|
||||
// (otherwise the game still thinks we're playing!)
|
||||
CURLAbortFile();
|
||||
SV_StopServer();
|
||||
SV_ResetServer();
|
||||
serverlistultimatecount = 0;
|
||||
@@ -983,7 +980,10 @@ void D_ClearState(void)
|
||||
CL_ClearPlayer(i);
|
||||
|
||||
splitscreen = 0;
|
||||
SplitScreen_OnChange();
|
||||
|
||||
// recompute screen size
|
||||
R_ExecuteSetViewSize();
|
||||
|
||||
botingame = false;
|
||||
botskin = 0;
|
||||
cv_debug = 0;
|
||||
@@ -1002,7 +1002,6 @@ void D_ClearState(void)
|
||||
gameaction = ga_nothing;
|
||||
memset(displayplayers, 0, sizeof(displayplayers));
|
||||
consoleplayer = 0;
|
||||
//demosequence = -1;
|
||||
gametype = GT_RACE; // SRB2kart
|
||||
paused = false;
|
||||
|
||||
@@ -1021,10 +1020,15 @@ void D_ClearState(void)
|
||||
S_StopSounds();
|
||||
S_ResetKeepAndSpecialMus(); // just in case
|
||||
|
||||
P_FreeLevelState();
|
||||
//P_FreeLevelState();
|
||||
|
||||
G_SetGamestate(GS_NULL);
|
||||
wipegamestate = GS_NULL;
|
||||
|
||||
M_ClearMenus(true);
|
||||
|
||||
// map palettes affect this
|
||||
D_ResetDeviceLED();
|
||||
}
|
||||
|
||||
//
|
||||
@@ -1032,25 +1036,18 @@ void D_ClearState(void)
|
||||
//
|
||||
void D_StartTitle(void)
|
||||
{
|
||||
demo.title = false;
|
||||
D_ClearState();
|
||||
netgame = false; // title menu shouldnt be a netgame lmao
|
||||
M_ClearMenus(true);
|
||||
multiplayer = netgame = false; // title menu shouldnt be a netgame or multiplayer lmao
|
||||
F_StartTitleScreen();
|
||||
D_ResetDeviceLED();
|
||||
}
|
||||
|
||||
//
|
||||
// D_AddFile
|
||||
//
|
||||
static void D_AddFile(const char *file, char **filearray)
|
||||
static void D_AddFile(const char *file, char **filearray, size_t index)
|
||||
{
|
||||
size_t pnumwadfiles;
|
||||
char *newfile;
|
||||
|
||||
for (pnumwadfiles = 0; filearray[pnumwadfiles]; pnumwadfiles++)
|
||||
;
|
||||
|
||||
newfile = malloc(strlen(file) + 1);
|
||||
if (!newfile)
|
||||
{
|
||||
@@ -1058,16 +1055,17 @@ static void D_AddFile(const char *file, char **filearray)
|
||||
}
|
||||
strcpy(newfile, file);
|
||||
|
||||
filearray[pnumwadfiles] = newfile;
|
||||
filearray[index] = newfile;
|
||||
}
|
||||
|
||||
static void D_CleanFile(char **filearray)
|
||||
static void D_CleanFile(char **filearray, size_t count)
|
||||
{
|
||||
size_t pnumwadfiles;
|
||||
for (pnumwadfiles = 0; filearray[pnumwadfiles]; pnumwadfiles++)
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
free(filearray[pnumwadfiles]);
|
||||
filearray[pnumwadfiles] = NULL;
|
||||
free(filearray[i]);
|
||||
filearray[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1080,50 +1078,49 @@ static INT32 D_DetectFileType(const char* filename)
|
||||
|
||||
const size_t len = strlen(filename);
|
||||
|
||||
if (!stricmp(&filename[len - 4], ".wad"))
|
||||
if (fasticmp(&filename[len - 4], ".wad"))
|
||||
return 2;
|
||||
else if (!stricmp(&filename[len - 4], ".pk3"))
|
||||
else if (fasticmp(&filename[len - 4], ".pk3"))
|
||||
return 3;
|
||||
else if (!stricmp(&filename[len - 5], ".kart"))
|
||||
else if (fasticmp(&filename[len - 5], ".kart"))
|
||||
return 4;
|
||||
else if (!stricmp(&filename[len - 4], ".lua"))
|
||||
else if (fasticmp(&filename[len - 4], ".lua"))
|
||||
return 5;
|
||||
else if (!stricmp(&filename[len - 4], ".soc"))
|
||||
else if (fasticmp(&filename[len - 4], ".soc"))
|
||||
return 6;
|
||||
else if (!stricmp(&filename[len - 4], ".cfg"))
|
||||
else if (fasticmp(&filename[len - 4], ".cfg"))
|
||||
return 7;
|
||||
else if (!stricmp(&filename[len - 4], ".txt"))
|
||||
else if (fasticmp(&filename[len - 4], ".txt"))
|
||||
return 8;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// autoload that shit
|
||||
static void D_AutoloadFile(const char *file, char **filearray)
|
||||
static void D_AutoloadFile(const char *file, char **filearray, size_t index)
|
||||
{
|
||||
size_t pnumwadfiles;
|
||||
char *newfile;
|
||||
INT32 fileType = D_DetectFileType(file);
|
||||
|
||||
for (pnumwadfiles = 0; filearray[pnumwadfiles]; pnumwadfiles++)
|
||||
;
|
||||
|
||||
newfile = malloc(strlen(file) + 1);
|
||||
if (!newfile)
|
||||
I_Error("No more free memory to AutoloadFile %s",file);
|
||||
|
||||
if (!fileType)
|
||||
{
|
||||
CONS_Printf("D_AutoloadFile: File %s is unknown or invalid\n", file);
|
||||
return;
|
||||
}
|
||||
|
||||
strcpy(newfile, file);
|
||||
|
||||
if (fileType <= 6)
|
||||
filearray[pnumwadfiles] = newfile;
|
||||
{
|
||||
newfile = malloc(strlen(file) + 1);
|
||||
if (!newfile)
|
||||
I_Error("No more free memory to AutoloadFile %s",file);
|
||||
|
||||
strcpy(newfile, file);
|
||||
filearray[index] = newfile;
|
||||
}
|
||||
else
|
||||
COM_BufAddText(va("exec %s\n", newfile));
|
||||
{
|
||||
COM_BufAddText(va("exec %s\n", file));
|
||||
}
|
||||
}
|
||||
|
||||
static char *strremove(char *str, const char *sub)
|
||||
@@ -1148,42 +1145,44 @@ static void D_FindAddonsToAutoload(void)
|
||||
{
|
||||
FILE *autoloadconfigfile;
|
||||
const char *autoloadpath;
|
||||
char *newline;
|
||||
|
||||
boolean postload;
|
||||
|
||||
INT32 i;
|
||||
char wadsToAutoload[256] = "";
|
||||
|
||||
// does it exist tho
|
||||
autoloadpath = va("%s"PATHSEP"%s",srb2home,AUTOLOADCONFIGFILENAME);
|
||||
autoloadpath = va("%s"PATHSEP"%s", srb2home, AUTOLOADCONFIGFILENAME);
|
||||
autoloadconfigfile = fopen(autoloadpath, "r");
|
||||
|
||||
// If the file is found, run our shit
|
||||
if (!autoloadconfigfile) // nope outta here
|
||||
{
|
||||
wasautoloaded = postautoloaded = true; // so D_AddAutoloadFiles can skip everything since nothings there to autoload
|
||||
autoloadcount = postloadcount = 0; // so D_AddAutoloadFiles can skip everything since nothings there to autoload
|
||||
return;
|
||||
}
|
||||
|
||||
while (fgets(wadsToAutoload, sizeof wadsToAutoload, autoloadconfigfile) != NULL)
|
||||
while (fgets(wadsToAutoload, sizeof(wadsToAutoload), autoloadconfigfile) != NULL)
|
||||
{
|
||||
postload = false;
|
||||
|
||||
// skip if commented or empty
|
||||
if ((wadsToAutoload[1] == '\0' || wadsToAutoload[1] == '\n')
|
||||
|| (wadsToAutoload[0] == '#'))
|
||||
if (wadsToAutoload[0] == '\n' ||
|
||||
wadsToAutoload[0] == '#' ||
|
||||
wadsToAutoload[0] == '\0')
|
||||
continue;
|
||||
|
||||
// this marks it so that it loads after loading server addons
|
||||
else if (fastncmp(wadsToAutoload, "postload ", 9))
|
||||
if (fastncmp(wadsToAutoload, "postload ", 9))
|
||||
{
|
||||
strremove(wadsToAutoload, "postload ");
|
||||
postload = true;
|
||||
}
|
||||
|
||||
// Remove Any Empty or Skipped Lines
|
||||
for (i = 0; wadsToAutoload[i] != '\0'; i++)
|
||||
{
|
||||
if (wadsToAutoload[i] == '\n')
|
||||
wadsToAutoload[i] = '\0';
|
||||
}
|
||||
newline = strchr(wadsToAutoload, '\n');
|
||||
if (newline)
|
||||
*newline = '\0';
|
||||
|
||||
if (!postload && W_CheckPostLoadList(wadsToAutoload))
|
||||
{
|
||||
@@ -1193,56 +1192,67 @@ static void D_FindAddonsToAutoload(void)
|
||||
|
||||
// LOAD IT
|
||||
if (!postload)
|
||||
D_AutoloadFile(wadsToAutoload, autoloadwadfiles);
|
||||
{
|
||||
D_AutoloadFile(wadsToAutoload, autoloadwadfiles, autoloadcount);
|
||||
autoloadcount++;
|
||||
}
|
||||
else
|
||||
D_AutoloadFile(wadsToAutoload, autoloadwadfilespost);
|
||||
|
||||
// end it here
|
||||
for (i = 0; wadsToAutoload[i] != '\0'; i++)
|
||||
wadsToAutoload[i] = '\0';
|
||||
{
|
||||
D_AutoloadFile(wadsToAutoload, autoloadwadfilespost, postloadcount);
|
||||
postloadcount++;
|
||||
}
|
||||
}
|
||||
|
||||
autoloadwadfiles[autoloadcount] = NULL;
|
||||
autoloadwadfilespost[postloadcount] = NULL;
|
||||
|
||||
// we dont want memory leaks around here do we?
|
||||
fclose(autoloadconfigfile);
|
||||
}
|
||||
|
||||
static void D_AddAutoloadFiles(void)
|
||||
{
|
||||
if (wasautoloaded)
|
||||
// nothing to autoload
|
||||
if (autoloadcount == 0)
|
||||
return;
|
||||
|
||||
CONS_Printf("D_AutoloadFile(): Loading autoloaded addons...\n");
|
||||
|
||||
if (W_AddAutoloadedLocalFiles(autoloadwadfiles) == 0)
|
||||
CONS_Printf("D_AutoloadFile(): Are you sure you put in valid files or what?\n");
|
||||
D_CleanFile(autoloadwadfiles);
|
||||
|
||||
wasautoloaded = true;
|
||||
D_CleanFile(autoloadwadfiles, autoloadcount);
|
||||
|
||||
autoloadcount = 0;
|
||||
}
|
||||
|
||||
void D_AddPostloadFiles(void)
|
||||
{
|
||||
if (postautoloaded || !netgame)
|
||||
// nothing to postload
|
||||
if (postloadcount == 0 || !netgame)
|
||||
return;
|
||||
|
||||
CONS_Printf("D_AddPostloadFiles(): Loading postloaded addons...\n");
|
||||
|
||||
if (W_AddAutoloadedLocalFiles(autoloadwadfilespost) == 0)
|
||||
CONS_Printf("D_AddPostloadFiles(): Are you sure you put in valid files or what?\n");
|
||||
D_CleanFile(autoloadwadfilespost);
|
||||
|
||||
postautoloaded = true;
|
||||
D_CleanFile(autoloadwadfilespost, postloadcount);
|
||||
|
||||
postloadcount = 0;
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
// Identify the SRB2 version, and IWAD file to use.
|
||||
// ==========================================================================
|
||||
|
||||
static boolean AddIWAD(void)
|
||||
static boolean AddIWAD(const char * file, const char *dir)
|
||||
{
|
||||
char * path = va(pandf, srb2path, "srb2.srb");
|
||||
char * path = va(pandf, dir, file);
|
||||
|
||||
if (FIL_ReadFileOK(path))
|
||||
{
|
||||
D_AddFile(path, startupiwadfiles);
|
||||
D_AddFile(path, startupiwadfiles, startupiwadcount++);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1278,14 +1288,14 @@ static void IdentifyVersion(void)
|
||||
}
|
||||
|
||||
#if (1) // reduce the amount of findfile by only using full cwd in this func
|
||||
if (strcmp(tempsrb2path, srb2waddir))
|
||||
if (!fastcmp(tempsrb2path, srb2waddir))
|
||||
#endif
|
||||
{
|
||||
strlcpy(srb2path, srb2waddir, sizeof (srb2path));
|
||||
}
|
||||
|
||||
// Load the IWAD
|
||||
if (!AddIWAD())
|
||||
if (!AddIWAD("srb2.srb", srb2path)) // not sure why this uses srb2path and not srb2waddir?
|
||||
{
|
||||
I_Error("SRB2.SRB not found! Expected in %s\n", srb2waddir);
|
||||
}
|
||||
@@ -1299,57 +1309,60 @@ static void IdentifyVersion(void)
|
||||
|
||||
#ifdef USE_PATCH_DTA
|
||||
// Add our crappy patches to fix our bugs
|
||||
D_AddFile(va(pandf,srb2waddir,"patch.dta"));
|
||||
if (!AddIWAD("patch.dta", srb2waddir))
|
||||
{
|
||||
I_Error("patch.dta not found! Expected in %s\n", srb2waddir);
|
||||
}
|
||||
#endif
|
||||
if (!AddIWAD("gfx.kart", srb2waddir))
|
||||
{
|
||||
I_Error("gfx.kart not found! Expected in %s\n", srb2waddir);
|
||||
}
|
||||
|
||||
D_AddFile(va(pandf, srb2waddir, "gfx.kart"), startupiwadfiles);
|
||||
D_AddFile(va(pandf, srb2waddir, "textures.kart"), startupiwadfiles);
|
||||
D_AddFile(va(pandf, srb2waddir, "chars.kart"), startupiwadfiles);
|
||||
D_AddFile(va(pandf, srb2waddir, "maps.kart"), startupiwadfiles);
|
||||
if (!AddIWAD("textures.kart", srb2waddir))
|
||||
{
|
||||
I_Error("textures.kart not found! Expected in %s\n", srb2waddir);
|
||||
}
|
||||
|
||||
if (!AddIWAD("chars.kart", srb2waddir))
|
||||
{
|
||||
I_Error("chars.kart not found! Expected in %s\n", srb2waddir);
|
||||
}
|
||||
|
||||
if (!AddIWAD("maps.kart", srb2waddir))
|
||||
{
|
||||
I_Error("maps.kart not found! Expected in %s\n", srb2waddir);
|
||||
}
|
||||
#ifdef USE_PATCH_KART
|
||||
D_AddFile(va(pandf,srb2waddir,"patch.kart"), startupiwadfiles);
|
||||
if (!AddIWAD("patch.kart", srb2waddir))
|
||||
{
|
||||
I_Error("patch.kart not found! Expected in %s\n", srb2waddir);
|
||||
}
|
||||
#endif
|
||||
|
||||
const char *path = NULL;
|
||||
|
||||
path = va(pandf, srb2waddir, "extra.kart");
|
||||
|
||||
// completely optional
|
||||
if (FIL_ReadFileOK(path))
|
||||
{
|
||||
D_AddFile(path, startupiwadfiles);
|
||||
if (AddIWAD("extra.kart", srb2waddir))
|
||||
found_extra_kart = true;
|
||||
}
|
||||
|
||||
path = va(pandf, srb2waddir, "extra2.kart");
|
||||
|
||||
// completely optional 2: Back with a vengence
|
||||
if (FIL_ReadFileOK(path))
|
||||
{
|
||||
D_AddFile(path, startupiwadfiles);
|
||||
if (AddIWAD("extra2.kart", srb2waddir))
|
||||
found_extra2_kart = true;
|
||||
}
|
||||
|
||||
path = va(pandf, srb2waddir, "extra3.kart");
|
||||
|
||||
if (FIL_ReadFileOK(path))
|
||||
{
|
||||
D_AddFile(path, startupiwadfiles);
|
||||
if (AddIWAD("extra3.kart", srb2waddir))
|
||||
found_extra3_kart = true;
|
||||
}
|
||||
|
||||
#if !defined (HAVE_SDL) || defined (HAVE_MIXER)
|
||||
#define MUSICTEST(str) \
|
||||
musicpath = va(pandf,srb2waddir,str);\
|
||||
musicpath = va(pandf, srb2waddir, str);\
|
||||
handle = W_OpenWadFile(&musicpath, false); \
|
||||
if (handle) \
|
||||
{\
|
||||
{ \
|
||||
int ms = W_VerifyNMUSlumps(musicpath, handle, false); \
|
||||
fclose(handle); \
|
||||
if (ms == 0) \
|
||||
I_Error("File " str " has been modified with non-music/sound lumps"); \
|
||||
if (ms == 1) \
|
||||
D_AddFile(musicpath, startupiwadfiles); \
|
||||
D_AddFile(musicpath, startupiwadfiles, startupiwadcount++); \
|
||||
}
|
||||
{
|
||||
const char *musicpath;
|
||||
@@ -1723,8 +1736,14 @@ void D_SRB2Main(void)
|
||||
else
|
||||
{
|
||||
// use user specific config file
|
||||
if (M_CheckParm("-workdir") && M_IsNextParm())
|
||||
snprintf(srb2home, sizeof srb2home, "%s", M_GetNextParm());
|
||||
else
|
||||
#ifdef DEFAULTDIR
|
||||
snprintf(srb2home, sizeof srb2home, "%s" PATHSEP DEFAULTDIR, userhome);
|
||||
snprintf(srb2home, sizeof srb2home, "%s" PATHSEP DEFAULTDIR, userhome);
|
||||
#else // DEFAULTDIR
|
||||
snprintf(srb2home, sizeof srb2home, "%s", userhome);
|
||||
#endif // DEFAULTDIR
|
||||
snprintf(downloaddir, sizeof downloaddir, "%s" PATHSEP "DOWNLOAD", srb2home);
|
||||
if (dedicated)
|
||||
snprintf(configfile, sizeof configfile, "%s" PATHSEP "d"CONFIGFILENAME, srb2home);
|
||||
@@ -1733,17 +1752,6 @@ void D_SRB2Main(void)
|
||||
|
||||
// can't use sprintf since there is %u in savegamename
|
||||
strcatbf(savegamename, srb2home, PATHSEP);
|
||||
#else
|
||||
snprintf(srb2home, sizeof srb2home, "%s", userhome);
|
||||
snprintf(downloaddir, sizeof downloaddir, "%s", userhome);
|
||||
if (dedicated)
|
||||
snprintf(configfile, sizeof configfile, "%s" PATHSEP "d"CONFIGFILENAME, userhome);
|
||||
else
|
||||
snprintf(configfile, sizeof configfile, "%s" PATHSEP CONFIGFILENAME, userhome);
|
||||
|
||||
// can't use sprintf since there is %u in savegamename
|
||||
strcatbf(savegamename, userhome, PATHSEP);
|
||||
#endif
|
||||
}
|
||||
|
||||
configfile[sizeof configfile - 1] = '\0';
|
||||
@@ -1769,6 +1777,9 @@ void D_SRB2Main(void)
|
||||
}
|
||||
}
|
||||
|
||||
// make sure workdir exists
|
||||
I_mkdir(srb2home, 0755);
|
||||
|
||||
// Create addons dir
|
||||
snprintf(addonsdir, sizeof addonsdir, "%s%s%s", srb2home, PATHSEP, "addons");
|
||||
I_mkdir(addonsdir, 0755);
|
||||
@@ -1797,7 +1808,7 @@ void D_SRB2Main(void)
|
||||
const char *s = M_GetNextParm();
|
||||
|
||||
if (s) // Check for NULL?
|
||||
D_AddFile(s, startuppwads);
|
||||
D_AddFile(s, startuppwads, startuppwadcount++);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1830,8 +1841,10 @@ void D_SRB2Main(void)
|
||||
// load wad, including the main wad file
|
||||
CONS_Printf("W_InitMultipleFiles(): Adding IWAD and main PWADs.\n");
|
||||
|
||||
W_InitMultipleFiles(startupiwadfiles, false);
|
||||
D_CleanFile(startupiwadfiles);
|
||||
W_InitMultipleFiles(startupiwadfiles, startupiwadcount, false);
|
||||
//mainwads = startupiwadcount - musicwads;
|
||||
D_CleanFile(startupiwadfiles, startupiwadcount);
|
||||
startupiwadcount = 0;
|
||||
mainwads = 0;
|
||||
|
||||
#ifndef DEVELOP
|
||||
@@ -1870,15 +1883,16 @@ void D_SRB2Main(void)
|
||||
|
||||
D_CheckMaps(false);
|
||||
|
||||
W_InitMultipleFiles(startuppwads, true);
|
||||
W_InitMultipleFiles(startuppwads, startuppwadcount, true);
|
||||
|
||||
// Only search for pwad maps if we actually have a pwad added
|
||||
if (startuppwads[0] != NULL)
|
||||
if (startuppwadcount > 0)
|
||||
{
|
||||
D_CheckMaps(true);
|
||||
}
|
||||
|
||||
D_CleanFile(startuppwads);
|
||||
D_CleanFile(startuppwads, startuppwadcount);
|
||||
startuppwadcount = 0;
|
||||
|
||||
cht_Init();
|
||||
|
||||
@@ -1922,9 +1936,7 @@ void D_SRB2Main(void)
|
||||
|
||||
G_LoadGameData();
|
||||
|
||||
#if defined (__unix__) || defined (UNIXCOMMON) || defined (HAVE_SDL)
|
||||
VID_PrepareModeList(); // Regenerate Modelist according to cv_fullscreen
|
||||
#endif
|
||||
|
||||
// set user default mode or mode set at cmdline
|
||||
SCR_CheckDefaultMode();
|
||||
@@ -2144,11 +2156,14 @@ void D_SRB2Main(void)
|
||||
const char *sskill = M_GetNextParm();
|
||||
|
||||
for (j = 0; kartspeed_cons_t[j].strvalue; j++)
|
||||
if (!strcasecmp(kartspeed_cons_t[j].strvalue, sskill))
|
||||
{
|
||||
if (fasticmp(kartspeed_cons_t[j].strvalue, sskill))
|
||||
{
|
||||
newskill = (INT16)kartspeed_cons_t[j].value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!kartspeed_cons_t[j].strvalue) // reached end of the list with no match
|
||||
{
|
||||
j = atoi(sskill); // assume they gave us a skill number, which is okay too
|
||||
|
||||
@@ -61,9 +61,6 @@ extern boolean minilighticon; // mkwii-style minimap headlight
|
||||
//
|
||||
|
||||
// autoload stuff
|
||||
extern boolean autoloading;
|
||||
extern boolean autoloaded;
|
||||
extern boolean postautoloaded;
|
||||
void D_AddPostloadFiles(void);
|
||||
|
||||
// the infinite loop of D_SRB2Loop() called from win_main for windows version
|
||||
|
||||
+3
-53
@@ -145,7 +145,6 @@ boolean Net_GetNetStat(void)
|
||||
#define URGENTFREESLOTNUM 10
|
||||
#define ACKTOSENDTIMEOUT (TICRATE/11)
|
||||
|
||||
#ifndef NONET
|
||||
typedef struct
|
||||
{
|
||||
UINT8 acknum;
|
||||
@@ -159,7 +158,6 @@ typedef struct
|
||||
doomdata_t data;
|
||||
} pak;
|
||||
} ackpak_t;
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@@ -167,10 +165,8 @@ typedef enum
|
||||
NF_TIMEOUT = 2, // Flag is set when the node got a timeout
|
||||
} node_flags_t;
|
||||
|
||||
#ifndef NONET
|
||||
// Table of packets that were not acknowleged can be resent (the sender window)
|
||||
static ackpak_t ackpak[MAXACKPACKETS];
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -198,7 +194,6 @@ typedef struct
|
||||
static node_t nodes[MAXNETNODES];
|
||||
#define NODETIMEOUT 14
|
||||
|
||||
#ifndef NONET
|
||||
// return <0 if a < b (mod 256)
|
||||
// 0 if a = n (mod 256)
|
||||
// >0 if a > b (mod 256)
|
||||
@@ -411,22 +406,16 @@ static boolean Processackpak(void)
|
||||
}
|
||||
return goodpacket;
|
||||
}
|
||||
#endif
|
||||
|
||||
// send special packet with only ack on it
|
||||
void Net_SendAcks(INT32 node)
|
||||
{
|
||||
#ifdef NONET
|
||||
(void)node;
|
||||
#else
|
||||
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||
netbuffer->packettype = PT_NOTHING;
|
||||
M_Memcpy(netbuffer->u.textcmd, nodes[node].acktosend, MAXACKTOSEND);
|
||||
HSendPacket(node, false, 0, MAXACKTOSEND);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef NONET
|
||||
static void GotAcks(void)
|
||||
{
|
||||
INT32 i, j;
|
||||
@@ -457,7 +446,6 @@ static void GotAcks(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void Net_ConnectionTimeout(INT32 node)
|
||||
{
|
||||
@@ -484,7 +472,6 @@ void Net_ConnectionTimeout(INT32 node)
|
||||
// Resend the data if needed
|
||||
void Net_AckTicker(void)
|
||||
{
|
||||
#ifndef NONET
|
||||
INT32 i;
|
||||
|
||||
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||
@@ -534,16 +521,12 @@ void Net_AckTicker(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Remove last packet received ack before resending the ackreturn
|
||||
// (the higher layer doesn't have room, or something else ....)
|
||||
void Net_UnAcknowledgePacket(INT32 node)
|
||||
{
|
||||
#ifdef NONET
|
||||
(void)node;
|
||||
#else
|
||||
INT32 hm1 = (nodes[node].acktosend_head-1+MAXACKTOSEND) % MAXACKTOSEND;
|
||||
DEBFILE(va("UnAcknowledge node %d\n", node));
|
||||
|
||||
@@ -580,10 +563,8 @@ void Net_UnAcknowledgePacket(INT32 node)
|
||||
if (!nodes[node].firstacktosend)
|
||||
nodes[node].firstacktosend = 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef NONET
|
||||
/** Checks if all acks have been received
|
||||
*
|
||||
* \return True if all acks have been received
|
||||
@@ -601,7 +582,6 @@ static boolean Net_AllAcksReceived(void)
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
/** Waits for all ackreturns
|
||||
*
|
||||
@@ -610,9 +590,6 @@ static boolean Net_AllAcksReceived(void)
|
||||
*/
|
||||
void Net_WaitAllAckReceived(UINT32 timeout)
|
||||
{
|
||||
#ifdef NONET
|
||||
(void)timeout;
|
||||
#else
|
||||
tic_t tictac = I_GetTime();
|
||||
timeout = tictac + timeout*NEWTICRATE;
|
||||
|
||||
@@ -630,7 +607,6 @@ void Net_WaitAllAckReceived(UINT32 timeout)
|
||||
HGetPacket();
|
||||
Net_AckTicker();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void InitNode(node_t *node)
|
||||
@@ -647,10 +623,8 @@ static void InitAck(void)
|
||||
{
|
||||
INT32 i;
|
||||
|
||||
#ifndef NONET
|
||||
for (i = 0; i < MAXACKPACKETS; i++)
|
||||
ackpak[i].acknum = 0;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < MAXNETNODES; i++)
|
||||
InitNode(&nodes[i]);
|
||||
@@ -663,9 +637,6 @@ static void InitAck(void)
|
||||
*/
|
||||
void Net_AbortPacketType(UINT8 packettype)
|
||||
{
|
||||
#ifdef NONET
|
||||
(void)packettype;
|
||||
#else
|
||||
for (INT32 i = 0; i < MAXACKPACKETS; i++)
|
||||
{
|
||||
if (ackpak[i].acknum && (ackpak[i].pak.data.packettype == packettype
|
||||
@@ -674,7 +645,6 @@ void Net_AbortPacketType(UINT8 packettype)
|
||||
ackpak[i].acknum = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
@@ -684,9 +654,6 @@ void Net_AbortPacketType(UINT8 packettype)
|
||||
// remove a node, clear all ack from this node and reset askret
|
||||
void Net_CloseConnection(INT32 node)
|
||||
{
|
||||
#ifdef NONET
|
||||
(void)node;
|
||||
#else
|
||||
INT32 i;
|
||||
|
||||
if (node == -1)
|
||||
@@ -738,10 +705,8 @@ void Net_CloseConnection(INT32 node)
|
||||
InitNode(&nodes[node]);
|
||||
SV_AbortSendFiles(node);
|
||||
I_NetFreeNodenum(node);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef NONET
|
||||
//
|
||||
// Checksum
|
||||
//
|
||||
@@ -757,10 +722,8 @@ static UINT32 NetbufferChecksum(void)
|
||||
|
||||
return LONG(c);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUGFILE
|
||||
|
||||
static void fprintfstring(char *s, size_t len)
|
||||
{
|
||||
INT32 mode = 0;
|
||||
@@ -1032,7 +995,6 @@ void Command_Droprate(void)
|
||||
packetdroprate = droprate;
|
||||
}
|
||||
|
||||
#ifndef NONET
|
||||
static boolean ShouldDropPacket(void)
|
||||
{
|
||||
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||
@@ -1040,7 +1002,6 @@ static boolean ShouldDropPacket(void)
|
||||
|| (packetdroprate != 0 && rand() < (((double)RAND_MAX) * (packetdroprate / 100.f))) || packetdroprate == 100;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// HSendPacket
|
||||
@@ -1077,11 +1038,6 @@ boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlen
|
||||
if (!netgame)
|
||||
I_Error("Tried to transmit to another node");
|
||||
|
||||
#ifdef NONET
|
||||
(void)node;
|
||||
(void)reliable;
|
||||
(void)acknum;
|
||||
#else
|
||||
// do this before GetFreeAcknum because this function backups
|
||||
// the current packet
|
||||
doomcom->remotenode = (INT16)node;
|
||||
@@ -1136,8 +1092,6 @@ boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlen
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // ndef NONET
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1171,13 +1125,9 @@ boolean HGetPacket(void)
|
||||
if (!netgame)
|
||||
return false;
|
||||
|
||||
#ifndef NONET
|
||||
|
||||
while(true)
|
||||
while (true)
|
||||
{
|
||||
I_NetGet();
|
||||
|
||||
if (doomcom->remotenode == -1) // No packet received
|
||||
if (!I_NetGet()) // No packets received
|
||||
return false;
|
||||
|
||||
getbytes += packetheaderlength + doomcom->datalength; // For stat
|
||||
@@ -1213,10 +1163,10 @@ boolean HGetPacket(void)
|
||||
GotAcks();
|
||||
continue;
|
||||
}
|
||||
|
||||
doomcom->datalength -= BASEPACKETSIZE;
|
||||
break;
|
||||
}
|
||||
#endif // ifndef NONET
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -53,10 +53,8 @@ void Net_AckTicker(void);
|
||||
boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlength);
|
||||
boolean HGetPacket(void);
|
||||
void D_SetDoomcom(void);
|
||||
#ifndef NONET
|
||||
void D_SaveBan(void);
|
||||
void D_LoadBan(boolean warning);
|
||||
#endif
|
||||
boolean D_CheckNetGame(void);
|
||||
void D_CloseConnection(void);
|
||||
void Net_UnAcknowledgePacket(INT32 node);
|
||||
|
||||
+100
-101
@@ -292,6 +292,10 @@ consvar_t cv_mouseturn = {"mouseturn", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL,
|
||||
// Lagless camera! Yay!
|
||||
consvar_t cv_laglesscam = {"lagless_camera", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
// makes the camera use the saved angleturn in replays instead of the players angle
|
||||
// more accurate to how the recording player seen things in game, but may be jittery if they encountered net issues
|
||||
consvar_t cv_demoangturn = {"useangleturninreplays", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_verticallook[MAXSPLITSCREENPLAYERS] = {
|
||||
{"verticallook", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"verticallook2", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
@@ -721,10 +725,8 @@ void D_RegisterServerCommands(void)
|
||||
CV_RegisterVar(&cv_killingdead);
|
||||
|
||||
// d_clisrv
|
||||
#ifndef NONET
|
||||
#ifdef SATURNJOIN
|
||||
CV_RegisterVar(&cv_allownewsaturnplayer); // need to register it before cv_maxplayers && cv_allownewplayer
|
||||
#endif
|
||||
#endif
|
||||
CV_RegisterVar(&cv_maxplayers);
|
||||
CV_RegisterVar(&cv_resynchattempts);
|
||||
@@ -737,18 +739,15 @@ void D_RegisterServerCommands(void)
|
||||
CV_RegisterVar(&cv_downloadspeed);
|
||||
CV_RegisterVar(&cv_connectawaittime);
|
||||
CV_RegisterVar(&cv_httpsource);
|
||||
#ifndef NONET
|
||||
CV_RegisterVar(&cv_allownewplayer);
|
||||
|
||||
CV_RegisterVar(&cv_joinrefusemessage);
|
||||
|
||||
CV_RegisterVar(&cv_chatlogsize);
|
||||
#ifdef VANILLAJOINNEXTROUND
|
||||
CV_RegisterVar(&cv_joinnextround);
|
||||
#endif
|
||||
|
||||
CV_RegisterVar(&cv_showjoinaddress);
|
||||
CV_RegisterVar(&cv_shownodeip);
|
||||
CV_RegisterVar(&cv_blamecfail);
|
||||
#endif
|
||||
|
||||
COM_AddCommand("ping", Command_Ping_f);
|
||||
CV_RegisterVar(&cv_nettimeout);
|
||||
@@ -850,12 +849,6 @@ void D_RegisterClientCommands(void)
|
||||
CV_RegisterVar(&cv_zlib_memory);
|
||||
CV_RegisterVar(&cv_zlib_strategy);
|
||||
CV_RegisterVar(&cv_zlib_window_bits);
|
||||
// APNG variables
|
||||
CV_RegisterVar(&cv_zlib_levela);
|
||||
CV_RegisterVar(&cv_zlib_memorya);
|
||||
CV_RegisterVar(&cv_zlib_strategya);
|
||||
CV_RegisterVar(&cv_zlib_window_bitsa);
|
||||
CV_RegisterVar(&cv_apng_delay);
|
||||
// GIF variables
|
||||
CV_RegisterVar(&cv_gif_optimize);
|
||||
CV_RegisterVar(&cv_gif_downscale);
|
||||
@@ -975,10 +968,11 @@ void D_RegisterClientCommands(void)
|
||||
|
||||
// g_input.c
|
||||
CV_RegisterVar(&cv_controlperkey);
|
||||
CV_RegisterVar(&cv_turnsmooth);
|
||||
|
||||
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||
{
|
||||
CV_RegisterVar(&cv_turnsmooth[i]);
|
||||
|
||||
CV_RegisterVar(&cv_turnaxis[i]);
|
||||
CV_RegisterVar(&cv_moveaxis[i]);
|
||||
CV_RegisterVar(&cv_camturnaxis[i]);
|
||||
@@ -995,6 +989,8 @@ void D_RegisterClientCommands(void)
|
||||
CV_RegisterVar(&cv_xdeadzone[i]);
|
||||
CV_RegisterVar(&cv_ydeadzone[i]);
|
||||
|
||||
CV_RegisterVar(&cv_litesteer[i]);
|
||||
|
||||
CV_RegisterVar(&cv_usejoystick[i]);
|
||||
CV_RegisterVar(&cv_joyscale[i]);
|
||||
CV_RegisterVar(&cv_rumble[i]);
|
||||
@@ -1027,6 +1023,7 @@ void D_RegisterClientCommands(void)
|
||||
// screen.c
|
||||
CV_RegisterVar(&cv_fullscreen);
|
||||
CV_RegisterVar(&cv_renderview);
|
||||
CV_RegisterVar(&cv_frameskip);
|
||||
CV_RegisterVar(&cv_vhseffect);
|
||||
CV_RegisterVar(&cv_shittyscreen);
|
||||
CV_RegisterVar(&cv_scr_width);
|
||||
@@ -1050,6 +1047,7 @@ void D_RegisterClientCommands(void)
|
||||
CV_RegisterVar(&cv_betainterscreen);
|
||||
|
||||
CV_RegisterVar(&cv_laglesscam);
|
||||
CV_RegisterVar(&cv_demoangturn);
|
||||
|
||||
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||
{
|
||||
@@ -1221,7 +1219,7 @@ static boolean EnsurePlayerNameIsGood(char *name, INT32 playernum)
|
||||
for (ix = 0; ix < MAXPLAYERS; ix++)
|
||||
{
|
||||
if (ix != playernum && playeringame[ix]
|
||||
&& strcasecmp(name, player_names[ix]) == 0)
|
||||
&& fasticmp(name, player_names[ix]))
|
||||
{
|
||||
// We shouldn't kick people out just because
|
||||
// they joined the game with the same name
|
||||
@@ -1338,7 +1336,7 @@ static void CleanupPlayerName(INT32 playernum, const char *newname)
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (i != playernum && playeringame[i]
|
||||
&& strcasecmp(tmpname, player_names[i]) == 0)
|
||||
&& fasticmp(tmpname, player_names[i]))
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -1388,7 +1386,7 @@ static void SetPlayerName(INT32 playernum, char *newname)
|
||||
{
|
||||
if (EnsurePlayerNameIsGood(newname, playernum))
|
||||
{
|
||||
if (strcasecmp(newname, player_names[playernum]) != 0)
|
||||
if (!fasticmp(newname, player_names[playernum]))
|
||||
{
|
||||
if (netgame)
|
||||
HU_AddChatText(va("\x82*%s renamed to %s", player_names[playernum], newname), false);
|
||||
@@ -1510,9 +1508,9 @@ static void SendNameAndColor(void)
|
||||
CV_StealthSet(&cv_playercolor, cv_playercolor.defaultvalue);
|
||||
}
|
||||
|
||||
if (!strcmp(cv_playername.string, player_names[consoleplayer])
|
||||
if (fastcmp(cv_playername.string, player_names[consoleplayer])
|
||||
&& cv_playercolor.value == players[consoleplayer].skincolor
|
||||
&& !strcmp(cv_skin.string, skins[players[consoleplayer].skin].name))
|
||||
&& fastcmp(cv_skin.string, skins[players[consoleplayer].skin].name))
|
||||
return;
|
||||
|
||||
// We'll handle it later if we're not playing.
|
||||
@@ -1947,7 +1945,7 @@ static void Got_NameAndColor(UINT8 **cp, INT32 playernum)
|
||||
// set name
|
||||
if (player_name_changes[playernum] < MAXNAMECHANGES)
|
||||
{
|
||||
if (strcasecmp(player_names[playernum], name) != 0)
|
||||
if (!fasticmp(player_names[playernum], name))
|
||||
SetPlayerName(playernum, name);
|
||||
}
|
||||
|
||||
@@ -2001,11 +1999,6 @@ static void Got_NameAndColor(UINT8 **cp, INT32 playernum)
|
||||
}
|
||||
else
|
||||
SetPlayerSkinByNum(playernum, skin);
|
||||
|
||||
#ifdef HAVE_DISCORDRPC
|
||||
if (playernum == consoleplayer)
|
||||
DRPC_UpdatePresence();
|
||||
#endif
|
||||
}
|
||||
|
||||
void SendWeaponPref(void)
|
||||
@@ -2329,8 +2322,8 @@ static void Command_Playdemo_f(void)
|
||||
|
||||
CONS_Printf(M_GetText("Playing back demo '%s'.\n"), name);
|
||||
|
||||
demo.loadfiles = strcmp(COM_Argv(2), "-addfiles") == 0;
|
||||
demo.ignorefiles = strcmp(COM_Argv(2), "-force") == 0;
|
||||
demo.loadfiles = fastcmp(COM_Argv(2), "-addfiles");
|
||||
demo.ignorefiles = fastcmp(COM_Argv(2), "-force");
|
||||
|
||||
// Internal if no extension, external if one exists
|
||||
// If external, convert the file name to a path in SRB2's home directory
|
||||
@@ -2499,15 +2492,18 @@ void D_SetupVote(void)
|
||||
INT32 i;
|
||||
UINT8 gt = (cv_kartgametypepreference.value == -1) ? gametype : cv_kartgametypepreference.value;
|
||||
UINT8 secondgt = G_SometimesGetDifferentGametype(gt);
|
||||
INT16 votebuffer[4] = {-1,-1,-1,0};
|
||||
INT16 votebuffer[4] = {-1,-1,-1, 0};
|
||||
INT16 luamaps[4] = {0, 0, 0, 0};
|
||||
|
||||
LUA_HookSetupVote(luamaps, sizeof(luamaps)/sizeof(luamaps[0]), gt, secondgt);
|
||||
|
||||
// Correct secondgt if needed
|
||||
UINT8 typeoflevel = mapheaderinfo[luamaps[2]-1]->typeoflevel;
|
||||
if (luamaps[2] && (typeoflevel & G_TOLFlag(secondgt&(~0x80))) == 0)
|
||||
secondgt = ((typeoflevel & TOL_RACE) ? GT_RACE : GT_MATCH)|(secondgt&0x80);
|
||||
if (luamaps[2])
|
||||
{
|
||||
UINT8 typeoflevel = mapheaderinfo[luamaps[2]-1]->typeoflevel;
|
||||
if ((typeoflevel & G_TOLFlag(secondgt&(~0x80))) == 0)
|
||||
secondgt = ((typeoflevel & TOL_RACE) ? GT_RACE : GT_MATCH)|(secondgt&0x80);
|
||||
}
|
||||
|
||||
if (cv_kartencore.value && gt == GT_RACE)
|
||||
WRITEUINT8(p, (gt|0x80));
|
||||
@@ -2608,14 +2604,18 @@ ConcatCommandArgv (int start, int end)
|
||||
size += strlen(COM_Argv(i)) + 1;
|
||||
}
|
||||
|
||||
final = ZZ_Alloc(size);
|
||||
p = final;
|
||||
p = final = ZZ_Alloc(size);
|
||||
|
||||
if (!p)
|
||||
I_Error("ConcatCommandArgv: Out of memory!\n");
|
||||
|
||||
--end;/* handle the final argument separately */
|
||||
|
||||
for (i = start; i < end; ++i)
|
||||
{
|
||||
p += sprintf(p, "%s ", COM_Argv(i));
|
||||
}
|
||||
|
||||
/* at this point "end" is actually the last argument's position */
|
||||
strcpy(p, COM_Argv(end));
|
||||
|
||||
@@ -3194,20 +3194,20 @@ static void Command_Teamchange_f(void)
|
||||
|
||||
if (G_GametypeHasTeams())
|
||||
{
|
||||
if (!strcasecmp(COM_Argv(1), "red") || !strcasecmp(COM_Argv(1), "1"))
|
||||
if (fasticmp(COM_Argv(1), "red") || fasticmp(COM_Argv(1), "1"))
|
||||
NetPacket.packet.newteam = 1;
|
||||
else if (!strcasecmp(COM_Argv(1), "blue") || !strcasecmp(COM_Argv(1), "2"))
|
||||
else if (fasticmp(COM_Argv(1), "blue") || fasticmp(COM_Argv(1), "2"))
|
||||
NetPacket.packet.newteam = 2;
|
||||
else if (!strcasecmp(COM_Argv(1), "spectator") || !strcasecmp(COM_Argv(1), "0"))
|
||||
else if (fasticmp(COM_Argv(1), "spectator") || fasticmp(COM_Argv(1), "0"))
|
||||
NetPacket.packet.newteam = 0;
|
||||
else
|
||||
error = true;
|
||||
}
|
||||
else if (G_GametypeHasSpectators())
|
||||
{
|
||||
if (!strcasecmp(COM_Argv(1), "spectator") || !strcasecmp(COM_Argv(1), "0"))
|
||||
if (fasticmp(COM_Argv(1), "spectator") || fasticmp(COM_Argv(1), "0"))
|
||||
NetPacket.packet.newteam = 0;
|
||||
else if (!strcasecmp(COM_Argv(1), "playing") || !strcasecmp(COM_Argv(1), "1"))
|
||||
else if (fasticmp(COM_Argv(1), "playing") || fasticmp(COM_Argv(1), "1"))
|
||||
NetPacket.packet.newteam = 3;
|
||||
else
|
||||
error = true;
|
||||
@@ -3284,20 +3284,20 @@ static void Command_Teamchange2_f(void)
|
||||
|
||||
if (G_GametypeHasTeams())
|
||||
{
|
||||
if (!strcasecmp(COM_Argv(1), "red") || !strcasecmp(COM_Argv(1), "1"))
|
||||
if (fasticmp(COM_Argv(1), "red") || fasticmp(COM_Argv(1), "1"))
|
||||
NetPacket.packet.newteam = 1;
|
||||
else if (!strcasecmp(COM_Argv(1), "blue") || !strcasecmp(COM_Argv(1), "2"))
|
||||
else if (fasticmp(COM_Argv(1), "blue") || fasticmp(COM_Argv(1), "2"))
|
||||
NetPacket.packet.newteam = 2;
|
||||
else if (!strcasecmp(COM_Argv(1), "spectator") || !strcasecmp(COM_Argv(1), "0"))
|
||||
else if (fasticmp(COM_Argv(1), "spectator") || fasticmp(COM_Argv(1), "0"))
|
||||
NetPacket.packet.newteam = 0;
|
||||
else
|
||||
error = true;
|
||||
}
|
||||
else if (G_GametypeHasSpectators())
|
||||
{
|
||||
if (!strcasecmp(COM_Argv(1), "spectator") || !strcasecmp(COM_Argv(1), "0"))
|
||||
if (fasticmp(COM_Argv(1), "spectator") || fasticmp(COM_Argv(1), "0"))
|
||||
NetPacket.packet.newteam = 0;
|
||||
else if (!strcasecmp(COM_Argv(1), "playing") || !strcasecmp(COM_Argv(1), "1"))
|
||||
else if (fasticmp(COM_Argv(1), "playing") || fasticmp(COM_Argv(1), "1"))
|
||||
NetPacket.packet.newteam = 3;
|
||||
else
|
||||
error = true;
|
||||
@@ -3375,20 +3375,20 @@ static void Command_Teamchange3_f(void)
|
||||
|
||||
if (G_GametypeHasTeams())
|
||||
{
|
||||
if (!strcasecmp(COM_Argv(1), "red") || !strcasecmp(COM_Argv(1), "1"))
|
||||
if (fasticmp(COM_Argv(1), "red") || fasticmp(COM_Argv(1), "1"))
|
||||
NetPacket.packet.newteam = 1;
|
||||
else if (!strcasecmp(COM_Argv(1), "blue") || !strcasecmp(COM_Argv(1), "2"))
|
||||
else if (fasticmp(COM_Argv(1), "blue") || fasticmp(COM_Argv(1), "2"))
|
||||
NetPacket.packet.newteam = 2;
|
||||
else if (!strcasecmp(COM_Argv(1), "spectator") || !strcasecmp(COM_Argv(1), "0"))
|
||||
else if (fasticmp(COM_Argv(1), "spectator") || fasticmp(COM_Argv(1), "0"))
|
||||
NetPacket.packet.newteam = 0;
|
||||
else
|
||||
error = true;
|
||||
}
|
||||
else if (G_GametypeHasSpectators())
|
||||
{
|
||||
if (!strcasecmp(COM_Argv(1), "spectator") || !strcasecmp(COM_Argv(1), "0"))
|
||||
if (fasticmp(COM_Argv(1), "spectator") || fasticmp(COM_Argv(1), "0"))
|
||||
NetPacket.packet.newteam = 0;
|
||||
else if (!strcasecmp(COM_Argv(1), "playing") || !strcasecmp(COM_Argv(1), "1"))
|
||||
else if (fasticmp(COM_Argv(1), "playing") || fasticmp(COM_Argv(1), "1"))
|
||||
NetPacket.packet.newteam = 3;
|
||||
else
|
||||
error = true;
|
||||
@@ -3466,20 +3466,20 @@ static void Command_Teamchange4_f(void)
|
||||
|
||||
if (G_GametypeHasTeams())
|
||||
{
|
||||
if (!strcasecmp(COM_Argv(1), "red") || !strcasecmp(COM_Argv(1), "1"))
|
||||
if (fasticmp(COM_Argv(1), "red") || fasticmp(COM_Argv(1), "1"))
|
||||
NetPacket.packet.newteam = 1;
|
||||
else if (!strcasecmp(COM_Argv(1), "blue") || !strcasecmp(COM_Argv(1), "2"))
|
||||
else if (fasticmp(COM_Argv(1), "blue") || fasticmp(COM_Argv(1), "2"))
|
||||
NetPacket.packet.newteam = 2;
|
||||
else if (!strcasecmp(COM_Argv(1), "spectator") || !strcasecmp(COM_Argv(1), "0"))
|
||||
else if (fasticmp(COM_Argv(1), "spectator") || fasticmp(COM_Argv(1), "0"))
|
||||
NetPacket.packet.newteam = 0;
|
||||
else
|
||||
error = true;
|
||||
}
|
||||
else if (G_GametypeHasSpectators())
|
||||
{
|
||||
if (!strcasecmp(COM_Argv(1), "spectator") || !strcasecmp(COM_Argv(1), "0"))
|
||||
if (fasticmp(COM_Argv(1), "spectator") || fasticmp(COM_Argv(1), "0"))
|
||||
NetPacket.packet.newteam = 0;
|
||||
else if (!strcasecmp(COM_Argv(1), "playing") || !strcasecmp(COM_Argv(1), "1"))
|
||||
else if (fasticmp(COM_Argv(1), "playing") || fasticmp(COM_Argv(1), "1"))
|
||||
NetPacket.packet.newteam = 3;
|
||||
else
|
||||
error = true;
|
||||
@@ -3565,33 +3565,33 @@ static void Command_ServerTeamChange_f(void)
|
||||
|
||||
if (G_TagGametype())
|
||||
{
|
||||
if (!strcasecmp(COM_Argv(2), "it") || !strcasecmp(COM_Argv(2), "1"))
|
||||
if (fasticmp(COM_Argv(2), "it") || fasticmp(COM_Argv(2), "1"))
|
||||
NetPacket.packet.newteam = 1;
|
||||
else if (!strcasecmp(COM_Argv(2), "notit") || !strcasecmp(COM_Argv(2), "2"))
|
||||
else if (fasticmp(COM_Argv(2), "notit") || fasticmp(COM_Argv(2), "2"))
|
||||
NetPacket.packet.newteam = 2;
|
||||
else if (!strcasecmp(COM_Argv(2), "playing") || !strcasecmp(COM_Argv(2), "3"))
|
||||
else if (fasticmp(COM_Argv(2), "playing") || fasticmp(COM_Argv(2), "3"))
|
||||
NetPacket.packet.newteam = 3;
|
||||
else if (!strcasecmp(COM_Argv(2), "spectator") || !strcasecmp(COM_Argv(2), "0"))
|
||||
else if (fasticmp(COM_Argv(2), "spectator") || fasticmp(COM_Argv(2), "0"))
|
||||
NetPacket.packet.newteam = 0;
|
||||
else
|
||||
error = true;
|
||||
}
|
||||
else if (G_GametypeHasTeams())
|
||||
{
|
||||
if (!strcasecmp(COM_Argv(2), "red") || !strcasecmp(COM_Argv(2), "1"))
|
||||
if (fasticmp(COM_Argv(2), "red") || fasticmp(COM_Argv(2), "1"))
|
||||
NetPacket.packet.newteam = 1;
|
||||
else if (!strcasecmp(COM_Argv(2), "blue") || !strcasecmp(COM_Argv(2), "2"))
|
||||
else if (fasticmp(COM_Argv(2), "blue") || fasticmp(COM_Argv(2), "2"))
|
||||
NetPacket.packet.newteam = 2;
|
||||
else if (!strcasecmp(COM_Argv(2), "spectator") || !strcasecmp(COM_Argv(2), "0"))
|
||||
else if (fasticmp(COM_Argv(2), "spectator") || fasticmp(COM_Argv(2), "0"))
|
||||
NetPacket.packet.newteam = 0;
|
||||
else
|
||||
error = true;
|
||||
}
|
||||
else if (G_GametypeHasSpectators())
|
||||
{
|
||||
if (!strcasecmp(COM_Argv(2), "spectator") || !strcasecmp(COM_Argv(2), "0"))
|
||||
if (fasticmp(COM_Argv(2), "spectator") || fasticmp(COM_Argv(2), "0"))
|
||||
NetPacket.packet.newteam = 0;
|
||||
else if (!strcasecmp(COM_Argv(2), "playing") || !strcasecmp(COM_Argv(2), "1"))
|
||||
else if (fasticmp(COM_Argv(2), "playing") || fasticmp(COM_Argv(2), "1"))
|
||||
NetPacket.packet.newteam = 3;
|
||||
else
|
||||
error = true;
|
||||
@@ -4226,23 +4226,32 @@ static void Command_MotD_f(void)
|
||||
|
||||
mymotd = Z_Malloc(sizeof(motd), PU_STATIC, NULL);
|
||||
|
||||
strlcpy(mymotd, COM_Argv(1), sizeof motd);
|
||||
if (!mymotd)
|
||||
return;
|
||||
//I_Error("Command_MotD_f: Out of memory!\n"); // idk if this aint a bit too much lel
|
||||
|
||||
strlcpy(mymotd, COM_Argv(1), sizeof(motd));
|
||||
|
||||
for (i = 2; i < j; i++)
|
||||
{
|
||||
strlcat(mymotd, " ", sizeof motd);
|
||||
strlcat(mymotd, COM_Argv(i), sizeof motd);
|
||||
strlcat(mymotd, " ", sizeof(motd));
|
||||
strlcat(mymotd, COM_Argv(i), sizeof(motd));
|
||||
}
|
||||
|
||||
// Disallow non-printing characters and semicolons.
|
||||
for (i = 0; mymotd[i] != '\0'; i++)
|
||||
{
|
||||
if (!isprint(mymotd[i]) || mymotd[i] == ';')
|
||||
{
|
||||
Z_Free(mymotd);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ((netgame || multiplayer) && client)
|
||||
{
|
||||
SendNetXCmd(XD_SETMOTD, mymotd, i); // send the actual size of the motd string, not the full buffer's size
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(motd, mymotd);
|
||||
@@ -4386,6 +4395,14 @@ static void Command_Addfilelocal(void)
|
||||
P_AddWadFile(fn, true);
|
||||
}
|
||||
|
||||
static void CloseFileHandle(FILE **fhandle)
|
||||
{
|
||||
if (*fhandle)
|
||||
{
|
||||
fclose(*fhandle);
|
||||
*fhandle = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/** Adds a pwad at runtime.
|
||||
* Searches for sounds, maps, music, new images.
|
||||
@@ -4398,7 +4415,7 @@ static void Command_Addfile(void)
|
||||
INT32 i;
|
||||
int musiconly = -1; // W_VerifyNMUSlumps isn't boolean
|
||||
|
||||
FILE *fhandle = NULL;
|
||||
CLEANUP(CloseFileHandle) FILE *fhandle = NULL;
|
||||
|
||||
if (COM_Argc() != 2)
|
||||
{
|
||||
@@ -4413,18 +4430,15 @@ static void Command_Addfile(void)
|
||||
if (!isprint(fn[i]) || fn[i] == ';')
|
||||
return;
|
||||
|
||||
if (fhandle)
|
||||
{
|
||||
fclose(fhandle);
|
||||
fhandle = NULL;
|
||||
}
|
||||
|
||||
if ((fhandle = W_OpenWadFile(&fn, true)) != NULL)
|
||||
{
|
||||
musiconly = W_VerifyNMUSlumps(fn, fhandle, false);
|
||||
}
|
||||
|
||||
if (musiconly == -1)
|
||||
if (fhandle == NULL || musiconly == -1)
|
||||
return; // file not found
|
||||
|
||||
if (!musiconly)
|
||||
{
|
||||
// ... But only so long as they contain nothing more then music and sprites.
|
||||
if (netgame && !(server || IsPlayerAdmin(consoleplayer)))
|
||||
@@ -4436,7 +4450,7 @@ static void Command_Addfile(void)
|
||||
}
|
||||
|
||||
// Add file on your client directly if it is trivial, or you aren't in a netgame.
|
||||
if (!(netgame || multiplayer) || musiconly)
|
||||
if (!netgame || musiconly)
|
||||
{
|
||||
P_AddWadFile(fn, false);
|
||||
return;
|
||||
@@ -4452,7 +4466,7 @@ static void Command_Addfile(void)
|
||||
{
|
||||
UINT8 md5sum[16];
|
||||
#ifdef NOMD5
|
||||
memset(md5sum,0,16);
|
||||
memset(md5sum, 0, 16);
|
||||
#else
|
||||
|
||||
{
|
||||
@@ -4464,15 +4478,15 @@ static void Command_Addfile(void)
|
||||
|
||||
for (i = 0; i < numwadfiles; i++)
|
||||
{
|
||||
if (memcmp(wadfiles[i]->md5sum, md5sum, 16))
|
||||
continue;
|
||||
|
||||
CONS_Alert(CONS_ERROR, M_GetText("%s is already loaded\n"), fn);
|
||||
goto addfile_finally;
|
||||
if (!memcmp(wadfiles[i]->md5sum, md5sum, 16))
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("%s is already loaded\n"), fn);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// Finally okay to write this important data
|
||||
WRITESTRINGN(buf_p,p,240);
|
||||
WRITESTRINGN(buf_p, p, 240);
|
||||
WRITEMEM(buf_p, md5sum, 16);
|
||||
}
|
||||
|
||||
@@ -4480,10 +4494,6 @@ static void Command_Addfile(void)
|
||||
SendNetXCmd(XD_REQADDFILE, buf, buf_p - buf);
|
||||
else
|
||||
SendNetXCmd(XD_ADDFILE, buf, buf_p - buf);
|
||||
|
||||
addfile_finally:
|
||||
if (fhandle)
|
||||
fclose(fhandle);
|
||||
}
|
||||
|
||||
/** Adds something at runtime.
|
||||
@@ -4674,7 +4684,7 @@ static void Got_Addfilecmd(UINT8 **cp, INT32 playernum)
|
||||
return;
|
||||
}
|
||||
|
||||
ncs = findfile(filename,md5sum,true);
|
||||
ncs = findfile(filename, md5sum, true);
|
||||
|
||||
if (ncs != FS_FOUND || !P_AddWadFile(filename, false))
|
||||
{
|
||||
@@ -4887,18 +4897,7 @@ static void Command_Version_f(void)
|
||||
#endif
|
||||
|
||||
// OS
|
||||
// Would be nice to use SDL_GetPlatform for this
|
||||
#if defined (_WIN32) || defined (_WIN64)
|
||||
CONS_Printf("Windows ");
|
||||
#elif defined(__linux__)
|
||||
CONS_Printf("Linux ");
|
||||
#elif defined(MACOSX)
|
||||
CONS_Printf("macOS ");
|
||||
#elif defined(UNIXCOMMON)
|
||||
CONS_Printf("Unix (Common) ");
|
||||
#else
|
||||
CONS_Printf("Other OS ");
|
||||
#endif
|
||||
CONS_Printf("%s ", I_GetSysName());
|
||||
|
||||
// Bitness
|
||||
if (sizeof(void*) == 4)
|
||||
@@ -5210,14 +5209,14 @@ static void Ringslinger_OnChange(void)
|
||||
static void Gravity_OnChange(void)
|
||||
{
|
||||
if (!M_SecretUnlocked(SECRET_PANDORA) && !netgame && !cv_debug
|
||||
&& strcmp(cv_gravity.string, cv_gravity.defaultvalue))
|
||||
&& !fastcmp(cv_gravity.string, cv_gravity.defaultvalue))
|
||||
{
|
||||
CONS_Printf(M_GetText("You haven't earned this yet.\n"));
|
||||
CV_StealthSet(&cv_gravity, cv_gravity.defaultvalue);
|
||||
return;
|
||||
}
|
||||
#ifndef NETGAME_GRAVITY
|
||||
if(netgame)
|
||||
if (netgame)
|
||||
{
|
||||
CV_StealthSet(&cv_gravity, cv_gravity.defaultvalue);
|
||||
return;
|
||||
@@ -5286,7 +5285,7 @@ retryscramble:
|
||||
memset(&scrambleplayers, 0, sizeof(scrambleplayers));
|
||||
memset(&scrambleteams, 0, sizeof(scrambleplayers));
|
||||
scrambletotal = scramblecount = 0;
|
||||
blue = red = maxcomposition = newteam = playercount = 0;
|
||||
blue = red = newteam = playercount = 0;
|
||||
repick = true;
|
||||
|
||||
// Put each player's node in the array.
|
||||
|
||||
+2
-16
@@ -209,6 +209,8 @@ extern consvar_t cv_betainterscreen;
|
||||
|
||||
extern consvar_t cv_laglesscam;
|
||||
|
||||
extern consvar_t cv_demoangturn;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SKINMENUTYPE_SCROLL = 0,
|
||||
@@ -266,14 +268,6 @@ typedef enum
|
||||
|
||||
extern const char *netxcmdnames[MAXNETXCMD - 1];
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4214)
|
||||
#endif
|
||||
|
||||
//Packet composition for Command_TeamChange_f() ServerTeamChange, etc.
|
||||
//bitwise structs make packing bits a little easier, but byte alignment harder?
|
||||
//todo: decide whether to make the other netcommands conform, or just get rid of this experiment.
|
||||
@@ -285,10 +279,6 @@ typedef struct {
|
||||
UINT32 scrambled : 1; // value 0 to 1
|
||||
} ATTRPACK changeteam_packet_t;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(default : 4214)
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
UINT16 l; // liitle endian
|
||||
UINT16 b; // big enian
|
||||
@@ -302,10 +292,6 @@ typedef union {
|
||||
changeteam_value_t value;
|
||||
} ATTRPACK changeteam_union;
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
// add game commands, needs cleanup
|
||||
void D_RegisterServerCommands(void);
|
||||
void D_RegisterClientCommands(void);
|
||||
|
||||
+94
-68
@@ -35,7 +35,8 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CURL
|
||||
#include "curl/curl.h"
|
||||
#include <curl/curl.h>
|
||||
#include "m_curl.h"
|
||||
#endif
|
||||
|
||||
#include "doomdef.h"
|
||||
@@ -120,6 +121,7 @@ file_download_t filedownload;
|
||||
|
||||
#ifdef HAVE_CURL
|
||||
static CURL *http_handle;
|
||||
static char curl_errbuf[CURL_ERROR_SIZE];
|
||||
static CURLM *multi_handle;
|
||||
static UINT32 curl_dlnow;
|
||||
static UINT32 curl_dltotal;
|
||||
@@ -229,9 +231,7 @@ void D_ParseFileneeded(INT32 fileneedednum_parm, UINT8 *fileneededstr, UINT16 fi
|
||||
|
||||
void CL_PrepareDownloadSaveGame(const char *tmpsave)
|
||||
{
|
||||
#ifdef CLIENT_LOADINGSCREEN
|
||||
filedownload.current = -1;
|
||||
#endif
|
||||
fileneedednum = 1;
|
||||
fileneeded[0].status = FS_REQUESTED;
|
||||
fileneeded[0].justdownloaded = false;
|
||||
@@ -493,9 +493,6 @@ INT32 CL_CheckFiles(void)
|
||||
size_t filestoload = 0;
|
||||
boolean downloadrequired = false;
|
||||
|
||||
// if (M_CheckParm("-nofiles"))
|
||||
// return 1;
|
||||
|
||||
// the first is the iwad (the main wad file)
|
||||
// we don't care if it's called srb2.srb or srb2.wad.
|
||||
// Never download the IWAD, just assume it's there and identical
|
||||
@@ -509,11 +506,9 @@ INT32 CL_CheckFiles(void)
|
||||
{
|
||||
CONS_Debug(DBG_NETPLAY, "game is modified; only doing basic checks\n");
|
||||
|
||||
boolean have_important = false;
|
||||
|
||||
for (i = 0, j = mainwads+1; i < fileneedednum || j < numwadfiles;)
|
||||
{
|
||||
if (j < numwadfiles && (!wadfiles[j]->important || wadfiles[j]->localfile))
|
||||
if (j < numwadfiles && !wadfiles[j]->important) // TODO: add checks for localfiles that dont contain anything "allowed" (maps and stuff like that)
|
||||
{
|
||||
// Unimportant on our side. still don't care.
|
||||
++j;
|
||||
@@ -522,15 +517,7 @@ INT32 CL_CheckFiles(void)
|
||||
|
||||
// If this test is true, we've reached the end of one file list.
|
||||
if (i >= fileneedednum || j >= numwadfiles)
|
||||
{
|
||||
// We are missing some of important files, or have too much
|
||||
// important files.
|
||||
if (have_important)
|
||||
return 2;
|
||||
|
||||
// All checked files weren't important, don't care about them.
|
||||
break;
|
||||
}
|
||||
return 2;
|
||||
|
||||
// For the sake of speed, only bother with a md5 check
|
||||
if (memcmp(wadfiles[j]->md5sum, fileneeded[i].md5sum, 16))
|
||||
@@ -538,14 +525,12 @@ INT32 CL_CheckFiles(void)
|
||||
|
||||
// It's accounted for! let's keep going.
|
||||
CONS_Debug(DBG_NETPLAY, "'%s' accounted for\n", fileneeded[i].filename);
|
||||
have_important = true;
|
||||
fileneeded[i].status = FS_OPEN;
|
||||
++i;
|
||||
++j;
|
||||
}
|
||||
|
||||
if (have_important)
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (i = 0; i < fileneedednum; i++)
|
||||
@@ -565,7 +550,8 @@ INT32 CL_CheckFiles(void)
|
||||
for (j = mainwads+1; j < numwadfiles; j++)
|
||||
{
|
||||
nameonly(strcpy(wadfilename, wadfiles[j]->filename));
|
||||
if (!stricmp(wadfilename, fileneeded[i].filename) &&
|
||||
|
||||
if (fasticmp(wadfilename, fileneeded[i].filename) &&
|
||||
!memcmp(wadfiles[j]->md5sum, fileneeded[i].md5sum, 16))
|
||||
{
|
||||
CONS_Debug(DBG_NETPLAY, "already loaded\n");
|
||||
@@ -593,9 +579,6 @@ boolean CL_LoadServerFiles(void)
|
||||
{
|
||||
INT32 i;
|
||||
|
||||
// if (M_CheckParm("-nofiles"))
|
||||
// return;
|
||||
|
||||
for (i = 0; i < fileneedednum; i++)
|
||||
{
|
||||
if (fileneeded[i].status == FS_OPEN)
|
||||
@@ -631,6 +614,7 @@ boolean CL_LoadServerFiles(void)
|
||||
fileneeded[i].status, s);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -682,7 +666,7 @@ static boolean SV_SendFile(INT32 node, const char *filename, UINT8 fileid)
|
||||
strlcpy(wadfilename, wadfiles[wadnum]->filename, MAX_WADPATH);
|
||||
nameonly(wadfilename);
|
||||
|
||||
if (!stricmp(wadfilename, p->id.filename))
|
||||
if (fasticmp(wadfilename, p->id.filename))
|
||||
{
|
||||
// Copy file name with full path
|
||||
strlcpy(p->id.filename, wadfiles[wadnum]->filename, MAX_WADPATH);
|
||||
@@ -963,17 +947,17 @@ void Got_Filetxpak(void)
|
||||
char *filename = file->filename;
|
||||
static INT32 filetime = 0;
|
||||
|
||||
if (!(strcmp(filename, "srb2.srb")
|
||||
//&& strcmp(filename, "srb2.wad")
|
||||
//&& strcmp(filename, "patch.dta")
|
||||
//&& strcmp(filename, "music.dta")
|
||||
&& strcmp(filename, "gfx.kart")
|
||||
&& strcmp(filename, "textures.kart")
|
||||
&& strcmp(filename, "chars.kart")
|
||||
&& strcmp(filename, "maps.kart")
|
||||
&& strcmp(filename, "sounds.kart")
|
||||
&& strcmp(filename, "music.kart")
|
||||
&& strcmp(filename, "patch.kart")
|
||||
if ((fastcmp(filename, "srb2.srb")
|
||||
//|| fastcmp(filename, "srb2.wad")
|
||||
//|| fastcmp(filename, "patch.dta")
|
||||
//|| fastcmp(filename, "music.dta")
|
||||
|| fastcmp(filename, "gfx.kart")
|
||||
|| fastcmp(filename, "textures.kart")
|
||||
|| fastcmp(filename, "chars.kart")
|
||||
|| fastcmp(filename, "maps.kart")
|
||||
|| fastcmp(filename, "sounds.kart")
|
||||
|| fastcmp(filename, "music.kart")
|
||||
|| fastcmp(filename, "patch.kart")
|
||||
))
|
||||
I_Error("Tried to download \"%s\"", filename);
|
||||
|
||||
@@ -1022,17 +1006,16 @@ void Got_Filetxpak(void)
|
||||
file->file = NULL;
|
||||
file->status = FS_FOUND;
|
||||
file->justdownloaded = true;
|
||||
CONS_Printf(M_GetText("Downloading %s...(done)\n"),
|
||||
filename);
|
||||
#ifndef NONET
|
||||
CONS_Printf(M_GetText("Downloading %s...(done)\n"), filename);
|
||||
|
||||
filedownload.completednum++;
|
||||
filedownload.completedsize += file->totalsize;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (!file->justdownloaded)
|
||||
{
|
||||
const char *s;
|
||||
|
||||
switch(file->status)
|
||||
{
|
||||
case FS_NOTFOUND:
|
||||
@@ -1051,6 +1034,7 @@ void Got_Filetxpak(void)
|
||||
s = "unknown";
|
||||
break;
|
||||
}
|
||||
|
||||
I_Error("Received a file not requested (file id: %d, file status: %s)\n", filenum, s);
|
||||
}
|
||||
|
||||
@@ -1061,9 +1045,7 @@ void Got_Filetxpak(void)
|
||||
filetime = 0;
|
||||
}
|
||||
|
||||
#ifdef CLIENT_LOADINGSCREEN
|
||||
filedownload.current = filenum;
|
||||
#endif
|
||||
}
|
||||
|
||||
/** \brief Checks if a node is downloading a file
|
||||
@@ -1216,7 +1198,7 @@ filestatus_t findfile(char *filename, const UINT8 *wantedmd5sum, boolean complet
|
||||
}
|
||||
|
||||
// next, check SRB2's "home" directory (if non-'.')
|
||||
if (strcmp(srb2home, "."))
|
||||
if (!fastcmp(srb2home, "."))
|
||||
{
|
||||
homecheck = filesearch(filename, srb2home, wantedmd5sum, completepath, 10);
|
||||
|
||||
@@ -1228,7 +1210,7 @@ filestatus_t findfile(char *filename, const UINT8 *wantedmd5sum, boolean complet
|
||||
}
|
||||
|
||||
// next, check SRB2's "path" directory (also if non-'.')
|
||||
if (strcmp(srb2path, "."))
|
||||
if (!fastcmp(srb2path, "."))
|
||||
{
|
||||
homecheck = filesearch(filename, srb2path, wantedmd5sum, completepath, 10);
|
||||
|
||||
@@ -1309,6 +1291,7 @@ static int curlprogress_callback(void *clientp, double dltotal, double dlnow, do
|
||||
void CURLPrepareFile(const char* url, int dfilenum)
|
||||
{
|
||||
HTTP_login *login;
|
||||
CURLcode cc;
|
||||
|
||||
#ifdef PARANOIA
|
||||
if (M_CheckParm("-nodownload"))
|
||||
@@ -1317,14 +1300,33 @@ void CURLPrepareFile(const char* url, int dfilenum)
|
||||
|
||||
if (!multi_handle)
|
||||
{
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
multi_handle = curl_multi_init();
|
||||
cc = curl_global_init(CURL_GLOBAL_ALL);
|
||||
if (cc < 0)
|
||||
{
|
||||
I_OutputMsg("libcurl: curl_global_init() returned %d\n", cc);
|
||||
}
|
||||
else
|
||||
{
|
||||
multi_handle = curl_multi_init();
|
||||
}
|
||||
if (!multi_handle)
|
||||
{
|
||||
I_OutputMsg("libcurl: curl_multi_init() failed\n");
|
||||
curl_global_cleanup();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
http_handle = curl_easy_init();
|
||||
|
||||
if (http_handle && multi_handle)
|
||||
if (http_handle)
|
||||
{
|
||||
CURLMcode mc;
|
||||
|
||||
cc = curl_easy_setopt(http_handle, CURLOPT_ERRORBUFFER, curl_errbuf);
|
||||
if (cc != CURLE_OK) I_OutputMsg("libcurl: CURLOPT_ERRORBUFFER failed\n");
|
||||
curl_errbuf[0] = 0x00;
|
||||
|
||||
I_mkdir(downloaddir, 0755);
|
||||
|
||||
curl_curfile = &fileneeded[dfilenum];
|
||||
@@ -1334,31 +1336,38 @@ void CURLPrepareFile(const char* url, int dfilenum)
|
||||
curl_origfilesize = curl_curfile->currentsize;
|
||||
curl_origtotalfilesize = curl_curfile->totalsize;
|
||||
|
||||
curl_easy_setopt(http_handle, CURLOPT_URL, va("%s/%s", url, curl_realname));
|
||||
cc = curl_easy_setopt(http_handle, CURLOPT_URL, va("%s/%s", url, curl_realname));
|
||||
if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", curl_errbuf);
|
||||
|
||||
// Only allow HTTP and HTTPS
|
||||
#if (LIBCURL_VERSION_MAJOR <= 7) && (LIBCURL_VERSION_MINOR < 85)
|
||||
curl_easy_setopt(http_handle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS);
|
||||
cc = curl_easy_setopt(http_handle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS);
|
||||
#else
|
||||
curl_easy_setopt(http_handle, CURLOPT_PROTOCOLS_STR, "http,https");
|
||||
cc = curl_easy_setopt(http_handle, CURLOPT_PROTOCOLS_STR, "http,https");
|
||||
#endif
|
||||
if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", curl_errbuf);
|
||||
|
||||
curl_easy_setopt(http_handle, CURLOPT_USERAGENT, va("SRB2Kart/v%d.%d", VERSION, SUBVERSION)); // Set user agent as some servers won't accept invalid user agents.
|
||||
// Set user agent, as some servers won't accept invalid user agents.
|
||||
cc = curl_easy_setopt(http_handle, CURLOPT_USERAGENT, va("SRB2Kart/v%d.%d", VERSION, SUBVERSION));
|
||||
if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", curl_errbuf);
|
||||
|
||||
// Authenticate if the user so wishes
|
||||
login = CURLGetLogin(url, NULL);
|
||||
|
||||
if (login)
|
||||
{
|
||||
curl_easy_setopt(http_handle, CURLOPT_USERPWD, login->auth);
|
||||
cc = curl_easy_setopt(http_handle, CURLOPT_USERPWD, login->auth);
|
||||
if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", curl_errbuf);
|
||||
}
|
||||
|
||||
// Follow a redirect request, if sent by the server.
|
||||
curl_easy_setopt(http_handle, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
cc = curl_easy_setopt(http_handle, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", curl_errbuf);
|
||||
|
||||
curl_easy_setopt(http_handle, CURLOPT_FAILONERROR, 1L);
|
||||
cc = curl_easy_setopt(http_handle, CURLOPT_FAILONERROR, 1L);
|
||||
if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", curl_errbuf);
|
||||
|
||||
CONS_Printf("Downloading %s from %s\n", curl_realname, url);
|
||||
CONS_Printf("Downloading addon \"%s\" from %s\n", curl_realname, url);
|
||||
|
||||
strcatbf(curl_curfile->filename, downloaddir, "/");
|
||||
curl_curfile->file = fopen(curl_curfile->filename, "wb");
|
||||
@@ -1377,19 +1386,33 @@ void CURLPrepareFile(const char* url, int dfilenum)
|
||||
return;
|
||||
}
|
||||
|
||||
curl_easy_setopt(http_handle, CURLOPT_WRITEDATA, curl_curfile->file);
|
||||
curl_easy_setopt(http_handle, CURLOPT_WRITEFUNCTION, curlwrite_data);
|
||||
curl_easy_setopt(http_handle, CURLOPT_NOPROGRESS, 0L);
|
||||
cc = curl_easy_setopt(http_handle, CURLOPT_WRITEDATA, curl_curfile->file);
|
||||
if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", curl_errbuf);
|
||||
|
||||
cc = curl_easy_setopt(http_handle, CURLOPT_WRITEFUNCTION, curlwrite_data);
|
||||
if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", curl_errbuf);
|
||||
|
||||
cc = curl_easy_setopt(http_handle, CURLOPT_NOPROGRESS, 0L);
|
||||
if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", curl_errbuf);
|
||||
|
||||
#ifdef XFERINFOFUNCTION
|
||||
curl_easy_setopt(http_handle, CURLOPT_XFERINFOFUNCTION, curlprogress_callbackx);
|
||||
cc = curl_easy_setopt(http_handle, CURLOPT_XFERINFOFUNCTION, curlprogress_callbackx);
|
||||
if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", curl_errbuf);
|
||||
#else
|
||||
curl_easy_setopt(http_handle, CURLOPT_PROGRESSFUNCTION, curlprogress_callback);
|
||||
cc = curl_easy_setopt(http_handle, CURLOPT_PROGRESSFUNCTION, curlprogress_callback);
|
||||
if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", curl_errbuf);
|
||||
#endif
|
||||
|
||||
M_SetCURLArgs(http_handle, curl_errbuf);
|
||||
|
||||
curl_curfile->status = FS_DOWNLOADING;
|
||||
curl_multi_add_handle(multi_handle, http_handle);
|
||||
|
||||
mc = curl_multi_add_handle(multi_handle, http_handle);
|
||||
if (mc != CURLM_OK) I_OutputMsg("libcurl: %s\n", curl_multi_strerror(mc));
|
||||
|
||||
mc = curl_multi_perform(multi_handle, &curl_runninghandles);
|
||||
if (mc != CURLM_OK) I_OutputMsg("libcurl: %s\n", curl_multi_strerror(mc));
|
||||
|
||||
curl_multi_perform(multi_handle, &curl_runninghandles);
|
||||
curl_starttime = time(NULL);
|
||||
|
||||
filedownload.current = dfilenum;
|
||||
@@ -1431,14 +1454,15 @@ void CURLGetFile(void)
|
||||
{
|
||||
if (curl_runninghandles)
|
||||
{
|
||||
curl_multi_perform(multi_handle, &curl_runninghandles);
|
||||
mc = curl_multi_perform(multi_handle, &curl_runninghandles);
|
||||
if (mc != CURLM_OK) I_OutputMsg("libcurl: %s\n", curl_multi_strerror(mc));
|
||||
|
||||
/* wait for activity, timeout or "nothing" */
|
||||
mc = curl_multi_wait(multi_handle, NULL, 0, 1000, NULL);
|
||||
|
||||
if (mc != CURLM_OK)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, "curl_multi_wait() failed, code %d.\n", mc);
|
||||
CONS_Alert(CONS_WARNING, "curl_multi_wait() failed: %s.\n", curl_multi_strerror(mc));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1496,7 +1520,8 @@ void CURLGetFile(void)
|
||||
Z_Free(filename);
|
||||
curl_curfile->file = NULL;
|
||||
filedownload.remaining--;
|
||||
curl_multi_remove_handle(multi_handle, e);
|
||||
mc = curl_multi_remove_handle(multi_handle, e);
|
||||
if (mc != CURLM_OK) I_OutputMsg("libcurl: %s\n", curl_multi_strerror(mc));
|
||||
curl_easy_cleanup(e);
|
||||
|
||||
if (!filedownload.remaining)
|
||||
@@ -1507,7 +1532,8 @@ void CURLGetFile(void)
|
||||
|
||||
if (!filedownload.remaining || !filedownload.http_running)
|
||||
{
|
||||
curl_multi_cleanup(multi_handle);
|
||||
mc = curl_multi_cleanup(multi_handle);
|
||||
if (mc != CURLM_OK) I_OutputMsg("libcurl: %s\n", curl_multi_strerror(mc));
|
||||
curl_global_cleanup();
|
||||
multi_handle = NULL;
|
||||
}
|
||||
@@ -1529,7 +1555,7 @@ CURLGetLogin (const char *url, HTTP_login ***return_prev_next)
|
||||
( login = (*prev_next));
|
||||
prev_next = &login->next
|
||||
){
|
||||
if (strcmp(login->url, url) == 0)
|
||||
if (fastcmp(login->url, url) != 0)
|
||||
{
|
||||
if (return_prev_next)
|
||||
(*return_prev_next) = prev_next;
|
||||
|
||||
@@ -59,19 +59,15 @@ extern char downloaddir[512];
|
||||
|
||||
typedef struct
|
||||
{
|
||||
#ifdef CLIENT_LOADINGSCREEN
|
||||
INT32 current;
|
||||
INT32 completednum;
|
||||
UINT32 completedsize;
|
||||
INT32 totalnum;
|
||||
UINT32 totalsize;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CURL
|
||||
INT32 remaining;
|
||||
boolean http_failed;
|
||||
boolean http_running;
|
||||
|
||||
char http_source[MAX_MIRROR_LENGTH+1];
|
||||
#endif
|
||||
} file_download_t;
|
||||
@@ -79,7 +75,6 @@ typedef struct
|
||||
extern file_download_t filedownload;
|
||||
|
||||
#ifdef HAVE_CURL
|
||||
|
||||
typedef struct HTTP_login HTTP_login;
|
||||
|
||||
extern struct HTTP_login
|
||||
|
||||
+30
-13
@@ -22,6 +22,7 @@
|
||||
|
||||
#ifdef HAVE_CURL
|
||||
#include <curl/curl.h>
|
||||
#include "m_curl.h"
|
||||
#endif
|
||||
|
||||
#include "doomdef.h"
|
||||
@@ -207,14 +208,15 @@ void D_SetupProtocol(void)
|
||||
|
||||
fp = fopen(protocolfile, "a+");
|
||||
result = fgets(buffer, PATH_MAX, fp);
|
||||
|
||||
if (result)
|
||||
{
|
||||
if (strcmp(buffer, "no") == 0)
|
||||
{
|
||||
fclose(fp);
|
||||
return;
|
||||
}
|
||||
else if (strcmp(buffer, exe_path) != 0)
|
||||
if (!fastcmp(buffer, "no"))
|
||||
{
|
||||
fclose(fp);
|
||||
return;
|
||||
}
|
||||
else if (fastcmp(buffer, exe_path))
|
||||
{
|
||||
// overwrite
|
||||
fclose(fp);
|
||||
@@ -232,6 +234,7 @@ void D_SetupProtocol(void)
|
||||
else
|
||||
fprintf(fp, "no");
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
@@ -255,8 +258,10 @@ void D_CreateProtocol(void)
|
||||
}
|
||||
|
||||
#ifdef HAVE_CURL
|
||||
static char curl_errbuf[CURL_ERROR_SIZE];
|
||||
void D_DownloadReplay(const char *url, const char *path)
|
||||
{
|
||||
|
||||
FILE *fp = NULL;
|
||||
CURL *curl;
|
||||
CURLcode cc;
|
||||
@@ -264,17 +269,29 @@ void D_DownloadReplay(const char *url, const char *path)
|
||||
if (!curl)
|
||||
I_Error("Unable to download replay. Error initializing CURL.");
|
||||
|
||||
cc = curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_errbuf);
|
||||
if (cc != CURLE_OK) I_OutputMsg("libcurl: CURLOPT_ERRORBUFFER failed\n");
|
||||
curl_errbuf[0] = 0x00;
|
||||
|
||||
fp = fopen(path, "wb");
|
||||
CONS_Printf("REPLAY: URL: %s\n", url);
|
||||
curl_easy_setopt(curl, CURLOPT_URL, url);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curlwrite_data);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
|
||||
|
||||
cc = curl_easy_perform(curl);
|
||||
cc = curl_easy_setopt(curl, CURLOPT_URL, url);
|
||||
if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", curl_errbuf);
|
||||
|
||||
cc = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curlwrite_data);
|
||||
if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", curl_errbuf);
|
||||
|
||||
cc = curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
|
||||
if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", curl_errbuf);
|
||||
|
||||
M_SetCURLArgs(curl, curl_errbuf);
|
||||
|
||||
cc = curl_easy_perform(curl);
|
||||
if (cc != CURLE_OK)
|
||||
I_Error("Unable to download replay. URL gave response code %u.", cc);
|
||||
I_Error("Unable to download replay. libcurl: %s.", curl_errbuf);
|
||||
|
||||
curl_easy_cleanup(curl);
|
||||
fclose(fp);
|
||||
curl_easy_cleanup(curl);
|
||||
fclose(fp);
|
||||
}
|
||||
#endif
|
||||
@@ -9,6 +9,9 @@
|
||||
/// \file d_protocol.h
|
||||
/// \brief srb2kart:// protocol stuff
|
||||
|
||||
#ifndef __D_PROTOCOL__
|
||||
#define __D_PROTOCOL__
|
||||
|
||||
void D_SetupProtocol(void);
|
||||
|
||||
void D_CreateProtocol(void);
|
||||
@@ -16,3 +19,5 @@ void D_DeleteProtocol(void);
|
||||
#ifdef HAVE_CURL
|
||||
void D_DownloadReplay(const char *url, const char *path);
|
||||
#endif
|
||||
|
||||
#endif //__D_PROTOCOL__
|
||||
@@ -50,10 +50,6 @@ typedef enum
|
||||
#define TICCMD_RECEIVED 1
|
||||
#define TICCMD_XY 2
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
SINT8 forwardmove; // -MAXPLMOVE to MAXPLMOVE (50)
|
||||
@@ -65,8 +61,4 @@ typedef struct
|
||||
UINT8 latency; // Netgames: how many tics ago was this ticcmd generated from this player's end?
|
||||
} ATTRPACK ticcmd_t;
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+6
-18
@@ -138,8 +138,7 @@ static void InitLogging(void)
|
||||
|
||||
if (M_IsPathAbsolute(reldir))
|
||||
{
|
||||
left = snprintf(logfilename, sizeof logfilename,
|
||||
"%s"PATHSEP, reldir);
|
||||
left = snprintf(logfilename, sizeof logfilename, "%s"PATHSEP, reldir);
|
||||
}
|
||||
else
|
||||
#ifdef DEFAULTDIR
|
||||
@@ -155,13 +154,10 @@ static void InitLogging(void)
|
||||
"."PATHSEP"%s"PATHSEP, reldir);
|
||||
}
|
||||
|
||||
strftime(&logfilename[left], sizeof logfilename - left,
|
||||
format, timeinfo);
|
||||
strftime(&logfilename[left], sizeof logfilename - left, format, timeinfo);
|
||||
}
|
||||
|
||||
M_MkdirEachUntil(logfilename,
|
||||
M_PathParts(logdir) - 1,
|
||||
M_PathParts(logfilename) - 1, 0755);
|
||||
M_MkdirEachUntil(logfilename, M_PathParts(logdir) - 1, M_PathParts(logfilename) - 1, 0755);
|
||||
|
||||
#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
|
||||
logstream = fopen(logfilename, "w");
|
||||
@@ -213,12 +209,9 @@ int main(int argc, char **argv)
|
||||
|
||||
//I_OutputMsg("I_StartupSystem() ...\n");
|
||||
I_StartupSystem();
|
||||
#if defined (_WIN32)
|
||||
{
|
||||
#ifdef DRMINGW
|
||||
ExcHndlInit();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_DRMINGW
|
||||
InitDrMingw();
|
||||
#endif
|
||||
|
||||
// startup SRB2
|
||||
@@ -228,11 +221,6 @@ int main(int argc, char **argv)
|
||||
// never return
|
||||
D_SRB2Loop();
|
||||
|
||||
#ifdef BUGTRAP
|
||||
// This is safe even if BT didn't start.
|
||||
ShutdownBugTrap();
|
||||
#endif
|
||||
|
||||
// return to OS
|
||||
return 0;
|
||||
}
|
||||
+363
-363
@@ -54,8 +54,6 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
|
||||
#include <string.h>
|
||||
#ifdef __GNUC__
|
||||
#include <unistd.h>
|
||||
#elif defined (_MSC_VER)
|
||||
#include <direct.h>
|
||||
#endif
|
||||
#if defined (__unix__) || defined (UNIXCOMMON)
|
||||
#include <fcntl.h>
|
||||
@@ -66,10 +64,6 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
|
||||
#include <conio.h>
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4214 4244)
|
||||
#endif
|
||||
|
||||
#if defined (__unix__) || defined(__APPLE__) || (defined (UNIXCOMMON) && !defined (__HAIKU__))
|
||||
#include <time.h>
|
||||
#if defined (__linux__)
|
||||
@@ -180,293 +174,10 @@ static char returnWadPath[256];
|
||||
#include "../byteptr.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBBACKTRACE
|
||||
#include <backtrace.h>
|
||||
// TODO - move this to some header file instead
|
||||
extern struct backtrace_state *bt_state;
|
||||
|
||||
typedef struct bt_crash_reason_s {
|
||||
enum {
|
||||
BTCRASH_SIGNAL,
|
||||
BTCRASH_ERRORMSG,
|
||||
} type;
|
||||
|
||||
union {
|
||||
INT32 signal;
|
||||
const char *errormsg;
|
||||
} value;
|
||||
} bt_crash_reason_t;
|
||||
|
||||
#define BT_CRASH_REASON_SIGNAL(num) (bt_crash_reason_t){ .type = BTCRASH_SIGNAL, .value = { .signal = num } }
|
||||
#define BT_CRASH_REASON_ERRORMSG(msg) (bt_crash_reason_t){ .type = BTCRASH_ERRORMSG, .value = { .errormsg = msg } }
|
||||
|
||||
static void printsignal(FILE *fp, INT32 num)
|
||||
{
|
||||
switch (num)
|
||||
{
|
||||
case SIGILL:
|
||||
fprintf(fp, "SIGILL - illegal instruction - invalid function image");
|
||||
break;
|
||||
case SIGFPE:
|
||||
fprintf(fp, "SIGFPE - mathematical exception");
|
||||
break;
|
||||
case SIGSEGV:
|
||||
fprintf(fp, "SIGSEGV - segment violation");
|
||||
break;
|
||||
case SIGABRT:
|
||||
fprintf(fp, "SIGABRT - abnormal termination triggered by abort call");
|
||||
break;
|
||||
default:
|
||||
fprintf(fp, "Signal number %d", num);
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct bt_out_buf_s {
|
||||
boolean error;
|
||||
char *pos;
|
||||
size_t size;
|
||||
} bt_out_buf_t;
|
||||
|
||||
static void bt_syminfo_cb(void *data, uintptr_t pc, const char *symname, uintptr_t symval, uintptr_t symsize)
|
||||
{
|
||||
(void)symval;
|
||||
(void)symsize;
|
||||
|
||||
bt_out_buf_t *buf = (bt_out_buf_t*)data;
|
||||
|
||||
if (!symname)
|
||||
symname = "???";
|
||||
|
||||
int n = snprintf(buf->pos, buf->size, "%p %s\n", (void*)pc, symname);
|
||||
|
||||
if (n <= 0)
|
||||
{
|
||||
buf->size = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
buf->pos += n;
|
||||
buf->size -= n;
|
||||
}
|
||||
|
||||
static int bt_simple_cb(void *data, uintptr_t pc)
|
||||
{
|
||||
bt_out_buf_t *buf = (bt_out_buf_t*)data;
|
||||
|
||||
backtrace_syminfo(bt_state, pc, bt_syminfo_cb, NULL, data);
|
||||
|
||||
if (!buf->size) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int bt_full_cb(void *data, uintptr_t pc, const char *filename, int lineno, const char *function)
|
||||
{
|
||||
bt_out_buf_t *buf = (bt_out_buf_t*)data;
|
||||
|
||||
if (!filename) filename = "???";
|
||||
if (!function) function = "???";
|
||||
|
||||
int n = snprintf(buf->pos, buf->size, "%p %s\n\t%s:%d\n", (void*)pc, function, filename, lineno);
|
||||
|
||||
if (n <= 0) return 1;
|
||||
|
||||
buf->pos += n;
|
||||
buf->size -= n;
|
||||
|
||||
if (!buf->size) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void bt_error_cb(void *data, const char *msg, int errnum)
|
||||
{
|
||||
(void)msg; // We don't need this
|
||||
|
||||
bt_out_buf_t *buf = (bt_out_buf_t*)data;
|
||||
|
||||
// No debug info
|
||||
if (errnum == -1)
|
||||
buf->error = true;
|
||||
}
|
||||
|
||||
static void write_backtrace(bt_crash_reason_t reason)
|
||||
{
|
||||
FILE *out = fopen(va("%s" PATHSEP "%s", srb2home, "srb2kart-crash-log.txt"), "a");
|
||||
|
||||
time_t rawtime;
|
||||
struct tm *timeinfo;
|
||||
|
||||
const size_t BUFSIZE = 8192;
|
||||
char backtrace[BUFSIZE];
|
||||
|
||||
bt_out_buf_t buf;
|
||||
buf.error = false;
|
||||
buf.pos = backtrace;
|
||||
buf.size = BUFSIZE;
|
||||
|
||||
|
||||
if (!out)
|
||||
{
|
||||
fprintf(stderr, "\nWARNING: Couldn't open crash log for writing! Make sure your permissions are correct. Please save the below report!\n");
|
||||
out = stderr;
|
||||
}
|
||||
|
||||
// Get the current time as a string.
|
||||
time(&rawtime);
|
||||
timeinfo = localtime(&rawtime);
|
||||
|
||||
fprintf(out, "------------------------\n\n");
|
||||
|
||||
fprintf(out, "Program name: %s %s\n", SRB2APPLICATION, VERSIONSTRING);
|
||||
|
||||
if (compdate && comptime && comprevision && compbranch)
|
||||
fprintf(out, "Compiled: %s %s, commit %s, branch %s\n", compdate, comptime, comprevision, compbranch);
|
||||
|
||||
if (gamestate == GS_LEVEL)
|
||||
{
|
||||
char *title = G_BuildMapTitle(gamemap);
|
||||
|
||||
if (title)
|
||||
{
|
||||
fprintf(out, "Game map: %s (%s)\n", title, G_BuildMapName(gamemap));
|
||||
Z_Free(title);
|
||||
}
|
||||
else
|
||||
fprintf(out, "Game map: %s\n", G_BuildMapName(gamemap));
|
||||
}
|
||||
|
||||
fprintf(out, "Time of crash: %s\n", asctime(timeinfo));
|
||||
|
||||
fprintf(out, "Caused by: ");
|
||||
|
||||
switch (reason.type)
|
||||
{
|
||||
case BTCRASH_SIGNAL:
|
||||
printsignal(out, reason.value.signal);
|
||||
break;
|
||||
|
||||
case BTCRASH_ERRORMSG:
|
||||
fprintf(out, "%s", reason.value.errormsg);
|
||||
break;
|
||||
}
|
||||
|
||||
fprintf(out, "\nBacktrace:\n");
|
||||
|
||||
// Try to get full backtrace, it will print files and line numbers
|
||||
backtrace_full(bt_state, 2, bt_full_cb, bt_error_cb, (void*)&buf);
|
||||
|
||||
if (buf.error)
|
||||
{
|
||||
// Fall back to simple backtrace, only prints function names
|
||||
backtrace_simple(bt_state, 2, bt_simple_cb, NULL, (void*)&buf);
|
||||
}
|
||||
|
||||
fputs(backtrace, out);
|
||||
|
||||
if (out != stderr)
|
||||
{
|
||||
fclose(out);
|
||||
fprintf(stderr, "Crash report created, find srb2kart-crash-log.txt in your SRB2Kart directory\n");
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
boolean consolevent = false;
|
||||
boolean framebuffer = false;
|
||||
|
||||
boolean g_in_exiting_signal_handler = false;
|
||||
|
||||
UINT8 keyboard_started = false;
|
||||
|
||||
static void I_ReportSignal(int num, int coredumped)
|
||||
{
|
||||
//static char msg[] = "oh no! back to reality!\r\n";
|
||||
const char * sigmsg;
|
||||
char msg[256];
|
||||
|
||||
switch (num)
|
||||
{
|
||||
// case SIGINT:
|
||||
// sigmsg = "SIGINT - interrupted";
|
||||
// break;
|
||||
case SIGILL:
|
||||
sigmsg = "SIGILL - illegal instruction - invalid function image";
|
||||
break;
|
||||
case SIGFPE:
|
||||
sigmsg = "SIGFPE - mathematical exception";
|
||||
break;
|
||||
case SIGSEGV:
|
||||
sigmsg = "SIGSEGV - segment violation";
|
||||
break;
|
||||
// case SIGTERM:
|
||||
// sigmsg = "SIGTERM - Software termination signal from kill";
|
||||
// break;
|
||||
// case SIGBREAK:
|
||||
// sigmsg = "SIGBREAK - Ctrl-Break sequence";
|
||||
// break;
|
||||
case SIGABRT:
|
||||
sigmsg = "SIGABRT - abnormal termination triggered by abort call";
|
||||
break;
|
||||
default:
|
||||
sprintf(msg,"signal number %d", num);
|
||||
if (coredumped)
|
||||
sigmsg = 0;
|
||||
else
|
||||
sigmsg = msg;
|
||||
}
|
||||
|
||||
if (coredumped)
|
||||
{
|
||||
if (sigmsg)
|
||||
sprintf(msg, "%s (core dumped)", sigmsg);
|
||||
else
|
||||
strcat(msg, " (core dumped)");
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(msg, "%s", sigmsg);
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBBACKTRACE
|
||||
strncat(msg, "\n\nCrash report has been saved into srb2kart-crash-log.txt", 255);
|
||||
#elif defined(_WIN32) && !defined(__MINGW64__)
|
||||
strncat(msg, "\n\nCrash report has been saved into srb2kart.rpt", 255);
|
||||
#endif
|
||||
|
||||
I_OutputMsg("\nProcess killed by signal: %s\n\n", sigmsg);
|
||||
}
|
||||
|
||||
#ifndef NEWSIGNALHANDLER
|
||||
FUNCNORETURN static ATTRNORETURN void signal_handler(INT32 num)
|
||||
{
|
||||
g_in_exiting_signal_handler = true;
|
||||
|
||||
D_QuitNetGame(); // Fix server freezes
|
||||
|
||||
#ifdef HAVE_LIBBACKTRACE
|
||||
write_backtrace(BT_CRASH_REASON_SIGNAL(num));
|
||||
#endif
|
||||
|
||||
if (demo.recording)
|
||||
G_SaveDemo();
|
||||
|
||||
I_ReportSignal(num, 0);
|
||||
I_ShutdownSystem();
|
||||
signal(num, SIG_DFL); //default signal action
|
||||
raise(num);
|
||||
I_Quit();
|
||||
}
|
||||
#endif
|
||||
|
||||
FUNCNORETURN static ATTRNORETURN void quit_handler(int num)
|
||||
{
|
||||
signal(num, SIG_DFL); //default signal action
|
||||
raise(num);
|
||||
I_Quit();
|
||||
}
|
||||
|
||||
#ifdef HAVE_TERMIOS
|
||||
// TERMIOS console code from Quake3: thank you!
|
||||
boolean stdin_active = true;
|
||||
@@ -495,16 +206,6 @@ static struct termios tty_tc;
|
||||
// so we provide tty_Clear and tty_Show to be called before and after a stdout or stderr output
|
||||
// =============================================================
|
||||
|
||||
// flush stdin, I suspect some terminals are sending a LOT of garbage
|
||||
// FIXME TTimo relevant?
|
||||
#if 0
|
||||
static inline void tty_FlushIn(void)
|
||||
{
|
||||
char key;
|
||||
while (read(STDIN_FILENO, &key, 1)!=-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
// do a backspace
|
||||
// TTimo NOTE: it seems on some terminals just sending '\b' is not enough
|
||||
// so for now, in any case we send "\b \b" .. yeah well ..
|
||||
@@ -799,55 +500,6 @@ static inline void I_StartupConsole(void)
|
||||
static inline void I_ShutdownConsole(void){}
|
||||
#endif
|
||||
|
||||
//
|
||||
// StartupKeyboard
|
||||
//
|
||||
static void I_RegisterSignals (void)
|
||||
{
|
||||
#ifdef SIGINT
|
||||
signal(SIGINT , quit_handler);
|
||||
#endif
|
||||
#ifdef SIGBREAK
|
||||
signal(SIGBREAK , quit_handler);
|
||||
#endif
|
||||
#ifdef SIGTERM
|
||||
signal(SIGTERM , quit_handler);
|
||||
#endif
|
||||
|
||||
// If these defines don't exist,
|
||||
// then compilation would have failed above us...
|
||||
#ifndef NEWSIGNALHANDLER
|
||||
signal(SIGILL , signal_handler);
|
||||
signal(SIGSEGV , signal_handler);
|
||||
signal(SIGABRT , signal_handler);
|
||||
signal(SIGFPE , signal_handler);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef NEWSIGNALHANDLER
|
||||
static void signal_handler_child(INT32 num)
|
||||
{
|
||||
#ifdef HAVE_LIBBACKTRACE
|
||||
write_backtrace(BT_CRASH_REASON_SIGNAL(num));
|
||||
#endif
|
||||
|
||||
if (demo.recording)
|
||||
G_SaveDemo();
|
||||
|
||||
signal(num, SIG_DFL); //default signal action
|
||||
raise(num);
|
||||
}
|
||||
|
||||
static void I_RegisterChildSignals(void)
|
||||
{
|
||||
// If these defines don't exist,
|
||||
// then compilation would have failed above us...
|
||||
signal(SIGILL , signal_handler_child);
|
||||
signal(SIGSEGV , signal_handler_child);
|
||||
signal(SIGABRT , signal_handler_child);
|
||||
signal(SIGFPE , signal_handler_child);
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
//I_OutputMsg
|
||||
@@ -874,10 +526,6 @@ void I_OutputMsg(const char *fmt, ...)
|
||||
DEFAULTFONTBGR, DEFAULTFONTBGG, DEFAULTFONTBGB, DEFAULTFONTBGA, txt);
|
||||
#endif
|
||||
|
||||
#if defined (_WIN32) && defined (_MSC_VER)
|
||||
OutputDebugStringA(txt);
|
||||
#endif
|
||||
|
||||
len = strlen(txt);
|
||||
|
||||
#ifdef LOGMESSAGES
|
||||
@@ -1322,6 +970,317 @@ void I_SleepDuration(precise_t duration)
|
||||
#endif
|
||||
}
|
||||
|
||||
boolean g_in_exiting_signal_handler = false;
|
||||
|
||||
static void I_PrintSignal(INT32 signal_num, boolean core_dumped, char *signal_msg)
|
||||
{
|
||||
const char *sigmsg;
|
||||
|
||||
switch (signal_num)
|
||||
{
|
||||
#ifdef SIGINT
|
||||
case SIGINT:
|
||||
sigmsg = ("SIGINT - SRB2Kart-Saturn was interrupted prematurely by the user.");
|
||||
break;
|
||||
#endif
|
||||
case SIGILL: // illegal instruction - invalid function image
|
||||
sigmsg = ("SIGILL - SRB2Kart-Saturn has attempted to execute an illegal instruction and needs to close.");
|
||||
break;
|
||||
case SIGFPE: // mathematical exception
|
||||
sigmsg = ("SIGFPE - SRB2Kart-Saturn has encountered a mathematical exception and needs to close.");
|
||||
break;
|
||||
case SIGSEGV: // segment violation
|
||||
sigmsg = ("SIGSEGV - SRB2Kart-Saturn has attempted to access a memory location that it shouldn't and needs to close.");
|
||||
break;
|
||||
#ifdef SIGTERM
|
||||
case SIGTERM: // Software termination signal from kill
|
||||
sigmsg = ("SIGTERM - SRB2Kart-Saturn was terminated by a kill signal.");
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGBREAK
|
||||
case SIGBREAK: // Ctrl-Break sequence
|
||||
sigmsg =("SIGBREAK - SRB2Kart-Saturn was terminated by a Ctrl-Break sequence.")
|
||||
break;
|
||||
#endif
|
||||
case SIGABRT: // abnormal termination triggered by abort call
|
||||
sigmsg = ("SIGABRT - SRB2Kart-Saturn was terminated by an abort signal.");
|
||||
break;
|
||||
default:
|
||||
sprintf(signal_msg, "Signal number %d", signal_num);
|
||||
sigmsg = (core_dumped ? "Unknown signal" : signal_msg);
|
||||
break;
|
||||
}
|
||||
|
||||
if (core_dumped)
|
||||
{
|
||||
if (sigmsg)
|
||||
sprintf(signal_msg, "%s (core dumped)", sigmsg);
|
||||
else
|
||||
strcat(signal_msg, " (core dumped)");
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(signal_msg, "%s", sigmsg);
|
||||
}
|
||||
}
|
||||
|
||||
static void I_ReportSignal(int num, int coredumped)
|
||||
{
|
||||
char sigmsg[512];
|
||||
|
||||
I_PrintSignal(num, coredumped, sigmsg);
|
||||
size_t len = strlen(sigmsg);
|
||||
snprintf(sigmsg + len, sizeof(sigmsg) - len, "\n\nCrash report has been saved into %s", CRASH_LOGFILE_NAME);
|
||||
I_OutputMsg("\nProcess killed by signal: %s\n\n", sigmsg);
|
||||
}
|
||||
|
||||
#ifndef NEWSIGNALHANDLER
|
||||
FUNCNORETURN static ATTRNORETURN void signal_handler(INT32 num)
|
||||
{
|
||||
g_in_exiting_signal_handler = true;
|
||||
|
||||
D_QuitNetGame(); // Fix server freezes
|
||||
|
||||
#ifdef HAVE_LIBBACKTRACE
|
||||
write_backtrace(BT_CRASH_REASON_SIGNAL(num));
|
||||
#endif
|
||||
|
||||
I_ReportSignal(num, 0);
|
||||
I_ShutdownSystem();
|
||||
signal(num, SIG_DFL); //default signal action
|
||||
raise(num);
|
||||
I_Quit();
|
||||
}
|
||||
#endif
|
||||
|
||||
FUNCNORETURN static ATTRNORETURN void quit_handler(int num)
|
||||
{
|
||||
signal(num, SIG_DFL); //default signal action
|
||||
raise(num);
|
||||
I_Quit();
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBBACKTRACE
|
||||
#include <backtrace.h>
|
||||
// TODO - move this to some header file instead
|
||||
extern struct backtrace_state *bt_state;
|
||||
|
||||
typedef struct bt_crash_reason_s {
|
||||
enum {
|
||||
BTCRASH_SIGNAL,
|
||||
BTCRASH_ERRORMSG,
|
||||
} type;
|
||||
|
||||
union {
|
||||
INT32 signal;
|
||||
const char *errormsg;
|
||||
} value;
|
||||
} bt_crash_reason_t;
|
||||
|
||||
#define BT_CRASH_REASON_SIGNAL(num) (bt_crash_reason_t){ .type = BTCRASH_SIGNAL, .value = { .signal = num } }
|
||||
#define BT_CRASH_REASON_ERRORMSG(msg) (bt_crash_reason_t){ .type = BTCRASH_ERRORMSG, .value = { .errormsg = msg } }
|
||||
|
||||
typedef struct bt_out_buf_s {
|
||||
boolean error;
|
||||
char *pos;
|
||||
size_t size;
|
||||
} bt_out_buf_t;
|
||||
|
||||
static void bt_syminfo_cb(void *data, uintptr_t pc, const char *symname, uintptr_t symval, uintptr_t symsize)
|
||||
{
|
||||
(void)symval;
|
||||
(void)symsize;
|
||||
|
||||
bt_out_buf_t *buf = (bt_out_buf_t*)data;
|
||||
|
||||
if (!symname)
|
||||
symname = "???";
|
||||
|
||||
int n = snprintf(buf->pos, buf->size, "%p %s\n", (void*)pc, symname);
|
||||
|
||||
if (n <= 0)
|
||||
{
|
||||
buf->size = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
buf->pos += n;
|
||||
buf->size -= n;
|
||||
}
|
||||
|
||||
static int bt_simple_cb(void *data, uintptr_t pc)
|
||||
{
|
||||
bt_out_buf_t *buf = (bt_out_buf_t*)data;
|
||||
|
||||
backtrace_syminfo(bt_state, pc, bt_syminfo_cb, NULL, data);
|
||||
|
||||
if (!buf->size) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int bt_full_cb(void *data, uintptr_t pc, const char *filename, int lineno, const char *function)
|
||||
{
|
||||
bt_out_buf_t *buf = (bt_out_buf_t*)data;
|
||||
|
||||
if (!filename) filename = "???";
|
||||
if (!function) function = "???";
|
||||
|
||||
int n = snprintf(buf->pos, buf->size, "%p %s\n\t%s:%d\n", (void*)pc, function, filename, lineno);
|
||||
|
||||
if (n <= 0) return 1;
|
||||
|
||||
buf->pos += n;
|
||||
buf->size -= n;
|
||||
|
||||
if (!buf->size) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void bt_error_cb(void *data, const char *msg, int errnum)
|
||||
{
|
||||
(void)msg; // We don't need this
|
||||
|
||||
bt_out_buf_t *buf = (bt_out_buf_t*)data;
|
||||
|
||||
// No debug info
|
||||
if (errnum == -1)
|
||||
buf->error = true;
|
||||
}
|
||||
|
||||
static void write_backtrace(bt_crash_reason_t reason)
|
||||
{
|
||||
char sig_msg[512];
|
||||
const char *filename = va("%s" PATHSEP CRASH_LOGFILE_NAME, srb2home);
|
||||
FILE *out = fopen(filename, "a+");
|
||||
|
||||
time_t rawtime;
|
||||
struct tm *timeinfo;
|
||||
|
||||
const size_t BUFSIZE = 8192;
|
||||
char backtrace[BUFSIZE];
|
||||
|
||||
bt_out_buf_t buf;
|
||||
buf.error = false;
|
||||
buf.pos = backtrace;
|
||||
buf.size = BUFSIZE;
|
||||
|
||||
if (!out)
|
||||
{
|
||||
fprintf(stderr, "\nWARNING: Couldn't open crash log for writing! Make sure your permissions are correct. Please save the below report!\n");
|
||||
out = stderr;
|
||||
}
|
||||
|
||||
// Get the current time as a string.
|
||||
time(&rawtime);
|
||||
timeinfo = localtime(&rawtime);
|
||||
|
||||
fprintf(out, "------------------------\n\n");
|
||||
|
||||
fprintf(out, "Program name: %s %s\n", SRB2APPLICATION, VERSIONSTRING);
|
||||
|
||||
fprintf(out, "Dedicated build\n");
|
||||
fprintf(out, "Platform: %s\n", I_GetSysName());
|
||||
|
||||
if (compdate && comptime && comprevision && compbranch)
|
||||
fprintf(out, "Compiled: %s %s, commit %s, branch %s\n", compdate, comptime, comprevision, compbranch);
|
||||
|
||||
if (gamestate == GS_LEVEL && gamemap)
|
||||
{
|
||||
char *title = G_BuildMapTitle(gamemap);
|
||||
|
||||
if (title)
|
||||
{
|
||||
fprintf(out, "Game map: %s (%s)\n", title, G_BuildMapName(gamemap));
|
||||
Z_Free(title);
|
||||
}
|
||||
else
|
||||
fprintf(out, "Game map: %s\n", G_BuildMapName(gamemap));
|
||||
}
|
||||
|
||||
fprintf(out, "Time of crash: %s\n", asctime(timeinfo));
|
||||
|
||||
fprintf(out, "Caused by: ");
|
||||
|
||||
switch (reason.type)
|
||||
{
|
||||
case BTCRASH_SIGNAL:
|
||||
I_PrintSignal(reason.value.signal, false, sig_msg);
|
||||
fprintf(out, "%s", sig_msg);
|
||||
break;
|
||||
|
||||
case BTCRASH_ERRORMSG:
|
||||
fprintf(out, "%s", reason.value.errormsg);
|
||||
break;
|
||||
}
|
||||
|
||||
fprintf(out, "\nBacktrace:\n");
|
||||
|
||||
// Try to get full backtrace, it will print files and line numbers
|
||||
backtrace_full(bt_state, 2, bt_full_cb, bt_error_cb, (void*)&buf);
|
||||
|
||||
if (buf.error)
|
||||
{
|
||||
// Fall back to simple backtrace, only prints function names
|
||||
backtrace_simple(bt_state, 2, bt_simple_cb, NULL, (void*)&buf);
|
||||
}
|
||||
|
||||
fputs(backtrace, out);
|
||||
|
||||
if (out != stderr)
|
||||
{
|
||||
fclose(out);
|
||||
fprintf(stderr, "Crash report created, find %s in your SRB2Kart directory\n", CRASH_LOGFILE_NAME);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void I_RegisterSignals(void)
|
||||
{
|
||||
#ifdef SIGINT
|
||||
signal(SIGINT, quit_handler);
|
||||
#endif
|
||||
#ifdef SIGBREAK
|
||||
signal(SIGBREAK, quit_handler);
|
||||
#endif
|
||||
#ifdef SIGTERM
|
||||
signal(SIGTERM, quit_handler);
|
||||
#endif
|
||||
#ifndef NEWSIGNALHANDLER
|
||||
// If these defines don't exist,
|
||||
// then compilation would have failed above us...
|
||||
signal(SIGILL, signal_handler);
|
||||
signal(SIGSEGV, signal_handler);
|
||||
signal(SIGABRT, signal_handler);
|
||||
signal(SIGFPE, signal_handler);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef NEWSIGNALHANDLER
|
||||
static void signal_handler_child(INT32 num)
|
||||
{
|
||||
g_in_exiting_signal_handler = true;
|
||||
|
||||
#ifdef HAVE_LIBBACKTRACE
|
||||
write_backtrace(BT_CRASH_REASON_SIGNAL(num));
|
||||
#endif
|
||||
|
||||
signal(num, SIG_DFL); // default signal action
|
||||
raise(num);
|
||||
}
|
||||
|
||||
static void I_RegisterChildSignals(void)
|
||||
{
|
||||
// If these defines don't exist,
|
||||
// then compilation would have failed above us...
|
||||
signal(SIGILL, signal_handler_child);
|
||||
signal(SIGSEGV, signal_handler_child);
|
||||
signal(SIGABRT, signal_handler_child);
|
||||
signal(SIGFPE, signal_handler_child);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef NEWSIGNALHANDLER
|
||||
FUNCNORETURN static ATTRNORETURN void newsignalhandler_Warn(const char *pr)
|
||||
{
|
||||
@@ -1426,13 +1385,12 @@ void I_Quit(void)
|
||||
static boolean quiting = false;
|
||||
|
||||
/* prevent recursive I_Quit() */
|
||||
if (quiting) goto death;
|
||||
if (quiting)
|
||||
goto death;
|
||||
quiting = false;
|
||||
I_ShutdownConsole();
|
||||
M_SaveConfig(NULL); //save game config, cvars..
|
||||
#ifndef NONET
|
||||
D_SaveBan(); // save the ban list
|
||||
#endif
|
||||
G_SaveGameData(false); // Tails 12-08-2002
|
||||
//added:16-02-98: when recording a demo, should exit using 'q' key,
|
||||
// but sometimes we forget and use 'F10'.. so save here too.
|
||||
@@ -1484,7 +1442,7 @@ static INT32 errorcount = 0;
|
||||
*/
|
||||
static boolean shutdowning = false;
|
||||
|
||||
void I_Error(const char *error, ...)
|
||||
FUNCIERROR void ATTRNORETURN I_Error(const char *error, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char buffer[8192];
|
||||
@@ -1510,7 +1468,7 @@ void I_Error(const char *error, ...)
|
||||
if (errorcount > 20)
|
||||
{
|
||||
va_start(argptr, error);
|
||||
vsprintf(buffer, error, argptr);
|
||||
vsnprintf(buffer, 8192, error, argptr);
|
||||
va_end(argptr);
|
||||
|
||||
I_OutputMsg("SRB2Kart %s Recursive Error", buffer);
|
||||
@@ -1524,7 +1482,7 @@ void I_Error(const char *error, ...)
|
||||
|
||||
// Display error message in the console before we start shutting it down
|
||||
va_start(argptr, error);
|
||||
vsprintf(buffer, error, argptr);
|
||||
vsnprintf(buffer, 8192, error, argptr);
|
||||
va_end(argptr);
|
||||
I_OutputMsg("\nI_Error(): %s\n", buffer);
|
||||
|
||||
@@ -1536,9 +1494,7 @@ void I_Error(const char *error, ...)
|
||||
I_ShutdownConsole();
|
||||
|
||||
M_SaveConfig(NULL); // save game config, cvars..
|
||||
#ifndef NONET
|
||||
D_SaveBan(); // save the ban list
|
||||
#endif
|
||||
G_SaveGameData(false); // Tails 12-08-2002
|
||||
|
||||
// Shutdown. Here might be other errors.
|
||||
@@ -1753,9 +1709,9 @@ char *I_GetUserName(void)
|
||||
strncpy(username, p, MAXPLAYERNAME);
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(username, "") != 0)
|
||||
if (!fastcmp(username, ""))
|
||||
return username;
|
||||
|
||||
return NULL; // dummy for platform independent version
|
||||
}
|
||||
|
||||
@@ -2027,7 +1983,7 @@ const char *I_LocateWad(void)
|
||||
#if defined (_WIN32)
|
||||
SetCurrentDirectoryA(waddir);
|
||||
#else
|
||||
if (chdir(waddir) == -1)
|
||||
if (waddir == NULL || chdir(waddir) == -1)
|
||||
I_OutputMsg("Couldn't change working directory\n");
|
||||
#endif
|
||||
}
|
||||
@@ -2175,6 +2131,50 @@ size_t I_GetFreeMem(size_t *total)
|
||||
// note CPUAFFINITY code used to reside here
|
||||
void I_RegisterSysCommands(void) {}
|
||||
|
||||
const char *I_GetSysName(void)
|
||||
{
|
||||
// reference: https://sourceforge.net/p/predef/wiki/OperatingSystems/
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
return "Windows";
|
||||
#elif defined(__APPLE__)
|
||||
return "Mac OS";
|
||||
#elif defined(__linux__)
|
||||
return "Linux";
|
||||
#elif defined(__FreeBSD__)
|
||||
return "FreeBSD";
|
||||
#elif defined(__OpenBSD__)
|
||||
return "OpenBSD";
|
||||
#elif defined(__NetBSD__)
|
||||
return "NetBSD";
|
||||
#elif defined(__DragonFly__)
|
||||
return "DragonFly BSD";
|
||||
#elif defined(__gnu_hurd__)
|
||||
return "GNU Hurd"; // for anyone mental enough to set up an SRB2 server on GNU Hurd
|
||||
#elif defined(__hpux)
|
||||
return "HP-UX";
|
||||
#elif defined(EPLAN9)
|
||||
return "Plan 9";
|
||||
#elif defined(__HAIKU__)
|
||||
return "Haiku";
|
||||
#elif defined(__BEOS__)
|
||||
return "BeOS";
|
||||
#elif defined(__minix)
|
||||
return "Minix";
|
||||
#elif defined(__sun)
|
||||
#if defined(__SVR4) || defined(__srv4__)
|
||||
return "Solaris"; // this would be so cursed...
|
||||
#else
|
||||
return "SunOS";
|
||||
#endif
|
||||
#elif defined(_AIX)
|
||||
return "AIX";
|
||||
#elif defined(__SYLLABLE__)
|
||||
return "SyllableOS"; // RIP SyllableOS, i still miss you ;-;
|
||||
#else
|
||||
return "Unknown";
|
||||
#endif
|
||||
}
|
||||
|
||||
boolean I_InitNetwork(void)
|
||||
{
|
||||
// this must exist, but this is actually handled in i_tcp.c
|
||||
|
||||
@@ -89,9 +89,10 @@ void I_UpdateNoVsync(void)
|
||||
//
|
||||
// I_ReadScreen
|
||||
//
|
||||
void I_ReadScreen(UINT8 *scr)
|
||||
void I_ReadScreen(UINT8 * restrict scr, INT32 scale)
|
||||
{
|
||||
(void)scr;
|
||||
(void)scale;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -144,8 +145,9 @@ UINT32 I_GetRefreshRate(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void I_SetTextInput(void)
|
||||
void I_SetTextInput(boolean enable)
|
||||
{
|
||||
(void)enable;
|
||||
}
|
||||
|
||||
boolean I_UseNativeKeyboard(void)
|
||||
|
||||
+9
-9
@@ -754,7 +754,7 @@ static void readlevelheader(MYFILE *f, INT32 num, INT32 wadnum)
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
word2 = tmp += 2;
|
||||
word2 = tmp + 2;
|
||||
i = atoi(word2); // used for numerical settings
|
||||
|
||||
// CHEAP HACK: move this over here for lowercase subtitles
|
||||
@@ -1393,7 +1393,7 @@ static void readhuditem(MYFILE *f, INT32 num)
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
word2 = tmp += 2;
|
||||
word2 = tmp + 2;
|
||||
strupr(word2);
|
||||
|
||||
i = atoi(word2); // used for numerical settings
|
||||
@@ -1862,7 +1862,7 @@ static void reademblemdata(MYFILE *f, INT32 num)
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
word2 = tmp += 2;
|
||||
word2 = tmp + 2;
|
||||
value = atoi(word2); // used for numerical settings
|
||||
|
||||
// Up here to allow lowercase in hints
|
||||
@@ -1989,7 +1989,7 @@ static void readextraemblemdata(MYFILE *f, INT32 num)
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
word2 = tmp += 2;
|
||||
word2 = tmp + 2;
|
||||
strupr(word2);
|
||||
|
||||
value = atoi(word2); // used for numerical settings
|
||||
@@ -2067,7 +2067,7 @@ static void readunlockable(MYFILE *f, INT32 num)
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
word2 = tmp += 2;
|
||||
word2 = tmp + 2;
|
||||
strupr(word2);
|
||||
|
||||
i = atoi(word2); // used for numerical settings
|
||||
@@ -2336,7 +2336,7 @@ static void readconditionset(MYFILE *f, UINT8 setnum)
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
word2 = tmp += 2;
|
||||
word2 = tmp + 2;
|
||||
strupr(word2);
|
||||
|
||||
if (fastncmp(word, "CONDITION", 9))
|
||||
@@ -2470,7 +2470,7 @@ static void readmaincfg(MYFILE *f)
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
word2 = tmp += 2;
|
||||
word2 = tmp + 2;
|
||||
strupr(word2);
|
||||
|
||||
value = atoi(word2); // used for numerical settings
|
||||
@@ -2649,7 +2649,7 @@ static void readwipes(MYFILE *f)
|
||||
{
|
||||
char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL);
|
||||
char *word = s;
|
||||
char *pword = word;
|
||||
char *pword;
|
||||
char *word2;
|
||||
char *tmp;
|
||||
INT32 value;
|
||||
@@ -2682,7 +2682,7 @@ static void readwipes(MYFILE *f)
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
word2 = tmp += 2;
|
||||
word2 = tmp + 2;
|
||||
value = atoi(word2); // used for numerical settings
|
||||
|
||||
if (value < -1 || value > 99)
|
||||
|
||||
+30
-4
@@ -49,6 +49,27 @@ discordRequest_t *discordRequestList = NULL;
|
||||
|
||||
static char self_ip[IP_SIZE+1];
|
||||
|
||||
/*--------------------------------------------------
|
||||
* const char *DRPC_HideUsername(const char *input)
|
||||
*
|
||||
* See header file for description.
|
||||
* --------------------------------------------------*/
|
||||
const char *DRPC_HideUsername(const char *input)
|
||||
{
|
||||
static char buffer[5];
|
||||
int i;
|
||||
|
||||
buffer[0] = input[0];
|
||||
|
||||
for (i = 1; i < 4; ++i)
|
||||
{
|
||||
buffer[i] = '.';
|
||||
}
|
||||
|
||||
buffer[4] = '\0';
|
||||
return buffer;
|
||||
}
|
||||
|
||||
boolean drpc_init = false;
|
||||
|
||||
/*--------------------------------------------------
|
||||
@@ -105,7 +126,7 @@ static void DRPC_HandleReady(const DiscordUser *user)
|
||||
}
|
||||
else
|
||||
{
|
||||
CONS_Printf("Discord: connected to %s#%s (%s)\n", user->username, user->discriminator, user->userId);
|
||||
CONS_Printf("Discord: connected to %s (%s)\n", user->username, user->userId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,8 +262,10 @@ static void DRPC_HandleJoinRequest(const DiscordUser *requestUser)
|
||||
newRequest->username = Z_Calloc(344, PU_STATIC, NULL);
|
||||
snprintf(newRequest->username, 344, "%s", requestUser->username);
|
||||
|
||||
#if 0
|
||||
newRequest->discriminator = Z_Calloc(8, PU_STATIC, NULL);
|
||||
snprintf(newRequest->discriminator, 8, "%s", requestUser->discriminator);
|
||||
#endif
|
||||
|
||||
newRequest->userID = Z_Calloc(32, PU_STATIC, NULL);
|
||||
snprintf(newRequest->userID, 32, "%s", requestUser->userId);
|
||||
@@ -254,7 +277,7 @@ static void DRPC_HandleJoinRequest(const DiscordUser *requestUser)
|
||||
while (append != NULL)
|
||||
{
|
||||
// CHECK FOR DUPES!! Ignore any that already exist from the same user.
|
||||
if (!strcmp(newRequest->userID, append->userID))
|
||||
if (fastcmp(newRequest->userID, append->userID))
|
||||
{
|
||||
Discord_Respond(newRequest->userID, DISCORD_REPLY_IGNORE);
|
||||
DRPC_RemoveRequest(newRequest);
|
||||
@@ -308,6 +331,9 @@ void DRPC_RemoveRequest(discordRequest_t *removeRequest)
|
||||
}
|
||||
|
||||
Z_Free(removeRequest->username);
|
||||
#if 0
|
||||
Z_Free(removeRequest->discriminator);
|
||||
#endif
|
||||
Z_Free(removeRequest->userID);
|
||||
Z_Free(removeRequest);
|
||||
}
|
||||
@@ -393,7 +419,7 @@ static const char *DRPC_GetServerIP(void)
|
||||
// If you're connected
|
||||
if (I_GetNodeAddress && (address = I_GetNodeAddress(servernode)) != NULL)
|
||||
{
|
||||
if (strcmp(address, "self"))
|
||||
if (!fastcmp(address, "self"))
|
||||
{
|
||||
// We're not the server, so we could successfully get the IP!
|
||||
// No need to do anything else :)
|
||||
@@ -658,7 +684,7 @@ void DRPC_UpdatePresence(void)
|
||||
// Character image
|
||||
while (supportedSkins[checkSkin] != NULL)
|
||||
{
|
||||
if (!strcmp(skins[players[consoleplayer].skin].name, supportedSkins[checkSkin]))
|
||||
if (fastcmp(skins[players[consoleplayer].skin].name, supportedSkins[checkSkin]))
|
||||
{
|
||||
snprintf(charimg, 21, "char%s", supportedSkins[checkSkin]);
|
||||
discordPresence.smallImageKey = charimg;
|
||||
|
||||
@@ -29,7 +29,9 @@ extern struct discordInfo_s {
|
||||
|
||||
typedef struct discordRequest_s {
|
||||
char *username; // Discord user name.
|
||||
#if 0 // Good night, sweet prince...
|
||||
char *discriminator; // Discord discriminator (The little hashtag thing after the username). Separated for a "hide discriminators" cvar.
|
||||
#endif
|
||||
char *userID; // The ID of the Discord user, gets used with Discord_Respond()
|
||||
|
||||
// HAHAHA, no.
|
||||
@@ -44,6 +46,15 @@ typedef struct discordRequest_s {
|
||||
|
||||
extern discordRequest_t *discordRequestList;
|
||||
|
||||
/*--------------------------------------------------
|
||||
* const char *DRPC_HideUsername(const char *input);
|
||||
*
|
||||
* Handle usernames while cv_discordstreamer is activated.
|
||||
* (The loss of discriminators is still a dumbass regression
|
||||
* that I will never forgive the Discord developers for.)
|
||||
* --------------------------------------------------*/
|
||||
|
||||
const char *DRPC_HideUsername(const char *input);
|
||||
|
||||
/*--------------------------------------------------
|
||||
void DRPC_RemoveRequest(void);
|
||||
|
||||
@@ -57,10 +57,6 @@ enum
|
||||
|
||||
// Do not use bit five or after, as they are used for object z-offsets.
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
// A single Vertex.
|
||||
typedef struct
|
||||
{
|
||||
@@ -188,10 +184,6 @@ typedef struct
|
||||
UINT16 children[2];
|
||||
} ATTRPACK mapnode_t;
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
// Thing definition, position, orientation and type,
|
||||
// plus visibility flags and attributes.
|
||||
typedef struct
|
||||
|
||||
+24
-22
@@ -47,17 +47,6 @@
|
||||
#define ASMCALL
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4127 4152 4213 4514)
|
||||
#ifdef _WIN64
|
||||
#pragma warning(disable : 4306)
|
||||
#endif
|
||||
#endif
|
||||
// warning level 4
|
||||
// warning C4127: conditional expression is constant
|
||||
// warning C4152: nonstandard extension, function/data pointer conversion in expression
|
||||
// warning C4213: nonstandard extension used : cast on l-value
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -80,6 +69,8 @@ extern "C" {
|
||||
#include <sys/stat.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "fastcmp.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
@@ -101,6 +92,14 @@ extern FILE *logstream;
|
||||
extern char logfilename[1024];
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_LIBBACKTRACE)
|
||||
#define CRASH_LOGFILE_NAME "srb2kart-crash-log.txt"
|
||||
#elif defined (HAVE_DRMINGW)
|
||||
#define CRASH_LOGFILE_NAME "srb2kart-crash-log.RPT"
|
||||
#else
|
||||
#define CRASH_LOGFILE_NAME "(unknown crash log)"
|
||||
#endif
|
||||
|
||||
/* A mod name to further distinguish versions. */
|
||||
#define SRB2APPLICATION "SRB2Kart"
|
||||
|
||||
@@ -117,9 +116,11 @@ extern char logfilename[1024];
|
||||
#define SUBVERSION 6 // more precise version number
|
||||
#define VERSIONSTRING "Saturn v9"
|
||||
#define VERSIONSTRINGW L"Saturn v9"
|
||||
|
||||
#define SATURN_TESTING // comment out for saturn release builds!
|
||||
|
||||
// Hey! If you change this, add 1 to the MODVERSION below! Otherwise we can't force updates!
|
||||
// And change CMakeLists.txt (not src/, but in root), for CMake users!
|
||||
// AND appveyor.yml, for the build bots!
|
||||
#endif
|
||||
|
||||
// Maintain compatibility with 1.0.x record attack replays?
|
||||
@@ -416,7 +417,7 @@ enum {
|
||||
|
||||
|
||||
*/
|
||||
void I_Error(const char *error, ...) FUNCIERROR;
|
||||
FUNCIERROR void ATTRNORETURN I_Error(const char *error, ...);
|
||||
|
||||
/** \brief write a message to stderr (use before I_Quit) for when you need to quit with a msg, but need
|
||||
the return code 0 of I_Quit();
|
||||
@@ -560,13 +561,19 @@ UINT32 quickncasehash (const char *p, size_t n)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__GNUC__) || defined(__clang__) || defined(_MSC_VER)
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#define restrict __restrict
|
||||
#else
|
||||
#define restrict
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// the GNU cleanup attribute: plugging memory leaks since 2003!
|
||||
// on scope exit, the cleanup function is called with a pointer to the declared variable,
|
||||
// essentially behaving like a C++ destructor
|
||||
// NOTE: you WILL have nasal troubles if the variable is not initialized
|
||||
#define CLEANUP(f) __attribute__((__cleanup__(f)))
|
||||
|
||||
// An assert-type mechanism.
|
||||
#ifdef PARANOIA
|
||||
#define I_Assert(e) ((e) ? (void)0 : I_Error("assert failed: %s, file %s, line %d", #e, __FILE__, __LINE__))
|
||||
@@ -589,7 +596,6 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
|
||||
// None of these that are disabled in the normal build are guaranteed to work perfectly
|
||||
// Compile them at your own risk!
|
||||
|
||||
#ifndef NONET
|
||||
//-- SATURN __
|
||||
/// Detect if a client is on Saturn in the clientconfig.
|
||||
/// To seperately allow them to join or block joining from vanilla clients.
|
||||
@@ -604,7 +610,6 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
|
||||
#define SATURNPAK
|
||||
#endif
|
||||
//-- <( ̄︶ ̄)> __
|
||||
#endif
|
||||
|
||||
/// Undefine to use the new method of Gamma correction see colour cube in v_video.c
|
||||
#define BACKWARDSCOMPATCORRECTION
|
||||
@@ -626,11 +631,6 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
|
||||
/// Most modifications should probably enable this.
|
||||
//#define SAVEGAME_OTHERVERSIONS
|
||||
|
||||
#ifndef NONET
|
||||
/// Display a connection screen on join attempts.
|
||||
#define CLIENT_LOADINGSCREEN
|
||||
#endif
|
||||
|
||||
/// Backwards compatibility with musicslots.
|
||||
/// \note You should leave this enabled unless you're working with a future SRB2 version.
|
||||
#define MUSICSLOT_COMPATIBILITY
|
||||
@@ -651,9 +651,11 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
|
||||
#define ROTANGLES 72 // Needs to be a divisor of 360 (45, 60, 90, 120...)
|
||||
#define ROTANGDIFF (360 / ROTANGLES)
|
||||
|
||||
#if defined (HAVE_CURL) && ! defined (NONET)
|
||||
#if defined (HAVE_CURL)
|
||||
#define MASTERSERVER
|
||||
#ifndef NOHOLEPUNCH
|
||||
#define HOLEPUNCH
|
||||
#endif
|
||||
#else
|
||||
#undef UPDATE_ALERT
|
||||
#endif
|
||||
|
||||
@@ -116,7 +116,10 @@ extern UINT8 window_notinfocus; // are we in focus? (backend independant -- hand
|
||||
extern boolean nodrawers;
|
||||
extern boolean noblit;
|
||||
extern boolean lastdraw;
|
||||
|
||||
#ifdef MOTIONBLUR
|
||||
extern INT32 postimgparam[MAXSPLITSCREENPLAYERS];
|
||||
#endif
|
||||
|
||||
extern INT32 viewwindowx, viewwindowy;
|
||||
extern INT32 viewwidth;
|
||||
|
||||
+2
-45
@@ -28,31 +28,6 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* 7.18.1.1 Exact-width integer types */
|
||||
#ifdef _MSC_VER
|
||||
#define UINT8 unsigned __int8
|
||||
#define SINT8 signed __int8
|
||||
|
||||
#define UINT16 unsigned __int16
|
||||
#define INT16 __int16
|
||||
|
||||
#define INT32 __int32
|
||||
#define UINT32 unsigned __int32
|
||||
|
||||
#define INT64 __int64
|
||||
#define UINT64 unsigned __int64
|
||||
|
||||
typedef long ssize_t;
|
||||
|
||||
/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
|
||||
#if (_MSC_VER <= 1200)
|
||||
#ifndef DWORD_PTR
|
||||
#define DWORD_PTR DWORD
|
||||
#endif
|
||||
#ifndef PDWORD_PTR
|
||||
#define PDWORD_PTR PDWORD
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#define __STDC_LIMIT_MACROS
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -66,26 +41,15 @@ typedef long ssize_t;
|
||||
#define UINT32 uint32_t
|
||||
#define INT64 int64_t
|
||||
#define UINT64 uint64_t
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE_CC__
|
||||
#define DIRECTFULLSCREEN 1
|
||||
#define DEBUG_LOG
|
||||
#define NOIPX
|
||||
#endif
|
||||
|
||||
/* Strings and some misc platform specific stuff */
|
||||
|
||||
#if defined (_MSC_VER) || defined (__OS2__)
|
||||
// Microsoft VisualC++
|
||||
#ifdef _MSC_VER
|
||||
#if (_MSC_VER <= 1800) // MSVC 2013 and back
|
||||
#define snprintf _snprintf
|
||||
#if (_MSC_VER <= 1200) // MSVC 6.0 and back
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if defined (__OS2__)
|
||||
#define strncasecmp strnicmp
|
||||
#define strcasecmp stricmp
|
||||
#define inline __inline
|
||||
@@ -270,13 +234,6 @@ typedef int32_t boolean;
|
||||
#endif
|
||||
|
||||
#define ATTRUNUSED __attribute__((unused))
|
||||
|
||||
#elif defined (_MSC_VER)
|
||||
#define ATTRNORETURN __declspec(noreturn)
|
||||
#define ATTRINLINE __forceinline
|
||||
#if _MSC_VER > 1200 // >= MSVC 6.0
|
||||
#define ATTRNOINLINE __declspec(noinline)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef FUNCPRINTF
|
||||
@@ -368,7 +325,7 @@ typedef UINT8 bitarray_t;
|
||||
static inline int
|
||||
in_bit_array (const bitarray_t * const array, const int value)
|
||||
{
|
||||
return (array[value >> 3] & (1<<(value & 7)));
|
||||
return(array[value >> 3] & (1<<(value & 7)));
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
||||
+7
-12
@@ -169,7 +169,7 @@ static void F_SkyScroll(INT32 scrollspeed)
|
||||
pat = W_CachePatchName("TITLEBG1", PU_PATCH_LOWPRIORITY);
|
||||
pat2 = W_CachePatchName("TITLEBG2", PU_PATCH_LOWPRIORITY);
|
||||
|
||||
w = (vid.width / vid.dupx)<<FRACBITS;
|
||||
w = (vid.scaledwidth << FRACBITS);
|
||||
|
||||
// The scroll offset MUST be clamped before shifting by FRACBITS, or else it'll overflow in about 3 minutes
|
||||
animtimer = ((((finalecount * scrollspeed) % (pat->width*16))<<FRACBITS) + (R_GetTimeFrac(RTF_MENU) * scrollspeed))/16;
|
||||
@@ -677,7 +677,7 @@ void F_CreditDrawer(void)
|
||||
y += 12<<FRACBITS;
|
||||
break;
|
||||
}
|
||||
if (((y>>FRACBITS) * vid.dupy) > vid.height)
|
||||
if (((y>>FRACBITS) * vid.dup) > vid.height)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -685,8 +685,8 @@ void F_CreditDrawer(void)
|
||||
if (finalecount)
|
||||
{
|
||||
const char *goodbyefornow = "See you in ""\x82""Dr. Robotnik's Ring Racers""\x80""!";
|
||||
fixed_t lpad = ((vid.width/vid.dupx) - BASEVIDWIDTH)<<FRACBITS;
|
||||
fixed_t w = V_StringWidth(goodbyefornow, V_ALLOWLOWERCASE)<<FRACBITS;
|
||||
fixed_t lpad = (vid.scaledwidth - BASEVIDWIDTH) << FRACBITS;
|
||||
fixed_t w = V_StringWidth(goodbyefornow, V_ALLOWLOWERCASE) << FRACBITS;
|
||||
fixed_t x = FixedMul(((BASEVIDWIDTH<<FRACBITS)+w+lpad), ((finalecount-1)<<FRACBITS)/(5*TICRATE)) - w - (lpad/2);
|
||||
V_DrawString(x>>FRACBITS, y>>FRACBITS, V_ALLOWLOWERCASE, goodbyefornow); // for some reason DrawStringAtFixed can't tolerate colour codes
|
||||
}
|
||||
@@ -707,7 +707,8 @@ void F_CreditTicker(void)
|
||||
case 1: y += 30<<FRACBITS; break;
|
||||
default: y += 12<<FRACBITS; break;
|
||||
}
|
||||
if (FixedMul(y,vid.dupy) > vid.height)
|
||||
|
||||
if (FixedMul(y, vid.dup) > vid.height)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -962,6 +963,7 @@ void F_StartTitleScreen(void)
|
||||
finalecount = 0;
|
||||
else
|
||||
wipegamestate = GS_TITLESCREEN;
|
||||
|
||||
G_SetGamestate(GS_TITLESCREEN);
|
||||
CON_ClearHUD();
|
||||
|
||||
@@ -1149,13 +1151,6 @@ void F_TitleScreenTicker(boolean run)
|
||||
// Setup demo name
|
||||
snprintf(dname, 9, "%sS%02u", mapname, numstaff);
|
||||
|
||||
/*if ((l = W_CheckNumForName(dname)) == LUMPERROR) -- we KNOW it exists now
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("Demo lump \"%s\" doesn't exist\n"), dname);
|
||||
F_StartIntro();
|
||||
return;
|
||||
}*/
|
||||
|
||||
loadreplay:
|
||||
demo.title = demo.fromtitle = true;
|
||||
demo.ignorefiles = true;
|
||||
|
||||
+2
-2
@@ -314,7 +314,7 @@ void F_WipeStartScreen(void)
|
||||
}
|
||||
#endif
|
||||
wipe_scr_start = vid.screens[3];
|
||||
I_ReadScreen(wipe_scr_start);
|
||||
I_ReadScreen(wipe_scr_start, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -331,7 +331,7 @@ void F_WipeEndScreen(void)
|
||||
}
|
||||
#endif
|
||||
wipe_scr_end = vid.screens[4];
|
||||
I_ReadScreen(wipe_scr_end);
|
||||
I_ReadScreen(wipe_scr_end, 1);
|
||||
V_DrawBlock(0, 0, 0, vid.width, vid.height, wipe_scr_start);
|
||||
#endif
|
||||
}
|
||||
|
||||
+31
-324
@@ -30,286 +30,7 @@
|
||||
#include "z_zone.h"
|
||||
#include "m_menu.h" // Addons_option_Onchange
|
||||
|
||||
#if defined (_WIN32) && defined (_MSC_VER)
|
||||
|
||||
#include <errno.h>
|
||||
#include <io.h>
|
||||
#include <tchar.h>
|
||||
|
||||
#define SUFFIX "*"
|
||||
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
|
||||
#ifndef INVALID_FILE_ATTRIBUTES
|
||||
#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
|
||||
#endif
|
||||
|
||||
struct dirent
|
||||
{
|
||||
long d_ino; /* Always zero. */
|
||||
unsigned short d_reclen; /* Always zero. */
|
||||
unsigned short d_namlen; /* Length of name in d_name. */
|
||||
char d_name[FILENAME_MAX]; /* File name. */
|
||||
};
|
||||
|
||||
/*
|
||||
* This is an internal data structure. Good programmers will not use it
|
||||
* except as an argument to one of the functions below.
|
||||
* dd_stat field is now int (was short in older versions).
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* disk transfer area for this dir */
|
||||
struct _finddata_t dd_dta;
|
||||
|
||||
/* dirent struct to return from dir (NOTE: this makes this thread
|
||||
* safe as long as only one thread uses a particular DIR struct at
|
||||
* a time) */
|
||||
struct dirent dd_dir;
|
||||
|
||||
/* _findnext handle */
|
||||
#if _MSC_VER > 1200
|
||||
intptr_t dd_handle;
|
||||
#else
|
||||
long dd_handle;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Status of search:
|
||||
* 0 = not started yet (next entry to read is first entry)
|
||||
* -1 = off the end
|
||||
* positive = 0 based index of next entry
|
||||
*/
|
||||
int dd_stat;
|
||||
|
||||
/* given path for dir with search pattern (struct is extended) */
|
||||
CHAR dd_name[1];
|
||||
} DIR;
|
||||
|
||||
/*
|
||||
* opendir
|
||||
*
|
||||
* Returns a pointer to a DIR structure appropriately filled in to begin
|
||||
* searching a directory.
|
||||
*/
|
||||
|
||||
DIR *
|
||||
opendir (const CHAR *szPath)
|
||||
{
|
||||
DIR *nd;
|
||||
DWORD rc;
|
||||
CHAR szFullPath[MAX_PATH];
|
||||
|
||||
errno = 0;
|
||||
|
||||
if (!szPath)
|
||||
{
|
||||
errno = EFAULT;
|
||||
return (DIR *) 0;
|
||||
}
|
||||
|
||||
if (szPath[0] == '\0')
|
||||
{
|
||||
errno = ENOTDIR;
|
||||
return (DIR *) 0;
|
||||
}
|
||||
|
||||
/* Attempt to determine if the given path really is a directory. */
|
||||
rc = GetFileAttributesA(szPath);
|
||||
if (rc == INVALID_FILE_ATTRIBUTES)
|
||||
{
|
||||
/* call GetLastError for more error info */
|
||||
errno = ENOENT;
|
||||
return (DIR *) 0;
|
||||
}
|
||||
if (!(rc & FILE_ATTRIBUTE_DIRECTORY))
|
||||
{
|
||||
/* Error, entry exists but not a directory. */
|
||||
errno = ENOTDIR;
|
||||
return (DIR *) 0;
|
||||
}
|
||||
|
||||
/* Make an absolute pathname. */
|
||||
_fullpath (szFullPath, szPath, MAX_PATH);
|
||||
|
||||
/* Allocate enough space to store DIR structure and the complete
|
||||
* directory path given. */
|
||||
nd = (DIR *) malloc (sizeof (DIR) + (strlen(szFullPath) + strlen (SLASH) +
|
||||
strlen(PATHSEP) + 1) * sizeof (CHAR));
|
||||
|
||||
if (!nd)
|
||||
{
|
||||
/* Error, out of memory. */
|
||||
errno = ENOMEM;
|
||||
return (DIR *) 0;
|
||||
}
|
||||
|
||||
/* Create the search expression. */
|
||||
strcpy (nd->dd_name, szFullPath);
|
||||
|
||||
/* Add on a slash if the path does not end with one. */
|
||||
if (nd->dd_name[0] != '\0' &&
|
||||
nd->dd_name[strlen (nd->dd_name) - 1] != PATHSEP[0])
|
||||
{
|
||||
strcat (nd->dd_name, PATHSEP);
|
||||
}
|
||||
|
||||
/* Add on the search pattern */
|
||||
strcat (nd->dd_name, SUFFIX);
|
||||
|
||||
/* Initialize handle to -1 so that a premature closedir doesn't try
|
||||
* to call _findclose on it. */
|
||||
nd->dd_handle = -1;
|
||||
|
||||
/* Initialize the status. */
|
||||
nd->dd_stat = 0;
|
||||
|
||||
/* Initialize the dirent structure. ino and reclen are invalid under
|
||||
* Win32, and name simply points at the appropriate part of the
|
||||
* findfirst_t structure. */
|
||||
nd->dd_dir.d_ino = 0;
|
||||
nd->dd_dir.d_reclen = 0;
|
||||
nd->dd_dir.d_namlen = 0;
|
||||
ZeroMemory(nd->dd_dir.d_name, FILENAME_MAX);
|
||||
|
||||
return nd;
|
||||
}
|
||||
|
||||
/*
|
||||
* readdir
|
||||
*
|
||||
* Return a pointer to a dirent structure filled with the information on the
|
||||
* next entry in the directory.
|
||||
*/
|
||||
struct dirent *
|
||||
readdir (DIR * dirp)
|
||||
{
|
||||
errno = 0;
|
||||
|
||||
/* Check for valid DIR struct. */
|
||||
if (!dirp)
|
||||
{
|
||||
errno = EFAULT;
|
||||
return (struct dirent *) 0;
|
||||
}
|
||||
|
||||
if (dirp->dd_stat < 0)
|
||||
{
|
||||
/* We have already returned all files in the directory
|
||||
* (or the structure has an invalid dd_stat). */
|
||||
return (struct dirent *) 0;
|
||||
}
|
||||
else if (dirp->dd_stat == 0)
|
||||
{
|
||||
/* We haven't started the search yet. */
|
||||
/* Start the search */
|
||||
dirp->dd_handle = _findfirst (dirp->dd_name, &(dirp->dd_dta));
|
||||
|
||||
if (dirp->dd_handle == -1)
|
||||
{
|
||||
/* Whoops! Seems there are no files in that
|
||||
* directory. */
|
||||
dirp->dd_stat = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
dirp->dd_stat = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Get the next search entry. */
|
||||
if (_findnext (dirp->dd_handle, &(dirp->dd_dta)))
|
||||
{
|
||||
/* We are off the end or otherwise error.
|
||||
_findnext sets errno to ENOENT if no more file
|
||||
Undo this. */
|
||||
DWORD winerr = GetLastError();
|
||||
if (winerr == ERROR_NO_MORE_FILES)
|
||||
errno = 0;
|
||||
_findclose (dirp->dd_handle);
|
||||
dirp->dd_handle = -1;
|
||||
dirp->dd_stat = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Update the status to indicate the correct
|
||||
* number. */
|
||||
dirp->dd_stat++;
|
||||
}
|
||||
}
|
||||
|
||||
if (dirp->dd_stat > 0)
|
||||
{
|
||||
/* Successfully got an entry. Everything about the file is
|
||||
* already appropriately filled in except the length of the
|
||||
* file name. */
|
||||
dirp->dd_dir.d_namlen = (unsigned short)strlen (dirp->dd_dta.name);
|
||||
strcpy (dirp->dd_dir.d_name, dirp->dd_dta.name);
|
||||
return &dirp->dd_dir;
|
||||
}
|
||||
|
||||
return (struct dirent *) 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* rewinddir
|
||||
*
|
||||
* Makes the next readdir start from the beginning.
|
||||
*/
|
||||
int
|
||||
rewinddir (DIR * dirp)
|
||||
{
|
||||
errno = 0;
|
||||
|
||||
/* Check for valid DIR struct. */
|
||||
if (!dirp)
|
||||
{
|
||||
errno = EFAULT;
|
||||
return -1;
|
||||
}
|
||||
|
||||
dirp->dd_stat = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* closedir
|
||||
*
|
||||
* Frees up resources allocated by opendir.
|
||||
*/
|
||||
int
|
||||
closedir (DIR * dirp)
|
||||
{
|
||||
int rc;
|
||||
|
||||
errno = 0;
|
||||
rc = 0;
|
||||
|
||||
if (!dirp)
|
||||
{
|
||||
errno = EFAULT;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (dirp->dd_handle != -1)
|
||||
{
|
||||
rc = _findclose (dirp->dd_handle);
|
||||
}
|
||||
|
||||
/* Delete the dir structure. */
|
||||
free (dirp);
|
||||
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
||||
static CV_PossibleValue_t addons_cons_t[] = {{0, "Default"},
|
||||
#if 1
|
||||
{1, "HOME"}, {2, "SRB2"},
|
||||
#endif
|
||||
{3, "CUSTOM"}, {0, NULL}};
|
||||
|
||||
static CV_PossibleValue_t addons_cons_t[] = {{0, "Default"}, {1, "HOME"}, {2, "SRB2"}, {3, "CUSTOM"}, {0, NULL}};
|
||||
consvar_t cv_addons_option = {"addons_option", "Default", CV_SAVE|CV_CALL, addons_cons_t, Addons_option_Onchange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_addons_folder = {"addons_folder", "", CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
@@ -323,7 +44,7 @@ consvar_t cv_addons_search_case = {"addons_search_case", "No", CV_SAVE, CV_YesNo
|
||||
static CV_PossibleValue_t addons_search_type_cons_t[] = {{0, "Start"}, {1, "Anywhere"}, {0, NULL}};
|
||||
consvar_t cv_addons_search_type = {"addons_search_type", "Anywhere", CV_SAVE, addons_search_type_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
char menupath[1024];
|
||||
char menupath[MAXFILEPATH];
|
||||
size_t menupathindex[menudepth];
|
||||
size_t menudepthleft = menudepth;
|
||||
|
||||
@@ -390,7 +111,7 @@ filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *want
|
||||
int found = 0;
|
||||
char *searchname;
|
||||
int depthleft = maxsearchdepth;
|
||||
char searchpath[1024];
|
||||
char searchpath[MAXFILEPATH];
|
||||
size_t *searchpathindex;
|
||||
|
||||
dirhandle = (DIR**)malloc(maxsearchdepth * sizeof(DIR*));
|
||||
@@ -477,20 +198,21 @@ filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *want
|
||||
|
||||
for (; *path != NULL; path++)
|
||||
{
|
||||
if (strcasecmp(*path, dent->d_name) == 0)
|
||||
if (fasticmp(*path, dent->d_name))
|
||||
{
|
||||
skipfolder = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// This folder is excluded
|
||||
if (skipfolder)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (strcasecmp(".git", dent->d_name) // sanity if you're weird like me
|
||||
if (!fasticmp(".git", dent->d_name) // sanity if you're weird like me
|
||||
&& (dirhandle[depthleft-1] = opendir(searchpath)) != NULL)
|
||||
{
|
||||
// Got read permissions!
|
||||
@@ -505,7 +227,7 @@ filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *want
|
||||
|
||||
// I am a file!
|
||||
|
||||
if (strcasecmp(searchname, dent->d_name))
|
||||
if (!fasticmp(searchname, dent->d_name))
|
||||
continue; // Not what we're looking for!
|
||||
|
||||
switch (checkfilemd5(searchpath, wantedmd5sum))
|
||||
@@ -631,7 +353,7 @@ void searchfilemenu(char *tempname)
|
||||
{
|
||||
for (i = first; i < sizedirmenu; i++)
|
||||
{
|
||||
if (!strcmp(dirmenu[i]+DIR_STRING, tempname))
|
||||
if (fastcmp(dirmenu[i]+DIR_STRING, tempname))
|
||||
{
|
||||
dir_on[menudepthleft] = i;
|
||||
break;
|
||||
@@ -678,7 +400,7 @@ void searchfilemenu(char *tempname)
|
||||
{
|
||||
if (filemenucmp(coredirmenu[i]+DIR_STRING, localmenusearch))
|
||||
{
|
||||
if (tempname && !strcmp(coredirmenu[i]+DIR_STRING, tempname))
|
||||
if (tempname && fastcmp(coredirmenu[i]+DIR_STRING, tempname))
|
||||
{
|
||||
dir_on[menudepthleft] = sizedirmenu;
|
||||
Z_Free(tempname);
|
||||
@@ -699,9 +421,6 @@ boolean preparefilemenu(boolean samedepth, boolean replayhut)
|
||||
{
|
||||
DIR *dirhandle;
|
||||
struct dirent *dent;
|
||||
#ifndef _WIN32
|
||||
struct stat fsstat;
|
||||
#endif
|
||||
size_t pos = 0, folderpos = 0, numfolders = 0;
|
||||
char *tempname = NULL;
|
||||
|
||||
@@ -723,10 +442,13 @@ boolean preparefilemenu(boolean samedepth, boolean replayhut)
|
||||
Z_Free(dirmenu);
|
||||
dirmenu = NULL;
|
||||
|
||||
for (; sizecoredirmenu > 0; sizecoredirmenu--) // clear out existing items
|
||||
if (coredirmenu != NULL)
|
||||
{
|
||||
Z_Free(coredirmenu[sizecoredirmenu-1]);
|
||||
coredirmenu[sizecoredirmenu-1] = NULL;
|
||||
for (; sizecoredirmenu > 0; sizecoredirmenu--) // clear out existing items
|
||||
{
|
||||
Z_Free(coredirmenu[sizecoredirmenu-1]);
|
||||
coredirmenu[sizecoredirmenu-1] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
while (true)
|
||||
@@ -744,33 +466,26 @@ boolean preparefilemenu(boolean samedepth, boolean replayhut)
|
||||
|
||||
strcpy(&menupath[menupathindex[menudepthleft]],dent->d_name);
|
||||
|
||||
#ifndef _WIN32
|
||||
if (stat(menupath, &fsstat) < 0)
|
||||
#else
|
||||
// if we wanna follow symlinks we can check with FILE_ATTRIBUTE_REPARSE_POINT
|
||||
DWORD fileattr = GetFileAttributes(menupath);
|
||||
if (fileattr == INVALID_FILE_ATTRIBUTES)
|
||||
#endif
|
||||
INT32 isdir = pathisdirectory(menupath);
|
||||
|
||||
if (isdir == -1)
|
||||
; // was the file (re)moved? can't stat it
|
||||
else // is a file or directory
|
||||
{
|
||||
#ifndef _WIN32
|
||||
if (!S_ISDIR(fsstat.st_mode)) // file
|
||||
#else
|
||||
if (!(fileattr & FILE_ATTRIBUTE_DIRECTORY))
|
||||
#endif
|
||||
if (isdir == 0) // file
|
||||
{
|
||||
size_t len = strlen(dent->d_name)+1;
|
||||
|
||||
if (replayhut)
|
||||
{
|
||||
if (strcasecmp(".lmp", dent->d_name+len-5))
|
||||
if (!fasticmp(".lmp", dent->d_name+len-5))
|
||||
continue; // Not a replay
|
||||
}
|
||||
else if (!cv_addons_showall.value)
|
||||
{
|
||||
UINT8 ext;
|
||||
for (ext = 0; ext < NUM_EXT_TABLE; ext++)
|
||||
if (!strcasecmp(exttable[ext]+1, dent->d_name+len-(exttable[ext][0])))
|
||||
if (fasticmp(exttable[ext]+1, dent->d_name+len-(exttable[ext][0])))
|
||||
break; // extension comparison
|
||||
|
||||
if (ext == NUM_EXT_TABLE)
|
||||
@@ -826,13 +541,9 @@ boolean preparefilemenu(boolean samedepth, boolean replayhut)
|
||||
|
||||
strcpy(&menupath[menupathindex[menudepthleft]],dent->d_name);
|
||||
|
||||
#ifndef _WIN32
|
||||
if (stat(menupath, &fsstat) < 0)
|
||||
#else
|
||||
// if we wanna follow symlinks we can check with FILE_ATTRIBUTE_REPARSE_POINT
|
||||
DWORD fileattr = GetFileAttributes(menupath);
|
||||
if (fileattr == INVALID_FILE_ATTRIBUTES)
|
||||
#endif
|
||||
INT32 isdir = pathisdirectory(menupath);
|
||||
|
||||
if (isdir == -1)
|
||||
; // was the file (re)moved? can't stat it
|
||||
else // is a file or directory
|
||||
{
|
||||
@@ -841,18 +552,14 @@ boolean preparefilemenu(boolean samedepth, boolean replayhut)
|
||||
UINT8 ext = EXT_FOLDER;
|
||||
UINT8 folder;
|
||||
|
||||
#ifndef _WIN32
|
||||
if (!S_ISDIR(fsstat.st_mode)) // file
|
||||
#else
|
||||
if (!(fileattr & FILE_ATTRIBUTE_DIRECTORY))
|
||||
#endif
|
||||
if (isdir == 0) // file
|
||||
{
|
||||
if (!((numfolders+pos) < sizecoredirmenu))
|
||||
continue; // crash prevention
|
||||
|
||||
if (replayhut)
|
||||
{
|
||||
if (strcasecmp(".lmp", dent->d_name+len-5))
|
||||
if (!fasticmp(".lmp", dent->d_name+len-5))
|
||||
continue; // Not a replay
|
||||
|
||||
ext = EXT_TXT; // This isn't used anywhere but better safe than sorry for messing with this...
|
||||
@@ -860,7 +567,7 @@ boolean preparefilemenu(boolean samedepth, boolean replayhut)
|
||||
else
|
||||
{
|
||||
for (; ext < NUM_EXT_TABLE; ext++)
|
||||
if (!strcasecmp(exttable[ext]+1, dent->d_name+len-(exttable[ext][0])))
|
||||
if (fasticmp(exttable[ext]+1, dent->d_name+len-(exttable[ext][0])))
|
||||
break; // extension comparison
|
||||
|
||||
if (ext == NUM_EXT_TABLE && !cv_addons_showall.value)
|
||||
@@ -880,7 +587,7 @@ boolean preparefilemenu(boolean samedepth, boolean replayhut)
|
||||
nameonly(filenamebuf[i]);
|
||||
}
|
||||
|
||||
if (strcmp(dent->d_name, filenamebuf[i]))
|
||||
if (!fastcmp(dent->d_name, filenamebuf[i]))
|
||||
continue;
|
||||
|
||||
if (cv_addons_md5.value && !checkfilemd5(menupath, wadfiles[i]->md5sum))
|
||||
@@ -891,11 +598,11 @@ boolean preparefilemenu(boolean samedepth, boolean replayhut)
|
||||
}
|
||||
else if (ext == EXT_TXT)
|
||||
{
|
||||
if (!strncmp(dent->d_name, "log-", 4) || !strcmp(dent->d_name, "errorlog.txt"))
|
||||
if (!strncmp(dent->d_name, "log-", 4) || fastcmp(dent->d_name, "errorlog.txt"))
|
||||
ext |= EXT_LOADED;
|
||||
}
|
||||
|
||||
if (!strcmp(dent->d_name, configfile))
|
||||
if (fastcmp(dent->d_name, configfile))
|
||||
ext |= EXT_LOADED;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -34,7 +34,8 @@ filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *want
|
||||
|
||||
#define menudepth 20
|
||||
|
||||
extern char menupath[1024];
|
||||
#define MAXFILEPATH 1024
|
||||
extern char menupath[MAXFILEPATH];
|
||||
extern size_t menupathindex[menudepth];
|
||||
extern size_t menudepthleft;
|
||||
|
||||
|
||||
+412
-332
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -67,7 +67,7 @@ typedef enum {
|
||||
} menudemotype_e;
|
||||
|
||||
typedef struct menudemo_s {
|
||||
char filepath[256];
|
||||
char filepath[1023 + 256]; // see M_PrepReplayList and sizeof menupath
|
||||
menudemotype_e type;
|
||||
|
||||
char title[65]; // Null-terminated for string prints
|
||||
|
||||
+42
-27
@@ -452,6 +452,13 @@ consvar_t cv_ydeadzone[MAXSPLITSCREENPLAYERS] = {
|
||||
{"joy4_ydeadzone", "0.5", CV_FLOAT|CV_SAVE, deadzone_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}
|
||||
};
|
||||
|
||||
consvar_t cv_litesteer[MAXSPLITSCREENPLAYERS] = {
|
||||
{"litesteer", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"litesteer2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"litesteer3", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"litesteer4", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}
|
||||
};
|
||||
|
||||
static CV_PossibleValue_t driftsparkpulse_t[] = {{0, "MIN"}, {FRACUNIT*3, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_driftsparkpulse = {"driftsparkpulse", "1.4", CV_FLOAT | CV_SAVE, driftsparkpulse_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
@@ -1014,8 +1021,8 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||
else
|
||||
th = 0;
|
||||
|
||||
if (th < SLOWTURNTICS)
|
||||
tspeed = cv_turnsmooth.value == 2 ? 2 : 0; // slow turn
|
||||
if (th < (cv_turnsmooth[forplayer].value * 3))
|
||||
tspeed = cv_turnsmooth[forplayer].value == 2 ? 2 : 0; // slow turn
|
||||
else
|
||||
tspeed = 1;
|
||||
|
||||
@@ -1024,30 +1031,32 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||
// let movement keys cancel each other out
|
||||
if (turnright && !(turnleft))
|
||||
{
|
||||
cmd->angleturn = (INT16)(cmd->angleturn - (angleturn[tspeed]));
|
||||
cmd->driftturn = (INT16)(cmd->driftturn - (angleturn[tspeed]));
|
||||
cmd->angleturn -= angleturn[tspeed];
|
||||
side += sidemove[1];
|
||||
}
|
||||
else if (turnleft && !(turnright))
|
||||
{
|
||||
cmd->angleturn = (INT16)(cmd->angleturn + (angleturn[tspeed]));
|
||||
cmd->driftturn = (INT16)(cmd->driftturn + (angleturn[tspeed]));
|
||||
cmd->angleturn += angleturn[tspeed];
|
||||
side -= sidemove[1];
|
||||
}
|
||||
|
||||
if (analogjoystickmove && axis != 0)
|
||||
{
|
||||
// JOYAXISRANGE should be 1023 (divide by 1024)
|
||||
cmd->angleturn = (INT16)(cmd->angleturn - (((axis * angleturn[1]) >> 10))); // ANALOG!
|
||||
cmd->driftturn = (INT16)(cmd->driftturn - (((axis * angleturn[1]) >> 10)));
|
||||
side += ((axis * sidemove[0]) >> 10);
|
||||
cmd->angleturn -= (axis * KART_FULLTURN) / JOYAXISRANGE;
|
||||
side += (axis * sidemove[0]) / JOYAXISRANGE;
|
||||
}
|
||||
|
||||
if (cv_mouseturn.value)
|
||||
{
|
||||
//THIS WORKS WTF????????
|
||||
cmd->angleturn = (INT16)(cmd->angleturn - ((mousex*(encoremode ? -1 : 1)*8)));
|
||||
cmd->driftturn = (INT16)(cmd->driftturn - ((mousex*(encoremode ? -1 : 1)*8)));
|
||||
cmd->angleturn -= (mousex*(encoremode ? -1 : 1)*8);
|
||||
}
|
||||
|
||||
// Digital users can input diagonal-back for shallow turns.
|
||||
if (cv_litesteer[forplayer].value && InputDown(gc_aimbackward, ssplayer)
|
||||
&& abs(cmd->angleturn) == KART_FULLTURN) // My keyboard hits 1024 but my keyboard only hits 1023, video games
|
||||
{
|
||||
cmd->angleturn /= 2;
|
||||
}
|
||||
|
||||
if (objectplacing) // SRB2Kart: spectators need special controls // not anymore huehuehue
|
||||
@@ -1160,10 +1169,8 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||
else if (cmd->angleturn < (-angleturn[1]))
|
||||
cmd->angleturn = (-angleturn[1]);
|
||||
|
||||
if (cmd->driftturn > (angleturn[1]))
|
||||
cmd->driftturn = (angleturn[1]);
|
||||
else if (cmd->driftturn < (-angleturn[1]))
|
||||
cmd->driftturn = (-angleturn[1]);
|
||||
// until here both are the very same
|
||||
cmd->driftturn = cmd->angleturn;
|
||||
|
||||
if (player->mo)
|
||||
cmd->angleturn = K_GetKartTurnValue(player, cmd->angleturn);
|
||||
@@ -2761,7 +2768,7 @@ INT32 G_GetGametypeByName(const char *gametypestr)
|
||||
INT32 i;
|
||||
|
||||
for (i = 0; i < NUMGAMETYPES; i++)
|
||||
if (!stricmp(gametypestr, Gametype_Names[i]))
|
||||
if (fasticmp(gametypestr, Gametype_Names[i]))
|
||||
return i;
|
||||
|
||||
return -1; // unknown gametype
|
||||
@@ -3456,7 +3463,8 @@ void G_LoadGameData(void)
|
||||
if (READUINT32(save.p) != 0xFCAFE211)
|
||||
{
|
||||
const char *gdfolder = "the SRB2Kart folder";
|
||||
if (strcmp(srb2home,"."))
|
||||
|
||||
if (!fastcmp(srb2home,"."))
|
||||
gdfolder = srb2home;
|
||||
|
||||
Z_Free(save.buffer);
|
||||
@@ -3540,7 +3548,8 @@ void G_LoadGameData(void)
|
||||
datacorrupt:
|
||||
{
|
||||
const char *gdfolder = "the SRB2Kart folder";
|
||||
if (strcmp(srb2home,"."))
|
||||
|
||||
if (!fastcmp(srb2home,"."))
|
||||
gdfolder = srb2home;
|
||||
|
||||
Z_Free(save.buffer);
|
||||
@@ -3564,7 +3573,7 @@ void G_SaveGameData(boolean force)
|
||||
if (!gamedataloaded)
|
||||
return; // If never loaded (-nodata), don't save
|
||||
|
||||
save.p = save.buffer = (UINT8 *)malloc(GAMEDATASIZE);
|
||||
save.p = save.buffer = (UINT8 *)Z_Malloc(GAMEDATASIZE, PU_STATIC, NULL);
|
||||
if (!save.p)
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("No more free memory for saving game data\n"));
|
||||
@@ -3584,6 +3593,8 @@ void G_SaveGameData(boolean force)
|
||||
if (!FIL_CopyFile(gamedatafilename, backupfile))
|
||||
{
|
||||
CONS_Alert(CONS_WARNING,"Failed to create a backup of save data. Will not attempt to write to save data\n");
|
||||
Z_Free(save.buffer);
|
||||
save.p = save.buffer = NULL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -3655,7 +3666,7 @@ void G_SaveGameData(boolean force)
|
||||
length = save.p - save.buffer;
|
||||
|
||||
FIL_WriteFile(va(pandf, srb2home, gamedatafilename), save.buffer, length);
|
||||
free(save.buffer);
|
||||
Z_Free(save.buffer);
|
||||
save.p = save.buffer = NULL;
|
||||
}
|
||||
|
||||
@@ -3749,7 +3760,8 @@ void G_LoadGame(UINT32 slot, INT16 mapoverride)
|
||||
|
||||
memset(vcheck, 0, sizeof (vcheck));
|
||||
sprintf(vcheck, "version %d", VERSION);
|
||||
if (strcmp((const char *)save.p, (const char *)vcheck))
|
||||
|
||||
if (!fastcmp((const char *)save.p, (const char *)vcheck))
|
||||
{
|
||||
#ifdef SAVEGAME_OTHERVERSIONS
|
||||
M_StartMessage(M_GetText("Save game from different version.\nYou can load this savegame, but\nsaving afterwards will be disabled.\n\nDo you want to continue anyway?\n\n(Press 'Y' to confirm)\n"),
|
||||
@@ -3825,7 +3837,7 @@ void G_SaveGame(UINT32 savegameslot)
|
||||
char name[VERSIONSIZE];
|
||||
size_t length;
|
||||
|
||||
save.p = save.buffer = (UINT8 *)malloc(SAVEGAMESIZE);
|
||||
save.p = save.buffer = (UINT8 *)Z_Malloc(SAVEGAMESIZE, PU_STATIC, NULL);
|
||||
if (!save.p)
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("No more free memory for saving game data\n"));
|
||||
@@ -3840,7 +3852,7 @@ void G_SaveGame(UINT32 savegameslot)
|
||||
|
||||
length = save.p - save.buffer;
|
||||
saved = FIL_WriteFile(backup, save.buffer, length);
|
||||
free(save.buffer);
|
||||
Z_Free(save.buffer);
|
||||
save.p = save.buffer = NULL;
|
||||
}
|
||||
|
||||
@@ -4027,7 +4039,7 @@ char *G_BuildMapTitle(INT32 mapnum)
|
||||
if (!mapheaderinfo[mapnum-1])
|
||||
P_AllocMapHeader(mapnum-1);
|
||||
|
||||
if (strcmp(mapheaderinfo[mapnum-1]->lvlttl, ""))
|
||||
if (!fastcmp(mapheaderinfo[mapnum-1]->lvlttl, ""))
|
||||
{
|
||||
size_t len = 1;
|
||||
const char *zonetext = NULL;
|
||||
@@ -4052,7 +4064,11 @@ char *G_BuildMapTitle(INT32 mapnum)
|
||||
|
||||
title = Z_Malloc(len, PU_STATIC, NULL);
|
||||
|
||||
if (!title)
|
||||
return NULL;
|
||||
|
||||
sprintf(title, "%s", mapheaderinfo[mapnum-1]->lvlttl);
|
||||
|
||||
if (zonetext) sprintf(title + strlen(title), " %s", zonetext);
|
||||
if (actnum) sprintf(title + strlen(title), " %s", actnum);
|
||||
}
|
||||
@@ -4141,8 +4157,6 @@ INT32 G_FindMap(const char *mapname, char **foundmapnamep,
|
||||
if (!( realmapname = G_BuildMapTitle(mapnum) ))
|
||||
continue;
|
||||
|
||||
aprop = realmapname;
|
||||
|
||||
/* Now that we found a perfect match no need to fucking guess. */
|
||||
if (strnicmp(realmapname, mapname, mapnamelen) == 0)
|
||||
{
|
||||
@@ -4170,6 +4184,7 @@ INT32 G_FindMap(const char *mapname, char **foundmapnamep,
|
||||
writesimplefreq(freq, &freqc,
|
||||
mapnum, aprop - realmapname, mapnamelen);
|
||||
}
|
||||
|
||||
if (apromapnum == 0)
|
||||
{
|
||||
apromapnum = mapnum;
|
||||
|
||||
+2
-3
@@ -72,6 +72,8 @@ extern consvar_t cv_custom3axis[MAXSPLITSCREENPLAYERS];
|
||||
extern consvar_t cv_xdeadzone[MAXSPLITSCREENPLAYERS];
|
||||
extern consvar_t cv_ydeadzone[MAXSPLITSCREENPLAYERS];
|
||||
|
||||
extern consvar_t cv_litesteer[MAXSPLITSCREENPLAYERS];
|
||||
|
||||
extern consvar_t cv_ghost_besttime, cv_ghost_bestlap, cv_ghost_last, cv_ghost_guest, cv_ghost_staff;
|
||||
|
||||
// Hud offsets
|
||||
@@ -129,9 +131,7 @@ extern consvar_t cv_playerblendeffects;
|
||||
|
||||
extern consvar_t cv_cechotoggle;
|
||||
|
||||
#ifndef NONET
|
||||
extern consvar_t cv_chatlogsize;
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@@ -155,7 +155,6 @@ typedef enum
|
||||
// mouseaiming (looking up/down with the mouse or keyboard)
|
||||
#define KB_LOOKSPEED (1<<25)
|
||||
#define MAXPLMOVE (50)
|
||||
#define SLOWTURNTICS (cv_turnsmooth.value * 3)
|
||||
|
||||
// build an internal map name MAPxx from map number
|
||||
const char *G_BuildMapName(INT32 map);
|
||||
|
||||
+11
-4
@@ -37,7 +37,13 @@ static CV_PossibleValue_t turnsmooth_cons_t[] = {{2, "Slow"}, {1, "Fast"}, {0, "
|
||||
consvar_t cv_mousesens = {"mousesens", "20", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mouseysens = {"mouseysens", "20", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_controlperkey = {"controlperkey", "One", CV_SAVE, onecontrolperkey_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_turnsmooth = {"turnsmoothing", "Slow", CV_SAVE, turnsmooth_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_turnsmooth[MAXSPLITSCREENPLAYERS] = {
|
||||
{"turnsmoothing", "Slow", CV_SAVE, turnsmooth_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"turnsmoothing2", "Slow", CV_SAVE, turnsmooth_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"turnsmoothing3", "Slow", CV_SAVE, turnsmooth_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||
{"turnsmoothing4", "Slow", CV_SAVE, turnsmooth_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}
|
||||
};
|
||||
|
||||
static void G_ResetPlayerDeviceRumble(INT32 player);
|
||||
static void rumble_off_handle(void);
|
||||
@@ -1027,7 +1033,7 @@ INT32 G_KeyStringtoNum(const char *keystr)
|
||||
return atoi(&keystr[3]);
|
||||
|
||||
for (j = 0; j < NUMKEYNAMES; j++)
|
||||
if (!stricmp(keynames[j].name, keystr))
|
||||
if (fasticmp(keynames[j].name, keystr))
|
||||
return keynames[j].keynum;
|
||||
|
||||
return 0;
|
||||
@@ -1327,14 +1333,15 @@ static void setcontrol(INT32 (*gc)[2])
|
||||
player = 0;
|
||||
|
||||
namectrl = COM_Argv(1);
|
||||
for (numctrl = 0; numctrl < num_gamecontrols && stricmp(namectrl, gamecontrolname[numctrl]);
|
||||
numctrl++)
|
||||
for (numctrl = 0; numctrl < num_gamecontrols && !fasticmp(namectrl, gamecontrolname[numctrl]); numctrl++)
|
||||
;
|
||||
|
||||
if (numctrl == num_gamecontrols)
|
||||
{
|
||||
CONS_Printf(M_GetText("Control '%s' unknown\n"), namectrl);
|
||||
return;
|
||||
}
|
||||
|
||||
keynum1 = G_KeyStringtoNum(COM_Argv(2));
|
||||
keynum2 = G_KeyStringtoNum(COM_Argv(3));
|
||||
keynum = G_FilterKeyByVersion(numctrl, 0, player, &keynum1, &keynum2, &nestedoverride);
|
||||
|
||||
+2
-1
@@ -110,7 +110,8 @@ typedef enum
|
||||
|
||||
// mouse values are used once
|
||||
extern consvar_t cv_mousesens, cv_mouseysens;
|
||||
extern consvar_t cv_controlperkey, cv_turnsmooth;
|
||||
extern consvar_t cv_controlperkey;
|
||||
extern consvar_t cv_turnsmooth[MAXSPLITSCREENPLAYERS];
|
||||
extern consvar_t cv_rumble[MAXSPLITSCREENPLAYERS];
|
||||
extern consvar_t cv_gamepadled[MAXSPLITSCREENPLAYERS];
|
||||
|
||||
|
||||
Loaded 100 of 226 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user