mirror of
https://github.com/whoahq/whoa.git
synced 2026-09-10 04:44:54 +03:00
chore: initial commit
This commit is contained in:
commit
70b00c5c38
17
.editorconfig
Normal file
17
.editorconfig
Normal file
@ -0,0 +1,17 @@
|
||||
root = true
|
||||
|
||||
[src/**/*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[test/**/*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
35
.github/workflows/pr.yml
vendored
Normal file
35
.github/workflows/pr.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
name: PR
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: ${{ matrix.config.name }}
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- name: Ubuntu Latest (GCC)
|
||||
os: ubuntu-latest
|
||||
build_type: Release
|
||||
cc: "gcc"
|
||||
cxx: "g++"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Prepare
|
||||
run: mkdir build
|
||||
|
||||
- name: Configure
|
||||
run: cd build && cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }}
|
||||
|
||||
- name: Build
|
||||
run: cd build && make install
|
||||
|
||||
- name: Test
|
||||
run: cd build && ./dist/bin/WhoaTest
|
||||
38
.github/workflows/push.yml
vendored
Normal file
38
.github/workflows/push.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
name: Push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: ${{ matrix.config.name }}
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- name: Ubuntu Latest (GCC)
|
||||
os: ubuntu-latest
|
||||
build_type: Release
|
||||
cc: "gcc"
|
||||
cxx: "g++"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Prepare
|
||||
run: mkdir build
|
||||
|
||||
- name: Configure
|
||||
run: cd build && cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }}
|
||||
|
||||
- name: Build
|
||||
run: cd build && make install
|
||||
|
||||
- name: Test
|
||||
run: cd build && ./dist/bin/WhoaTest
|
||||
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
.DS_Store
|
||||
.vscode
|
||||
.idea
|
||||
|
||||
/build
|
||||
/cmake-build-*
|
||||
|
||||
12
.gitmodules
vendored
Normal file
12
.gitmodules
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
[submodule "lib/common"]
|
||||
path = lib/common
|
||||
url = https://github.com/whoahq/common.git
|
||||
[submodule "lib/squall"]
|
||||
path = lib/squall
|
||||
url = https://github.com/whoahq/squall.git
|
||||
[submodule "lib/typhoon"]
|
||||
path = lib/typhoon
|
||||
url = https://github.com/whoahq/typhoon.git
|
||||
[submodule "lib/system"]
|
||||
path = lib/system
|
||||
url = https://github.com/whoahq/system.git
|
||||
50
CMakeLists.txt
Normal file
50
CMakeLists.txt
Normal file
@ -0,0 +1,50 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
message(FATAL_ERROR
|
||||
"In-source builds not allowed.
|
||||
Please make a new directory (called a build directory) and run CMake from there.
|
||||
You may need to remove CMakeCache.txt."
|
||||
)
|
||||
endif()
|
||||
|
||||
# OS variables
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14" CACHE STRING "macOS Deployment Target" FORCE)
|
||||
|
||||
# Project
|
||||
project(whoa)
|
||||
|
||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX "dist" CACHE PATH "Installation prefix" FORCE)
|
||||
endif()
|
||||
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
|
||||
# Some templates abuse offsetof
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof")
|
||||
|
||||
# OS defines
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
add_definitions(
|
||||
-DGL_SILENCE_DEPRECATION
|
||||
)
|
||||
endif()
|
||||
|
||||
include(lib/system/cmake/system.cmake)
|
||||
|
||||
# Threads
|
||||
if(WHOA_SYSTEM_LINUX OR WHOA_SYSTEM_MAC)
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
|
||||
add_subdirectory(lib)
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(test)
|
||||
add_subdirectory(vendor)
|
||||
47
README.md
Normal file
47
README.md
Normal file
@ -0,0 +1,47 @@
|
||||
# Whoa
|
||||
|
||||
Welcome to Whoa, a reimplementation of World of Warcraft 3.3.5a (build 12340) in C++11.
|
||||
|
||||
## Supported Platforms
|
||||
|
||||
Currently, macOS 10.14+ is supported, including recent versions of macOS on M1 processors. Support for Linux is in progress. Support for Windows is coming soon™.
|
||||
|
||||
## Building
|
||||
|
||||
To build, ensure you have a recent version of CMake installed, and run the following from the `whoa` directory:
|
||||
|
||||
```
|
||||
mkdir build && cd build
|
||||
cmake ..
|
||||
make install
|
||||
```
|
||||
|
||||
Assuming all went well, you should see a `dist/bin` directory appear in the `build` directory. The `bin` directory will contain a `whoa` executable.
|
||||
|
||||
## Running
|
||||
|
||||
Whoa doesn't currently support reading from MPQ archives. Instead, it assumes you are launching the Whoa executable from the root of a fully extracted MPQ archive set for World of Warcraft 3.3.5a (build 12340). You can obtain a valid set of MPQ archives to extract by installing World of Warcraft 3.3.5a from legally purchased original install media. Whoa does not provide any copy of game data.
|
||||
|
||||
Assuming all goes well, you should be greeted by the login screen, complete with its flying dragon animation loop.
|
||||
|
||||
Whoa is very much a work-in-progress: it does not fully connect to a login server, does not play back sound or music, and does not support customizing settings. These things will be supported over time.
|
||||
|
||||
## FAQ
|
||||
|
||||
**Why?**
|
||||
|
||||
It's fascinating to explore the development practices used to build a modern major video game.
|
||||
|
||||
**Why 3.3.5a?**
|
||||
|
||||
The game and its libraries have become significantly more complex in the intervening 10+ years. By picking 3.3.5a, it's possible to imagine this implementation will eventually be complete.
|
||||
|
||||
**Can I use this in my own development projects?**
|
||||
|
||||
It's probably a bad idea. The game is closed source, and this project is in no way official.
|
||||
|
||||
## Legal
|
||||
|
||||
This project is released into the public domain.
|
||||
|
||||
World of Warcraft: Wrath of the Lich King ©2008 Blizzard Entertainment, Inc. All rights reserved. Wrath of the Lich King is a trademark, and World of Warcraft, Warcraft and Blizzard Entertainment are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries.
|
||||
4
lib/CMakeLists.txt
Normal file
4
lib/CMakeLists.txt
Normal file
@ -0,0 +1,4 @@
|
||||
add_subdirectory(common)
|
||||
add_subdirectory(squall)
|
||||
add_subdirectory(system)
|
||||
add_subdirectory(typhoon)
|
||||
1
lib/common
Submodule
1
lib/common
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit ff3c28bbd910983147ddc1d99d83c482ae23df7d
|
||||
1
lib/squall
Submodule
1
lib/squall
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit e3b0c356adc0abb4ad5c549951a5423b6edaf64d
|
||||
1
lib/system
Submodule
1
lib/system
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit f886ab5bc35b2e0d968baa8dec3faaccf385fbc3
|
||||
1
lib/typhoon
Submodule
1
lib/typhoon
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 36d177759d273ae599e7c99920466e4886d57a41
|
||||
13
src/CMakeLists.txt
Normal file
13
src/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
add_subdirectory(app)
|
||||
add_subdirectory(async)
|
||||
add_subdirectory(client)
|
||||
add_subdirectory(event)
|
||||
add_subdirectory(glue)
|
||||
add_subdirectory(gx)
|
||||
add_subdirectory(math)
|
||||
add_subdirectory(model)
|
||||
add_subdirectory(net)
|
||||
add_subdirectory(sound)
|
||||
add_subdirectory(ui)
|
||||
add_subdirectory(util)
|
||||
add_subdirectory(world)
|
||||
48
src/app/CMakeLists.txt
Normal file
48
src/app/CMakeLists.txt
Normal file
@ -0,0 +1,48 @@
|
||||
if(WHOA_SYSTEM_MAC)
|
||||
file(GLOB PRIVATE_SOURCES "mac/*.cpp" "mac/*.mm")
|
||||
|
||||
set_source_files_properties(${PRIVATE_SOURCES}
|
||||
PROPERTIES COMPILE_FLAGS "-x objective-c++"
|
||||
)
|
||||
|
||||
add_executable(Whoa ${PRIVATE_SOURCES})
|
||||
|
||||
target_link_libraries(Whoa
|
||||
PRIVATE
|
||||
client
|
||||
event
|
||||
gx
|
||||
net
|
||||
util
|
||||
"-framework AppKit"
|
||||
"-framework Carbon"
|
||||
"-framework IOKit"
|
||||
)
|
||||
|
||||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/mac/MainMenu.nib DESTINATION "bin")
|
||||
endif()
|
||||
|
||||
if(WHOA_SYSTEM_LINUX)
|
||||
file(GLOB PRIVATE_SOURCES "linux/*.cpp")
|
||||
|
||||
add_executable(Whoa ${PRIVATE_SOURCES})
|
||||
|
||||
target_link_libraries(Whoa
|
||||
PRIVATE
|
||||
client
|
||||
event
|
||||
gx
|
||||
net
|
||||
util
|
||||
)
|
||||
endif()
|
||||
|
||||
target_include_directories(Whoa
|
||||
PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
# Windows executables yet to be done
|
||||
if(WHOA_SYSTEM_MAC OR WHOA_SYSTEM_LINUX)
|
||||
install(TARGETS Whoa DESTINATION "bin")
|
||||
endif()
|
||||
11
src/app/linux/Wowre.cpp
Normal file
11
src/app/linux/Wowre.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
| < | ||||