Compare commits

...

70 commits

Author SHA1 Message Date
Richard Goedeken
5e9ea51064 update version info for v2.6.0 release 2024-07-14 18:24:06 -07:00
Richard Goedeken
beebe29996
Merge pull request #16 from Jj0YzL5nvJ/up2024
CI/CD: Update to generic scripts, independent schedule, etc
2024-05-26 19:53:57 -07:00
Jj0YzL5nvJ
99515bac6d CI/CD: Update to generic scripts, independent schedule, etc 2024-05-24 11:13:42 -06:00
Richard Goedeken
8187d1135c
Merge pull request #15 from Jj0YzL5nvJ/up2023
CI/CD: Fixes Ubuntu i386 builds, among other changes
2023-06-11 12:19:57 -07:00
Jj0YzL5nvJ
b69ca81311 CI/CD: Fixes Ubuntu i386 builds, among other changes 2023-05-21 23:30:45 -06:00
Richard Goedeken
4f5f3ba69a
Merge pull request #14 from Jj0YzL5nvJ/ci-schedule
CI/CD: Integrate scheduled builds and other...
2023-03-02 21:58:34 -08:00
Jj0YzL5nvJ
7865c767b5 CI/CD: Integrate scheduled builds and other necessary updates 2023-02-14 23:48:47 -06:00
Richard Goedeken
82ab630d29
Merge pull request #13 from Sinisig/viewport-fix
Set viewport when initializing window
2022-08-16 17:45:10 -07:00
Sinisig
4e6356c74a Set viewport when initializing window 2022-08-15 22:13:42 -04:00
Richard Goedeken
52b2909ae6
Merge pull request #12 from Jj0YzL5nvJ/ci-update
CI/CD: Update
2022-07-13 19:28:51 -07:00
Jj0YzL5nvJ
401bcb1047 CI/CD: Update 2022-07-10 18:51:06 -06:00
Richard Goedeken
244f13d3b9
Merge pull request #11 from Sinisig/crash-fix
Fixed crash in StringFunctions::trim()
2022-06-09 20:09:35 -07:00
Sinisig
cdde810024 Fixed crash in StringFunctions::trim() 2022-06-09 22:42:52 -04:00
Richard Goedeken
05f76111c6
Merge pull request #10 from Jj0YzL5nvJ/ci-github
CI/CD: Implement GitHub Actions and public nightly builds
2022-04-11 20:45:54 -07:00
Jj0YzL5nvJ
3f1b81dc5a CI/CD: Implement GitHub Actions and public nightly builds 2021-12-05 08:58:33 -07:00
Richard Goedeken
578edd1530 Revert "Allow non-default compilers without resorting to symbolic links"
This reverts commit b0876423c8, as it conflicts with GNU make which always defines default values for certain variables
2020-09-16 22:36:13 -07:00
Richard Goedeken
20ac6717d6
Merge pull request #9 from Jj0YzL5nvJ/alter_cc_cxx
Allow non-default compilers without resorting to symbolic links
2020-08-30 18:55:01 -07:00
Jj0YzL5nvJ
b0876423c8 Allow non-default compilers without resorting to symbolic links 2020-08-30 13:57:34 -06:00
Richard Goedeken
5bde6b38b4
Merge pull request #8 from bentley/master
Fix include guard.
2019-02-21 20:40:54 -08:00
Richard Goedeken
7109d57577 fix Travis CI test builds for MXE 32 and 64 bits 2019-02-21 20:39:57 -08:00
Anthony J. Bentley
87247554f0 Fix include guard. 2019-02-17 15:20:03 -07:00
bsmiles32
fbadbf835e
Merge pull request #7 from bentley/master
Update homepage links
2018-01-01 17:45:34 +01:00
Anthony J. Bentley
4ff794eab4 Update homepage. 2017-12-28 16:29:54 -07:00
Anthony J. Bentley
e4f190bbaa Update link to bug tracker. 2017-12-28 16:14:09 -07:00
Richard Goedeken
aff8439a6e
Merge pull request #6 from charlemagnelasse/travis-mxe
Build MXE targets as additional tests in travis build matrix
2017-11-08 20:06:50 -08:00
Charlemagne Lasse
82ad6a855e Build MXE targets as additional tests in travis build matrix 2017-11-05 15:35:41 +01:00
Richard Goedeken
55a685f0ad Merge pull request #5 from charlemagnelasse/travis-container
Use faster container based Travis CI
2017-02-01 22:21:24 -08:00
Charlemagne Lasse
b35a20cae1 Use faster container based Travis CI 2016-12-16 22:32:05 +01:00
Richard Goedeken
2a79d2832b Merge pull request #4 from charlemagnelasse/master
Use Ubuntu Trusty as base system for Travis CI
2016-09-01 18:03:59 -07:00
Charlemagne Lasse
853bf104f9 Remove unused Travis CI define __extern_always_inline 2016-09-01 20:37:12 +02:00
Charlemagne Lasse
96e2e18fce Use Ubuntu Trusty as base system for Travis CI 2016-09-01 20:23:59 +02:00
Richard Goedeken
905c61fd30 Merge pull request #3 from bentley/openbsd
Remove unnecessary OpenBSD warning.
2015-06-08 06:32:07 -07:00
Anthony J. Bentley
23e74784d7 Remove unnecessary OpenBSD warning. 2015-06-08 01:53:34 -06:00
Richard Goedeken
911d3b81ec Merge pull request #2 from conchurnavid/includes
Cleanup includes order and add missing includes
2015-03-21 21:38:02 -07:00
Conchúr Navid
21a43d4b33 Add missing includes and forward declarations 2015-03-21 13:59:22 +01:00
Conchúr Navid
b16c1dd9ec Sort the includes based on type and names 2015-03-21 12:53:28 +01:00
Conchúr Navid
aeb663548b Work around conflicting defintions of ZERO and ONE 2015-03-21 12:53:28 +01:00
Conchúr Navid
d2f459d3c2 Fix executable bits of files 2015-03-21 10:53:38 +01:00
Richard Goedeken
7378184970 Merge pull request #1 from fayvel/travisci
Add Travis CI configuration file for automatic build tests
2014-07-07 22:08:01 -07:00
Fayvel Victor
73b6eccf89 Add Travis CI configuration file for automatic build tests
Github provides a Travis CI integration which makes it easy to have a quick
check of a patch before a pull request is accepted. It is not enough to prove
the correctness of a contribution but at least helps to avoid some of the worst
build problems.

This feature *must* be enabled by the mupen64plus administrator *before this
commit is merged*:

- https://travis-ci.org/profile/mupen64plus
- Login via your Github account
- Make sure you are on "https://travis-ci.org/profile/mupen64plus"
- Switch repository to "On"
2014-07-06 12:32:01 +02:00
Sven Eckelmann
b881e3e7cf Merge branches 'makefile' and 'github' 2013-12-19 13:49:07 +01:00
Sven Eckelmann
19ecbc1f95 Replace references to bitbucket with github 2013-12-19 13:27:14 +01:00
Sven Eckelmann
03398c7e37 Force line ending type for specific files
Different operation systems (Unix vs. Windows) use different line ending types.
It can easily happen that users from different systems edit files and replace
all line endings of a file with the system specific version. This screws up
diffs and makes merges harder.

Git can normalize line endings for specific files and avoid this problem.
Binary files should be marked to avoid accidentally normalization.
2013-12-19 13:15:43 +01:00
Sven Eckelmann
c2a73cfb60 Convert .hgignore to .gitignore 2013-12-19 13:09:20 +01:00
Sven Eckelmann
5892aa7cdd Don't fail rebuild when header is removed
The *.d depends files for make just list the files used when building an
object file. Removing a file listed in such a dependency file causes make to
search for a way to recreate it. This usually cannot work because these files
aren't autogenerated.

The gcc option -MP can be used to generate empty rule for these files. Removing
a file in a dependency list will then execute this empty rule and continue with
the execution of the creation of the object file. This compilation process will
then automatically correct the dependency file.
2013-12-19 12:55:19 +01:00
wahrhaft
08104ee4fd Added tag 2.0.0 for changeset 2e14d1a541b7 2013-07-04 22:03:20 -04:00
wahrhaft
e2746f2d97 Bump version number to 2.0.0 2013-07-04 21:21:37 -04:00
Sven Eckelmann
876f992074 Update video extension API version to 3.0.0 and video plugin API version to 2.2.0 2013-05-28 21:13:17 +02:00
Sven Eckelmann
0bfae1fad5 Allow to statically set *_(CFLAGS|LIBS) without pkg-config
n.pepinpe requested in #540 to allow overwriting the automatically searched
CFLAGS and LIBS for used libraries. This should allow distributors to set the
build configuration without patching the makefile. This is important for
systems were pkg-config or sdl-config aren't normally used.
2013-05-11 15:00:00 +02:00
Sven Eckelmann
5722e78303 Enable Link-time optimization by default
The GCC introduced Link-time optimization in GCC 4.5 (2010-04-14). This should
be long enough available that interested users have upgraded to a compiler
supporting it.

The MSVC project already enabled WholeProgramOptimization since a long time.
Enabling it by default in GCC seems to be equally valid.
2013-05-09 22:50:00 +02:00
Sven Eckelmann
d49a2b857f Add CXXFLAGS to the linker step
The GCC manual states for different parameters that the options for compilation
must also be used when linking. The options for compilation are stored in
CXXFLAGS and added to LINK.o to fix the behavior.

Option which need this are for example -fPIC/-fPIE or -flto.
2013-05-09 22:22:52 +02:00
Sven Eckelmann
dfa22c9899 Revert "Enable link time garbage collection when link time optimization is enabled"
Some linker on different platforms don't handle the garbage collection
correctly and create extreme bloated binaries. Therefore, leave it to the user
to enable this feature or not.
2013-03-14 08:04:01 +01:00
Sven Eckelmann
8d32f2a9cc Enable link time garbage collection when link time optimization is enabled 2013-02-01 10:01:54 +01:00
Sven Eckelmann
1ddef24000 Introduce WARNFLAGS for default (removable) compiler warning flags 2013-01-02 16:13:45 +01:00
Sven Eckelmann
8c84c961a4 Don't use long to store pointers
long may be to short to store pointers on 64 bit systems and therefore cause
build failures on Windows.
2013-01-01 00:53:17 +01:00
Sven Eckelmann
3a3e2fe240 Disable PIC on MinGW to reduce warnings 2013-01-01 00:30:34 +01:00
n pepinpe
eb6fe960e7 Correct OpenGL includes on OSX 2012-12-31 11:03:06 +01:00
n pepinpe
dc809fd709 Fix path to OSX SDK with XCode >=4.3 2012-12-31 10:43:00 +01:00
veganaize
b2cc64accf Don't try to find OpenGL libraries on MacOSX and MinGW using pkg-config
MacOSX and MinGW don't provide gl.pc or glu.pc to find the cflags or libs using
pkg-config. Removing this search and replacing it with an hardcoded value is
easier on these platforms.
2012-12-19 21:57:42 +01:00
Sven Eckelmann
d41ea6ed48 Use $(OBJDIR) in clean target instead of hardcoded path 2012-12-13 14:53:05 +01:00
Sven Eckelmann
4fbab9cd89 Allow to add a postfix for each build
The POSTFIX make option is useful for distributions to compile different
versions of the plugin in parallel. The object files will be stored in a
directory with the postfix appended and the linker result will also have this
postfix appended.
2012-12-13 14:47:23 +01:00
veganaize
47e650709d Add support for MingW32 2012-12-13 13:58:55 +01:00
Sven Eckelmann
0911511a37 Add CROSS_COMPILE make option
The CROSS_COMPILE make option can be used to automatically prepend the prefix
to all build relevant tools to seamlessly allow cross compilation without
setting each tool name separately.

Cross compiling for MinGW32 would can be done using
$ make -C projects/unix/ CROSS_COMPILE=i686-pc-mingw32- HOST_CPU=i686 UNAME=MINGW
2012-12-13 12:25:40 +01:00
Sven Eckelmann
ecd1eb677a Allow to change names of *-config tools for cross compiles 2012-12-13 11:33:49 +01:00
Sven Eckelmann
94441fbc3c Synchronize usage of environmental variables for UNAME with HOST_CPU 2012-12-13 10:52:49 +01:00
wahrhaft
cc071fca31 Merge new platforms in Makefile 2012-11-27 22:56:28 -05:00
Anthony J. Bentley
9229129383 Add newlines to ends of files. 2012-11-12 19:19:43 -07:00
Anthony J. Bentley
93a26045c2 Detect OpenBSD PowerPC platforms macppc and socppc. 2012-11-12 18:28:19 -07:00
Sven Eckelmann
5a741ceb87 Add configuration for semi-supported architecture armel 2012-11-04 01:27:30 +01:00
wahrhaft
59ddf59ef5 Added tag 1.99.5 for changeset 567e98c19050 2012-08-09 23:12:38 -04:00
128 changed files with 1985 additions and 1493 deletions

38
.gitattributes vendored Normal file
View file

@ -0,0 +1,38 @@
* text=auto
# normal text files
*.6 text
AUTHORS text
*.c text
*.cfg text
*.cht text
*.conf text
COPYING text
*.cpp text
*.def text
*-license text
*.h text
*.html text
*.ini text
INSTALL text
LICENSES text
Makefile text
*.py text
README text
RELEASE text
*.S text
*.sh text
*.txt text
*.ver text
# windows specific text files
*.sln text eol=crlf
*.vcproj text eol=crlf
*.vcxproj text eol=crlf
*.vcxproj.filters text eol=crlf
# binary files
*.gz binary
*.ttf binary
cursor.tex binary
font.tex binary

120
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,120 @@
name: Arachnoid
on:
push:
paths-ignore:
- '.{gitattributes,gitignore,travis.yml}'
- '*.md,appveyor.yml,README'
pull_request:
paths-ignore:
- '.{gitattributes,gitignore,travis.yml}'
- '*.md,appveyor.yml,README'
workflow_dispatch:
jobs:
Linux:
strategy:
fail-fast: false
matrix:
include:
- cc: GCC
arch: x64
- cc: GCC
arch: x86
- cc: Clang
arch: x64
- cc: Clang
arch: x86
name: Linux / ${{ matrix.cc }} / ${{ matrix.arch }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Get build dependencies and arrange the environment
run: |
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-core.git ../mupen64plus-core
export C_CLANG_SUFFIX="-15" C_GCC_SUFFIX="-12"
export BUILD_DEPS="libgl1-mesa-dev"
./../mupen64plus-core/.github/workflows/scripts/ci_install_ubuntu_deps.sh ${{ matrix.arch }} ${{ matrix.cc }}
- name: Build and related stuff, backup binaries
run: |
export C_CLANG_SUFFIX="-15" C_GCC_SUFFIX="-12"
./../mupen64plus-core/.github/workflows/scripts/ci_build.sh ${{ matrix.arch }} ${{ matrix.cc }} makepkg
- name: Upload artifact
if: matrix.cc == 'GCC'
uses: actions/upload-artifact@v4
with:
name: ${{ env.PKG_NAME }}
path: pkg/*.tar.gz
MSYS2:
strategy:
fail-fast: false
matrix:
include:
- cc: GCC
arch: x64
cross: x86_64
env: MINGW64
- cc: GCC
arch: x86
cross: i686
env: MINGW32
name: Windows / MSYS2 ${{ matrix.cc }} / ${{ matrix.arch }}
runs-on: windows-2022
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.env }}
update: true
install: >-
git
libtool
make
mingw-w64-${{ matrix.cross }}-gcc
mingw-w64-${{ matrix.cross }}-toolchain
mingw-w64-${{ matrix.cross }}-ntldd
- name: Build and related stuff, backup binaries
run: |
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-core.git ../mupen64plus-core
./../mupen64plus-core/.github/workflows/scripts/ci_build.sh ${{ matrix.arch }} ${{ matrix.cc }}
- name: Backup dependencies, etc...
run: |
./../mupen64plus-core/.github/workflows/scripts/ci_backup_mingw_deps.sh ${{ matrix.env }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.PKG_NAME }}
path: pkg/*
Nightly-build:
runs-on: ubuntu-latest
if: github.ref_name == 'master'
needs: [Linux, MSYS2]
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: binaries
- name: Get some tools
run: |
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-core.git ../mupen64plus-core
sudo apt-get update
sudo apt-get -y install hashdeep
- name: Creating new artifacts and update nightly-build
run: |
./../mupen64plus-core/.github/workflows/scripts/ci_nightly_artifacts.sh
- name: Nightly-build
uses: ncipollo/release-action@v1
with:
prerelease: true
allowUpdates: true
removeArtifacts: true
replacesArtifacts: false
tag: nightly-build
artifacts: pkg/*

115
.github/workflows/schedule.yml vendored Normal file
View file

@ -0,0 +1,115 @@
name: Arachnoid - Scheduled
on:
schedule:
- cron: '15 14 21 * *'
jobs:
Linux:
strategy:
fail-fast: false
matrix:
include:
- cc: GCC
arch: x64
- cc: GCC
arch: x86
- cc: Clang
arch: x64
- cc: Clang
arch: x86
name: Linux / ${{ matrix.cc }} / ${{ matrix.arch }}
runs-on: ubuntu-22.04
if: github.repository == 'mupen64plus/mupen64plus-video-arachnoid'
steps:
- uses: actions/checkout@v4
- name: Get build dependencies and arrange the environment
run: |
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-core.git ../mupen64plus-core
export C_CLANG_SUFFIX="-15" C_GCC_SUFFIX="-12"
export BUILD_DEPS="libgl1-mesa-dev"
./../mupen64plus-core/.github/workflows/scripts/ci_install_ubuntu_deps.sh ${{ matrix.arch }} ${{ matrix.cc }}
- name: Build and related stuff, backup binaries
run: |
export C_CLANG_SUFFIX="-15" C_GCC_SUFFIX="-12"
./../mupen64plus-core/.github/workflows/scripts/ci_build.sh ${{ matrix.arch }} ${{ matrix.cc }} makepkg
- name: Upload artifact
if: matrix.cc == 'GCC'
uses: actions/upload-artifact@v4
with:
name: ${{ env.PKG_NAME }}
path: pkg/*.tar.gz
MSYS2:
strategy:
fail-fast: false
matrix:
include:
- cc: GCC
arch: x64
cross: x86_64
env: MINGW64
- cc: GCC
arch: x86
cross: i686
env: MINGW32
name: Windows / MSYS2 ${{ matrix.cc }} / ${{ matrix.arch }}
runs-on: windows-2022
if: github.repository == 'mupen64plus/mupen64plus-video-arachnoid'
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.env }}
update: true
install: >-
git
libtool
make
mingw-w64-${{ matrix.cross }}-gcc
mingw-w64-${{ matrix.cross }}-toolchain
mingw-w64-${{ matrix.cross }}-ntldd
- name: Build and related stuff, backup binaries
run: |
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-core.git ../mupen64plus-core
./../mupen64plus-core/.github/workflows/scripts/ci_build.sh ${{ matrix.arch }} ${{ matrix.cc }}
- name: Backup dependencies, etc...
run: |
./../mupen64plus-core/.github/workflows/scripts/ci_backup_mingw_deps.sh ${{ matrix.env }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.PKG_NAME }}
path: pkg/*
Nightly-build:
runs-on: ubuntu-latest
if: github.ref_name == 'master'
needs: [Linux, MSYS2]
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: binaries
- name: Get some tools
run: |
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-core.git ../mupen64plus-core
sudo apt-get update
sudo apt-get -y install hashdeep
- name: Creating new artifacts and update nightly-build
run: |
./../mupen64plus-core/.github/workflows/scripts/ci_nightly_artifacts.sh
- name: Nightly-build
uses: ncipollo/release-action@v1
with:
prerelease: true
allowUpdates: true
removeArtifacts: true
replacesArtifacts: false
tag: nightly-build
artifacts: pkg/*

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/projects/unix/_obj*/
/projects/unix/mupen64plus-video-arachnoid*.so

View file

@ -1,4 +0,0 @@
syntax: regexp
^projects/unix/_obj/
^projects/unix/mupen64plus-video-arachnoid.so$

45
.travis.yml Normal file
View file

@ -0,0 +1,45 @@
sudo: required
dist: xenial
language: cpp
compiler:
- gcc
- clang
addons:
apt:
packages:
- git
- libgl1-mesa-dev
- pkg-config
before_install:
- git clone --depth=1 --branch=master git://github.com/mupen64plus/mupen64plus-core.git deps/mupen64plus-core
script:
- make -C projects/unix APIDIR="$(pwd)/deps/mupen64plus-core/src/api/" V=1 clean && LDFLAGS="-Wl,--no-add-needed -Wl,--no-undefined" OPTFLAGS="-O2" make CC="${CC}" CXX="${CXX}" -j$(nproc) -C projects/unix APIDIR="$(pwd)/deps/mupen64plus-core/src/api/" V=1 all
# extra mxe build entries
matrix:
include:
- env:
- MXE_CPU=i686
- PATH="/usr/lib/mxe/usr/bin/:$PATH"
before_install:
- curl -sSL "https://mirror.mxe.cc/repos/apt/client-conf/mxeapt.gpg" | sudo -E apt-key add -
- echo "deb https://mirror.mxe.cc/repos/apt xenial main" | sudo tee -a /etc/apt/sources.list
- sudo apt-get update -qq
- sudo apt-get -y --allow-unauthenticated install mxe-i686-w64-mingw32.shared-gcc
- git clone --depth=1 --branch=master git://github.com/mupen64plus/mupen64plus-core.git deps/mupen64plus-core
script:
- make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" -C projects/unix APIDIR="$(pwd)/deps/mupen64plus-core/src/api/" V=1 clean &&
make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" -C projects/unix APIDIR="$(pwd)/deps/mupen64plus-core/src/api/" V=1 -j$(nproc) all
- env:
- MXE_CPU=x86_64
- PATH="/usr/lib/mxe/usr/bin/:$PATH"
before_install:
- curl -sSL "https://mirror.mxe.cc/repos/apt/client-conf/mxeapt.gpg" | sudo -E apt-key add -
- echo "deb https://mirror.mxe.cc/repos/apt xenial main" | sudo tee -a /etc/apt/sources.list
- sudo apt-get update -qq
- sudo apt-get -y --allow-unauthenticated install mxe-x86-64-w64-mingw32.shared-gcc
- git clone --depth=1 --branch=master git://github.com/mupen64plus/mupen64plus-core.git deps/mupen64plus-core
script:
- make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" -C projects/unix APIDIR="$(pwd)/deps/mupen64plus-core/src/api/" V=1 clean &&
make UNAME=MINGW CROSS_COMPILE="${MXE_CPU}-w64-mingw32.shared-" CC="${MXE_CPU}-w64-mingw32.shared-gcc" CXX="${MXE_CPU}-w64-mingw32.shared-g++" HOST_CPU="${MXE_CPU}" -C projects/unix APIDIR="$(pwd)/deps/mupen64plus-core/src/api/" V=1 -j$(nproc) all

2
README
View file

@ -1,5 +1,5 @@
Arachnoid Graphics Plugin for Mupen64Plus
http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
https://github.com/mupen64plus/mupen64plus-video-arachnoid/
Derived from the Project64/1964 version of Arachnoid, available from:
http://sourceforge.net/projects/arachnoid/

38
projects/msvc9/GraphicsPlugin.sln Executable file → Normal file
View file

@ -1,19 +1,19 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GraphicsPlugin", "GraphicsPlugin.vcproj", "{6F7FDCD3-C278-4A5C-BD36-85D58AC75AFE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6F7FDCD3-C278-4A5C-BD36-85D58AC75AFE}.Debug|Win32.ActiveCfg = Debug|Win32
{6F7FDCD3-C278-4A5C-BD36-85D58AC75AFE}.Debug|Win32.Build.0 = Debug|Win32
{6F7FDCD3-C278-4A5C-BD36-85D58AC75AFE}.Release|Win32.ActiveCfg = Release|Win32
{6F7FDCD3-C278-4A5C-BD36-85D58AC75AFE}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GraphicsPlugin", "GraphicsPlugin.vcproj", "{6F7FDCD3-C278-4A5C-BD36-85D58AC75AFE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6F7FDCD3-C278-4A5C-BD36-85D58AC75AFE}.Debug|Win32.ActiveCfg = Debug|Win32
{6F7FDCD3-C278-4A5C-BD36-85D58AC75AFE}.Debug|Win32.Build.0 = Debug|Win32
{6F7FDCD3-C278-4A5C-BD36-85D58AC75AFE}.Release|Win32.ActiveCfg = Release|Win32
{6F7FDCD3-C278-4A5C-BD36-85D58AC75AFE}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

1844
projects/msvc9/GraphicsPlugin.vcproj Executable file → Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
#/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# * Arachnoid - Makefile *
# * http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/ *
# * https://github.com/mupen64plus/mupen64plus-video-arachnoid/ *
# * Copyright (C) 2009 Richard42, Jon Ring *
# * *
# * This program is free software; you can redistribute it and/or modify *
@ -20,8 +20,9 @@
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
# Makefile for mupen64plus-video-arachnoid
# detect operation system
UNAME = $(shell uname -s)
# detect operating system
UNAME ?= $(shell uname -s)
OS := NONE
ifeq ("$(UNAME)","Linux")
OS = LINUX
SO_EXTENSION = so
@ -52,21 +53,31 @@ ifeq ("$(UNAME)","OpenBSD")
OS = FREEBSD
SO_EXTENSION = so
SHARED = -shared
$(warning OS type "$(UNAME)" not officially supported.')
endif
ifneq ("$(filter GNU/kFreeBSD kfreebsd,$(UNAME))","")
OS = LINUX
SO_EXTENSION = so
SHARED = -shared
endif
ifeq ("$(patsubst MINGW%,MINGW,$(UNAME))","MINGW")
OS = MINGW
SO_EXTENSION = dll
SHARED = -shared
PIC = 0
endif
ifeq ("$(OS)","NONE")
$(error OS type "$(UNAME)" not supported. Please file bug report at 'https://github.com/mupen64plus/mupen64plus-core/issues')
endif
# detect system architecture
HOST_CPU ?= $(shell uname -m)
CPU := NONE
NO_ASM ?= 1
ifneq ("$(filter x86_64 amd64,$(HOST_CPU))","")
CPU := X86
ifeq ("$(BITS)", "32")
ARCH_DETECTED := 64BITS_32
PIC ?= 0
else
ARCH_DETECTED := 64BITS
PIC ?= 1
@ -75,8 +86,9 @@ endif
ifneq ("$(filter pentium i%86,$(HOST_CPU))","")
CPU := X86
ARCH_DETECTED := 32BITS
PIC ?= 0
endif
ifneq ("$(filter ppc powerpc,$(HOST_CPU))","")
ifneq ("$(filter ppc macppc socppc powerpc,$(HOST_CPU))","")
CPU := PPC
ARCH_DETECTED := 32BITS
BIG_ENDIAN := 1
@ -90,10 +102,25 @@ ifneq ("$(filter ppc64 powerpc64,$(HOST_CPU))","")
PIC ?= 1
$(warning Architecture "$(HOST_CPU)" not officially supported.')
endif
ifneq ("$(filter arm%,$(HOST_CPU))","")
ifeq ("$(filter arm%b,$(HOST_CPU))","")
CPU := ARM
ARCH_DETECTED := 32BITS
PIC ?= 1
$(warning Architecture "$(HOST_CPU)" not officially supported.')
endif
endif
ifeq ("$(CPU)","NONE")
$(error CPU type "$(HOST_CPU)" not supported. Please file bug report at 'https://github.com/mupen64plus/mupen64plus-core/issues')
endif
SRCDIR = ../../src
OBJDIR = _obj$(POSTFIX)
# base CFLAGS, LDLIBS, and LDFLAGS
OPTFLAGS ?= -O3
CFLAGS += $(OPTFLAGS) -ffast-math -fno-strict-aliasing -fvisibility=hidden -I../../src \
OPTFLAGS ?= -O3 -flto
WARNFLAGS ?= -Wall
CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -ffast-math -fno-strict-aliasing -fvisibility=hidden -I../../src \
-I../../src/hash -I../../src/ucodes -I../../src/GBI -I../../src/RDP -I../../src/utils \
-I../../src/log -I../../src/RSP -I../../src/framebuffer -I../../src/math -I../../src/renderer \
-I../../src/Assembler -I../../src/texture -I../../src/config -I../../src/Combiner
@ -103,26 +130,54 @@ LDFLAGS += $(SHARED)
# On OS X, add a few extra flags to elegantly support cross-compilation and backward
# compatibility (and also the flags to link against OpenGL)
ifeq ($(OS), OSX)
# Select the proper SDK
# Also, SDKs are stored in a different location since XCode 4.3
OSX_SDK ?= $(shell sw_vers -productVersion | cut -f1 -f2 -d .)
OSX_XCODEMAJ = $(shell xcodebuild -version | grep '[0-9]*\.[0-9]*' | cut -f2 -d ' ' | cut -f1 -d .)
OSX_XCODEMIN = $(shell xcodebuild -version | grep '[0-9]*\.[0-9]*' | cut -f2 -d ' ' | cut -f2 -d .)
OSX_XCODEGE43 = $(shell echo "`expr $(OSX_XCODEMAJ) \>= 4``expr $(OSX_XCODEMIN) \>= 3`")
ifeq ($(OSX_XCODEGE43), 11)
OSX_SYSROOT := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
else
OSX_SYSROOT := /Developer/SDKs
endif
ifeq ($(CPU), X86)
ifeq ($(ARCH_DETECTED), 64BITS)
CFLAGS += -arch x86_64 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk
LDFLAGS += -bundle -framework OpenGL -arch x86_64 -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.5.sdk
CFLAGS += -arch x86_64 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk
LDFLAGS += -bundle
else
CFLAGS += -arch i686 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk
LDFLAGS += -bundle -framework OpenGL -arch i686 -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.5.sdk
CFLAGS += -arch i686 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk
LDFLAGS += -bundle
endif
endif
else
# test for essential build dependencies
ifeq ($(shell which pkg-config 2>/dev/null),)
$(error pkg-config not found)
# search for OpenGL libraries
ifeq ($(OS), OSX)
GL_LDLIBS = -framework OpenGL
endif
ifeq ($(shell pkg-config --modversion gl 2>/dev/null),)
$(error No OpenGL development libraries found!)
ifeq ($(OS), MINGW)
GL_LDLIBS = -lopengl32
endif
CFLAGS += -pthread $(shell pkg-config --cflags gl)
LDLIBS += -pthread $(shell pkg-config --libs gl)
ifeq ($(origin GL_CFLAGS) $(origin GL_LDLIBS), undefined undefined)
ifeq ($(origin PKG_CONFIG), undefined)
PKG_CONFIG = $(CROSS_COMPILE)pkg-config
ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null),)
$(error $(PKG_CONFIG) not found)
endif
endif
ifeq ($(shell $(PKG_CONFIG) --modversion gl 2>/dev/null),)
$(error No OpenGL development libraries found!)
endif
GL_CFLAGS += $(shell $(PKG_CONFIG) --cflags gl)
GL_LDLIBS += $(shell $(PKG_CONFIG) --libs gl)
endif
CFLAGS += $(GL_CFLAGS)
LDLIBS += $(GL_LDLIBS)
CFLAGS += -pthread
endif
ifeq ($(OS), LINUX)
LDLIBS += -ldl
@ -136,10 +191,8 @@ endif
# On 32-bit x86 systems we do not want to use -fPIC because we don't have to and it has a big performance penalty on this arch
ifeq ($(PIC), 1)
CFLAGS += -fPIC
LDFLAGS += -fPIC
else
CFLAGS += -fno-PIC
LDFLAGS += -fno-PIC
endif
ifeq ($(BIG_ENDIAN), 1)
@ -166,24 +219,32 @@ else
endif
endif
# tweak flags for 32-bit build on 64-bit system
ifeq ($(ARCH_DETECTED), 64BITS_32)
ifeq ($(OS), FREEBSD)
$(error Do not use the BITS=32 option with FreeBSD, use -m32 and -m elf_i386)
endif
ifneq ($(OS), OSX)
ifeq ($(OS), MINGW)
LDFLAGS += -Wl,-m,i386pe
else
CFLAGS += -m32
LDFLAGS += -Wl,-m,elf_i386
endif
endif
endif
ifeq ($(ARCH_DETECTED), 64BITS)
ifeq ($(OS), MINGW)
LDFLAGS += -Wl,-m,i386pep
endif
endif
# set special flags per-system
ifeq ($(OS), LINUX)
# only export api symbols
LDFLAGS += -Wl,-version-script,$(SRCDIR)/video_api_export.ver
endif
ifneq ($(OS), FREEBSD)
ifeq ($(CPU), X86)
# tweak flags for 32-bit build on 64-bit system
ifeq ($(ARCH_DETECTED), 64BITS_32)
CFLAGS += -m32
LDFLAGS += -m32 -Wl,-m,elf_i386
endif
endif
else
ifeq ($(ARCH_DETECTED), 64BITS_32)
$(error Do not use the BITS=32 option with FreeBSD, use -m32 and -m elf_i386)
endif
endif
# reduced compile output when running make without V=1
ifneq ($(findstring $(MAKEFLAGS),s),s)
@ -195,14 +256,14 @@ endif
endif
# set base program pointers and flags
CC ?= gcc
CXX ?= g++
CC = $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
RM ?= rm -f
INSTALL ?= install
MKDIR ?= mkdir -p
COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
COMPILE.cc = $(Q_CXX)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
LINK.o = $(Q_LD)$(CXX) $(LDFLAGS) $(TARGET_ARCH)
LINK.o = $(Q_LD)$(CXX) $(CXXFLAGS) $(LDFLAGS) $(TARGET_ARCH)
# set special flags for given Makefile parameters
ifeq ($(DEBUG),1)
@ -216,9 +277,6 @@ endif
ifeq ($(PREFIX),)
PREFIX := /usr/local
endif
ifeq ($(SHAREDIR),)
SHAREDIR := $(PREFIX)/share/mupen64plus
endif
ifeq ($(LIBDIR),)
LIBDIR := $(PREFIX)/lib
endif
@ -226,10 +284,6 @@ ifeq ($(PLUGINDIR),)
PLUGINDIR := $(LIBDIR)/mupen64plus
endif
SRCDIR = ../../src
OBJDIR = _obj
# list of source files to compile
SOURCE = \
$(SRCDIR)/main.cpp \
@ -282,8 +336,13 @@ SOURCE = \
$(SRCDIR)/Combiner/CombinerCache.cpp \
$(SRCDIR)/RomDetector.cpp \
$(SRCDIR)/RDP/RDP.cpp \
$(SRCDIR)/RDP/RDPInstructions.cpp \
$(SRCDIR)/osal_dynamiclib_unix.cpp
$(SRCDIR)/RDP/RDPInstructions.cpp
ifeq ($(OS),MINGW)
SOURCE += $(SRCDIR)/osal_dynamiclib_win32.cpp
else
SOURCE += $(SRCDIR)/osal_dynamiclib_unix.cpp
endif
# generate a list of object files build, make a temporary directory for them
@ -293,7 +352,7 @@ $(shell $(MKDIR) $(OBJDIRS))
# build targets
TARGET = mupen64plus-video-arachnoid.$(SO_EXTENSION)
TARGET = mupen64plus-video-arachnoid$(POSTFIX).$(SO_EXTENSION)
targets:
@echo "Mupen64plus-video-arachnoid N64 Graphics plugin makefile. "
@echo " Targets:"
@ -305,8 +364,10 @@ targets:
@echo " Options:"
@echo " BITS=32 == build 32-bit binaries on 64-bit machine"
@echo " APIDIR=path == path to find Mupen64Plus Core headers"
@echo " OPTFLAGS=flag == compiler optimization (default: -O3)"
@echo " OPTFLAGS=flag == compiler optimization (default: -O3 -flto)"
@echo " WARNFLAGS=flag == compiler warning levels (default: -Wall)"
@echo " PIC=(1|0) == Force enable/disable of position independent code"
@echo " POSTFIX=name == String added to the name of the the build (default: '')"
@echo " Install Options:"
@echo " PREFIX=path == install/uninstall prefix (default: /usr/local)"
@echo " LIBDIR=path == library prefix (default: PREFIX/lib)"
@ -314,7 +375,6 @@ targets:
@echo " DESTDIR=path == path to prepend to all installation paths (only for packagers)"
@echo " Debugging Options:"
@echo " DEBUG=1 == add debugging symbols"
@echo " LTO=1 == enable experimental build with link-time optimization"
@echo " V=1 == show verbose compiler output"
all: $(TARGET)
@ -328,18 +388,13 @@ uninstall:
clean:
$(RM) -r ./_obj mupen64plus-video-arachnoid.$(SO_EXTENSION)
$(RM) -r $(OBJDIR) $(TARGET)
# build dependency files
CFLAGS += -MD
CFLAGS += -MD -MP
-include $(OBJECTS:.o=.d)
CXXFLAGS += $(CFLAGS)
ifeq ($(LTO), 1)
CFLAGS += -flto
CXXFLAGS += -flto
LDFLAGS += -fuse-linker-plugin $(CXXFLAGS)
endif
# standard build rules
$(OBJDIR)/%.o: $(SRCDIR)/%.c

4
src/Assembler/assembler.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2009 Jon Ring
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
@ -114,7 +114,7 @@ Done:
}
#else
long beginOffset = (long)src & 3;
long long beginOffset = (long long)src & 3;
char *readPtr = (char*)src - beginOffset;
char *writePtr = (char*)dest;

51
src/Combiner/AdvancedCombinerManager.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -20,32 +20,35 @@
*****************************************************************************/
#include "AdvancedCombinerManager.h"
#include "CombinerStructs.h"
#include "ExtensionChecker.h"
#include "MultiTexturingExt.h"
#include "AdvancedTexEnvCombiner.h"
#include "SimpleTexEnvCombiner.h"
#include "DummyCombiner.h"
#include "CombinerStageMerger.h"
#include "CombinerBase.h"
#include "CombinerStageCreator.h"
#include "RomDetector.h"
#include "m64p.h"
#include "CombinerStageMerger.h"
#include "CombinerStructs.h"
#include "DummyCombiner.h"
#include "ExtensionChecker.h"
#include "GBIDefs.h"
#include "MultiTexturingExt.h"
#include "OpenGL.h"
#include "RomDetector.h"
#include "SimpleTexEnvCombiner.h"
#include "m64p.h"
static int saRGBExpanded[] =
{
COMBINED, TEXEL0, TEXEL1, PRIMITIVE,
SHADE, ENVIRONMENT, ONE, NOISE,
ZERO, ZERO, ZERO, ZERO,
ZERO, ZERO, ZERO, ZERO
SHADE, ENVIRONMENT, CB_ONE, NOISE,
CB_ZERO, CB_ZERO, CB_ZERO, CB_ZERO,
CB_ZERO, CB_ZERO, CB_ZERO, CB_ZERO
};
static int sbRGBExpanded[] =
{
COMBINED, TEXEL0, TEXEL1, PRIMITIVE,
SHADE, ENVIRONMENT, CENTER, K4,
ZERO, ZERO, ZERO, ZERO,
ZERO, ZERO, ZERO, ZERO
CB_ZERO, CB_ZERO, CB_ZERO, CB_ZERO,
CB_ZERO, CB_ZERO, CB_ZERO, CB_ZERO
};
static int mRGBExpanded[] =
@ -54,40 +57,40 @@ static int mRGBExpanded[] =
SHADE, ENVIRONMENT, SCALE, COMBINED_ALPHA,
TEXEL0_ALPHA, TEXEL1_ALPHA, PRIMITIVE_ALPHA, SHADE_ALPHA,
ENV_ALPHA, LOD_FRACTION, PRIM_LOD_FRAC, K5,
ZERO, ZERO, ZERO, ZERO,
ZERO, ZERO, ZERO, ZERO,
ZERO, ZERO, ZERO, ZERO,
ZERO, ZERO, ZERO, ZERO
CB_ZERO, CB_ZERO, CB_ZERO, CB_ZERO,
CB_ZERO, CB_ZERO, CB_ZERO, CB_ZERO,
CB_ZERO, CB_ZERO, CB_ZERO, CB_ZERO,
CB_ZERO, CB_ZERO, CB_ZERO, CB_ZERO
};
static int aRGBExpanded[] =
{
COMBINED, TEXEL0, TEXEL1, PRIMITIVE,
SHADE, ENVIRONMENT, ONE, ZERO
SHADE, ENVIRONMENT, CB_ONE, CB_ZERO
};
static int saAExpanded[] =
{
COMBINED, TEXEL0_ALPHA, TEXEL1_ALPHA, PRIMITIVE_ALPHA,
SHADE_ALPHA, ENV_ALPHA, ONE, ZERO
SHADE_ALPHA, ENV_ALPHA, CB_ONE, CB_ZERO
};
static int sbAExpanded[] =
{
COMBINED, TEXEL0_ALPHA, TEXEL1_ALPHA, PRIMITIVE_ALPHA,
SHADE_ALPHA, ENV_ALPHA, ONE, ZERO
SHADE_ALPHA, ENV_ALPHA, CB_ONE, CB_ZERO
};
static int mAExpanded[] =
{
LOD_FRACTION, TEXEL0_ALPHA, TEXEL1_ALPHA, PRIMITIVE_ALPHA,
SHADE_ALPHA, ENV_ALPHA, PRIM_LOD_FRAC, ZERO,
SHADE_ALPHA, ENV_ALPHA, PRIM_LOD_FRAC, CB_ZERO,
};
static int aAExpanded[] =
{
COMBINED, TEXEL0_ALPHA, TEXEL1_ALPHA, PRIMITIVE_ALPHA,
SHADE_ALPHA, ENV_ALPHA, ONE, ZERO
SHADE_ALPHA, ENV_ALPHA, CB_ONE, CB_ZERO
};
//-----------------------------------------------------------------------------
@ -314,7 +317,7 @@ void AdvancedCombinerManager::getSecondaryCombinerColor(float out[4])
}
//Get color
m_combiner->getCombinerColor(out, currentTexEnv->vertex.secondaryColor, ONE);
m_combiner->getCombinerColor(out, currentTexEnv->vertex.secondaryColor, CB_ONE);
}
//-----------------------------------------------------------------------------

16
src/Combiner/AdvancedCombinerManager.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -22,18 +22,18 @@
#ifndef ADVANCED_COMBINER_MANAGER_H_
#define ADVANCED_COMBINER_MANAGER_H_
#include "GBIDefs.h"
#include "CombinerStructs.h"
#include "CombinerCache.h"
#include "CombinerStructs.h"
#include "GBIDefs.h"
//Forward declarations
struct TexEnvCombiner;
struct CombineCycle;
struct CombinerStage;
struct Combiner;
class AdvancedTexEnvCombiner;
class CombinerCache;
class CombinerBase;
class CombinerCache;
struct CombineCycle;
struct Combiner;
struct CombinerStage;
struct TexEnvCombiner;
//*****************************************************************************
//! Advanced Texture Environment Combiner

21
src/Combiner/AdvancedTexEnvCombiner.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -20,11 +20,12 @@
*****************************************************************************/
#include <algorithm>
using std::max;
#include "AdvancedTexEnvCombiner.h"
#include "CombinerStructs.h"
#include "MultiTexturingExt.h" //glActiveTextureARB
#include "ExtensionChecker.h"
#include "MultiTexturingExt.h" //glActiveTextureARB
#ifndef GL_ATI_texture_env_combine3
#define GL_ATI_texture_env_combine3
@ -81,9 +82,9 @@ static TexEnvCombinerArg TexEnvArgs[] =
{ GL_CONSTANT_ARB, GL_SRC_COLOR },
// K5
{ GL_CONSTANT_ARB, GL_SRC_COLOR },
// ONE
// CB_ONE
{ GL_CONSTANT_ARB, GL_SRC_COLOR },
// ZERO
// CB_ZERO
{ GL_CONSTANT_ARB, GL_SRC_COLOR }
};
@ -123,8 +124,8 @@ void AdvancedTexEnvCombiner::initialize()
if ( ATI_texture_env_combine3 )
{
TexEnvArgs[ONE].source = GL_ONE;
TexEnvArgs[ZERO].source = GL_ZERO;
TexEnvArgs[CB_ONE].source = GL_ONE;
TexEnvArgs[CB_ZERO].source = GL_ZERO;
}
}
@ -273,7 +274,7 @@ TexEnvCombiner* AdvancedTexEnvCombiner::createNewTextureEnviroment(Combiner* col
sb = m_primColor[3];
else if (alphaCombiner->stage[i].op[j].param1 == ENV_ALPHA)
sb = m_envColor[3];
else if (alphaCombiner->stage[i].op[j].param1 == ONE)
else if (alphaCombiner->stage[i].op[j].param1 == CB_ONE)
sb = 1.0f;
if (((alphaCombiner->stage[i].numOps - j) >= 3) &&
@ -286,7 +287,7 @@ TexEnvCombiner* AdvancedTexEnvCombiner::createNewTextureEnviroment(Combiner* col
envCombiner->usesT0 |= alphaCombiner->stage[i].op[j].param1 == TEXEL0_ALPHA;
envCombiner->usesT1 |= alphaCombiner->stage[i].op[j].param1 == TEXEL1_ALPHA;
if (alphaCombiner->stage[i].op[j].param1 == ONE)
if (alphaCombiner->stage[i].op[j].param1 == CB_ONE)
{
SetAlphaCombinerValues( curUnit, arg0, envCombiner->alpha[curUnit].arg0.source, GL_ONE_MINUS_SRC_ALPHA );
}
@ -342,7 +343,7 @@ TexEnvCombiner* AdvancedTexEnvCombiner::createNewTextureEnviroment(Combiner* col
(alphaCombiner->stage[i].op[j].param1 == TEXEL1_ALPHA) && (curUnit == 0))
curUnit++;
if ((j > 0) && (alphaCombiner->stage[i].op[j-1].op == LOAD) && (alphaCombiner->stage[i].op[j-1].param1 == ONE))
if ((j > 0) && (alphaCombiner->stage[i].op[j-1].op == LOAD) && (alphaCombiner->stage[i].op[j-1].param1 == CB_ONE))
{
SetAlphaCombinerArg( curUnit, arg0, alphaCombiner->stage[i].op[j].param1 );
envCombiner->alpha[curUnit].arg0.operand = GL_ONE_MINUS_SRC_ALPHA;
@ -481,7 +482,7 @@ TexEnvCombiner* AdvancedTexEnvCombiner::createNewTextureEnviroment(Combiner* col
((colorCombiner->stage[i].op[j].param1 == TEXEL1) || (colorCombiner->stage[i].op[j].param1 == TEXEL1_ALPHA)) && (curUnit == 0))
curUnit++;
if ((j > 0) && (colorCombiner->stage[i].op[j-1].op == LOAD) && (colorCombiner->stage[i].op[j-1].param1 == ONE))
if ((j > 0) && (colorCombiner->stage[i].op[j-1].op == LOAD) && (colorCombiner->stage[i].op[j-1].param1 == CB_ONE))
{
SetColorCombinerArg( curUnit, arg0, colorCombiner->stage[i].op[j].param1 );
envCombiner->color[curUnit].arg0.operand = GL_ONE_MINUS_SRC_COLOR;

3
src/Combiner/AdvancedTexEnvCombiner.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -25,6 +25,7 @@
#include "CombinerBase.h"
#include "CombinerStructs.h"
class AdvancedTexEnvCombiner;
struct TexEnvCombiner;
#ifndef GL_ARB_texture_env_combine

19
src/Combiner/CombinerBase.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -20,6 +20,7 @@
*****************************************************************************/
#include "CombinerBase.h"
#include "CombinerStructs.h"
//-----------------------------------------------------------------------------
@ -109,14 +110,14 @@ void CombinerBase::setEnvColor(float r, float g, float b, float a)
//! \arg \c PRIMITIVE_ALPHA Get color from primatives alpha value
//! \arg \c ENV_ALPHA Get color from environment colors alpha value
//! \arg \c PRIM_LOD_FRAC Get color from primative-LOD-frac value
//! \arg \c ONE Get white color
//! \arg \c ZERO Get black color
//! \arg \c CB_ONE Get white color
//! \arg \c CB_ZERO Get black color
//! @param[in] alphaSource From which alphasource to retrive alpha value
//! \arg \c PRIMITIVE_ALPHA Get alpha value from primitive colors alpha value
//! \arg \c ENV_ALPHA Get alpha value from environment colors alpha value
//! \arg \c PRIM_LOD_FRAC Get alpha value from primative-LOD-frac value
//! \arg \c ONE Set alpha value to 1.0
//! \arg \c ZERO Set alpha value to 0.0
//! \arg \c CB_ONE Set alpha value to 1.0
//! \arg \c CB_ZERO Set alpha value to 0.0
//! @param[out] out The combiner color with color and alpha value
//-----------------------------------------------------------------------------
void CombinerBase::getCombinerColor(float out[4], short colorSrc, short alphaSrc)
@ -149,12 +150,12 @@ void CombinerBase::getCombinerColor(float out[4], short colorSrc, short alphaSrc
out[1] = m_primLodFrac;
out[2] = m_primLodFrac;
break;
case ONE:
case CB_ONE:
out[0] = 1.0f;
out[1] = 1.0f;
out[2] = 1.0f;
break;
case ZERO:
case CB_ZERO:
out[0] = 0.0f;
out[1] = 0.0f;
out[2] = 0.0f;
@ -173,10 +174,10 @@ void CombinerBase::getCombinerColor(float out[4], short colorSrc, short alphaSrc
case PRIM_LOD_FRAC:
out[3] = m_primLodFrac;
break;
case ONE:
case CB_ONE:
out[3] = 1.0f;
break;
case ZERO:
case CB_ZERO:
out[3] = 0.0f;
break;
}

2
src/Combiner/CombinerBase.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

4
src/Combiner/CombinerCache.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -21,6 +21,8 @@
#include "CombinerCache.h"
#include "CombinerStructs.h"
//-----------------------------------------------------------------------------
//* New Compiled Combiner
//! Function used to add decoded mux values and the result of them to the list.

7
src/Combiner/CombinerCache.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -22,9 +22,12 @@
#ifndef COMBINER_CACHE_H_
#define COMBINER_CACHE_H_
#include "CombinerStructs.h"
#include <list>
#include "CombinerStructs.h"
struct TexEnvCombiner;
//*****************************************************************************
//* Cached Combiner
//! Struct used to store decoded mux values and the result of them

20
src/Combiner/CombinerStageCreator.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -28,6 +28,8 @@
#include "CombinerStageCreator.h"
#include "CombinerStructs.h"
//-----------------------------------------------------------------------------
//* Set Stage
//! Function used to set combiner stage, tries to simplify and optimize as
@ -44,10 +46,10 @@ void setStage(CombineCycle* combineCycle, CombinerStage* stageOut)
stageOut->numOps = 1;
// If we're just subtracting zero, skip it
if (combineCycle->subValue != ZERO)
if (combineCycle->subValue != CB_ZERO)
{
if (combineCycle->subValue == stageOut->op[0].param1)
stageOut->op[0].param1 = ZERO;
stageOut->op[0].param1 = CB_ZERO;
else
{
//Subract operation
@ -58,17 +60,17 @@ void setStage(CombineCycle* combineCycle, CombinerStage* stageOut)
}
//Multiply operation
if ((stageOut->numOps > 1) || (stageOut->op[0].param1 != ZERO))
if ((stageOut->numOps > 1) || (stageOut->op[0].param1 != CB_ZERO))
{
if (combineCycle->multValue == ZERO)
if (combineCycle->multValue == CB_ZERO)
{
stageOut->numOps = 1;
stageOut->op[0].op = LOAD;
stageOut->op[0].param1 = ZERO;
stageOut->op[0].param1 = CB_ZERO;
}
else
{
if ( stageOut->numOps == 1 && stageOut->op[0].param1 == ONE )
if ( stageOut->numOps == 1 && stageOut->op[0].param1 == CB_ONE )
{
//LOAD
stageOut->op[0].param1 = combineCycle->multValue;
@ -84,10 +86,10 @@ void setStage(CombineCycle* combineCycle, CombinerStage* stageOut)
}
//Don't bother adding zero
if (combineCycle->addValue != ZERO)
if (combineCycle->addValue != CB_ZERO)
{
// If all we have so far is zero, then load this instead
if ((stageOut->numOps == 1) && (stageOut->op[0].param1 == ZERO))
if ((stageOut->numOps == 1) && (stageOut->op[0].param1 == CB_ZERO))
{
stageOut->op[0].param1 = combineCycle->addValue;
}

7
src/Combiner/CombinerStageCreator.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -24,7 +24,10 @@
#include "CombinerStructs.h"
struct CombineCycle;
struct CombinerStage;
//Function used to set combiner stage
void setStage(CombineCycle* combineCycle, CombinerStage* stageOut);
#endif
#endif

2
src/Combiner/CombinerStageMerger.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

2
src/Combiner/CombinerStageMerger.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

8
src/Combiner/CombinerStructs.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -22,8 +22,8 @@
#ifndef COMBINER_STRUCTS_H_
#define COMBINER_STRUCTS_H_
#include "m64p.h"
#include "OpenGL.h"
#include "m64p.h"
// Internal combiner commands
#define LOAD 0
@ -53,8 +53,8 @@
#define NOISE 16
#define K4 17
#define K5 18
#define ONE 19
#define ZERO 20
#define CB_ONE 19
#define CB_ZERO 20
//* Combiner data
//! Defines how mux-values are coded.

4
src/Combiner/DummyCombiner.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,8 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "DummyCombiner.h"
#include "CombinerStructs.h"
#include "DummyCombiner.h"
#include "ExtensionChecker.h"
#include "MultiTexturingExt.h"

2
src/Combiner/DummyCombiner.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

12
src/Combiner/SimpleTexEnvCombiner.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,12 +19,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "SimpleTexEnvCombiner.h"
#include "CombinerStructs.h"
#include "MultiTexturingExt.h"
#include "ExtensionChecker.h"
#include "m64p.h"
#include "MultiTexturingExt.h"
#include "OpenGL.h"
#include "SimpleTexEnvCombiner.h"
#include "m64p.h"
//-----------------------------------------------------------------------------
//! Constructor
@ -172,7 +172,7 @@ TexEnvCombiner* SimpleTexEnvCombiner::createNewTextureEnviroment(Combiner* color
if (op->param1 == TEXEL0 || op->param1 == TEXEL0_ALPHA)
{
if ( mode == GL_MODULATE )
m_color = ONE;
m_color = CB_ONE;
m_usesTexture0 = true;
m_usesTexture1 = false;
@ -180,7 +180,7 @@ TexEnvCombiner* SimpleTexEnvCombiner::createNewTextureEnviroment(Combiner* color
else if ( op->param1 == TEXEL1 || op->param1 == TEXEL1_ALPHA )
{
if ( mode == GL_MODULATE )
m_color = ONE;
m_color = CB_ONE;
m_usesTexture0 = false;
m_usesTexture1 = true;

9
src/Combiner/SimpleTexEnvCombiner.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -22,14 +22,15 @@
#ifndef SIMPLE_TEX_ENV_COMBINER_H_
#define SIMPLE_TEX_ENV_COMBINER_H_
#include "GBIDefs.h"
#include "CombinerStructs.h"
#include "CombinerBase.h"
#include "CombinerStructs.h"
#include "GBIDefs.h"
//Forward declarations
struct CombineCycle;
struct CombinerStage;
struct Combiner;
struct CombinerStage;
struct TexEnvCombiner;
//*****************************************************************************
//! Simple Texture Environment Combiner

12
src/DisplayListParser.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -20,12 +20,14 @@
*****************************************************************************/
#include "DisplayListParser.h"
#include "Memory.h"
#include "GBI.h"
#include "RSP.h"
#include "RDP.h"
#include "OpenGLRenderer.h"
#include "GBIDefs.h"
#include "Memory.h"
#include "OpenGLRenderer.h"
#include "RDP.h"
#include "RSP.h"
#include "UCodeDefs.h"
//-----------------------------------------------------------------------------
//* Task

2
src/DisplayListParser.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

8
src/ExtensionChecker.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,9 +19,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "m64p.h"
#include "OpenGL.h"
#include <string.h>
#include "ExtensionChecker.h"
#include "OpenGL.h"
#include "m64p.h"
//-----------------------------------------------------------------------------
//! Is Extension Supported

6
src/ExtensionChecker.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,9 +19,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#ifndef EXTENSION_CHECKER_H
#ifndef EXTENSION_CHECKER_H_
#define EXTENSION_CHECKER_H_
bool isExtensionSupported( const char *extension );
#endif
#endif

6
src/FogManager.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2009 Jon Ring
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
@ -20,10 +20,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "FogManager.h"
#include "ExtensionChecker.h"
#include "m64p.h"
#include "FogManager.h"
#include "OpenGL.h"
#include "m64p.h"
#ifndef GL_GLEXT_VERSION
//-----------------------------------------------------------------------------

2
src/FogManager.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

16
src/GBI/GBI.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -20,14 +20,18 @@
*****************************************************************************/
#include "GBI.h"
#include "GBIDefs.h"
#include "RSP.h"
#include "RDP.h"
#include "UCodeSelector.h"
#include "UCodeIdentificationData.h"
#include "OpenGLManager.h"
#include "Logger.h"
#include "OpenGLManager.h"
#include "RDP.h"
#include "RSP.h"
#include "UCodeIdentificationData.h"
#include "UCodeSelector.h"
#include "m64p.h"
#include "m64p_types.h"
class DisplayListParser;
//-----------------------------------------------------------------------------
//! Static Variables

13
src/GBI/GBI.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -23,21 +23,22 @@
#define GRAPHIC_BINARY_INTERFACE_H_
#include "UCodeDefs.h"
#include "RDPInstructions.h"
#include "UCode0.h" //Super Mario 64
#include "UCode1.h" //Games like Mario Kart 64, Starfox 64
#include "UCode10.h" //Conker Bad Fur Day
#include "UCode2.h" //Golden Eye
#include "UCode4.h" //Wave Race 64
#include "UCode5.h" //Newer Games
#include "UCode6.h" //Diddy Kong Racing
#include "UCode7.h" //Yoshi's Story
#include "UCode9.h" //Perfect Dark
#include "UCode10.h" //Conker Bad Fur Day
#include "RDPInstructions.h"
#include "UCodeDefs.h"
class RSP;
class RDP;
class DisplayListParser;
class Memory;
class RDP;
class RSP;
class UCodeSelector;
// Allows easier setting of GBI commands

2
src/GBI/GBIDefs.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

28
src/GraphicsPlugin.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2009 Jon Ring
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
@ -20,20 +20,26 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "GraphicsPlugin.h"
#include "VI.h" //Video interface
#include "Memory.h" //Access to memory (RDRAM, Texture Memory)
#include "OpenGLRenderer.h" //Renderer
#include "FrameBuffer.h" //Framebuffer
#include <sys/time.h>
#include <ctime>
#include "ConfigMap.h" //Configuration
#include "DisplayListParser.h" //Displaylist parser
#include "FogManager.h" //Fog
#include "RSP.h" //Reality Signal Processor
#include "RDP.h" //Reality Drawing Processor
#include "FrameBuffer.h" //Framebuffer
#include "GBI.h" //Graphics Binary Interface
#include "ConfigMap.h" //Configuration
#include "GraphicsPlugin.h"
#include "Logger.h" //Debug logger
#include "Memory.h" //Access to memory (RDRAM, Texture Memory)
#include "OpenGL.h"
#include "OpenGLManager.h"
#include "OpenGLRenderer.h" //Renderer
#include "RDP.h" //Reality Drawing Processor
#include "RSP.h" //Reality Signal Processor
#include "RomDetector.h"
#include <ctime>
#include "VI.h" //Video interface
#include "m64p.h"
#include "m64p_types.h"
//FrameBuffer framebuffer01;
//FrameBuffer framebuffer02;
@ -101,7 +107,7 @@ bool GraphicsPlugin::initialize(GFX_INFO* graphicsInfo)
}
if (CoreVideo_SetVideoMode(m_config->fullscreenWidth, m_config->fullscreenHeight, m_config->fullscreenBitDepth,
m_config->startFullscreen ? M64VIDEO_FULLSCREEN : M64VIDEO_WINDOWED) != M64ERR_SUCCESS)
m_config->startFullscreen ? M64VIDEO_FULLSCREEN : M64VIDEO_WINDOWED, (m64p_video_flags) 0) != M64ERR_SUCCESS)
{
Logger::getSingleton().printMsg("Could not set video mode.", M64MSG_ERROR);
return false;

15
src/GraphicsPlugin.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2009 Jon Ring
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
@ -23,18 +23,21 @@
#ifndef GRAPHICS_PLUGIN_H_
#define GRAPHICS_PLUGIN_H_
#include "TextureCache.h"
#include "GBI.h"
#include "OpenGLManager.h" //Initializes OpenGL and handles OpenGL states
#include "RSP.h"
#include "RDP.h"
#include "RSP.h"
#include "TextureCache.h"
#include "m64p_plugin.h"
//Forward declarations
//struct GFX_INFO;
class VI;
class Memory;
class DisplayListParser;
class FogManager;
class Memory;
class OpenGLManager;
class ROMDetector;
//struct GFX_INFO;
class VI;
struct ConfigMap;
//*****************************************************************************

2
src/Memory.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

2
src/Memory.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

4
src/MultiTexturingExt.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,8 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "MultiTexturingExt.h"
#include "ExtensionChecker.h"
#include "MultiTexturingExt.h"
//Multi Texturing functions

4
src/MultiTexturingExt.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2009 Jon Ring
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
@ -23,8 +23,8 @@
#ifndef MULTI_TEXTURING_EXTENSION_H_
#define MULTI_TEXTURING_EXTENSION_H_
#include "m64p.h"
#include "OpenGL.h"
#include "m64p.h"
#ifndef GL_GLEXT_VERSION
//Multi Texturing Definitions

2
src/N64Games.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

8
src/OpenGL.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2009 Jon Ring
*
@ -24,7 +24,13 @@
#ifndef WIN32
#define GL_GLEXT_PROTOTYPES
#endif
#if defined(__MACOSX__)
#include <OpenGL/gl.h>
#elif defined(__MACOS__)
#include <gl.h>
#else
#include <GL/gl.h>
#endif
#ifndef WIN32
#include <GL/glext.h>
#endif

6
src/OpenGLManager.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2009 Jon Ring
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
@ -20,7 +20,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include <stddef.h>
#include "OpenGLManager.h"
#include "m64p.h"
//-----------------------------------------------------------------------------
//! Constructor
@ -55,6 +58,7 @@ bool OpenGLManager::initialize(bool fullscreen, int width, int height, int bitDe
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
glEnable(GL_DEPTH_TEST);
glEnable(GL_CULL_FACE);
this->setViewport(0, 0, width, height);
//Set render states
setCullMode(false, true);

4
src/OpenGLManager.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2009 Jon Ring
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
@ -23,9 +23,9 @@
#ifndef OPEN_GL_Manager_H_
#define OPEN_GL_Manager_H_
#include "OpenGL.h"
//OpenGL includes
#include "m64p.h"
#include "OpenGL.h"
//*****************************************************************************
//* OpenGL Manager Class

37
src/RDP/RDP.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,26 +19,31 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "RDP.h"
#include "GBIDefs.h"
#include "GBI.h"
#include "RSP.h"
#include "DisplayListParser.h"
#include "assembler.h"
#include "OpenGLRenderer.h"
#include "TextureCache.h"
#include "VI.h"
#include "Memory.h"
#include "OpenGLManager.h"
#include "OpenGL2DRenderer.h"
#include <algorithm>
#include "AdvancedCombinerManager.h"
#include "CachedTexture.h"
#include "DisplayListParser.h"
#include "FogManager.h"
#include "GBI.h"
#include "GBIDefs.h"
#include "Logger.h"
#include "MathLib.h"
#include "RomDetector.h"
#include "m64p.h"
#include "Memory.h"
#include "N64Games.h"
#include "OpenGL.h"
#include <algorithm>
#include "OpenGL2DRenderer.h"
#include "OpenGLManager.h"
#include "OpenGLRenderer.h"
#include "RDP.h"
#include "RSP.h"
#include "RomDetector.h"
#include "TextureCache.h"
#include "VI.h"
#include "assembler.h"
#include "m64p.h"
#include "m64p_types.h"
using std::max;
//-----------------------------------------------------------------------------

19
src/RDP/RDP.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -24,22 +24,23 @@
//Includes
#define M64P_PLUGIN_PROTOTYPES 1
#include "m64p_plugin.h"
#include "UCodeDefs.h"
#include "GBI.h"
#include "GBIDefs.h"
#include "TextureLoader.h"
#include "UCodeDefs.h"
#include "m64p_plugin.h"
//Forward declaration
class RSP;
class VI;
class Memory;
class DisplayListParser;
class TextureCache;
class AdvancedCombinerManager;
class DisplayListParser;
class FogManager;
class TextureLoader;
class GBI;
class Memory;
class OpenGL2DRenderer;
class RSP;
class TextureCache;
class TextureLoader;
class VI;
//*****************************************************************************
//! RDPSetImgInfo

9
src/RDP/RDPInstructions.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,11 +19,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "RDPInstructions.h"
#include "RDPUCodeStructs.h"
#include "RDP.h"
#include "DisplayListParser.h"
#include "Logger.h"
#include "RDP.h"
#include "RDPInstructions.h"
#include "RDPUCodeStructs.h"
#include "m64p_types.h"
//-----------------------------------------------------------------------------
// Static Variables

2
src/RDP/RDPInstructions.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

2
src/RDP/RDPUCodeStructs.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

29
src/RSP/RSP.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,21 +19,24 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "RSP.h"
#include "../UCodeDefs.h"
#include "../RDP/RDP.h"
#include <cmath>
#include "GBIDefs.h"
#include "VI.h"
#include "Memory.h"
#include "Logger.h"
#include "OpenGLRenderer.h"
#include "OpenGLManager.h"
#include "RSPLightManager.h"
#include "FogManager.h"
#include "../RDP/RDP.h"
#include "../UCodeDefs.h"
#include "DisplayListParser.h"
#include "FogManager.h"
#include "GBI.h"
#include "GBIDefs.h"
#include "Logger.h"
#include "MathLib.h"
#include "MathLib.h"
#include "Memory.h"
#include "OpenGLManager.h"
#include "OpenGLRenderer.h"
#include "RSP.h"
#include "RSPLightManager.h"
#include "RSPMatrixManager.h"
#include "VI.h"
#include "m64p_types.h"
#define MI_INTR_SP 0x00000001 //!< RSP Interrupt signal

19
src/RSP/RSP.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -23,20 +23,21 @@
#define REALITY_SIGNAL_PROCESSOR_H_
#define M64P_PLUGIN_PROTOTYPES 1
#include "m64p_plugin.h"
#include "UCodeDefs.h"
#include "Matrix4.h"
#include "RSPMatrixManager.h"
#include "RSPVertexManager.h"
#include "Matrix4.h"
#include "UCodeDefs.h"
#include "m64p_plugin.h"
//Forward declarations
class DisplayListParser;
class FogManager;
class Memory;
class RDP;
class RSPLightManager;
class RSPMatrixManager;
class VI;
struct RDPTile;
class RDP;
class Memory;
class DisplayListParser;
class RSPLightManager;
class FogManager;
//-----------------------------------------------------------------------------
// Defines

8
src/RSP/RSPLightManager.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,11 +19,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "RSPLightManager.h"
#include "Memory.h"
#include "MathLib.h"
#include "GBI.h"
#include "Logger.h"
#include "MathLib.h"
#include "Memory.h"
#include "RSPLightManager.h"
#define RGBA_GETALPHA(rgb) ((rgb) >> 24)
#define RGBA_GETRED(rgb) (((rgb) >> 16) & 0xff)

2
src/RSP/RSPLightManager.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

8
src/RSP/RSPMatrixManager.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,11 +19,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "RSPMatrixManager.h"
#include "Memory.h"
#include <cmath> //modff
#include "GBI.h" //SHIFT
#include "GBIDefs.h" //_FIXED2FLOAT
#include "Memory.h"
#include "RSPMatrixManager.h"
//-----------------------------------------------------------------------------
//! Constructor
//-----------------------------------------------------------------------------

2
src/RSP/RSPMatrixManager.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

22
src/RSP/RSPVertexManager.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,16 +19,20 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "RSPVertexManager.h"
#include "OpenGLManager.h"
#include "Memory.h"
#include "RSPMatrixManager.h"
#include "RSPLightManager.h"
#include "OpenGLRenderer.h"
#include "GBIDefs.h" //hmm
#include "MathLib.h" //Transform, Vec3Normalize
#include <cmath> //sqrt
#include "GBI.h"
#include "GBIDefs.h" //hmm
#include "Logger.h"
#include "MathLib.h" //Transform, Vec3Normalize
#include "Memory.h"
#include "OpenGL.h"
#include "OpenGLManager.h"
#include "OpenGLRenderer.h"
#include "RSPLightManager.h"
#include "RSPMatrixManager.h"
#include "RSPVertexManager.h"
#include "m64p_types.h"
//Vertex
struct Vertex

2
src/RSP/RSPVertexManager.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

7
src/RomDetector.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,10 +19,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "RomDetector.h"
#include "assembler.h" //swapRomHeaderBytes
#include <string.h> //memcpy
#include "RomDetector.h"
#include "StringFunctions.h"
#include "assembler.h" //swapRomHeaderBytes
//-----------------------------------------------------------------------------
//! Constructor

2
src/RomDetector.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

4
src/SecondaryColorExt.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,8 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "SecondaryColorExt.h"
#include "ExtensionChecker.h"
#include "SecondaryColorExt.h"
// EXT_secondary_color functions
#ifndef GL_GLEXT_VERSION

4
src/SecondaryColorExt.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2009 Jon Ring
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
@ -23,8 +23,8 @@
#ifndef SECONDARY_COLOR_EXTENSION_H_
#define SECONDARY_COLOR_EXTENSION_H_
#include "m64p.h"
#include "OpenGL.h"
#include "m64p.h"
#ifndef GL_GLEXT_VERSION
#ifndef GL_EXT_secondary_color

2
src/UCodeDefs.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

5
src/VI.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,8 +19,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "VI.h"
#include "GBI.h"
#include "GBIDefs.h" //_FIXED2FLOAT, _SHIFTR
#include "VI.h"
#include "m64p.h"
//-----------------------------------------------------------------------------

2
src/VI.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

6
src/config/Config.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2009 Jon Ring
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
@ -20,10 +20,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "Config.h"
#include <cstdio>
#include "Config.h"
#include "GraphicsPlugin.h"
#include "Logger.h"
#include "m64p.h"
//-----------------------------------------------------------------------------
//! Constructor

5
src/config/Config.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2009 Jon Ring
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
@ -23,8 +23,9 @@
#ifndef CONFIG_H_
#define CONFIG_H_
#include "m64p.h"
#include "ConfigMap.h"
#include "m64p.h"
#include "m64p_types.h"
//Forward declaration
class GraphicsPlugin;

2
src/config/ConfigMap.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

13
src/config/StringFunctions.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,8 +19,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "StringFunctions.h"
#include <ctype.h>
#include <cstring>
#include "StringFunctions.h"
using std::string;
using std::vector;
@ -95,6 +98,12 @@ void trim(string& str, bool left, bool right, const string delims)
//-----------------------------------------------------------------------------
char* trim(char* str, bool left, bool right)
{
// Empty string check
if (*str == '\0')
{
return str;
}
//Trim from the left
if(left)
{

7
src/config/StringFunctions.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -64,10 +64,11 @@ in binary (= untranslated) mode and check for the different newlines yourself.
#ifndef STRING_FUNCTIONS_H_
#define STRING_FUNCTIONS_H_
#include <ctype.h>
#include <stddef.h>
#include <algorithm> //std::transform
#include <string>
#include <vector>
#include <ctype.h>
#include <algorithm> //std::transform
namespace StringFunctions
{

4
src/config/StringValue.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -22,8 +22,8 @@
#ifndef STRING_VALUE_H_
#define STRING_VALUE_H_
#include <cstdlib>
#include <string>
#include <sstream>
#include <string>
//! Represents numeric value(s) with a string using conversion operators
struct StringValue

6
src/framebuffer/FrameBuffer.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,9 +19,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include <string.h>
#include "FrameBuffer.h"
#include "m64p.h"
#include "OpenGL.h"
#include "m64p.h"
#ifndef GL_GLEXT_VERSION
//-----------------------------------------------------------------------------

2
src/framebuffer/FrameBuffer.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

2
src/hash/CRCCalculator.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

2
src/hash/CRCCalculator.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

2
src/hash/CRCCalculator2.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

2
src/hash/CRCCalculator2.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

2
src/log/Logger.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2009 Jon Ring
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson

3
src/log/Logger.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2009 Jon Ring
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
@ -24,6 +24,7 @@
#define LOGGER_H_
#include <cstdlib>
#include "m64p_types.h"
//*****************************************************************************

7
src/m64p.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2009 Jon Ring
*
@ -32,9 +32,9 @@
#endif
#define M64P_PLUGIN_PROTOTYPES 1
#include "m64p_types.h"
#include "m64p_plugin.h"
#include "m64p_config.h"
#include "m64p_plugin.h"
#include "m64p_types.h"
#include "m64p_vidext.h"
/* definitions of pointers to Core config functions */
@ -63,6 +63,7 @@ extern ptr_VidExt_ListFullscreenModes CoreVideo_ListFullscreenModes;
extern ptr_VidExt_SetVideoMode CoreVideo_SetVideoMode;
extern ptr_VidExt_SetCaption CoreVideo_SetCaption;
extern ptr_VidExt_ToggleFullScreen CoreVideo_ToggleFullScreen;
extern ptr_VidExt_ResizeWindow CoreVideo_ResizeWindow;
extern ptr_VidExt_GL_GetProcAddress CoreVideo_GL_GetProcAddress;
extern ptr_VidExt_GL_SetAttribute CoreVideo_GL_SetAttribute;
extern ptr_VidExt_GL_SwapBuffers CoreVideo_GL_SwapBuffers;

37
src/main.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2009 Jon Ring
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
@ -22,26 +22,29 @@
//Includes
#define M64P_PLUGIN_PROTOTYPES 1
#include "m64p.h"
#include <stdio.h>
#include <string.h>
#include "ConfigMap.h"
#include "GraphicsPlugin.h" //Main class
#include "config/Config.h" //Configuration
#include "Logger.h" //Debug logger
#include "MemoryLeakDetector.h" //For detecting memory leaks
#include "m64p_types.h"
#include "OpenGLManager.h"
#include "config/Config.h" //Configuration
#include "m64p.h"
#include "m64p_common.h"
#include "m64p_plugin.h"
#include "m64p_config.h"
#include "m64p_plugin.h"
#include "m64p_types.h"
#include "m64p_vidext.h"
#include "osal_dynamiclib.h"
//Definitions
#define PLUGIN_NAME "Arachnoid Video Plugin"
#define PLUGIN_VERSION 0x016305
#define VIDEO_PLUGIN_API_VERSION 0x020100
#define PLUGIN_VERSION 0x020600
#define VIDEO_PLUGIN_API_VERSION 0x020200
#define CONFIG_API_VERSION 0x020000
#define VIDEXT_API_VERSION 0x020000
#define VIDEXT_API_VERSION 0x030000
#define VERSION_PRINTF_SPLIT(x) (((x) >> 16) & 0xffff), (((x) >> 8) & 0xff), ((x) & 0xff)
@ -86,6 +89,7 @@ ptr_VidExt_ListFullscreenModes CoreVideo_ListFullscreenModes = NULL;
ptr_VidExt_SetVideoMode CoreVideo_SetVideoMode = NULL;
ptr_VidExt_SetCaption CoreVideo_SetCaption = NULL;
ptr_VidExt_ToggleFullScreen CoreVideo_ToggleFullScreen = NULL;
ptr_VidExt_ResizeWindow CoreVideo_ResizeWindow = NULL;
ptr_VidExt_GL_GetProcAddress CoreVideo_GL_GetProcAddress = NULL;
ptr_VidExt_GL_SetAttribute CoreVideo_GL_SetAttribute = NULL;
ptr_VidExt_GL_SwapBuffers CoreVideo_GL_SwapBuffers = NULL;
@ -163,13 +167,14 @@ EXPORT m64p_error CALL PluginStartup(m64p_dynlib_handle CoreLibHandle, void *Con
CoreVideo_SetVideoMode = (ptr_VidExt_SetVideoMode) osal_dynlib_getproc(CoreLibHandle, "VidExt_SetVideoMode");
CoreVideo_SetCaption = (ptr_VidExt_SetCaption) osal_dynlib_getproc(CoreLibHandle, "VidExt_SetCaption");
CoreVideo_ToggleFullScreen = (ptr_VidExt_ToggleFullScreen) osal_dynlib_getproc(CoreLibHandle, "VidExt_ToggleFullScreen");
CoreVideo_ResizeWindow = (ptr_VidExt_ResizeWindow) osal_dynlib_getproc(CoreLibHandle, "VidExt_ResizeWindow");
CoreVideo_GL_GetProcAddress = (ptr_VidExt_GL_GetProcAddress) osal_dynlib_getproc(CoreLibHandle, "VidExt_GL_GetProcAddress");
CoreVideo_GL_SetAttribute = (ptr_VidExt_GL_SetAttribute) osal_dynlib_getproc(CoreLibHandle, "VidExt_GL_SetAttribute");
CoreVideo_GL_SwapBuffers = (ptr_VidExt_GL_SwapBuffers) osal_dynlib_getproc(CoreLibHandle, "VidExt_GL_SwapBuffers");
if (!CoreVideo_Init || !CoreVideo_Quit || !CoreVideo_ListFullscreenModes || !CoreVideo_SetVideoMode ||
!CoreVideo_SetCaption || !CoreVideo_ToggleFullScreen || !CoreVideo_GL_GetProcAddress ||
!CoreVideo_GL_SetAttribute || !CoreVideo_GL_SwapBuffers)
!CoreVideo_GL_SetAttribute || !CoreVideo_GL_SwapBuffers || !CoreVideo_ResizeWindow)
{
Logger::getSingleton().printMsg("Couldn't connect to Core video functions", M64MSG_ERROR);
return M64ERR_INCOMPATIBLE;
@ -257,6 +262,16 @@ EXPORT int CALL RomOpen()
return g_graphicsPlugin.initialize(&g_graphicsInfo);
}
//-----------------------------------------------------------------------------
//* Resize Video Output
//! This function is called to force us to resize our output OpenGL window.
//! This is currently unsupported, and should never be called because we do
//! not pass the RESIZABLE flag to VidExt_SetVideoMode when initializing.
//-----------------------------------------------------------------------------
EXPORT void CALL ResizeVideoOutput(int Width, int Height)
{
}
//-----------------------------------------------------------------------------
//* Rom Closed
//! This function is called when a rom is closed.

3
src/math/MathLib.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -23,6 +23,7 @@
#define MATH_LIBRARY_H_
#include <cmath> //sqrtf
#include "m64p.h"
// Formula: a.b = a0*b0 + a1*b1 + a2*b2

2
src/math/Matrix4.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

3
src/math/Matrix4.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -22,6 +22,7 @@
#ifndef MATRIX_4_H_
#define MATRIX_4_H_
#include <stddef.h>
#include <iostream>
#include <ostream>

2
src/osal_dynamiclib.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Mupen64plus-core - osal/dynamiclib.h *
* Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
* Mupen64Plus homepage: https://mupen64plus.org/ *
* Copyright (C) 2009 Richard Goedeken *
* *
* This program is free software; you can redistribute it and/or modify *

6
src/osal_dynamiclib_unix.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Mupen64plus-core - osal/dynamiclib_unix.c *
* Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
* Mupen64Plus homepage: https://mupen64plus.org/ *
* Copyright (C) 2009 Richard Goedeken *
* *
* This program is free software; you can redistribute it and/or modify *
@ -19,9 +19,9 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <stdlib.h>
#include <stdio.h>
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include "m64p_types.h"
#include "osal_dynamiclib.h"

146
src/osal_dynamiclib_win32.cpp Executable file → Normal file
View file

@ -1,74 +1,74 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Arachnoid Graphics Plugin for Mupen64Plus *
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/ *
* Copyright (C) 2009 Richard Goedeken *
* *
* 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. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include "m64p_types.h"
#include "osal_dynamiclib.h"
m64p_error osal_dynlib_open(m64p_dynlib_handle *pLibHandle, const char *pccLibraryPath)
{
if (pLibHandle == NULL || pccLibraryPath == NULL)
return M64ERR_INPUT_ASSERT;
*pLibHandle = LoadLibrary(pccLibraryPath);
if (*pLibHandle == NULL)
{
char *pchErrMsg;
DWORD dwErr = GetLastError();
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwErr,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &pchErrMsg, 0, NULL);
fprintf(stderr, "LoadLibrary('%s') error: %s\n", pccLibraryPath, pchErrMsg);
LocalFree(pchErrMsg);
return M64ERR_INPUT_NOT_FOUND;
}
return M64ERR_SUCCESS;
}
void * osal_dynlib_getproc(m64p_dynlib_handle LibHandle, const char *pccProcedureName)
{
if (pccProcedureName == NULL)
return NULL;
return GetProcAddress(LibHandle, pccProcedureName);
}
m64p_error osal_dynlib_close(m64p_dynlib_handle LibHandle)
{
int rval = FreeLibrary(LibHandle);
if (rval == 0)
{
char *pchErrMsg;
DWORD dwErr = GetLastError();
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwErr,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &pchErrMsg, 0, NULL);
fprintf(stderr, "FreeLibrary() error: %s\n", pchErrMsg);
LocalFree(pchErrMsg);
return M64ERR_INTERNAL;
}
return M64ERR_SUCCESS;
}
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/ *
* Copyright (C) 2009 Richard Goedeken *
* *
* 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. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include "m64p_types.h"
#include "osal_dynamiclib.h"
m64p_error osal_dynlib_open(m64p_dynlib_handle *pLibHandle, const char *pccLibraryPath)
{
if (pLibHandle == NULL || pccLibraryPath == NULL)
return M64ERR_INPUT_ASSERT;
*pLibHandle = LoadLibrary(pccLibraryPath);
if (*pLibHandle == NULL)
{
char *pchErrMsg;
DWORD dwErr = GetLastError();
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwErr,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &pchErrMsg, 0, NULL);
fprintf(stderr, "LoadLibrary('%s') error: %s\n", pccLibraryPath, pchErrMsg);
LocalFree(pchErrMsg);
return M64ERR_INPUT_NOT_FOUND;
}
return M64ERR_SUCCESS;
}
void * osal_dynlib_getproc(m64p_dynlib_handle LibHandle, const char *pccProcedureName)
{
if (pccProcedureName == NULL)
return NULL;
return (void *)GetProcAddress(LibHandle, pccProcedureName);
}
m64p_error osal_dynlib_close(m64p_dynlib_handle LibHandle)
{
int rval = FreeLibrary(LibHandle);
if (rval == 0)
{
char *pchErrMsg;
DWORD dwErr = GetLastError();
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwErr,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &pchErrMsg, 0, NULL);
fprintf(stderr, "FreeLibrary() error: %s\n", pchErrMsg);
LocalFree(pchErrMsg);
return M64ERR_INTERNAL;
}
return M64ERR_SUCCESS;
}

4
src/renderer/OpenGL2DRenderer.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,10 +19,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "OpenGL.h"
#include "OpenGL2DRenderer.h"
#include "VI.h"
#include "m64p.h"
#include "OpenGL.h"
//-----------------------------------------------------------------------------
//* Initialize

2
src/renderer/OpenGL2DRenderer.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

30
src/renderer/OpenGLRenderer.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2009 Jon Ring
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
@ -20,23 +20,29 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "m64p.h"
#include <cmath>
#include <algorithm>
#include "OpenGLRenderer.h"
#include "OpenGLManager.h"
#include "RSP.h"
#include "RDP.h"
#include "TextureCache.h"
#include "VI.h"
#include "Logger.h"
#include <cmath>
//#include "CombinerManager.h"
#include "AdvancedCombinerManager.h"
#include "FogManager.h"
#include "CachedTexture.h"
#include "ExtensionChecker.h"
#include "FogManager.h"
#include "GBIDefs.h"
#include "Logger.h"
#include "MultiTexturingExt.h"
#include "OpenGL.h"
#include "OpenGLManager.h"
#include "OpenGLRenderer.h"
#include "RDP.h"
#include "RSP.h"
#include "RSPVertexManager.h"
#include "SecondaryColorExt.h"
#include "TextureCache.h"
#include "TextureLoader.h"
#include "VI.h"
#include "m64p.h"
#include "m64p_types.h"
using std::max;

13
src/renderer/OpenGLRenderer.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -22,18 +22,17 @@
#ifndef OPEN_GL_RENDERER_H_
#define OPEN_GL_RENDERER_H_
#include "m64p.h"
#include "MultiTexturingExt.h"
#include "OpenGL.h"
#include "m64p.h"
//Forward Declarations
struct SPVertex;
class RSP;
class FogManager;
class RDP;
class RSP;
class TextureCache;
class VI;
class FogManager;
#include "MultiTexturingExt.h"
struct SPVertex;
//*****************************************************************************

4
src/texture/CachedTexture.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -21,8 +21,8 @@
#include "CachedTexture.h"
#include "m64p.h"
#include "OpenGL.h"
#include "m64p.h"
//-----------------------------------------------------------------------------
//! Constructor

2
src/texture/CachedTexture.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

10
src/texture/ImageFormatSelector.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -26,13 +26,13 @@
//
//*****************************************************************************
#include "ImageFormatSelector.h"
#include "CachedTexture.h"
#include "assembler.h"
#include "GBIDefs.h"
#include "m64p.h"
#include "OpenGL.h"
#include "ImageFormatSelector.h"
#include "Memory.h"
#include "OpenGL.h"
#include "assembler.h"
#include "m64p.h"
#ifndef GL_EXT_packed_pixels
#define GL_EXT_packed_pixels 1

2
src/texture/ImageFormatSelector.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*

23
src/texture/TextureCache.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,27 +19,32 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "TextureCache.h"
#include <algorithm>
#include "CachedTexture.h"
#include "GBIDefs.h"
#include "MathLib.h"
#include "OpenGL.h"
#include "RDP.h"
#include "RSP.h"
#include "CachedTexture.h"
#include "MathLib.h"
#include <algorithm>
#include "TextureCache.h"
#include "TextureLoader.h"
using std::min;
#include "m64p.h"
#include "OpenGL.h"
#include "Memory.h"
#include "OpenGLRenderer.h"
#include "MultiTexturingExt.h"
#include "OpenGLRenderer.h"
#include "m64p.h"
//gSPBgRect1Cyc
//gSPBgRectCopy
#define GL_CLAMP_TO_EDGE 0x812F
#define GL_GENERATE_MIPMAP 0x8191
#include "Logger.h"
#include <iostream>
#include "Logger.h"
//-----------------------------------------------------------------------------
//! Constructor
//-----------------------------------------------------------------------------

12
src/texture/TextureCache.h Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -22,15 +22,17 @@
#ifndef TEXTURE_CACHE_H_
#define TEXTURE_CACHE_H_
#include "CachedTexture.h"
#include "CRCCalculator2.h"
#include "ImageFormatSelector.h"
#include <list>
#include "CRCCalculator2.h"
#include "CachedTexture.h"
#include "ImageFormatSelector.h"
//Forward declarations
class CachedTexture;
class Memory;
class RSP;
class RDP;
class RSP;
//*****************************************************************************
//* Texture Cache

17
src/texture/TextureLoader.cpp Executable file → Normal file
View file

@ -1,6 +1,6 @@
/******************************************************************************
* Arachnoid Graphics Plugin for Mupen64Plus
* http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
* https://github.com/mupen64plus/mupen64plus-video-arachnoid/
*
* Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
*
@ -19,14 +19,15 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*****************************************************************************/
#include "TextureLoader.h"
#include "Memory.h"
#include "TextureCache.h"
#include "GBIDefs.h"
#include "assembler.h"
#include "Logger.h"
#include "RDP.h"
#include "CRCCalculator2.h"
#include "GBI.h"
#include "GBIDefs.h"
#include "Logger.h"
#include "Memory.h"
#include "RDP.h"
#include "TextureCache.h"
#include "TextureLoader.h"
#include "assembler.h"
//-----------------------------------------------------------------------------
//! Constructor

Some files were not shown because too many files have changed in this diff Show more