Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 31ca5ff0fb | |||
| 96bd7d36ba |
Generated
+6
-6
@@ -62,11 +62,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775036866,
|
"lastModified": 1775423009,
|
||||||
"narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=",
|
"narHash": "sha256-vPKLpjhIVWdDrfiUM8atW6YkIggCEKdSAlJPzzhkQlw=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
|
"rev": "68d8aa3d661f0e6bd5862291b5bb263b2a6595c9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -108,11 +108,11 @@
|
|||||||
"simdutf": {
|
"simdutf": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775095916,
|
"lastModified": 1775422815,
|
||||||
"narHash": "sha256-eKMjANt0fbqemtll6iSiFHwYzGWAsuZoVqOXqXNfodc=",
|
"narHash": "sha256-ybQGXx7ULmlaiNUEEAGJurblG3sA1HzLTuXE8t/LFnM=",
|
||||||
"owner": "simdutf",
|
"owner": "simdutf",
|
||||||
"repo": "simdutf",
|
"repo": "simdutf",
|
||||||
"rev": "1ac2c2245ce9df6a7d26550e34734882c4a16e9b",
|
"rev": "06258b2c046d233fa53957cced61bc279fadfb41",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
+50
-66
@@ -1,21 +1,16 @@
|
|||||||
# MARK: build configuration
|
|
||||||
|
|
||||||
project(
|
project(
|
||||||
'4jcraft',
|
'4jcraft',
|
||||||
['cpp', 'c'],
|
['cpp', 'c'],
|
||||||
version: '0.1.0',
|
version: '0.1.0',
|
||||||
meson_version: '>= 1.3',
|
meson_version: '>= 1.3',
|
||||||
default_options: [
|
default_options: [
|
||||||
'cpp_std=c++20',
|
'cpp_std=c++23',
|
||||||
'warning_level=0',
|
'warning_level=0',
|
||||||
'unity=on', # merge source files per target
|
'buildtype=debugoptimized', # for now
|
||||||
'unity_size=8', # TODO: mess around with this
|
'unity=on', # merge source files per target
|
||||||
'buildtype=debug',
|
'unity_size=8', # TODO: mess around with this
|
||||||
'b_pch=true', # precompiled headers
|
'b_pch=true', # precompiled headers
|
||||||
'default_library=static', # static linkage to subprojects
|
],
|
||||||
# 'b_lto=true', # link-time optimisation (ThinLTO under clang+lld)
|
|
||||||
# 'b_ndebug=if-release', # drop assert() in --buildtype=release
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
pymod = import('python')
|
pymod = import('python')
|
||||||
@@ -23,33 +18,31 @@ python = pymod.find_installation('python3', required: true)
|
|||||||
|
|
||||||
cc = meson.get_compiler('cpp')
|
cc = meson.get_compiler('cpp')
|
||||||
|
|
||||||
global_cpp_args = []
|
|
||||||
global_cpp_defs = [
|
global_cpp_defs = [
|
||||||
'-DSPLIT_SAVES',
|
'-DSPLIT_SAVES',
|
||||||
'-D_LARGE_WORLDS',
|
'-D_LARGE_WORLDS',
|
||||||
'-D_EXTENDED_ACHIEVEMENTS',
|
'-D_EXTENDED_ACHIEVEMENTS',
|
||||||
'-DMULTITHREAD_ENABLE', # always-on threading flag (formerly in App_Defines.h)
|
'-D_DEBUG_MENUS_ENABLED',
|
||||||
|
'-D_DEBUG',
|
||||||
|
'-D_FORTIFY_SOURCE=2',
|
||||||
|
'-DDEBUG',
|
||||||
]
|
]
|
||||||
|
|
||||||
# Debug-only defines: keep for debug + debugoptimized so iteration is unchanged.
|
if host_machine.system() == 'linux'
|
||||||
# --buildtype=release strips them so shipping builds don't carry debug logging,
|
global_cpp_defs += ['-Dlinux', '-D__linux', '-D__linux__']
|
||||||
# debug menu UI, or assert-driven sanity checks.
|
|
||||||
if get_option('buildtype') in ['debug', 'debugoptimized']
|
|
||||||
global_cpp_defs += [
|
|
||||||
'-D_DEBUG',
|
|
||||||
'-DDEBUG',
|
|
||||||
'-D_DEBUG_MENUS_ENABLED',
|
|
||||||
]
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('buildtype') == 'debugoptimized'
|
if get_option('renderer') == 'gles'
|
||||||
global_cpp_defs += ['-D_FORTIFY_SOURCE=2']
|
global_cpp_defs += ['-DGLES']
|
||||||
|
gl_dep = dependency('glesv2', required: true)
|
||||||
|
glu_dep = dependency('', required: false)
|
||||||
|
else
|
||||||
|
gl_dep = dependency('gl', required: true)
|
||||||
|
glu_dep = dependency('glu', required: true)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# MARK: meson options
|
|
||||||
|
|
||||||
if get_option('enable_vsync')
|
if get_option('enable_vsync')
|
||||||
global_cpp_defs += ['-DENABLE_VSYNC']
|
global_cpp_defs += ['-DENABLE_VSYNC']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('classic_panorama')
|
if get_option('classic_panorama')
|
||||||
@@ -57,52 +50,43 @@ if get_option('classic_panorama')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('enable_frame_profiler')
|
if get_option('enable_frame_profiler')
|
||||||
global_cpp_defs += ['-DENABLE_FRAME_PROFILER']
|
global_cpp_defs += ['-DENABLE_FRAME_PROFILER']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('ui_backend') == 'shiggy'
|
if get_option('ui_backend') == 'shiggy'
|
||||||
global_cpp_defs += ['-D_ENABLEIGGY']
|
global_cpp_defs += ['-D_ENABLEIGGY']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('ui_backend') == 'java'
|
if get_option('ui_backend') == 'java'
|
||||||
global_cpp_defs += '-DENABLE_JAVA_GUIS'
|
global_cpp_defs += '-DENABLE_JAVA_GUIS'
|
||||||
endif
|
|
||||||
|
|
||||||
if get_option('occlusion_culling') == 'off'
|
|
||||||
global_cpp_defs += ['-DOCCLUSION_MODE_NONE']
|
|
||||||
elif get_option('occlusion_culling') == 'frustum'
|
|
||||||
global_cpp_defs += ['-DOCCLUSION_MODE_FRUSTUM']
|
|
||||||
elif get_option('occlusion_culling') == 'bfs'
|
|
||||||
global_cpp_defs += ['-DOCCLUSION_MODE_BFS', '-DUSE_OCCLUSION_CULLING']
|
|
||||||
elif get_option('occlusion_culling') == 'hardware'
|
|
||||||
global_cpp_defs += ['-DOCCLUSION_MODE_HARDWARE', '-DUSE_OCCLUSION_CULLING']
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
add_project_arguments(global_cpp_defs, language: ['cpp', 'c'])
|
add_project_arguments(global_cpp_defs, language: ['cpp', 'c'])
|
||||||
|
|
||||||
|
global_cpp_args = [
|
||||||
|
'-Wshift-count-overflow',
|
||||||
|
'-pipe',
|
||||||
|
]
|
||||||
add_project_arguments(global_cpp_args, language: 'cpp')
|
add_project_arguments(global_cpp_args, language: 'cpp')
|
||||||
|
|
||||||
|
sdl2_dep = dependency('sdl2')
|
||||||
|
thread_dep = dependency('threads')
|
||||||
|
dl_dep = cc.find_library('dl', required: true)
|
||||||
|
glm_dep = dependency('glm')
|
||||||
|
|
||||||
|
stb = subproject('stb').get_variable('stb_inc')
|
||||||
|
stb_dep = declare_dependency(include_directories: stb)
|
||||||
|
simdutf_dep = dependency('simdutf',
|
||||||
|
fallback: ['simdutf', 'simdutf_dep'],
|
||||||
|
default_options: ['utf8=true', 'utf16=true', 'utf32=true']
|
||||||
|
)
|
||||||
|
miniaudio_dep = dependency('miniaudio')
|
||||||
|
|
||||||
subdir('targets/util')
|
subdir('targets/util')
|
||||||
subdir('targets/java')
|
subdir('targets/java')
|
||||||
subdir('targets/nbt')
|
subdir('targets/nbt')
|
||||||
subdir('targets/platform')
|
subdir('targets/platform')
|
||||||
|
|
||||||
# MARK: platform configuration
|
|
||||||
|
|
||||||
if host_machine.system() in ['linux', 'windows']
|
|
||||||
platform_fs_dep = platform_fs_std_dep
|
|
||||||
platform_game_dep = platform_game_stub_dep
|
|
||||||
platform_input_dep = platform_input_sdl2_dep
|
|
||||||
platform_leaderboard_dep = platform_leaderboard_stub_dep
|
|
||||||
platform_network_dep = platform_network_stub_dep
|
|
||||||
platform_profile_dep = platform_profile_stub_dep
|
|
||||||
platform_renderer_dep = platform_renderer_gl_dep
|
|
||||||
platform_sound_dep = platform_sound_miniaudio_dep
|
|
||||||
platform_storage_dep = platform_storage_stub_dep
|
|
||||||
platform_thread_dep = platform_thread_dep # standardized backend (for now)
|
|
||||||
|
|
||||||
app_platform_sources = files('targets/app/desktop/main.cpp')
|
|
||||||
endif
|
|
||||||
|
|
||||||
subdir('targets/resources')
|
subdir('targets/resources')
|
||||||
subdir('targets/minecraft')
|
subdir('targets/minecraft')
|
||||||
subdir('targets/app')
|
subdir('targets/app')
|
||||||
|
|||||||
@@ -40,10 +40,3 @@ option(
|
|||||||
value: 'frustum',
|
value: 'frustum',
|
||||||
description: 'Occlusion culling mode. Off disables ALL CULLING (debug only!), Frustum disables offscreen rendering (default), BFS is experimental connectivity culling, hardware uses GPU queries.',
|
description: 'Occlusion culling mode. Off disables ALL CULLING (debug only!), Frustum disables offscreen rendering (default), BFS is experimental connectivity culling, hardware uses GPU queries.',
|
||||||
)
|
)
|
||||||
|
|
||||||
option(
|
|
||||||
'enable_mimalloc',
|
|
||||||
type: 'feature',
|
|
||||||
value: 'auto',
|
|
||||||
description: 'Link mimalloc as the malloc implementation. Requires libmimalloc-dev.',
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -1,183 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
import argparse
|
|
||||||
import os
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
DEFAULT_EXTENSIONS = {
|
|
||||||
".c",
|
|
||||||
".cc",
|
|
||||||
".cpp",
|
|
||||||
".cxx",
|
|
||||||
".h",
|
|
||||||
".hh",
|
|
||||||
".hpp",
|
|
||||||
".hxx",
|
|
||||||
".inl",
|
|
||||||
".ipp",
|
|
||||||
}
|
|
||||||
DEFAULT_JOBS = os.cpu_count() or 4
|
|
||||||
DEFAULT_TIMEOUT = 10
|
|
||||||
|
|
||||||
# ansi escapes
|
|
||||||
RESET = "\033[0m" if sys.stdout.isatty() else ""
|
|
||||||
GREEN = "\033[32m" if sys.stdout.isatty() else ""
|
|
||||||
YELLOW = "\033[33m" if sys.stdout.isatty() else ""
|
|
||||||
RED = "\033[31m" if sys.stdout.isatty() else ""
|
|
||||||
BOLD = "\033[1m" if sys.stdout.isatty() else ""
|
|
||||||
|
|
||||||
def format_file(path, clang_format, extra_args, timeout):
|
|
||||||
cmd = [clang_format, "-i"]
|
|
||||||
cmd += extra_args
|
|
||||||
cmd.append(str(path))
|
|
||||||
|
|
||||||
try:
|
|
||||||
result = subprocess.run(
|
|
||||||
cmd,
|
|
||||||
capture_output=True,
|
|
||||||
text=True,
|
|
||||||
timeout=timeout,
|
|
||||||
)
|
|
||||||
if result.returncode != 0:
|
|
||||||
msg = (result.stderr or result.stdout or "non-zero exit code").strip()
|
|
||||||
return ("error", str(path), msg)
|
|
||||||
return ("ok", str(path), None)
|
|
||||||
|
|
||||||
except subprocess.TimeoutExpired:
|
|
||||||
return ("timeout", str(path), f"exceeded {timeout}s timeout")
|
|
||||||
|
|
||||||
except FileNotFoundError:
|
|
||||||
return ("error", str(path), f"'{clang_format}' not found — is it installed?")
|
|
||||||
|
|
||||||
except Exception as exc:
|
|
||||||
return ("error", str(path), str(exc))
|
|
||||||
|
|
||||||
def find_files(root, extensions, exclude_dirs):
|
|
||||||
found = []
|
|
||||||
for dirpath, dirnames, filenames in os.walk(root):
|
|
||||||
dirnames[:] = [d for d in dirnames if d not in exclude_dirs]
|
|
||||||
for fname in filenames:
|
|
||||||
if Path(fname).suffix.lower() in extensions:
|
|
||||||
found.append(Path(dirpath) / fname)
|
|
||||||
return sorted(found)
|
|
||||||
|
|
||||||
def main():
|
|
||||||
p = argparse.ArgumentParser(
|
|
||||||
description="Recursively runs clang-format on C/C++ files.",
|
|
||||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
||||||
)
|
|
||||||
p.add_argument("directory", nargs="?", default=".", type=Path)
|
|
||||||
p.add_argument(
|
|
||||||
"--clang-format",
|
|
||||||
default="clang-format",
|
|
||||||
metavar="BIN",
|
|
||||||
help="Path to the clang-format executable. (default: clang-format)",
|
|
||||||
)
|
|
||||||
p.add_argument(
|
|
||||||
"-j",
|
|
||||||
"--jobs",
|
|
||||||
type=int,
|
|
||||||
default=DEFAULT_JOBS,
|
|
||||||
metavar="N",
|
|
||||||
help=f"Number of parallel workers. (default: {DEFAULT_JOBS})",
|
|
||||||
)
|
|
||||||
p.add_argument(
|
|
||||||
"--timeout",
|
|
||||||
type=int,
|
|
||||||
default=DEFAULT_TIMEOUT,
|
|
||||||
metavar="SECS",
|
|
||||||
help=f"Per-file timeout in seconds. (default: {DEFAULT_TIMEOUT})",
|
|
||||||
)
|
|
||||||
p.add_argument(
|
|
||||||
"--extensions",
|
|
||||||
nargs="+",
|
|
||||||
metavar="EXT",
|
|
||||||
help="File extensions to process (including the dot)."
|
|
||||||
f"(default: {' '.join(sorted(DEFAULT_EXTENSIONS))})",
|
|
||||||
)
|
|
||||||
p.add_argument(
|
|
||||||
"--exclude",
|
|
||||||
nargs="*",
|
|
||||||
default=[],
|
|
||||||
metavar="DIR",
|
|
||||||
help="Directory names to skip during traversal (e.g. build third_party).",
|
|
||||||
)
|
|
||||||
p.add_argument(
|
|
||||||
"--clang-format-args",
|
|
||||||
nargs=argparse.REMAINDER,
|
|
||||||
default=[],
|
|
||||||
metavar="...",
|
|
||||||
)
|
|
||||||
args = p.parse_args()
|
|
||||||
|
|
||||||
root = args.directory.resolve()
|
|
||||||
if not root.is_dir():
|
|
||||||
print(f"{RED}Error:{RESET} '{root}' is not a directory.", file=sys.stderr)
|
|
||||||
return 1
|
|
||||||
|
|
||||||
extensions = (
|
|
||||||
{e if e.startswith(".") else f".{e}" for e in args.extensions}
|
|
||||||
if args.extensions
|
|
||||||
else DEFAULT_EXTENSIONS
|
|
||||||
)
|
|
||||||
|
|
||||||
exclude_dirs = set(args.exclude)
|
|
||||||
|
|
||||||
files = find_files(root, extensions, exclude_dirs)
|
|
||||||
if not files:
|
|
||||||
print(f"{YELLOW}No source files found.{RESET}")
|
|
||||||
return 0
|
|
||||||
|
|
||||||
total = len(files)
|
|
||||||
print(f"Found {BOLD}{total}{RESET} file(s).")
|
|
||||||
|
|
||||||
counters = {"ok": 0, "timeout": 0, "error": 0}
|
|
||||||
completed = 0
|
|
||||||
|
|
||||||
with ThreadPoolExecutor(max_workers=args.jobs) as pool:
|
|
||||||
futures = {
|
|
||||||
pool.submit(
|
|
||||||
format_file,
|
|
||||||
f,
|
|
||||||
args.clang_format,
|
|
||||||
args.clang_format_args,
|
|
||||||
args.timeout,
|
|
||||||
): f
|
|
||||||
for f in files
|
|
||||||
}
|
|
||||||
|
|
||||||
for future in as_completed(futures):
|
|
||||||
status, path_str, error = future.result()
|
|
||||||
counters[status] += 1
|
|
||||||
completed += 1
|
|
||||||
rel = os.path.relpath(path_str, root)
|
|
||||||
|
|
||||||
if status == "ok":
|
|
||||||
tag = f"{GREEN}[ OK ]{RESET}"
|
|
||||||
elif status == "timeout":
|
|
||||||
tag = f"{YELLOW}[ TIMEOUT ]{RESET}"
|
|
||||||
else:
|
|
||||||
tag = f"{RED}[ ERROR ]{RESET}"
|
|
||||||
|
|
||||||
progress = f"[{completed:>{len(str(total))}}/{total}]"
|
|
||||||
line = f"{progress} {tag} {rel}"
|
|
||||||
if error:
|
|
||||||
line += f"\n {RED}{error}{RESET}"
|
|
||||||
print(line)
|
|
||||||
|
|
||||||
print()
|
|
||||||
print(f"{BOLD}Summary{RESET}")
|
|
||||||
print(f"Total: {total}")
|
|
||||||
print(f"{GREEN}OK: {counters['ok']}{RESET}")
|
|
||||||
|
|
||||||
if counters["timeout"]:
|
|
||||||
print(f"{YELLOW}Timeout: {counters['timeout']}{RESET}")
|
|
||||||
if counters["error"]:
|
|
||||||
print(f"{RED}Error: {counters['error']}{RESET}")
|
|
||||||
|
|
||||||
return 1 if (counters["timeout"] or counters["error"]) else 0
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
sys.exit(main())
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
"""Enumerate C/C++ source files for a meson target.
|
|
||||||
|
|
||||||
Replaces the run_command('sh', '-c', 'find ...') hack in
|
|
||||||
targets/{minecraft,app}/meson.build. Run this whenever source files are
|
|
||||||
added or removed and commit the regenerated *_sources.txt files.
|
|
||||||
|
|
||||||
Usage:
|
|
||||||
python3 scripts/list_sources.py
|
|
||||||
|
|
||||||
Each module's sources.txt is generated relative to its meson source dir.
|
|
||||||
"""
|
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
REPO_ROOT = Path(__file__).resolve().parent.parent
|
|
||||||
|
|
||||||
# Module configuration: (output_path, scan_root, [exclude_basenames]).
|
|
||||||
# Paths in the output file are relative to the directory containing the
|
|
||||||
# meson.build that reads it.
|
|
||||||
MODULES = [
|
|
||||||
{
|
|
||||||
"name": "minecraft",
|
|
||||||
"output": REPO_ROOT / "targets" / "minecraft" / "sources.txt",
|
|
||||||
"scan_root": REPO_ROOT / "targets" / "minecraft",
|
|
||||||
"rel_to": REPO_ROOT / "targets" / "minecraft",
|
|
||||||
"exclude": {
|
|
||||||
"DurangoStats.cpp", # Durango-specific
|
|
||||||
# Incomplete / unused
|
|
||||||
"SkyIslandDimension.cpp",
|
|
||||||
"MemoryChunkStorage.cpp",
|
|
||||||
"MemoryLevelStorage.cpp",
|
|
||||||
"MemoryLevelStorageSource.cpp",
|
|
||||||
"NbtSlotFile.cpp",
|
|
||||||
"ZonedChunkStorage.cpp",
|
|
||||||
"ZoneFile.cpp",
|
|
||||||
"ZoneIo.cpp",
|
|
||||||
"LevelConflictException.cpp",
|
|
||||||
"SurvivalMode.cpp",
|
|
||||||
"CreativeMode.cpp",
|
|
||||||
"GameMode.cpp",
|
|
||||||
"DemoMode.cpp",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "app_common",
|
|
||||||
"output": REPO_ROOT / "targets" / "app" / "common_sources.txt",
|
|
||||||
"scan_root": REPO_ROOT / "targets" / "app" / "common",
|
|
||||||
"rel_to": REPO_ROOT / "targets" / "app",
|
|
||||||
"exclude": {
|
|
||||||
"UIScene_InGameSaveManagementMenu.cpp",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "app_linux",
|
|
||||||
"output": REPO_ROOT / "targets" / "app" / "linux_sources.txt",
|
|
||||||
"scan_root": REPO_ROOT / "targets" / "app" / "linux",
|
|
||||||
"rel_to": REPO_ROOT / "targets" / "app",
|
|
||||||
"exclude": set(),
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
EXTENSIONS = (".cpp", ".c")
|
|
||||||
|
|
||||||
|
|
||||||
def collect(scan_root: Path, rel_to: Path, exclude: set[str]) -> list[str]:
|
|
||||||
out: list[str] = []
|
|
||||||
for dirpath, _dirnames, filenames in os.walk(scan_root):
|
|
||||||
for name in filenames:
|
|
||||||
if not name.endswith(EXTENSIONS):
|
|
||||||
continue
|
|
||||||
if name in exclude:
|
|
||||||
continue
|
|
||||||
full = Path(dirpath) / name
|
|
||||||
out.append(str(full.relative_to(rel_to)))
|
|
||||||
out.sort()
|
|
||||||
return out
|
|
||||||
|
|
||||||
|
|
||||||
def main() -> int:
|
|
||||||
for mod in MODULES:
|
|
||||||
sources = collect(mod["scan_root"], mod["rel_to"], mod["exclude"])
|
|
||||||
body = "\n".join(sources) + "\n"
|
|
||||||
out_path: Path = mod["output"]
|
|
||||||
previous = out_path.read_text() if out_path.exists() else ""
|
|
||||||
if previous == body:
|
|
||||||
print(f"{mod['name']}: {len(sources)} files (unchanged)")
|
|
||||||
else:
|
|
||||||
out_path.write_text(body)
|
|
||||||
print(f"{mod['name']}: {len(sources)} files (regenerated {out_path.relative_to(REPO_ROOT)})")
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
sys.exit(main())
|
|
||||||
@@ -3,3 +3,7 @@ c = 'clang'
|
|||||||
cpp = 'clang++'
|
cpp = 'clang++'
|
||||||
c_ld = 'lld'
|
c_ld = 'lld'
|
||||||
cpp_ld = 'lld'
|
cpp_ld = 'lld'
|
||||||
|
|
||||||
|
[built-in options]
|
||||||
|
cpp_args = ['-stdlib=libc++']
|
||||||
|
cpp_link_args = ['-stdlib=libc++']
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
[wrap-file]
|
|
||||||
directory = glew-2.2.0
|
|
||||||
source_url = http://downloads.sourceforge.net/glew/glew-2.2.0.tgz
|
|
||||||
source_filename = glew-2.2.0.tgz
|
|
||||||
source_hash = d4fc82893cfb00109578d0a1a2337fb8ca335b3ceccf97b97e5cc7f08e4353e1
|
|
||||||
patch_filename = glew_2.2.0-2_patch.zip
|
|
||||||
patch_url = https://wrapdb.mesonbuild.com/v2/glew_2.2.0-2/get_patch
|
|
||||||
patch_hash = df7bc80456da53f83e93e89ca5035d04cdff19a836c956887a684b2bee16eb9b
|
|
||||||
wrapdb_version = 2.2.0-2
|
|
||||||
|
|
||||||
[provide]
|
|
||||||
glew = glew_dep
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
[wrap-file]
|
|
||||||
directory = glm-1.0.1
|
|
||||||
source_url = https://github.com/g-truc/glm/archive/refs/tags/1.0.1.tar.gz
|
|
||||||
source_filename = glm-1.0.1.tar.gz
|
|
||||||
source_hash = 9f3174561fd26904b23f0db5e560971cbf9b3cbda0b280f04d5c379d03bf234c
|
|
||||||
patch_filename = glm_1.0.1-1_patch.zip
|
|
||||||
patch_url = https://wrapdb.mesonbuild.com/v2/glm_1.0.1-1/get_patch
|
|
||||||
patch_hash = 25679275e26bc4c36bb617d1b4a52197039402af828d2a4bf67b3c0260a5df6a
|
|
||||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/glm_1.0.1-1/glm-1.0.1.tar.gz
|
|
||||||
wrapdb_version = 1.0.1-1
|
|
||||||
|
|
||||||
[provide]
|
|
||||||
glm = glm_dep
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
project('simdutf',
|
project('simdutf',
|
||||||
'cpp',
|
'cpp',
|
||||||
default_options: ['cpp_std=c++20'],
|
default_options: ['cpp_std=c++23'],
|
||||||
version: '8.2.0',
|
version: '8.2.0',
|
||||||
meson_version: '>= 1.1',
|
meson_version: '>= 1.1',
|
||||||
license: ['MIT'],
|
license: ['MIT'],
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
project('stb', 'c')
|
project('stb', 'c')
|
||||||
|
|
||||||
stb_dep = declare_dependency(
|
stb_inc = include_directories('.')
|
||||||
include_directories: include_directories('.'),
|
|
||||||
)
|
|
||||||
|
|
||||||
meson.override_dependency('stb', stb_dep)
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
[wrap-file]
|
|
||||||
directory = SDL2-2.32.8
|
|
||||||
source_url = https://github.com/libsdl-org/SDL/releases/download/release-2.32.8/SDL2-2.32.8.tar.gz
|
|
||||||
source_filename = SDL2-2.32.8.tar.gz
|
|
||||||
source_hash = 0ca83e9c9b31e18288c7ec811108e58bac1f1bb5ec6577ad386830eac51c787e
|
|
||||||
patch_filename = sdl2_2.32.8-1_patch.zip
|
|
||||||
patch_url = https://wrapdb.mesonbuild.com/v2/sdl2_2.32.8-1/get_patch
|
|
||||||
patch_hash = 5df17ea39ca418826db20e96bd821fa52b5718dac64b6225119fb6588c2744f0
|
|
||||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sdl2_2.32.8-1/SDL2-2.32.8.tar.gz
|
|
||||||
wrapdb_version = 2.32.8-1
|
|
||||||
|
|
||||||
[provide]
|
|
||||||
sdl2 = sdl2_dep
|
|
||||||
sdl2main = sdl2main_dep
|
|
||||||
sdl2_test = sdl2_test_dep
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
[wrap-git]
|
[wrap-git]
|
||||||
url = https://github.com/simdutf/simdutf.git
|
url = https://github.com/simdutf/simdutf.git
|
||||||
depth = 1
|
depth = 1
|
||||||
revision = fd476229424b40ae71a58dd5a205795c3d76b5f1
|
revision = v8.2.0
|
||||||
patch_directory = simdutf
|
patch_directory = simdutf
|
||||||
|
|
||||||
[provide]
|
[provide]
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
[wrap-file]
|
|
||||||
directory = zlib-1.3.2
|
|
||||||
source_url = https://zlib.net/zlib-1.3.2.tar.xz
|
|
||||||
source_fallback_url = https://wrapdb.mesonbuild.com/v2/zlib_1.3.2-1/get_source/zlib-1.3.2.tar.xz
|
|
||||||
source_filename = zlib-1.3.2.tar.xz
|
|
||||||
source_hash = d7a0654783a4da529d1bb793b7ad9c3318020af77667bcae35f95d0e42a792f3
|
|
||||||
patch_filename = zlib_1.3.2-1_patch.zip
|
|
||||||
patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.3.2-1/get_patch
|
|
||||||
patch_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/zlib_1.3.2-1/zlib_1.3.2-1_patch.zip
|
|
||||||
patch_hash = 5ae7a2e92f823df118cfb8c1b23d94e3117864392b3446581d669049b2fba6dd
|
|
||||||
wrapdb_version = 1.3.2-1
|
|
||||||
|
|
||||||
[provide]
|
|
||||||
dependency_names = zlib
|
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
# Network Code Implementation Notes
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
The networking classes are organized as follows:
|
||||||
|
|
||||||
|
```
|
||||||
|
Game \
|
||||||
|
^ |
|
||||||
|
| |
|
||||||
|
+-----------------------------+-----------------------------+ |
|
||||||
|
| | |
|
||||||
|
v v |
|
||||||
|
Game Network Manager <--------------------------------> Network Player Interface |- platform independent layers
|
||||||
|
^ ^ |
|
||||||
|
| | |
|
||||||
|
v | |
|
||||||
|
Platform Network Manager Interface | |
|
||||||
|
^ | /
|
||||||
|
| |
|
||||||
|
v v \
|
||||||
|
Platform Network Manager Implementation(1) <------> Network Player Implementation (3) |
|
||||||
|
^ ^ |_ platform specific layers
|
||||||
|
| | |
|
||||||
|
v v |
|
||||||
|
Platform specific network code(2) Platform specific player code (4) /
|
||||||
|
```
|
||||||
|
|
||||||
|
### Notes
|
||||||
|
|
||||||
|
- In general the game should **only communicate with the `GameNetworkManager` and `NetworkPlayerInterface` APIs**, which provide a platform independent interface for networking functionality. The `GameNetworkManager` may in general have code which is aware of the game itself, but it *shouldn't have any platform-specific networking code*. It communicates with a platform specific implementation of a `PlatformNetworkManagerInterface` to achieve this.
|
||||||
|
|
||||||
|
- The platform specific layers shouldn't contain any general game code, as this is much better placed in the platform independent layers to avoid duplicating effort.
|
||||||
|
|
||||||
|
- Platform specific files for each platform for the numbered classes in the previous diagram are currently:
|
||||||
|
|
||||||
|
|
||||||
|
## Platform-Specific Files
|
||||||
|
|
||||||
|
The platform-specific implementations for each numbered class in the diagram:
|
||||||
|
|
||||||
|
| Class | Xbox 360 | Sony | Other |
|
||||||
|
|-------|---------------------------------|----------------------------|-----------------------|
|
||||||
|
| (1) | PlatformNetworkManagerXbox | PlatformNetworkManagerSony | PlatformNetworkManagerStub |
|
||||||
|
| (2) | Provided by QNET | SQRNetworkManager | Qnet stub* |
|
||||||
|
| (3) | NetworkPlayerXbox | NetworkPlayerSony | NetworkPlayerXbox |
|
||||||
|
| (4) | Provided by QNET | SQRNetworkPlayer | Qnet stub* |
|
||||||
|
\*Temporarily provided by `extra64.h`
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
========================================================================
|
||||||
|
Xbox 360 APPLICATION : Minecraft.Client Project Overview
|
||||||
|
========================================================================
|
||||||
|
|
||||||
|
AppWizard has created this Minecraft.Client application for you.
|
||||||
|
|
||||||
|
This file contains a summary of what you will find in each of the files that
|
||||||
|
make up your Minecraft.Client application.
|
||||||
|
|
||||||
|
Minecraft.Client.vcxproj
|
||||||
|
This is the main project file for VC++ projects generated using an Application Wizard.
|
||||||
|
It contains information about the version of Visual C++ that generated the file, and
|
||||||
|
information about the platforms, configurations, and project features selected with the
|
||||||
|
Application Wizard.
|
||||||
|
|
||||||
|
Minecraft.Client.cpp
|
||||||
|
This is the main application source file.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
Other notes:
|
||||||
|
|
||||||
|
AppWizard uses "TODO:" comments to indicate parts of the source code you
|
||||||
|
should add to or customize.
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -1,22 +1,26 @@
|
|||||||
#include "app/common/AppGameServices.h"
|
#include "app/common/AppGameServices.h"
|
||||||
|
|
||||||
#include "app/common/DLC/DLCSkinFile.h"
|
|
||||||
#include "app/common/Game.h"
|
#include "app/common/Game.h"
|
||||||
#include "java/Class.h" // eINSTANCEOF
|
#include "java/Class.h" // eINSTANCEOF
|
||||||
#include "platform/game/game.h"
|
|
||||||
|
|
||||||
AppGameServices::AppGameServices(Game& game, IMenuService& menus)
|
AppGameServices::AppGameServices(Game& game, IMenuService& menus)
|
||||||
: game_(game), menus_(menus) {}
|
: game_(game), menus_(menus) {}
|
||||||
|
|
||||||
// -- Strings --
|
// -- Strings --
|
||||||
|
|
||||||
const char* AppGameServices::getString(int id) { return Game::GetString(id); }
|
const char* AppGameServices::getString(int id) {
|
||||||
|
return Game::GetString(id);
|
||||||
|
}
|
||||||
|
|
||||||
// -- Debug settings --
|
// -- Debug settings --
|
||||||
|
|
||||||
bool AppGameServices::debugSettingsOn() { return game_.DebugSettingsOn(); }
|
bool AppGameServices::debugSettingsOn() {
|
||||||
|
return game_.DebugSettingsOn();
|
||||||
|
}
|
||||||
|
|
||||||
bool AppGameServices::debugArtToolsOn() { return game_.DebugArtToolsOn(); }
|
bool AppGameServices::debugArtToolsOn() {
|
||||||
|
return game_.DebugArtToolsOn();
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int AppGameServices::debugGetMask(int iPad, bool overridePlayer) {
|
unsigned int AppGameServices::debugGetMask(int iPad, bool overridePlayer) {
|
||||||
return game_.GetGameSettingsDebugMask(iPad, overridePlayer);
|
return game_.GetGameSettingsDebugMask(iPad, overridePlayer);
|
||||||
@@ -30,7 +34,9 @@ bool AppGameServices::debugMobsDontTick() {
|
|||||||
return game_.GetMobsDontTickEnabled();
|
return game_.GetMobsDontTickEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AppGameServices::debugFreezePlayers() { return game_.GetFreezePlayers(); }
|
bool AppGameServices::debugFreezePlayers() {
|
||||||
|
return game_.GetFreezePlayers();
|
||||||
|
}
|
||||||
|
|
||||||
// -- Game host options --
|
// -- Game host options --
|
||||||
|
|
||||||
@@ -87,7 +93,9 @@ unsigned char AppGameServices::getGameSettings(int setting) {
|
|||||||
|
|
||||||
// -- App time --
|
// -- App time --
|
||||||
|
|
||||||
float AppGameServices::getAppTime() { return game_.getAppTime(); }
|
float AppGameServices::getAppTime() {
|
||||||
|
return game_.getAppTime();
|
||||||
|
}
|
||||||
|
|
||||||
// -- Game state --
|
// -- Game state --
|
||||||
|
|
||||||
@@ -96,14 +104,10 @@ void AppGameServices::setGameStarted(bool val) { game_.SetGameStarted(val); }
|
|||||||
bool AppGameServices::getTutorialMode() { return game_.GetTutorialMode(); }
|
bool AppGameServices::getTutorialMode() { return game_.GetTutorialMode(); }
|
||||||
void AppGameServices::setTutorialMode(bool val) { game_.SetTutorialMode(val); }
|
void AppGameServices::setTutorialMode(bool val) { game_.SetTutorialMode(val); }
|
||||||
bool AppGameServices::isAppPaused() { return game_.IsAppPaused(); }
|
bool AppGameServices::isAppPaused() { return game_.IsAppPaused(); }
|
||||||
int AppGameServices::getLocalPlayerCount() {
|
int AppGameServices::getLocalPlayerCount() { return game_.GetLocalPlayerCount(); }
|
||||||
return game_.GetLocalPlayerCount();
|
|
||||||
}
|
|
||||||
bool AppGameServices::autosaveDue() { return game_.AutosaveDue(); }
|
bool AppGameServices::autosaveDue() { return game_.AutosaveDue(); }
|
||||||
void AppGameServices::setAutosaveTimerTime() { game_.SetAutosaveTimerTime(); }
|
void AppGameServices::setAutosaveTimerTime() { game_.SetAutosaveTimerTime(); }
|
||||||
int64_t AppGameServices::secondsToAutosave() {
|
int64_t AppGameServices::secondsToAutosave() { return game_.SecondsToAutosave(); }
|
||||||
return game_.SecondsToAutosave();
|
|
||||||
}
|
|
||||||
|
|
||||||
void AppGameServices::setDisconnectReason(
|
void AppGameServices::setDisconnectReason(
|
||||||
DisconnectPacket::eDisconnectReason reason) {
|
DisconnectPacket::eDisconnectReason reason) {
|
||||||
@@ -111,13 +115,9 @@ void AppGameServices::setDisconnectReason(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AppGameServices::lockSaveNotification() { game_.lockSaveNotification(); }
|
void AppGameServices::lockSaveNotification() { game_.lockSaveNotification(); }
|
||||||
void AppGameServices::unlockSaveNotification() {
|
void AppGameServices::unlockSaveNotification() { game_.unlockSaveNotification(); }
|
||||||
game_.unlockSaveNotification();
|
|
||||||
}
|
|
||||||
bool AppGameServices::getResetNether() { return game_.GetResetNether(); }
|
bool AppGameServices::getResetNether() { return game_.GetResetNether(); }
|
||||||
bool AppGameServices::getUseDPadForDebug() {
|
bool AppGameServices::getUseDPadForDebug() { return game_.GetUseDPadForDebug(); }
|
||||||
return game_.GetUseDPadForDebug();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool AppGameServices::getWriteSavesToFolderEnabled() {
|
bool AppGameServices::getWriteSavesToFolderEnabled() {
|
||||||
return game_.GetWriteSavesToFolderEnabled();
|
return game_.GetWriteSavesToFolderEnabled();
|
||||||
@@ -127,7 +127,9 @@ bool AppGameServices::isLocalMultiplayerAvailable() {
|
|||||||
return game_.IsLocalMultiplayerAvailable();
|
return game_.IsLocalMultiplayerAvailable();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AppGameServices::dlcInstallPending() { return game_.DLCInstallPending(); }
|
bool AppGameServices::dlcInstallPending() {
|
||||||
|
return game_.DLCInstallPending();
|
||||||
|
}
|
||||||
|
|
||||||
bool AppGameServices::dlcInstallProcessCompleted() {
|
bool AppGameServices::dlcInstallProcessCompleted() {
|
||||||
return game_.DLCInstallProcessCompleted();
|
return game_.DLCInstallProcessCompleted();
|
||||||
@@ -175,15 +177,30 @@ void AppGameServices::setAction(int iPad, eXuiAction action, void* param) {
|
|||||||
game_.SetAction(iPad, action, param);
|
game_.SetAction(iPad, action, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AppGameServices::setXuiServerAction(int iPad, eXuiServerAction action,
|
||||||
|
void* param) {
|
||||||
|
game_.SetXuiServerAction(iPad, action, param);
|
||||||
|
}
|
||||||
|
|
||||||
eXuiAction AppGameServices::getXuiAction(int iPad) {
|
eXuiAction AppGameServices::getXuiAction(int iPad) {
|
||||||
return game_.GetXuiAction(iPad);
|
return game_.GetXuiAction(iPad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
eXuiServerAction AppGameServices::getXuiServerAction(int iPad) {
|
||||||
|
return game_.GetXuiServerAction(iPad);
|
||||||
|
}
|
||||||
|
|
||||||
|
void* AppGameServices::getXuiServerActionParam(int iPad) {
|
||||||
|
return game_.GetXuiServerActionParam(iPad);
|
||||||
|
}
|
||||||
|
|
||||||
void AppGameServices::setGlobalXuiAction(eXuiAction action) {
|
void AppGameServices::setGlobalXuiAction(eXuiAction action) {
|
||||||
game_.SetGlobalXuiAction(action);
|
game_.SetGlobalXuiAction(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppGameServices::handleButtonPresses() { game_.HandleButtonPresses(); }
|
void AppGameServices::handleButtonPresses() {
|
||||||
|
game_.HandleButtonPresses();
|
||||||
|
}
|
||||||
|
|
||||||
void AppGameServices::setTMSAction(int iPad, eTMSAction action) {
|
void AppGameServices::setTMSAction(int iPad, eTMSAction action) {
|
||||||
game_.SetTMSAction(iPad, action);
|
game_.SetTMSAction(iPad, action);
|
||||||
@@ -237,7 +254,8 @@ void AppGameServices::setAnimOverrideBitmask(std::uint32_t dwSkinID,
|
|||||||
game_.SetAnimOverrideBitmask(dwSkinID, bitmask);
|
game_.SetAnimOverrideBitmask(dwSkinID, bitmask);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int AppGameServices::getAnimOverrideBitmask(std::uint32_t dwSkinID) {
|
unsigned int AppGameServices::getAnimOverrideBitmask(
|
||||||
|
std::uint32_t dwSkinID) {
|
||||||
return game_.GetAnimOverrideBitmask(dwSkinID);
|
return game_.GetAnimOverrideBitmask(dwSkinID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,7 +267,9 @@ std::string AppGameServices::getSkinPathFromId(std::uint32_t skinId) {
|
|||||||
return Game::getSkinPathFromId(skinId);
|
return Game::getSkinPathFromId(skinId);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AppGameServices::defaultCapeExists() { return game_.DefaultCapeExists(); }
|
bool AppGameServices::defaultCapeExists() {
|
||||||
|
return game_.DefaultCapeExists();
|
||||||
|
}
|
||||||
|
|
||||||
bool AppGameServices::isXuidNotch(PlayerUID xuid) {
|
bool AppGameServices::isXuidNotch(PlayerUID xuid) {
|
||||||
return game_.isXuidNotch(xuid);
|
return game_.isXuidNotch(xuid);
|
||||||
@@ -264,21 +284,19 @@ bool AppGameServices::isXuidDeadmau5(PlayerUID xuid) {
|
|||||||
void AppGameServices::fatalLoadError() { game_.FatalLoadError(); }
|
void AppGameServices::fatalLoadError() { game_.FatalLoadError(); }
|
||||||
|
|
||||||
void AppGameServices::setRichPresenceContext(int iPad, int contextId) {
|
void AppGameServices::setRichPresenceContext(int iPad, int contextId) {
|
||||||
PlatformGame.SetRichPresenceContext(iPad, contextId);
|
game_.SetRichPresenceContext(iPad, contextId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppGameServices::captureSaveThumbnail() {
|
void AppGameServices::captureSaveThumbnail() { game_.CaptureSaveThumbnail(); }
|
||||||
PlatformGame.CaptureSaveThumbnail();
|
|
||||||
}
|
|
||||||
|
|
||||||
void AppGameServices::getSaveThumbnail(std::uint8_t** data,
|
void AppGameServices::getSaveThumbnail(std::uint8_t** data,
|
||||||
unsigned int* size) {
|
unsigned int* size) {
|
||||||
PlatformGame.GetSaveThumbnail(data, size);
|
game_.GetSaveThumbnail(data, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppGameServices::readBannedList(int iPad, eTMSAction action,
|
void AppGameServices::readBannedList(int iPad, eTMSAction action,
|
||||||
bool bCallback) {
|
bool bCallback) {
|
||||||
PlatformGame.ReadBannedList(iPad, action, bCallback);
|
game_.ReadBannedList(iPad, action, bCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppGameServices::updatePlayerInfo(std::uint8_t networkSmallId,
|
void AppGameServices::updatePlayerInfo(std::uint8_t networkSmallId,
|
||||||
@@ -287,7 +305,8 @@ void AppGameServices::updatePlayerInfo(std::uint8_t networkSmallId,
|
|||||||
game_.UpdatePlayerInfo(networkSmallId, playerColourIndex, playerPrivileges);
|
game_.UpdatePlayerInfo(networkSmallId, playerColourIndex, playerPrivileges);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int AppGameServices::getPlayerPrivileges(std::uint8_t networkSmallId) {
|
unsigned int AppGameServices::getPlayerPrivileges(
|
||||||
|
std::uint8_t networkSmallId) {
|
||||||
return game_.GetPlayerPrivileges(networkSmallId);
|
return game_.GetPlayerPrivileges(networkSmallId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -315,7 +334,9 @@ bool AppGameServices::getTerrainFeaturePosition(_eTerrainFeatureType type,
|
|||||||
return game_.GetTerrainFeaturePosition(type, pX, pZ);
|
return game_.GetTerrainFeaturePosition(type, pX, pZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppGameServices::loadDefaultGameRules() { game_.loadDefaultGameRules(); }
|
void AppGameServices::loadDefaultGameRules() {
|
||||||
|
game_.loadDefaultGameRules();
|
||||||
|
}
|
||||||
|
|
||||||
// -- Archive / resources --
|
// -- Archive / resources --
|
||||||
|
|
||||||
@@ -342,21 +363,24 @@ const char* AppGameServices::getGameRulesString(const std::string& key) {
|
|||||||
return game_.GetGameRulesString(key);
|
return game_.GetGameRulesString(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int AppGameServices::createImageTextData(
|
unsigned int AppGameServices::createImageTextData(std::uint8_t* textMetadata,
|
||||||
std::uint8_t* textMetadata, int64_t seed, bool hasSeed,
|
int64_t seed, bool hasSeed,
|
||||||
unsigned int uiHostOptions, unsigned int uiTexturePackId) {
|
unsigned int uiHostOptions,
|
||||||
return game_.CreateImageTextData(textMetadata, seed, hasSeed, uiHostOptions,
|
unsigned int uiTexturePackId) {
|
||||||
uiTexturePackId);
|
return game_.CreateImageTextData(textMetadata, seed, hasSeed,
|
||||||
|
uiHostOptions, uiTexturePackId);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string AppGameServices::getFilePath(std::uint32_t packId,
|
std::string AppGameServices::getFilePath(std::uint32_t packId,
|
||||||
std::string filename,
|
std::string filename,
|
||||||
bool bAddDataFolder,
|
bool bAddDataFolder,
|
||||||
std::string mountPoint) {
|
std::string mountPoint) {
|
||||||
return game_.getFilePath(packId, filename, bAddDataFolder, mountPoint);
|
return game_.getFilePath(packId, filename, bAddDataFolder, mountPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
char* AppGameServices::getUniqueMapName() { return game_.GetUniqueMapName(); }
|
char* AppGameServices::getUniqueMapName() {
|
||||||
|
return game_.GetUniqueMapName();
|
||||||
|
}
|
||||||
|
|
||||||
void AppGameServices::setUniqueMapName(char* name) {
|
void AppGameServices::setUniqueMapName(char* name) {
|
||||||
game_.SetUniqueMapName(name);
|
game_.SetUniqueMapName(name);
|
||||||
@@ -366,7 +390,9 @@ unsigned int AppGameServices::getOpacityTimer(int iPad) {
|
|||||||
return game_.GetOpacityTimer(iPad);
|
return game_.GetOpacityTimer(iPad);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppGameServices::setOpacityTimer(int iPad) { game_.SetOpacityTimer(iPad); }
|
void AppGameServices::setOpacityTimer(int iPad) {
|
||||||
|
game_.SetOpacityTimer(iPad);
|
||||||
|
}
|
||||||
|
|
||||||
void AppGameServices::tickOpacityTimer(int iPad) {
|
void AppGameServices::tickOpacityTimer(int iPad) {
|
||||||
game_.TickOpacityTimer(iPad);
|
game_.TickOpacityTimer(iPad);
|
||||||
@@ -387,7 +413,7 @@ void AppGameServices::debugPrintf(const char* msg) {
|
|||||||
|
|
||||||
// -- DLC --
|
// -- DLC --
|
||||||
|
|
||||||
ISkinAssetData* AppGameServices::getSkinAssetData(const std::string& name) {
|
DLCSkinFile* AppGameServices::getDLCSkinFile(const std::string& name) {
|
||||||
return game_.m_dlcManager.getSkinFile(name);
|
return game_.m_dlcManager.getSkinFile(name);
|
||||||
}
|
}
|
||||||
bool AppGameServices::dlcNeedsCorruptCheck() {
|
bool AppGameServices::dlcNeedsCorruptCheck() {
|
||||||
@@ -397,8 +423,8 @@ unsigned int AppGameServices::dlcCheckForCorrupt(bool showMessage) {
|
|||||||
return game_.m_dlcManager.checkForCorruptDLCAndAlert(showMessage);
|
return game_.m_dlcManager.checkForCorruptDLCAndAlert(showMessage);
|
||||||
}
|
}
|
||||||
bool AppGameServices::dlcReadDataFile(unsigned int& filesProcessed,
|
bool AppGameServices::dlcReadDataFile(unsigned int& filesProcessed,
|
||||||
const std::string& path, DLCPack* pack,
|
const std::string& path,
|
||||||
bool fromArchive) {
|
DLCPack* pack, bool fromArchive) {
|
||||||
return game_.m_dlcManager.readDLCDataFile(filesProcessed, path, pack,
|
return game_.m_dlcManager.readDLCDataFile(filesProcessed, path, pack,
|
||||||
fromArchive);
|
fromArchive);
|
||||||
}
|
}
|
||||||
@@ -409,7 +435,7 @@ void AppGameServices::dlcRemovePack(DLCPack* pack) {
|
|||||||
// -- Game rules --
|
// -- Game rules --
|
||||||
|
|
||||||
LevelGenerationOptions* AppGameServices::loadGameRules(std::uint8_t* data,
|
LevelGenerationOptions* AppGameServices::loadGameRules(std::uint8_t* data,
|
||||||
unsigned int size) {
|
unsigned int size) {
|
||||||
return game_.m_gameRules.loadGameRules(data, size);
|
return game_.m_gameRules.loadGameRules(data, size);
|
||||||
}
|
}
|
||||||
void AppGameServices::saveGameRules(std::uint8_t** data, unsigned int* size) {
|
void AppGameServices::saveGameRules(std::uint8_t** data, unsigned int* size) {
|
||||||
@@ -418,8 +444,7 @@ void AppGameServices::saveGameRules(std::uint8_t** data, unsigned int* size) {
|
|||||||
void AppGameServices::unloadCurrentGameRules() {
|
void AppGameServices::unloadCurrentGameRules() {
|
||||||
game_.m_gameRules.unloadCurrentGameRules();
|
game_.m_gameRules.unloadCurrentGameRules();
|
||||||
}
|
}
|
||||||
void AppGameServices::setLevelGenerationOptions(
|
void AppGameServices::setLevelGenerationOptions(LevelGenerationOptions* levelGen) {
|
||||||
LevelGenerationOptions* levelGen) {
|
|
||||||
game_.m_gameRules.setLevelGenerationOptions(levelGen);
|
game_.m_gameRules.setLevelGenerationOptions(levelGen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
class Game;
|
class Game;
|
||||||
class IMenuService;
|
class IMenuService;
|
||||||
class ISkinAssetData;
|
|
||||||
|
|
||||||
class AppGameServices : public IGameServices {
|
class AppGameServices : public IGameServices {
|
||||||
public:
|
public:
|
||||||
@@ -23,7 +22,8 @@ public:
|
|||||||
|
|
||||||
// -- Game host options --
|
// -- Game host options --
|
||||||
unsigned int getGameHostOption(eGameHostOption option) override;
|
unsigned int getGameHostOption(eGameHostOption option) override;
|
||||||
void setGameHostOption(eGameHostOption option, unsigned int value) override;
|
void setGameHostOption(eGameHostOption option,
|
||||||
|
unsigned int value) override;
|
||||||
|
|
||||||
// -- Level generation --
|
// -- Level generation --
|
||||||
LevelGenerationOptions* getLevelGenerationOptions() override;
|
LevelGenerationOptions* getLevelGenerationOptions() override;
|
||||||
@@ -76,7 +76,11 @@ public:
|
|||||||
|
|
||||||
// -- UI dispatch --
|
// -- UI dispatch --
|
||||||
void setAction(int iPad, eXuiAction action, void* param) override;
|
void setAction(int iPad, eXuiAction action, void* param) override;
|
||||||
|
void setXuiServerAction(int iPad, eXuiServerAction action,
|
||||||
|
void* param) override;
|
||||||
eXuiAction getXuiAction(int iPad) override;
|
eXuiAction getXuiAction(int iPad) override;
|
||||||
|
eXuiServerAction getXuiServerAction(int iPad) override;
|
||||||
|
void* getXuiServerActionParam(int iPad) override;
|
||||||
void setGlobalXuiAction(eXuiAction action) override;
|
void setGlobalXuiAction(eXuiAction action) override;
|
||||||
void handleButtonPresses() override;
|
void handleButtonPresses() override;
|
||||||
void setTMSAction(int iPad, eTMSAction action) override;
|
void setTMSAction(int iPad, eTMSAction action) override;
|
||||||
@@ -109,7 +113,8 @@ public:
|
|||||||
void setRichPresenceContext(int iPad, int contextId) override;
|
void setRichPresenceContext(int iPad, int contextId) override;
|
||||||
void captureSaveThumbnail() override;
|
void captureSaveThumbnail() override;
|
||||||
void getSaveThumbnail(std::uint8_t** data, unsigned int* size) override;
|
void getSaveThumbnail(std::uint8_t** data, unsigned int* size) override;
|
||||||
void readBannedList(int iPad, eTMSAction action, bool bCallback) override;
|
void readBannedList(int iPad, eTMSAction action,
|
||||||
|
bool bCallback) override;
|
||||||
void updatePlayerInfo(std::uint8_t networkSmallId,
|
void updatePlayerInfo(std::uint8_t networkSmallId,
|
||||||
int16_t playerColourIndex,
|
int16_t playerColourIndex,
|
||||||
unsigned int playerPrivileges) override;
|
unsigned int playerPrivileges) override;
|
||||||
@@ -134,12 +139,13 @@ public:
|
|||||||
int getHTMLColour(eMinecraftColour colour) override;
|
int getHTMLColour(eMinecraftColour colour) override;
|
||||||
std::string getEntityName(EntityTypeId type) override;
|
std::string getEntityName(EntityTypeId type) override;
|
||||||
const char* getGameRulesString(const std::string& key) override;
|
const char* getGameRulesString(const std::string& key) override;
|
||||||
unsigned int createImageTextData(std::uint8_t* textMetadata, int64_t seed,
|
unsigned int createImageTextData(std::uint8_t* textMetadata,
|
||||||
bool hasSeed, unsigned int uiHostOptions,
|
int64_t seed, bool hasSeed,
|
||||||
|
unsigned int uiHostOptions,
|
||||||
unsigned int uiTexturePackId) override;
|
unsigned int uiTexturePackId) override;
|
||||||
std::string getFilePath(std::uint32_t packId, std::string filename,
|
std::string getFilePath(std::uint32_t packId, std::string filename,
|
||||||
bool bAddDataFolder,
|
bool bAddDataFolder,
|
||||||
std::string mountPoint) override;
|
std::string mountPoint) override;
|
||||||
char* getUniqueMapName() override;
|
char* getUniqueMapName() override;
|
||||||
void setUniqueMapName(char* name) override;
|
void setUniqueMapName(char* name) override;
|
||||||
unsigned int getOpacityTimer(int iPad) override;
|
unsigned int getOpacityTimer(int iPad) override;
|
||||||
@@ -151,16 +157,17 @@ public:
|
|||||||
void debugPrintf(const char* msg) override;
|
void debugPrintf(const char* msg) override;
|
||||||
|
|
||||||
// -- DLC --
|
// -- DLC --
|
||||||
ISkinAssetData* getSkinAssetData(const std::string& name) override;
|
DLCSkinFile* getDLCSkinFile(const std::string& name) override;
|
||||||
bool dlcNeedsCorruptCheck() override;
|
bool dlcNeedsCorruptCheck() override;
|
||||||
unsigned int dlcCheckForCorrupt(bool showMessage) override;
|
unsigned int dlcCheckForCorrupt(bool showMessage) override;
|
||||||
bool dlcReadDataFile(unsigned int& filesProcessed, const std::string& path,
|
bool dlcReadDataFile(unsigned int& filesProcessed,
|
||||||
DLCPack* pack, bool fromArchive) override;
|
const std::string& path, DLCPack* pack,
|
||||||
|
bool fromArchive) override;
|
||||||
void dlcRemovePack(DLCPack* pack) override;
|
void dlcRemovePack(DLCPack* pack) override;
|
||||||
|
|
||||||
// -- Game rules --
|
// -- Game rules --
|
||||||
LevelGenerationOptions* loadGameRules(std::uint8_t* data,
|
LevelGenerationOptions* loadGameRules(std::uint8_t* data,
|
||||||
unsigned int size) override;
|
unsigned int size) override;
|
||||||
void saveGameRules(std::uint8_t** data, unsigned int* size) override;
|
void saveGameRules(std::uint8_t** data, unsigned int* size) override;
|
||||||
void unloadCurrentGameRules() override;
|
void unloadCurrentGameRules() override;
|
||||||
void setLevelGenerationOptions(LevelGenerationOptions* levelGen) override;
|
void setLevelGenerationOptions(LevelGenerationOptions* levelGen) override;
|
||||||
|
|||||||
@@ -0,0 +1,135 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
// 4J Stu - For non-splitscreen menus, default to this screen
|
||||||
|
#define DEFAULT_XUI_MENU_USER 0
|
||||||
|
#define MULTITHREAD_ENABLE
|
||||||
|
#define MAX_CAPENAME_SIZE 32
|
||||||
|
#define MAX_BANNERNAME_SIZE 32
|
||||||
|
#define MAX_TMSFILENAME_SIZE 40
|
||||||
|
#define MAX_TYPE_SIZE 32
|
||||||
|
#define MAX_EXTENSION_TYPES 3
|
||||||
|
|
||||||
|
#define MAX_LOCAL_PLAYERS 4
|
||||||
|
|
||||||
|
// 4J Stu - Required for sentient reporting of whether the volume level has been
|
||||||
|
// changed or not
|
||||||
|
#define DEFAULT_VOLUME_LEVEL 100
|
||||||
|
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_DIFFICULTY 0x00000003 // 0 - 3
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_FRIENDSOFFRIENDS 0x00000004
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_GAMERTAGS 0x00000008
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_GAMETYPE 0x00000030
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_LEVELTYPE 0x00000040
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_STRUCTURES 0x00000080
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_BONUSCHEST 0x00000100
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_BEENINCREATIVE 0x00000200
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_PVP 0x00000400
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_TRUSTPLAYERS 0x00000800
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_TNT 0x00001000
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_FIRESPREADS 0x00002000
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_HOSTFLY 0x00004000
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_HOSTHUNGER 0x00008000
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_HOSTINVISIBLE 0x00010000
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_BEDROCKFOG 0x00020000
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_DISABLESAVE 0x00040000
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_NOTOWNER 0x00080000
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_WORLDSIZE \
|
||||||
|
0x00700000 // 3 bits, 5 values (unset(0), classic(1), small(2), medium(3),
|
||||||
|
// large(4))
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_MOBGRIEFING 0x00800000
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_KEEPINVENTORY 0x01000000
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_DOMOBSPAWNING 0x02000000
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_DOMOBLOOT 0x04000000
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_DOTILEDROPS 0x08000000
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_NATURALREGEN 0x10000000
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_DODAYLIGHTCYCLE 0x20000000
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_ALL 0xFFFFFFFF
|
||||||
|
|
||||||
|
#define GAME_HOST_OPTION_BITMASK_WORLDSIZE_BITSHIFT 20
|
||||||
|
|
||||||
|
enum EGameHostOptionWorldSize {
|
||||||
|
e_worldSize_Unknown = 0,
|
||||||
|
e_worldSize_Classic,
|
||||||
|
e_worldSize_Small,
|
||||||
|
e_worldSize_Medium,
|
||||||
|
e_worldSize_Large
|
||||||
|
};
|
||||||
|
|
||||||
|
#define PROFILE_VERSION_8 10
|
||||||
|
#define PROFILE_VERSION_9 11
|
||||||
|
|
||||||
|
#define PROFILE_VERSION_10 12
|
||||||
|
|
||||||
|
// 4J-JEV: New Statistics and Achievements for 'NexGen' platforms.
|
||||||
|
#define PROFILE_VERSION_11 13
|
||||||
|
|
||||||
|
// Java 1.6.4
|
||||||
|
#define PROFILE_VERSION_12 14
|
||||||
|
|
||||||
|
#define PROFILE_VERSION_CURRENT PROFILE_VERSION_12
|
||||||
|
|
||||||
|
#define MAX_FAVORITE_SKINS \
|
||||||
|
10 // these are stored in the profile data so keep it small
|
||||||
|
|
||||||
|
// defines for game settings - uiBitmaskValues
|
||||||
|
|
||||||
|
#define GAMESETTING_CLOUDS 0x00000001
|
||||||
|
#define GAMESETTING_ONLINE 0x00000002
|
||||||
|
#define GAMESETTING_INVITEONLY 0x00000004
|
||||||
|
#define GAMESETTING_FRIENDSOFFRIENDS 0x00000008
|
||||||
|
#define GAMESETTING_DISPLAYUPDATEMSG 0x00000030
|
||||||
|
#define GAMESETTING_BEDROCKFOG 0x00000040
|
||||||
|
#define GAMESETTING_DISPLAYHUD 0x00000080
|
||||||
|
#define GAMESETTING_DISPLAYHAND 0x00000100
|
||||||
|
#define GAMESETTING_CUSTOMSKINANIM 0x00000200
|
||||||
|
#define GAMESETTING_DEATHMESSAGES 0x00000400
|
||||||
|
#define GAMESETTING_UISIZE 0x00001800
|
||||||
|
#define GAMESETTING_UISIZE_SPLITSCREEN 0x00006000
|
||||||
|
#define GAMESETTING_ANIMATEDCHARACTER 0x00008000
|
||||||
|
#define GAMESETTING_PS3EULAREAD 0x00010000
|
||||||
|
#define GAMESETTING_PSVITANETWORKMODEADHOC 0x00020000
|
||||||
|
|
||||||
|
// defines for languages
|
||||||
|
|
||||||
|
#define MINECRAFT_LANGUAGE_DEFAULT 0x00
|
||||||
|
#define MINECRAFT_LANGUAGE_ENGLISH 0x01
|
||||||
|
#define MINECRAFT_LANGUAGE_JAPANESE 0x02
|
||||||
|
#define MINECRAFT_LANGUAGE_GERMAN 0x03
|
||||||
|
#define MINECRAFT_LANGUAGE_FRENCH 0x04
|
||||||
|
#define MINECRAFT_LANGUAGE_SPANISH 0x05
|
||||||
|
#define MINECRAFT_LANGUAGE_ITALIAN 0x06
|
||||||
|
#define MINECRAFT_LANGUAGE_KOREAN 0x07
|
||||||
|
#define MINECRAFT_LANGUAGE_TCHINESE 0x08
|
||||||
|
#define MINECRAFT_LANGUAGE_PORTUGUESE 0x09
|
||||||
|
#define MINECRAFT_LANGUAGE_BRAZILIAN 0x0A
|
||||||
|
#define MINECRAFT_LANGUAGE_RUSSIAN 0x0B
|
||||||
|
#define MINECRAFT_LANGUAGE_DUTCH 0x0C
|
||||||
|
#define MINECRAFT_LANGUAGE_FINISH 0x0D
|
||||||
|
#define MINECRAFT_LANGUAGE_SWEDISH 0x0E
|
||||||
|
#define MINECRAFT_LANGUAGE_DANISH 0x0F
|
||||||
|
#define MINECRAFT_LANGUAGE_NORWEGIAN 0x10
|
||||||
|
#define MINECRAFT_LANGUAGE_POLISH 0x11
|
||||||
|
#define MINECRAFT_LANGUAGE_TURKISH 0x12
|
||||||
|
#define MINECRAFT_LANGUAGE_LATINAMERICANSPANISH 0x13
|
||||||
|
#define MINECRAFT_LANGUAGE_GREEK 0x14
|
||||||
|
|
||||||
|
/* Match these
|
||||||
|
|
||||||
|
const int XC_LANGUAGE_ENGLISH =1; const int XC_LANGUAGE_JAPANESE
|
||||||
|
=2; const int XC_LANGUAGE_GERMAN
|
||||||
|
=3; const int XC_LANGUAGE_FRENCH
|
||||||
|
=4; const int XC_LANGUAGE_SPANISH
|
||||||
|
=5; const int XC_LANGUAGE_ITALIAN
|
||||||
|
=6; const int XC_LANGUAGE_KOREAN
|
||||||
|
=7; const int XC_LANGUAGE_TCHINESE
|
||||||
|
=8; const int XC_LANGUAGE_PORTUGUESE =9; const int XC_LANGUAGE_BRAZILIAN
|
||||||
|
=10; const int XC_LANGUAGE_RUSSIAN
|
||||||
|
=11; const int XC_LANGUAGE_DUTCH
|
||||||
|
=12; const int XC_LANGUAGE_FINISH
|
||||||
|
=13; const int XC_LANGUAGE_SWEDISH
|
||||||
|
=14; const int XC_LANGUAGE_DANISH
|
||||||
|
=15; const int XC_LANGUAGE_NORWEGIAN =16; const int XC_LANGUAGE_POLISH
|
||||||
|
=17; const int XC_LANGUAGE_TURKISH
|
||||||
|
=18; const int XC_LANGUAGE_LATINAMERICANSPANISH =19;
|
||||||
|
const int XC_LANGUAGE_GREEK =20;
|
||||||
|
*/
|
||||||
@@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
#include "platform/storage/storage.h"
|
||||||
|
#include "app/common/App_Defines.h"
|
||||||
#include "minecraft/GameEnums.h"
|
#include "minecraft/GameEnums.h"
|
||||||
#include "minecraft/GameTypes.h"
|
#include "minecraft/GameTypes.h"
|
||||||
|
#include "app/common/Tutorial/TutorialEnum.h"
|
||||||
|
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||||
|
#include "platform/NetTypes.h"
|
||||||
#include "minecraft/client/model/SkinBox.h"
|
#include "minecraft/client/model/SkinBox.h"
|
||||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
|
||||||
#include "platform/XboxStubs.h"
|
#include "platform/XboxStubs.h"
|
||||||
#include "platform/network/NetTypes.h"
|
|
||||||
#include "platform/profile/ProfileConstants.h"
|
|
||||||
#include "platform/storage/storage.h"
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char* wchFilename;
|
char* wchFilename;
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "app/common/Game.h"
|
|
||||||
#include "app/common/UI/All Platforms/ArchiveFile.h"
|
#include "app/common/UI/All Platforms/ArchiveFile.h"
|
||||||
|
#include "app/linux/LinuxGame.h"
|
||||||
#include "java/File.h"
|
#include "java/File.h"
|
||||||
#include "minecraft/client/Minecraft.h"
|
#include "minecraft/client/Minecraft.h"
|
||||||
#include "minecraft/client/skins/TexturePack.h"
|
#include "minecraft/client/skins/TexturePack.h"
|
||||||
#include "minecraft/client/skins/TexturePackRepository.h"
|
#include "minecraft/client/skins/TexturePackRepository.h"
|
||||||
#include "platform/PlatformTypes.h"
|
|
||||||
#include "platform/fs/fs.h"
|
#include "platform/fs/fs.h"
|
||||||
|
#include "platform/PlatformTypes.h"
|
||||||
|
|
||||||
ArchiveManager::ArchiveManager()
|
ArchiveManager::ArchiveManager()
|
||||||
: m_mediaArchive(nullptr), m_dwRequiredTexturePackID(0) {}
|
: m_mediaArchive(nullptr), m_dwRequiredTexturePackID(0) {}
|
||||||
@@ -18,9 +18,14 @@ ArchiveManager::ArchiveManager()
|
|||||||
void ArchiveManager::loadMediaArchive() {
|
void ArchiveManager::loadMediaArchive() {
|
||||||
std::string mediapath = "";
|
std::string mediapath = "";
|
||||||
|
|
||||||
|
#if _WINDOWS64
|
||||||
mediapath = "Common\\Media\\MediaWindows64.arc";
|
mediapath = "Common\\Media\\MediaWindows64.arc";
|
||||||
|
#elif __linux__
|
||||||
|
mediapath = "app/common/Media/MediaLinux.arc";
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!mediapath.empty()) {
|
if (!mediapath.empty()) {
|
||||||
|
#if defined(__linux__)
|
||||||
std::string exeDirW = PlatformFilesystem.getBasePath().string();
|
std::string exeDirW = PlatformFilesystem.getBasePath().string();
|
||||||
std::string candidate = exeDirW + File::pathSeparator + mediapath;
|
std::string candidate = exeDirW + File::pathSeparator + mediapath;
|
||||||
if (File(candidate).exists()) {
|
if (File(candidate).exists()) {
|
||||||
@@ -28,6 +33,9 @@ void ArchiveManager::loadMediaArchive() {
|
|||||||
} else {
|
} else {
|
||||||
m_mediaArchive = new ArchiveFile(File(mediapath));
|
m_mediaArchive = new ArchiveFile(File(mediapath));
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
m_mediaArchive = new ArchiveFile(File(mediapath));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
#include "app/common/Audio/ConsoleSoundEngine.h"
|
|
||||||
|
|
||||||
bool ConsoleSoundEngine::GetIsPlayingStreamingCDMusic() {
|
|
||||||
return m_bIsPlayingStreamingCDMusic;
|
|
||||||
}
|
|
||||||
bool ConsoleSoundEngine::GetIsPlayingStreamingGameMusic() {
|
|
||||||
return m_bIsPlayingStreamingGameMusic;
|
|
||||||
}
|
|
||||||
void ConsoleSoundEngine::SetIsPlayingStreamingCDMusic(bool bVal) {
|
|
||||||
m_bIsPlayingStreamingCDMusic = bVal;
|
|
||||||
}
|
|
||||||
void ConsoleSoundEngine::SetIsPlayingStreamingGameMusic(bool bVal) {
|
|
||||||
m_bIsPlayingStreamingGameMusic = bVal;
|
|
||||||
}
|
|
||||||
bool ConsoleSoundEngine::GetIsPlayingEndMusic() { return m_bIsPlayingEndMusic; }
|
|
||||||
bool ConsoleSoundEngine::GetIsPlayingNetherMusic() {
|
|
||||||
return m_bIsPlayingNetherMusic;
|
|
||||||
}
|
|
||||||
void ConsoleSoundEngine::SetIsPlayingEndMusic(bool bVal) {
|
|
||||||
m_bIsPlayingEndMusic = bVal;
|
|
||||||
}
|
|
||||||
void ConsoleSoundEngine::SetIsPlayingNetherMusic(bool bVal) {
|
|
||||||
m_bIsPlayingNetherMusic = bVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ConsoleSoundEngine::tick() {
|
|
||||||
if (scheduledSounds.empty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto it = scheduledSounds.begin(); it != scheduledSounds.end();) {
|
|
||||||
ConsoleSoundEngine::ScheduledSound* next = *it;
|
|
||||||
next->delay--;
|
|
||||||
|
|
||||||
if (next->delay <= 0) {
|
|
||||||
play(next->iSound, next->x, next->y, next->z, next->volume,
|
|
||||||
next->pitch);
|
|
||||||
it = scheduledSounds.erase(it);
|
|
||||||
delete next;
|
|
||||||
} else {
|
|
||||||
++it;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ConsoleSoundEngine::schedule(int iSound, float x, float y, float z,
|
|
||||||
float volume, float pitch, int delayTicks) {
|
|
||||||
scheduledSounds.push_back(new ConsoleSoundEngine::ScheduledSound(
|
|
||||||
iSound, x, y, z, volume, pitch, delayTicks));
|
|
||||||
}
|
|
||||||
|
|
||||||
ConsoleSoundEngine::ScheduledSound::ScheduledSound(int iSound, float x, float y,
|
|
||||||
float z, float volume,
|
|
||||||
float pitch, int delay) {
|
|
||||||
this->iSound = iSound;
|
|
||||||
this->x = x;
|
|
||||||
this->y = y;
|
|
||||||
this->z = z;
|
|
||||||
this->volume = volume;
|
|
||||||
this->pitch = pitch;
|
|
||||||
this->delay = delay;
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
#include "Consoles_SoundEngine.h"
|
||||||
|
|
||||||
|
bool ConsoleSoundEngine::GetIsPlayingStreamingCDMusic() {
|
||||||
|
return m_bIsPlayingStreamingCDMusic;
|
||||||
|
}
|
||||||
|
bool ConsoleSoundEngine::GetIsPlayingStreamingGameMusic() {
|
||||||
|
return m_bIsPlayingStreamingGameMusic;
|
||||||
|
}
|
||||||
|
void ConsoleSoundEngine::SetIsPlayingStreamingCDMusic(bool bVal) {
|
||||||
|
m_bIsPlayingStreamingCDMusic = bVal;
|
||||||
|
}
|
||||||
|
void ConsoleSoundEngine::SetIsPlayingStreamingGameMusic(bool bVal) {
|
||||||
|
m_bIsPlayingStreamingGameMusic = bVal;
|
||||||
|
}
|
||||||
|
bool ConsoleSoundEngine::GetIsPlayingEndMusic() { return m_bIsPlayingEndMusic; }
|
||||||
|
bool ConsoleSoundEngine::GetIsPlayingNetherMusic() {
|
||||||
|
return m_bIsPlayingNetherMusic;
|
||||||
|
}
|
||||||
|
void ConsoleSoundEngine::SetIsPlayingEndMusic(bool bVal) {
|
||||||
|
m_bIsPlayingEndMusic = bVal;
|
||||||
|
}
|
||||||
|
void ConsoleSoundEngine::SetIsPlayingNetherMusic(bool bVal) {
|
||||||
|
m_bIsPlayingNetherMusic = bVal;
|
||||||
|
}
|
||||||
+1
-8
@@ -4,7 +4,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "SoundTypes.h"
|
#include "minecraft/sounds/SoundTypes.h"
|
||||||
|
|
||||||
class File;
|
class File;
|
||||||
|
|
||||||
@@ -21,11 +21,6 @@ typedef struct {
|
|||||||
class Options;
|
class Options;
|
||||||
class Mob;
|
class Mob;
|
||||||
|
|
||||||
// Game-side sound engine interface. The concrete backend
|
|
||||||
// (app/common/Audio/SoundEngine) inherits from this and forwards into
|
|
||||||
// IPlatformSound. minecraft/ consumers see only the abstract base, so
|
|
||||||
// they don't have to drag the concrete backend (and its miniaudio
|
|
||||||
// pimpl) into their compilation units.
|
|
||||||
class ConsoleSoundEngine {
|
class ConsoleSoundEngine {
|
||||||
public:
|
public:
|
||||||
ConsoleSoundEngine()
|
ConsoleSoundEngine()
|
||||||
@@ -34,8 +29,6 @@ public:
|
|||||||
m_bIsPlayingEndMusic(false),
|
m_bIsPlayingEndMusic(false),
|
||||||
m_bIsPlayingNetherMusic(false) {}
|
m_bIsPlayingNetherMusic(false) {}
|
||||||
|
|
||||||
virtual ~ConsoleSoundEngine() = default;
|
|
||||||
|
|
||||||
virtual void tick(std::shared_ptr<Mob>* players, float a) = 0;
|
virtual void tick(std::shared_ptr<Mob>* players, float a) = 0;
|
||||||
virtual void destroy() = 0;
|
virtual void destroy() = 0;
|
||||||
virtual void play(int iSound, float x, float y, float z, float volume,
|
virtual void play(int iSound, float x, float y, float z, float volume,
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -4,19 +4,13 @@ class Options;
|
|||||||
class C4JThread;
|
class C4JThread;
|
||||||
class Random;
|
class Random;
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "app/common/Audio/ConsoleSoundEngine.h"
|
#include "app/common/App_Defines.h"
|
||||||
#include "app/common/Audio/SoundTypes.h"
|
#include "app/common/Audio/Consoles_SoundEngine.h"
|
||||||
#include "app/common/Iggy/include/rrCore.h"
|
#include "app/linux/Iggy/include/rrCore.h"
|
||||||
#include "platform/PlatformTypes.h"
|
#include "minecraft/sounds/SoundTypes.h"
|
||||||
|
#include "miniaudio.h"
|
||||||
// Forward-declare the miniaudio backing state. The full struct lives in
|
|
||||||
// SoundEngine.cpp where miniaudio.h is actually included. This keeps
|
|
||||||
// miniaudio.h out of the 9 minecraft files that include SoundEngine.h
|
|
||||||
// via the 4j include chain.
|
|
||||||
struct SoundEngineMiniAudio;
|
|
||||||
|
|
||||||
constexpr float SFX_3D_MIN_DISTANCE = 1.0f;
|
constexpr float SFX_3D_MIN_DISTANCE = 1.0f;
|
||||||
constexpr float SFX_3D_MAX_DISTANCE = 16.0f;
|
constexpr float SFX_3D_MAX_DISTANCE = 16.0f;
|
||||||
@@ -96,15 +90,15 @@ typedef struct {
|
|||||||
char chName[64];
|
char chName[64];
|
||||||
#endif
|
#endif
|
||||||
} AUDIO_INFO;
|
} AUDIO_INFO;
|
||||||
|
struct MiniAudioSound {
|
||||||
// MiniAudioSound's definition lives in SoundEngine.cpp alongside the
|
ma_sound sound;
|
||||||
// miniaudio backend; consumers of this header don't need to see it.
|
AUDIO_INFO info;
|
||||||
|
bool active;
|
||||||
|
};
|
||||||
class SoundEngine : public ConsoleSoundEngine {
|
class SoundEngine : public ConsoleSoundEngine {
|
||||||
static const int MAX_SAME_SOUNDS_PLAYING = 8; // 4J added
|
static const int MAX_SAME_SOUNDS_PLAYING = 8; // 4J added
|
||||||
public:
|
public:
|
||||||
SoundEngine();
|
SoundEngine();
|
||||||
~SoundEngine();
|
|
||||||
virtual void destroy();
|
virtual void destroy();
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
void GetSoundName(char* szSoundName, int iSound);
|
void GetSoundName(char* szSoundName, int iSound);
|
||||||
@@ -142,15 +136,15 @@ private:
|
|||||||
float getMasterMusicVolume();
|
float getMasterMusicVolume();
|
||||||
// platform specific functions
|
// platform specific functions
|
||||||
int initAudioHardware(int iMinSpeakers) { return iMinSpeakers; }
|
int initAudioHardware(int iMinSpeakers) { return iMinSpeakers; }
|
||||||
|
#if defined(__linux__)
|
||||||
void updateMiniAudio();
|
void updateMiniAudio();
|
||||||
|
#endif
|
||||||
|
|
||||||
int GetRandomishTrack(int iStart, int iEnd);
|
int GetRandomishTrack(int iStart, int iEnd);
|
||||||
|
|
||||||
// Miniaudio engine + music stream PIMPL'd into SoundEngineMiniAudio,
|
ma_engine m_engine;
|
||||||
// defined in SoundEngine.cpp. Owned via unique_ptr; the destructor
|
ma_engine_config m_engineConfig;
|
||||||
// is out-of-line so the unique_ptr instantiation can see the full
|
ma_sound m_musicStream;
|
||||||
// type.
|
|
||||||
std::unique_ptr<SoundEngineMiniAudio> m_audio;
|
|
||||||
bool m_musicStreamActive;
|
bool m_musicStreamActive;
|
||||||
|
|
||||||
static char m_szSoundPath[];
|
static char m_szSoundPath[];
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "app/common/Audio/ConsoleSoundEngine.h"
|
#include "Consoles_SoundEngine.h"
|
||||||
#include "app/common/Audio/SoundTypes.h"
|
#include "minecraft/sounds/SoundTypes.h"
|
||||||
|
|
||||||
const char* ConsoleSoundEngine::wchSoundNames[eSoundType_MAX] = {
|
const char* ConsoleSoundEngine::wchSoundNames[eSoundType_MAX] = {
|
||||||
"mob/chicken/chicken", // eSoundType_MOB_CHICKEN_AMBIENT
|
"mob/chicken/chicken", // eSoundType_MOB_CHICKEN_AMBIENT
|
||||||
@@ -58,7 +58,7 @@ const char* ConsoleSoundEngine::wchSoundNames[eSoundType_MAX] = {
|
|||||||
"mob/cat/meow", // eSoundType_MOB_CAT_MEOW
|
"mob/cat/meow", // eSoundType_MOB_CAT_MEOW
|
||||||
// 4J-PB - correct the name of the event for hitting ocelots
|
// 4J-PB - correct the name of the event for hitting ocelots
|
||||||
"mob/cat/hitt", // eSoundType_MOB_CAT_HITT
|
"mob/cat/hitt", // eSoundType_MOB_CAT_HITT
|
||||||
// "mob.irongolem.throw", //
|
// "mob.irongolem.throw", //
|
||||||
// eSoundType_MOB_IRONGOLEM_THROW "mob.irongolem.hit",
|
// eSoundType_MOB_IRONGOLEM_THROW "mob.irongolem.hit",
|
||||||
//// eSoundType_MOB_IRONGOLEM_HIT "mob.irongolem.death",
|
//// eSoundType_MOB_IRONGOLEM_HIT "mob.irongolem.death",
|
||||||
//// eSoundType_MOB_IRONGOLEM_DEATH "mob.irongolem.walk",
|
//// eSoundType_MOB_IRONGOLEM_DEATH "mob.irongolem.walk",
|
||||||
@@ -205,11 +205,11 @@ const char* ConsoleSoundEngine::wchSoundNames[eSoundType_MAX] = {
|
|||||||
"mob/horse/jump", // eSoundType_MOB_HORSE_JUMP,
|
"mob/horse/jump", // eSoundType_MOB_HORSE_JUMP,
|
||||||
|
|
||||||
"mob/witch/idle", // eSoundType_MOB_WITCH_IDLE, <---
|
"mob/witch/idle", // eSoundType_MOB_WITCH_IDLE, <---
|
||||||
// missing
|
// missing
|
||||||
"mob/witch/hurt", // eSoundType_MOB_WITCH_HURT, <---
|
"mob/witch/hurt", // eSoundType_MOB_WITCH_HURT, <---
|
||||||
// missing
|
// missing
|
||||||
"mob/witch/death", // eSoundType_MOB_WITCH_DEATH, <---
|
"mob/witch/death", // eSoundType_MOB_WITCH_DEATH, <---
|
||||||
// missing
|
// missing
|
||||||
|
|
||||||
"mob/slime/big", // eSoundType_MOB_SLIME_BIG,
|
"mob/slime/big", // eSoundType_MOB_SLIME_BIG,
|
||||||
"mob/slime/small", // eSoundType_MOB_SLIME_SMALL,
|
"mob/slime/small", // eSoundType_MOB_SLIME_SMALL,
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ void BannedListManager::invalidate(int iPad) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BannedListManager::addLevel(int iPad, PlayerUID xuid, char* pszLevelName,
|
void BannedListManager::addLevel(int iPad, PlayerUID xuid,
|
||||||
bool bWriteToTMS) {
|
char* pszLevelName, bool bWriteToTMS) {
|
||||||
// we will have retrieved the banned level list from TMS, so add this one to
|
// we will have retrieved the banned level list from TMS, so add this one to
|
||||||
// it and write it back to TMS
|
// it and write it back to TMS
|
||||||
|
|
||||||
@@ -64,7 +64,8 @@ void BannedListManager::addLevel(int iPad, PlayerUID xuid, char* pszLevelName,
|
|||||||
// update telemetry too
|
// update telemetry too
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BannedListManager::isInList(int iPad, PlayerUID xuid, char* pszLevelName) {
|
bool BannedListManager::isInList(int iPad, PlayerUID xuid,
|
||||||
|
char* pszLevelName) {
|
||||||
for (auto it = m_vBannedListA[iPad]->begin();
|
for (auto it = m_vBannedListA[iPad]->begin();
|
||||||
it != m_vBannedListA[iPad]->end(); ++it) {
|
it != m_vBannedListA[iPad]->end(); ++it) {
|
||||||
PBANNEDLISTDATA pData = *it;
|
PBANNEDLISTDATA pData = *it;
|
||||||
@@ -125,4 +126,6 @@ void BannedListManager::setUniqueMapName(char* pszUniqueMapName) {
|
|||||||
memcpy(m_pszUniqueMapName, pszUniqueMapName, 14);
|
memcpy(m_pszUniqueMapName, pszUniqueMapName, 14);
|
||||||
}
|
}
|
||||||
|
|
||||||
char* BannedListManager::getUniqueMapName() { return m_pszUniqueMapName; }
|
char* BannedListManager::getUniqueMapName() {
|
||||||
|
return m_pszUniqueMapName;
|
||||||
|
}
|
||||||
|
|||||||
@@ -10,11 +10,6 @@
|
|||||||
#define VER_PRODUCTBUILD 560
|
#define VER_PRODUCTBUILD 560
|
||||||
// This goes up if there is any change to network traffic or code in a build
|
// This goes up if there is any change to network traffic or code in a build
|
||||||
#define VER_NETWORK 560
|
#define VER_NETWORK 560
|
||||||
|
|
||||||
// Network protocol version. Sent in the pre-login packet so client and
|
|
||||||
// server can detect mismatched builds.
|
|
||||||
#define MINECRAFT_NET_VERSION VER_NETWORK
|
|
||||||
|
|
||||||
#define VER_PRODUCTBUILD_QFE 0
|
#define VER_PRODUCTBUILD_QFE 0
|
||||||
|
|
||||||
#define VER_FILEVERSION_STRING "1.6"
|
#define VER_FILEVERSION_STRING "1.6"
|
||||||
@@ -48,9 +43,9 @@
|
|||||||
|
|
||||||
#define VER_FILEVERSION_STR2(x, y) \
|
#define VER_FILEVERSION_STR2(x, y) \
|
||||||
VER_FILEVERSION_STRING "." VER_FILEBPAD #x "." #y
|
VER_FILEVERSION_STRING "." VER_FILEBPAD #x "." #y
|
||||||
#define VER_FILEVERSION_STR2_W(x, y) \
|
#define VER_FILEVERSION_STR2_W(x, y) \
|
||||||
VER_FILEVERSION_STRING_W \
|
VER_FILEVERSION_STRING_W "." VER_FILEBPAD_W VER_WIDE_PREFIX( \
|
||||||
"." VER_FILEBPAD_W VER_WIDE_PREFIX(#x) "." VER_WIDE_PREFIX(#y)
|
#x) "." VER_WIDE_PREFIX(#y)
|
||||||
#define VER_FILEVERSION_STR1(x, y) VER_FILEVERSION_STR2(x, y)
|
#define VER_FILEVERSION_STR1(x, y) VER_FILEVERSION_STR2(x, y)
|
||||||
#define VER_FILEVERSION_STR1_W(x, y) VER_FILEVERSION_STR2_W(x, y)
|
#define VER_FILEVERSION_STR1_W(x, y) VER_FILEVERSION_STR2_W(x, y)
|
||||||
|
|
||||||
+5
-4
@@ -1,15 +1,16 @@
|
|||||||
#include "minecraft/client/resources/Colours/ColourTable.h"
|
#include "ColourTable.h"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "java/InputOutputStream/ByteArrayInputStream.h"
|
|
||||||
#include "java/InputOutputStream/DataInputStream.h"
|
|
||||||
#include "minecraft/GameEnums.h"
|
#include "minecraft/GameEnums.h"
|
||||||
#include "util/StringHelpers.h"
|
#include "util/StringHelpers.h"
|
||||||
|
#include "java/InputOutputStream/ByteArrayInputStream.h"
|
||||||
|
#include "java/InputOutputStream/DataInputStream.h"
|
||||||
|
|
||||||
std::unordered_map<std::string, eMinecraftColour> ColourTable::s_colourNamesMap;
|
std::unordered_map<std::string, eMinecraftColour>
|
||||||
|
ColourTable::s_colourNamesMap;
|
||||||
|
|
||||||
const char* ColourTable::ColourTableElements[eMinecraftColour_COUNT] = {
|
const char* ColourTable::ColourTableElements[eMinecraftColour_COUNT] = {
|
||||||
"NOTSET",
|
"NOTSET",
|
||||||
@@ -7,12 +7,17 @@
|
|||||||
|
|
||||||
#include "DLCManager.h"
|
#include "DLCManager.h"
|
||||||
#include "app/common/DLC/DLCFile.h"
|
#include "app/common/DLC/DLCFile.h"
|
||||||
#include "app/common/Game.h"
|
#include "app/linux/LinuxGame.h"
|
||||||
#include "platform/XboxStubs.h"
|
#include "platform/XboxStubs.h"
|
||||||
#include "platform/renderer/renderer.h"
|
#include "platform/renderer/renderer.h"
|
||||||
#include "platform/storage/storage.h"
|
#include "platform/storage/storage.h"
|
||||||
#include "util/StringHelpers.h"
|
#include "util/StringHelpers.h"
|
||||||
|
|
||||||
|
#if defined(_WINDOWS64)
|
||||||
|
#include "app/windows/XML/ATGXmlParser.h"
|
||||||
|
#include "app/windows/XML/xmlFilesCallback.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
constexpr std::size_t AUDIO_DLC_WCHAR_BIN_SIZE = 2;
|
constexpr std::size_t AUDIO_DLC_WCHAR_BIN_SIZE = 2;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "DLCManager.h"
|
#include "DLCManager.h"
|
||||||
#include "app/common/DLC/DLCFile.h"
|
#include "app/common/DLC/DLCFile.h"
|
||||||
#include "app/common/Game.h"
|
#include "app/linux/LinuxGame.h"
|
||||||
|
|
||||||
DLCCapeFile::DLCCapeFile(const std::string& path)
|
DLCCapeFile::DLCCapeFile(const std::string& path)
|
||||||
: DLCFile(DLCManager::e_DLCType_Cape, path) {}
|
: DLCFile(DLCManager::e_DLCType_Cape, path) {}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#include "DLCColourTableFile.h"
|
#include "DLCColourTableFile.h"
|
||||||
|
|
||||||
#include "DLCManager.h"
|
#include "DLCManager.h"
|
||||||
|
#include "app/common/Colours/ColourTable.h"
|
||||||
#include "app/common/DLC/DLCFile.h"
|
#include "app/common/DLC/DLCFile.h"
|
||||||
#include "app/common/Game.h"
|
#include "app/linux/LinuxGame.h"
|
||||||
#include "minecraft/client/Minecraft.h"
|
#include "minecraft/client/Minecraft.h"
|
||||||
#include "minecraft/client/resources/Colours/ColourTable.h"
|
|
||||||
#include "minecraft/client/skins/TexturePack.h"
|
#include "minecraft/client/skins/TexturePack.h"
|
||||||
#include "minecraft/client/skins/TexturePackRepository.h"
|
#include "minecraft/client/skins/TexturePackRepository.h"
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
#include "app/common/Minecraft_Macros.h"
|
||||||
#include "app/common/DLC/DLCManager.h"
|
#include "app/common/DLC/DLCManager.h"
|
||||||
#include "minecraft/Minecraft_Macros.h"
|
|
||||||
|
|
||||||
DLCFile::DLCFile(DLCManager::EDLCType type, const std::string& path) {
|
DLCFile::DLCFile(DLCManager::EDLCType type, const std::string& path) {
|
||||||
m_type = type;
|
m_type = type;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "DLCFile.h"
|
#include "DLCFile.h"
|
||||||
#include "minecraft/world/level/GameRules/LevelGenerationOptions.h"
|
#include "app/common/GameRules/LevelGeneration/LevelGenerationOptions.h"
|
||||||
|
|
||||||
class DLCGameRules : public DLCFile {
|
class DLCGameRules : public DLCFile {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
#include "DLCManager.h"
|
#include "DLCManager.h"
|
||||||
#include "app/common/DLC/DLCGameRules.h"
|
#include "app/common/DLC/DLCGameRules.h"
|
||||||
#include "app/common/Game.h"
|
|
||||||
#include "app/common/GameRules/GameRuleManager.h"
|
#include "app/common/GameRules/GameRuleManager.h"
|
||||||
|
#include "app/linux/LinuxGame.h"
|
||||||
|
|
||||||
class StringTable;
|
class StringTable;
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "DLCGameRules.h"
|
#include "DLCGameRules.h"
|
||||||
#include "minecraft/world/level/GameRules/LevelGenerationOptions.h"
|
#include "app/common/GameRules/LevelGeneration/LevelGenerationOptions.h"
|
||||||
|
|
||||||
class StringTable;
|
class StringTable;
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
#include "DLCManager.h"
|
#include "DLCManager.h"
|
||||||
#include "app/common/DLC/DLCFile.h"
|
#include "app/common/DLC/DLCFile.h"
|
||||||
#include "app/common/Game.h"
|
#include "app/common/Localisation/StringTable.h"
|
||||||
#include "minecraft/locale/StringTable.h"
|
|
||||||
|
|
||||||
DLCLocalisationFile::DLCLocalisationFile(const std::string& path)
|
DLCLocalisationFile::DLCLocalisationFile(const std::string& path)
|
||||||
: DLCFile(DLCManager::e_DLCType_LocalisationData, path) {
|
: DLCFile(DLCManager::e_DLCType_LocalisationData, path) {
|
||||||
@@ -12,6 +11,5 @@ DLCLocalisationFile::DLCLocalisationFile(const std::string& path)
|
|||||||
|
|
||||||
void DLCLocalisationFile::addData(std::uint8_t* pbData,
|
void DLCLocalisationFile::addData(std::uint8_t* pbData,
|
||||||
std::uint32_t dataBytes) {
|
std::uint32_t dataBytes) {
|
||||||
m_strings = new StringTable(
|
m_strings = new StringTable(pbData, dataBytes);
|
||||||
std::span<const std::uint8_t>(pbData, dataBytes), app.getLocale());
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,19 +13,20 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "DLCFile.h"
|
#include "simdutf.h"
|
||||||
#include "DLCPack.h"
|
|
||||||
#include "app/common/Game.h"
|
|
||||||
#include "app/common/GameRules/GameRuleManager.h"
|
|
||||||
#include "app/common/UI/ConsoleUIController.h"
|
|
||||||
#include "minecraft/client/Minecraft.h"
|
|
||||||
#include "minecraft/client/skins/TexturePackRepository.h"
|
|
||||||
#include "platform/fs/fs.h"
|
|
||||||
#include "platform/profile/profile.h"
|
#include "platform/profile/profile.h"
|
||||||
#include "platform/storage/storage.h"
|
#include "platform/storage/storage.h"
|
||||||
#include "simdutf.h"
|
#include "DLCFile.h"
|
||||||
#include "strings.h"
|
#include "DLCPack.h"
|
||||||
|
#include "app/common/GameRules/GameRuleManager.h"
|
||||||
|
#include "app/linux/LinuxGame.h"
|
||||||
|
#include "app/linux/Linux_UIController.h"
|
||||||
|
#include "platform/fs/fs.h"
|
||||||
#include "util/StringHelpers.h"
|
#include "util/StringHelpers.h"
|
||||||
|
#include "minecraft/client/Minecraft.h"
|
||||||
|
#include "minecraft/client/skins/TexturePackRepository.h"
|
||||||
|
#include "strings.h"
|
||||||
|
|
||||||
// 4jcraft, this is the size of wchar_t on disk
|
// 4jcraft, this is the size of wchar_t on disk
|
||||||
// the DLC was created on windows, with wchar_t beeing 2 bytes and UTF-16
|
// the DLC was created on windows, with wchar_t beeing 2 bytes and UTF-16
|
||||||
@@ -70,8 +71,7 @@ std::string getMountedDlcReadPath(const std::string& path) {
|
|||||||
std::string readPath = path;
|
std::string readPath = path;
|
||||||
|
|
||||||
#if defined(_WINDOWS64)
|
#if defined(_WINDOWS64)
|
||||||
const std::string mountedPath =
|
const std::string mountedPath = PlatformStorage.GetMountedPath(path.c_str());
|
||||||
PlatformStorage.GetMountedPath(path.c_str());
|
|
||||||
if (!mountedPath.empty()) {
|
if (!mountedPath.empty()) {
|
||||||
readPath = mountedPath;
|
readPath = mountedPath;
|
||||||
}
|
}
|
||||||
@@ -240,7 +240,7 @@ unsigned int DLCManager::getPackIndex(DLCPack* pack, bool& found,
|
|||||||
if (pack == nullptr) {
|
if (pack == nullptr) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"DLCManager: Attempting to find the index for a nullptr pack\n");
|
"DLCManager: Attempting to find the index for a nullptr pack\n");
|
||||||
// assert(0);
|
//assert(0);
|
||||||
return foundIndex;
|
return foundIndex;
|
||||||
}
|
}
|
||||||
if (type != e_DLCType_All) {
|
if (type != e_DLCType_All) {
|
||||||
@@ -401,12 +401,10 @@ bool DLCManager::processDLCDataFile(unsigned int& dwFilesProcessed,
|
|||||||
|
|
||||||
// for details, read in the function below
|
// for details, read in the function below
|
||||||
#define DLC_PARAM_WSTR(buf, off) \
|
#define DLC_PARAM_WSTR(buf, off) \
|
||||||
DLC_WSTRING((buf) + (off) + \
|
DLC_WSTRING((buf) + (off) + offsetof(IPlatformStorage::DLC_FILE_PARAM, wchData))
|
||||||
offsetof(IPlatformStorage::DLC_FILE_PARAM, wchData))
|
|
||||||
|
|
||||||
#define DLC_DETAIL_WSTR(buf, off) \
|
#define DLC_DETAIL_WSTR(buf, off) \
|
||||||
DLC_WSTRING((buf) + (off) + \
|
DLC_WSTRING((buf) + (off) + offsetof(IPlatformStorage::DLC_FILE_DETAILS, wchFile))
|
||||||
offsetof(IPlatformStorage::DLC_FILE_DETAILS, wchFile))
|
|
||||||
{
|
{
|
||||||
std::unordered_map<int, DLCManager::EDLCParameterType> parameterMapping;
|
std::unordered_map<int, DLCManager::EDLCParameterType> parameterMapping;
|
||||||
unsigned int uiCurrentByte = 0;
|
unsigned int uiCurrentByte = 0;
|
||||||
@@ -464,8 +462,7 @@ bool DLCManager::processDLCDataFile(unsigned int& dwFilesProcessed,
|
|||||||
uiCurrentByte += DLC_PARAM_ADV(parBuf.dwWchCount);
|
uiCurrentByte += DLC_PARAM_ADV(parBuf.dwWchCount);
|
||||||
DLC_READ_PARAM(&parBuf, pbData, uiCurrentByte);
|
DLC_READ_PARAM(&parBuf, pbData, uiCurrentByte);
|
||||||
}
|
}
|
||||||
// ulCurrentByte+=ulParameterCount *
|
// ulCurrentByte+=ulParameterCount * sizeof(IPlatformStorage::DLC_FILE_PARAM);
|
||||||
// sizeof(IPlatformStorage::DLC_FILE_PARAM);
|
|
||||||
|
|
||||||
unsigned int uiFileCount;
|
unsigned int uiFileCount;
|
||||||
DLC_READ_UINT(&uiFileCount, pbData, uiCurrentByte);
|
DLC_READ_UINT(&uiFileCount, pbData, uiCurrentByte);
|
||||||
@@ -480,9 +477,7 @@ bool DLCManager::processDLCDataFile(unsigned int& dwFilesProcessed,
|
|||||||
DLC_READ_DETAIL(&fileBuf, pbData, dwTemp);
|
DLC_READ_DETAIL(&fileBuf, pbData, dwTemp);
|
||||||
}
|
}
|
||||||
std::uint8_t* pbTemp =
|
std::uint8_t* pbTemp =
|
||||||
&pbData
|
&pbData[dwTemp]; //+ sizeof(IPlatformStorage::DLC_FILE_DETAILS)*ulFileCount;
|
||||||
[dwTemp]; //+
|
|
||||||
// sizeof(IPlatformStorage::DLC_FILE_DETAILS)*ulFileCount;
|
|
||||||
DLC_READ_DETAIL(&fileBuf, pbData, uiCurrentByte);
|
DLC_READ_DETAIL(&fileBuf, pbData, uiCurrentByte);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < uiFileCount; i++) {
|
for (unsigned int i = 0; i < uiFileCount; i++) {
|
||||||
|
|||||||
@@ -3,77 +3,50 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "minecraft/world/level/dlc/DLCConstants.h"
|
|
||||||
|
|
||||||
class DLCPack;
|
class DLCPack;
|
||||||
class DLCSkinFile;
|
class DLCSkinFile;
|
||||||
|
|
||||||
class DLCManager {
|
class DLCManager {
|
||||||
public:
|
public:
|
||||||
// Re-export the file-scope enums as nested type aliases so existing
|
enum EDLCType {
|
||||||
// app-side call sites that use DLCManager::EDLCType /
|
e_DLCType_Skin = 0,
|
||||||
// DLCManager::e_DLCType_Texture continue to compile. minecraft/-side
|
e_DLCType_Cape,
|
||||||
// call sites should use the namespaced names from DLCConstants.h
|
e_DLCType_Texture,
|
||||||
// directly.
|
e_DLCType_UIData,
|
||||||
using EDLCType = ::minecraft::dlc::EDLCType;
|
e_DLCType_PackConfig,
|
||||||
using EDLCParameterType = ::minecraft::dlc::EDLCParameterType;
|
e_DLCType_TexturePack,
|
||||||
|
e_DLCType_LocalisationData,
|
||||||
|
e_DLCType_GameRules,
|
||||||
|
e_DLCType_Audio,
|
||||||
|
e_DLCType_ColourTable,
|
||||||
|
e_DLCType_GameRulesHeader,
|
||||||
|
|
||||||
static constexpr EDLCType e_DLCType_Skin = ::minecraft::dlc::e_DLCType_Skin;
|
e_DLCType_Max,
|
||||||
static constexpr EDLCType e_DLCType_Cape = ::minecraft::dlc::e_DLCType_Cape;
|
e_DLCType_All,
|
||||||
static constexpr EDLCType e_DLCType_Texture =
|
};
|
||||||
::minecraft::dlc::e_DLCType_Texture;
|
|
||||||
static constexpr EDLCType e_DLCType_UIData =
|
|
||||||
::minecraft::dlc::e_DLCType_UIData;
|
|
||||||
static constexpr EDLCType e_DLCType_PackConfig =
|
|
||||||
::minecraft::dlc::e_DLCType_PackConfig;
|
|
||||||
static constexpr EDLCType e_DLCType_TexturePack =
|
|
||||||
::minecraft::dlc::e_DLCType_TexturePack;
|
|
||||||
static constexpr EDLCType e_DLCType_LocalisationData =
|
|
||||||
::minecraft::dlc::e_DLCType_LocalisationData;
|
|
||||||
static constexpr EDLCType e_DLCType_GameRules =
|
|
||||||
::minecraft::dlc::e_DLCType_GameRules;
|
|
||||||
static constexpr EDLCType e_DLCType_Audio =
|
|
||||||
::minecraft::dlc::e_DLCType_Audio;
|
|
||||||
static constexpr EDLCType e_DLCType_ColourTable =
|
|
||||||
::minecraft::dlc::e_DLCType_ColourTable;
|
|
||||||
static constexpr EDLCType e_DLCType_GameRulesHeader =
|
|
||||||
::minecraft::dlc::e_DLCType_GameRulesHeader;
|
|
||||||
static constexpr EDLCType e_DLCType_Max = ::minecraft::dlc::e_DLCType_Max;
|
|
||||||
static constexpr EDLCType e_DLCType_All = ::minecraft::dlc::e_DLCType_All;
|
|
||||||
|
|
||||||
static constexpr EDLCParameterType e_DLCParamType_Invalid =
|
// If you add to the Enum,then you need to add the array of type names
|
||||||
::minecraft::dlc::e_DLCParamType_Invalid;
|
// These are the names used in the XML for the parameters
|
||||||
static constexpr EDLCParameterType e_DLCParamType_DisplayName =
|
enum EDLCParameterType {
|
||||||
::minecraft::dlc::e_DLCParamType_DisplayName;
|
e_DLCParamType_Invalid = -1,
|
||||||
static constexpr EDLCParameterType e_DLCParamType_ThemeName =
|
|
||||||
::minecraft::dlc::e_DLCParamType_ThemeName;
|
|
||||||
static constexpr EDLCParameterType e_DLCParamType_Free =
|
|
||||||
::minecraft::dlc::e_DLCParamType_Free;
|
|
||||||
static constexpr EDLCParameterType e_DLCParamType_Credit =
|
|
||||||
::minecraft::dlc::e_DLCParamType_Credit;
|
|
||||||
static constexpr EDLCParameterType e_DLCParamType_Cape =
|
|
||||||
::minecraft::dlc::e_DLCParamType_Cape;
|
|
||||||
static constexpr EDLCParameterType e_DLCParamType_Box =
|
|
||||||
::minecraft::dlc::e_DLCParamType_Box;
|
|
||||||
static constexpr EDLCParameterType e_DLCParamType_Anim =
|
|
||||||
::minecraft::dlc::e_DLCParamType_Anim;
|
|
||||||
static constexpr EDLCParameterType e_DLCParamType_PackId =
|
|
||||||
::minecraft::dlc::e_DLCParamType_PackId;
|
|
||||||
static constexpr EDLCParameterType e_DLCParamType_NetherParticleColour =
|
|
||||||
::minecraft::dlc::e_DLCParamType_NetherParticleColour;
|
|
||||||
static constexpr EDLCParameterType e_DLCParamType_EnchantmentTextColour =
|
|
||||||
::minecraft::dlc::e_DLCParamType_EnchantmentTextColour;
|
|
||||||
static constexpr EDLCParameterType
|
|
||||||
e_DLCParamType_EnchantmentTextFocusColour =
|
|
||||||
::minecraft::dlc::e_DLCParamType_EnchantmentTextFocusColour;
|
|
||||||
static constexpr EDLCParameterType e_DLCParamType_DataPath =
|
|
||||||
::minecraft::dlc::e_DLCParamType_DataPath;
|
|
||||||
static constexpr EDLCParameterType e_DLCParamType_PackVersion =
|
|
||||||
::minecraft::dlc::e_DLCParamType_PackVersion;
|
|
||||||
static constexpr EDLCParameterType e_DLCParamType_Max =
|
|
||||||
::minecraft::dlc::e_DLCParamType_Max;
|
|
||||||
|
|
||||||
|
e_DLCParamType_DisplayName = 0,
|
||||||
|
e_DLCParamType_ThemeName,
|
||||||
|
e_DLCParamType_Free, // identify free skins
|
||||||
|
e_DLCParamType_Credit, // legal credits for DLC
|
||||||
|
e_DLCParamType_Cape,
|
||||||
|
e_DLCParamType_Box,
|
||||||
|
e_DLCParamType_Anim,
|
||||||
|
e_DLCParamType_PackId,
|
||||||
|
e_DLCParamType_NetherParticleColour,
|
||||||
|
e_DLCParamType_EnchantmentTextColour,
|
||||||
|
e_DLCParamType_EnchantmentTextFocusColour,
|
||||||
|
e_DLCParamType_DataPath,
|
||||||
|
e_DLCParamType_PackVersion,
|
||||||
|
|
||||||
|
e_DLCParamType_Max,
|
||||||
|
|
||||||
|
};
|
||||||
const static char* wchTypeNamesA[e_DLCParamType_Max];
|
const static char* wchTypeNamesA[e_DLCParamType_Max];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -110,7 +83,7 @@ public:
|
|||||||
EDLCType type = e_DLCType_All);
|
EDLCType type = e_DLCType_All);
|
||||||
DLCSkinFile* getSkinFile(
|
DLCSkinFile* getSkinFile(
|
||||||
const std::string& path); // Will hunt all packs of type skin to find
|
const std::string& path); // Will hunt all packs of type skin to find
|
||||||
// the right skinfile
|
// the right skinfile
|
||||||
|
|
||||||
DLCPack* getPackContainingSkin(const std::string& path);
|
DLCPack* getPackContainingSkin(const std::string& path);
|
||||||
unsigned int getPackIndexContainingSkin(const std::string& path,
|
unsigned int getPackIndexContainingSkin(const std::string& path,
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
#include "platform/profile/profile.h"
|
||||||
#include "DLCAudioFile.h"
|
#include "DLCAudioFile.h"
|
||||||
#include "DLCCapeFile.h"
|
#include "DLCCapeFile.h"
|
||||||
#include "DLCColourTableFile.h"
|
#include "DLCColourTableFile.h"
|
||||||
@@ -14,13 +15,13 @@
|
|||||||
#include "DLCLocalisationFile.h"
|
#include "DLCLocalisationFile.h"
|
||||||
#include "DLCTextureFile.h"
|
#include "DLCTextureFile.h"
|
||||||
#include "DLCUIDataFile.h"
|
#include "DLCUIDataFile.h"
|
||||||
|
#include "app/common/Console_Debug_enum.h"
|
||||||
#include "app/common/DLC/DLCFile.h"
|
#include "app/common/DLC/DLCFile.h"
|
||||||
#include "app/common/DLC/DLCManager.h"
|
#include "app/common/DLC/DLCManager.h"
|
||||||
#include "app/common/DLC/DLCSkinFile.h"
|
#include "app/common/DLC/DLCSkinFile.h"
|
||||||
#include "app/common/Game.h"
|
#include "app/common/Localisation/StringTable.h"
|
||||||
#include "minecraft/Console_Debug_enum.h"
|
#include "app/linux/LinuxGame.h"
|
||||||
#include "minecraft/locale/StringTable.h"
|
#include "app/linux/Stubs/winapi_stubs.h"
|
||||||
#include "platform/profile/profile.h"
|
|
||||||
#include "util/StringHelpers.h"
|
#include "util/StringHelpers.h"
|
||||||
|
|
||||||
DLCPack::DLCPack(const std::string& name, std::uint32_t dwLicenseMask) {
|
DLCPack::DLCPack(const std::string& name, std::uint32_t dwLicenseMask) {
|
||||||
@@ -351,6 +352,6 @@ void DLCPack::UpdateLanguage() {
|
|||||||
DLCLocalisationFile* localisationFile = (DLCLocalisationFile*)getFile(
|
DLCLocalisationFile* localisationFile = (DLCLocalisationFile*)getFile(
|
||||||
DLCManager::e_DLCType_LocalisationData, "languages.loc");
|
DLCManager::e_DLCType_LocalisationData, "languages.loc");
|
||||||
StringTable* strTable = localisationFile->getStringTable();
|
StringTable* strTable = localisationFile->getStringTable();
|
||||||
strTable->ReloadStringTable(app.getLocale());
|
strTable->ReloadStringTable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "platform/PlatformTypes.h"
|
||||||
#include "DLCManager.h"
|
#include "DLCManager.h"
|
||||||
#include "app/common/DLC/DLCSkinFile.h"
|
#include "app/common/DLC/DLCSkinFile.h"
|
||||||
#include "platform/PlatformTypes.h"
|
|
||||||
|
|
||||||
class DLCFile;
|
class DLCFile;
|
||||||
class DLCSkinFile;
|
class DLCSkinFile;
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
|
||||||
|
#include "platform/renderer/renderer.h"
|
||||||
#include "DLCManager.h"
|
#include "DLCManager.h"
|
||||||
#include "app/common/DLC/DLCFile.h"
|
#include "app/common/DLC/DLCFile.h"
|
||||||
#include "app/common/Game.h"
|
#include "app/linux/LinuxGame.h"
|
||||||
#include "minecraft/client/model/SkinBox.h"
|
#include "minecraft/client/model/SkinBox.h"
|
||||||
#include "platform/XboxStubs.h"
|
#include "platform/XboxStubs.h"
|
||||||
#include "platform/renderer/renderer.h"
|
|
||||||
|
|
||||||
DLCSkinFile::DLCSkinFile(const std::string& path)
|
DLCSkinFile::DLCSkinFile(const std::string& path)
|
||||||
: DLCFile(DLCManager::e_DLCType_Skin, path) {
|
: DLCFile(DLCManager::e_DLCType_Skin, path) {
|
||||||
@@ -56,8 +56,8 @@ void DLCSkinFile::addParameter(DLCManager::EDLCParameterType type,
|
|||||||
|
|
||||||
int maximumChars = 55;
|
int maximumChars = 55;
|
||||||
|
|
||||||
bool bIsSDMode = !PlatformRenderer.IsHiDef() &&
|
bool bIsSDMode =
|
||||||
!PlatformRenderer.IsWidescreen();
|
!PlatformRenderer.IsHiDef() && !PlatformRenderer.IsWidescreen();
|
||||||
|
|
||||||
if (bIsSDMode) {
|
if (bIsSDMode) {
|
||||||
maximumChars = 45;
|
maximumChars = 45;
|
||||||
@@ -110,9 +110,9 @@ void DLCSkinFile::addParameter(DLCManager::EDLCParameterType type,
|
|||||||
SKIN_BOX* pSkinBox = new SKIN_BOX;
|
SKIN_BOX* pSkinBox = new SKIN_BOX;
|
||||||
memset(pSkinBox, 0, sizeof(SKIN_BOX));
|
memset(pSkinBox, 0, sizeof(SKIN_BOX));
|
||||||
|
|
||||||
sscanf(value.c_str(), "%9s%f%f%f%f%f%f%f%f", wchBodyPart,
|
sscanf(value.c_str(), "%9ls%f%f%f%f%f%f%f%f", wchBodyPart, 10,
|
||||||
&pSkinBox->fX, &pSkinBox->fY, &pSkinBox->fZ, &pSkinBox->fW,
|
&pSkinBox->fX, &pSkinBox->fY, &pSkinBox->fZ, &pSkinBox->fW,
|
||||||
&pSkinBox->fH, &pSkinBox->fD, &pSkinBox->fU, &pSkinBox->fV);
|
&pSkinBox->fH, &pSkinBox->fD, &pSkinBox->fU, &pSkinBox->fV);
|
||||||
|
|
||||||
if (strcmp(wchBodyPart, "HEAD") == 0) {
|
if (strcmp(wchBodyPart, "HEAD") == 0) {
|
||||||
pSkinBox->ePart = eBodyPart_Head;
|
pSkinBox->ePart = eBodyPart_Head;
|
||||||
@@ -132,7 +132,8 @@ void DLCSkinFile::addParameter(DLCManager::EDLCParameterType type,
|
|||||||
m_AdditionalBoxes.push_back(pSkinBox);
|
m_AdditionalBoxes.push_back(pSkinBox);
|
||||||
} break;
|
} break;
|
||||||
case DLCManager::e_DLCParamType_Anim: {
|
case DLCManager::e_DLCParamType_Anim: {
|
||||||
sscanf(value.c_str(), "%X", &m_uiAnimOverrideBitmask);
|
sscanf(value.c_str(), "%X", &m_uiAnimOverrideBitmask,
|
||||||
|
sizeof(unsigned int));
|
||||||
uint32_t skinId = app.getSkinIdFromPath(m_path);
|
uint32_t skinId = app.getSkinIdFromPath(m_path);
|
||||||
app.SetAnimOverrideBitmask(skinId, m_uiAnimOverrideBitmask);
|
app.SetAnimOverrideBitmask(skinId, m_uiAnimOverrideBitmask);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -6,11 +6,10 @@
|
|||||||
|
|
||||||
#include "DLCFile.h"
|
#include "DLCFile.h"
|
||||||
#include "app/common/DLC/DLCManager.h"
|
#include "app/common/DLC/DLCManager.h"
|
||||||
#include "minecraft/client/model/HumanoidModel.h"
|
|
||||||
#include "minecraft/client/model/SkinBox.h"
|
#include "minecraft/client/model/SkinBox.h"
|
||||||
#include "minecraft/client/skins/ISkinAssetData.h"
|
#include "minecraft/client/model/HumanoidModel.h"
|
||||||
|
|
||||||
class DLCSkinFile : public DLCFile, public ISkinAssetData {
|
class DLCSkinFile : public DLCFile {
|
||||||
private:
|
private:
|
||||||
std::string m_displayName;
|
std::string m_displayName;
|
||||||
std::string m_themeName;
|
std::string m_themeName;
|
||||||
@@ -22,23 +21,15 @@ private:
|
|||||||
public:
|
public:
|
||||||
DLCSkinFile(const std::string& path);
|
DLCSkinFile(const std::string& path);
|
||||||
|
|
||||||
void addData(std::uint8_t* pbData, std::uint32_t dataBytes) override;
|
virtual void addData(std::uint8_t* pbData, std::uint32_t dataBytes);
|
||||||
void addParameter(DLCManager::EDLCParameterType type,
|
virtual void addParameter(DLCManager::EDLCParameterType type,
|
||||||
const std::string& value) override;
|
const std::string& value);
|
||||||
|
|
||||||
std::string getParameterAsString(
|
|
||||||
DLCManager::EDLCParameterType type) override;
|
|
||||||
bool getParameterAsBool(DLCManager::EDLCParameterType type) override;
|
|
||||||
|
|
||||||
// ISkinAssetData
|
|
||||||
[[nodiscard]] std::uint32_t getSkinID() override {
|
|
||||||
return DLCFile::getSkinID();
|
|
||||||
}
|
|
||||||
[[nodiscard]] unsigned int getAnimOverrideBitmask() override {
|
|
||||||
return m_uiAnimOverrideBitmask;
|
|
||||||
}
|
|
||||||
[[nodiscard]] int getAdditionalBoxesCount() override;
|
|
||||||
[[nodiscard]] std::vector<SKIN_BOX*>* getAdditionalBoxes() override;
|
|
||||||
|
|
||||||
|
virtual std::string getParameterAsString(
|
||||||
|
DLCManager::EDLCParameterType type);
|
||||||
|
virtual bool getParameterAsBool(DLCManager::EDLCParameterType type);
|
||||||
|
std::vector<SKIN_BOX*>* getAdditionalBoxes();
|
||||||
|
int getAdditionalBoxesCount();
|
||||||
|
unsigned int getAnimOverrideBitmask() { return m_uiAnimOverrideBitmask; }
|
||||||
bool isFree() { return m_bIsFree; }
|
bool isFree() { return m_bIsFree; }
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "DLCManager.h"
|
#include "DLCManager.h"
|
||||||
#include "app/common/DLC/DLCFile.h"
|
#include "app/common/DLC/DLCFile.h"
|
||||||
#include "app/common/Game.h"
|
#include "app/linux/LinuxGame.h"
|
||||||
|
|
||||||
DLCUIDataFile::DLCUIDataFile(const std::string& path)
|
DLCUIDataFile::DLCUIDataFile(const std::string& path)
|
||||||
: DLCFile(DLCManager::e_DLCType_UIData, path) {
|
: DLCFile(DLCManager::e_DLCType_UIData, path) {
|
||||||
|
|||||||
@@ -1,19 +1,21 @@
|
|||||||
#include "app/common/DLCController.h"
|
#include "app/common/DLCController.h"
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
#include <mutex>
|
|
||||||
|
|
||||||
#include "app/common/DLC/DLCManager.h"
|
|
||||||
#include "app/common/DLC/DLCPack.h"
|
|
||||||
#include "app/common/DLC/DLCSkinFile.h"
|
|
||||||
#include "app/common/Game.h"
|
#include "app/common/Game.h"
|
||||||
#include "app/common/UI/ConsoleUIController.h"
|
#include "app/common/DLC/DLCPack.h"
|
||||||
|
#include "app/common/DLC/DLCManager.h"
|
||||||
|
#include "app/common/DLC/DLCSkinFile.h"
|
||||||
|
#include "app/linux/LinuxGame.h"
|
||||||
|
#include "app/linux/Linux_UIController.h"
|
||||||
|
#include "app/linux/Stubs/winapi_stubs.h"
|
||||||
#include "minecraft/client/Minecraft.h"
|
#include "minecraft/client/Minecraft.h"
|
||||||
#include "minecraft/client/skins/TexturePack.h"
|
#include "minecraft/client/skins/TexturePack.h"
|
||||||
#include "minecraft/client/skins/TexturePackRepository.h"
|
#include "minecraft/client/skins/TexturePackRepository.h"
|
||||||
#include "platform/XboxStubs.h"
|
|
||||||
#include "platform/profile/profile.h"
|
|
||||||
#include "platform/storage/storage.h"
|
#include "platform/storage/storage.h"
|
||||||
|
#include "platform/profile/profile.h"
|
||||||
|
#include "platform/XboxStubs.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
#include <mutex>
|
||||||
|
|
||||||
DLCController::DLCController() {
|
DLCController::DLCController() {
|
||||||
m_pDLCFileBuffer = nullptr;
|
m_pDLCFileBuffer = nullptr;
|
||||||
@@ -74,9 +76,10 @@ bool DLCController::startInstallDLCProcess(int iPad) {
|
|||||||
"--- DLCController::startInstallDLCProcess - "
|
"--- DLCController::startInstallDLCProcess - "
|
||||||
"PlatformStorage.GetInstalledDLC\n");
|
"PlatformStorage.GetInstalledDLC\n");
|
||||||
|
|
||||||
PlatformStorage.GetInstalledDLC(iPad, [this](int iInstalledC, int pad) {
|
PlatformStorage.GetInstalledDLC(
|
||||||
return dlcInstalledCallback(iInstalledC, pad);
|
iPad, [this](int iInstalledC, int pad) {
|
||||||
});
|
return dlcInstalledCallback(iInstalledC, pad);
|
||||||
|
});
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
@@ -102,7 +105,7 @@ void DLCController::mountNextDLC(int iPad) {
|
|||||||
[this](int pad, std::uint32_t dwErr,
|
[this](int pad, std::uint32_t dwErr,
|
||||||
std::uint32_t dwLicenceMask) {
|
std::uint32_t dwLicenceMask) {
|
||||||
return dlcMountedCallback(pad, dwErr, dwLicenceMask);
|
return dlcMountedCallback(pad, dwErr, dwLicenceMask);
|
||||||
}) != 997 /* ERROR_IO_PENDING */) {
|
}) != ERROR_IO_PENDING) {
|
||||||
app.DebugPrintf("Failed to mount DLC %d for pad %d\n",
|
app.DebugPrintf("Failed to mount DLC %d for pad %d\n",
|
||||||
m_iTotalDLCInstalled, iPad);
|
m_iTotalDLCInstalled, iPad);
|
||||||
++m_iTotalDLCInstalled;
|
++m_iTotalDLCInstalled;
|
||||||
@@ -128,7 +131,7 @@ int DLCController::dlcMountedCallback(int iPad, std::uint32_t dwErr,
|
|||||||
#if defined(_WINDOWS64)
|
#if defined(_WINDOWS64)
|
||||||
app.DebugPrintf("--- DLCController::dlcMountedCallback\n");
|
app.DebugPrintf("--- DLCController::dlcMountedCallback\n");
|
||||||
|
|
||||||
if (dwErr != 0 /* ERROR_SUCCESS */) {
|
if (dwErr != ERROR_SUCCESS) {
|
||||||
app.DebugPrintf("Failed to mount DLC for pad %d: %u\n", iPad, dwErr);
|
app.DebugPrintf("Failed to mount DLC for pad %d: %u\n", iPad, dwErr);
|
||||||
app.m_dlcManager.incrementUnnamedCorruptCount();
|
app.m_dlcManager.incrementUnnamedCorruptCount();
|
||||||
} else {
|
} else {
|
||||||
@@ -185,11 +188,13 @@ int DLCController::dlcMountedCallback(int iPad, std::uint32_t dwErr,
|
|||||||
|
|
||||||
void DLCController::handleDLC(DLCPack* pack) {
|
void DLCController::handleDLC(DLCPack* pack) {
|
||||||
unsigned int dwFilesProcessed = 0;
|
unsigned int dwFilesProcessed = 0;
|
||||||
|
#if defined(_WINDOWS64) || defined(__linux__)
|
||||||
std::vector<std::string> dlcFilenames;
|
std::vector<std::string> dlcFilenames;
|
||||||
|
#endif
|
||||||
PlatformStorage.GetMountedDLCFileList("DLCDrive", dlcFilenames);
|
PlatformStorage.GetMountedDLCFileList("DLCDrive", dlcFilenames);
|
||||||
for (int i = 0; i < dlcFilenames.size(); i++) {
|
for (int i = 0; i < dlcFilenames.size(); i++) {
|
||||||
app.m_dlcManager.readDLCDataFile(dwFilesProcessed, dlcFilenames[i],
|
app.m_dlcManager.readDLCDataFile(dwFilesProcessed, dlcFilenames[i],
|
||||||
pack);
|
pack);
|
||||||
}
|
}
|
||||||
if (dwFilesProcessed == 0) app.m_dlcManager.removePack(pack);
|
if (dwFilesProcessed == 0) app.m_dlcManager.removePack(pack);
|
||||||
}
|
}
|
||||||
@@ -224,6 +229,7 @@ SCreditTextItemDef* DLCController::getDLCCredits(int iIndex) {
|
|||||||
return vDLCCredits.at(iIndex);
|
return vDLCCredits.at(iIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_WINDOWS64)
|
||||||
int32_t DLCController::registerDLCData(char* pType, char* pBannerName,
|
int32_t DLCController::registerDLCData(char* pType, char* pBannerName,
|
||||||
int iGender, uint64_t ullOfferID_Full,
|
int iGender, uint64_t ullOfferID_Full,
|
||||||
uint64_t ullOfferID_Trial,
|
uint64_t ullOfferID_Trial,
|
||||||
@@ -240,11 +246,11 @@ int32_t DLCController::registerDLCData(char* pType, char* pBannerName,
|
|||||||
pDLCData->uiSortIndex = uiSortIndex;
|
pDLCData->uiSortIndex = uiSortIndex;
|
||||||
pDLCData->iConfig = iConfig;
|
pDLCData->iConfig = iConfig;
|
||||||
|
|
||||||
if (strcmp(pBannerName, "") != 0) {
|
if (pBannerName != "") {
|
||||||
strncpy(pDLCData->wchBanner, pBannerName, MAX_BANNERNAME_SIZE);
|
wcsncpy_s(pDLCData->wchBanner, pBannerName, MAX_BANNERNAME_SIZE);
|
||||||
}
|
}
|
||||||
if (pDataFile[0] != 0) {
|
if (pDataFile[0] != 0) {
|
||||||
strncpy(pDLCData->wchDataFile, pDataFile, MAX_BANNERNAME_SIZE);
|
wcsncpy_s(pDLCData->wchDataFile, pDataFile, MAX_BANNERNAME_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pType != nullptr) {
|
if (pType != nullptr) {
|
||||||
@@ -271,6 +277,19 @@ int32_t DLCController::registerDLCData(char* pType, char* pBannerName,
|
|||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
#elif defined(__linux__)
|
||||||
|
int32_t DLCController::registerDLCData(char* pType, char* pBannerName,
|
||||||
|
int iGender, uint64_t ullOfferID_Full,
|
||||||
|
uint64_t ullOfferID_Trial,
|
||||||
|
char* pFirstSkin,
|
||||||
|
unsigned int uiSortIndex, int iConfig,
|
||||||
|
char* pDataFile) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"warning: DLCController::registerDLCData unimplemented for "
|
||||||
|
"platform `__linux__`\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool DLCController::getDLCFullOfferIDForSkinID(const std::string& FirstSkin,
|
bool DLCController::getDLCFullOfferIDForSkinID(const std::string& FirstSkin,
|
||||||
uint64_t* pullVal) {
|
uint64_t* pullVal) {
|
||||||
@@ -295,7 +314,8 @@ bool DLCController::getDLCFullOfferIDForPackID(const int iPackID,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DLC_INFO* DLCController::getDLCInfoForTrialOfferID(uint64_t ullOfferID_Trial) {
|
DLC_INFO* DLCController::getDLCInfoForTrialOfferID(
|
||||||
|
uint64_t ullOfferID_Trial) {
|
||||||
if (DLCInfo_Trial.size() > 0) {
|
if (DLCInfo_Trial.size() > 0) {
|
||||||
auto it = DLCInfo_Trial.find(ullOfferID_Trial);
|
auto it = DLCInfo_Trial.find(ullOfferID_Trial);
|
||||||
if (it == DLCInfo_Trial.end()) {
|
if (it == DLCInfo_Trial.end()) {
|
||||||
@@ -417,13 +437,12 @@ bool DLCController::retrieveNextDLCContent() {
|
|||||||
app.DebugPrintf("RetrieveNextDLCContent - type = %d\n",
|
app.DebugPrintf("RetrieveNextDLCContent - type = %d\n",
|
||||||
pCurrent->dwType);
|
pCurrent->dwType);
|
||||||
#endif
|
#endif
|
||||||
IPlatformStorage::EDLCStatus status =
|
IPlatformStorage::EDLCStatus status = PlatformStorage.GetDLCOffers(
|
||||||
PlatformStorage.GetDLCOffers(
|
PlatformProfile.GetPrimaryPad(),
|
||||||
PlatformProfile.GetPrimaryPad(),
|
[this](int iOfferC, std::uint32_t dwType, int pad) {
|
||||||
[this](int iOfferC, std::uint32_t dwType, int pad) {
|
return dlcOffersReturned(iOfferC, dwType, pad);
|
||||||
return dlcOffersReturned(iOfferC, dwType, pad);
|
},
|
||||||
},
|
pCurrent->dwType);
|
||||||
pCurrent->dwType);
|
|
||||||
if (status == IPlatformStorage::EDLC_Pending) {
|
if (status == IPlatformStorage::EDLC_Pending) {
|
||||||
pCurrent->eState = e_DLC_ContentState_Retrieving;
|
pCurrent->eState = e_DLC_ContentState_Retrieving;
|
||||||
} else {
|
} else {
|
||||||
@@ -651,9 +670,9 @@ unsigned int DLCController::addTMSPPFileTypeRequest(eDLCContentType eType,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DLCController::tmsPPFileReturned(
|
int DLCController::tmsPPFileReturned(void* pParam, int iPad, int iUserData,
|
||||||
void* pParam, int iPad, int iUserData,
|
IPlatformStorage::PTMSPP_FILEDATA pFileData,
|
||||||
IPlatformStorage::PTMSPP_FILEDATA pFileData, const char* szFilename) {
|
const char* szFilename) {
|
||||||
DLCController* pClass = (DLCController*)pParam;
|
DLCController* pClass = (DLCController*)pParam;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#include "app/common/App_structs.h"
|
#include "app/common/App_structs.h"
|
||||||
#include "app/common/DLC/DLCManager.h"
|
#include "app/common/DLC/DLCManager.h"
|
||||||
#include "platform/XboxStubs.h"
|
|
||||||
#include "platform/storage/storage.h"
|
#include "platform/storage/storage.h"
|
||||||
|
#include "platform/XboxStubs.h"
|
||||||
|
|
||||||
struct SCreditTextItemDef;
|
struct SCreditTextItemDef;
|
||||||
|
|
||||||
@@ -36,8 +36,9 @@ public:
|
|||||||
int iPad);
|
int iPad);
|
||||||
|
|
||||||
// DLC info registration
|
// DLC info registration
|
||||||
static int32_t registerDLCData(char*, char*, int, uint64_t, uint64_t, char*,
|
static int32_t registerDLCData(char*, char*, int, uint64_t, uint64_t,
|
||||||
unsigned int, int, char* pDataFile);
|
char*, unsigned int, int,
|
||||||
|
char* pDataFile);
|
||||||
bool getDLCFullOfferIDForSkinID(const std::string& FirstSkin,
|
bool getDLCFullOfferIDForSkinID(const std::string& FirstSkin,
|
||||||
uint64_t* pullVal);
|
uint64_t* pullVal);
|
||||||
bool getDLCFullOfferIDForPackID(const int iPackID, uint64_t* pullVal);
|
bool getDLCFullOfferIDForPackID(const int iPackID, uint64_t* pullVal);
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ DebugOptions::DebugOptions() {
|
|||||||
|
|
||||||
#if defined(_DEBUG_MENUS_ENABLED)
|
#if defined(_DEBUG_MENUS_ENABLED)
|
||||||
bool DebugOptions::debugArtToolsOn(unsigned int debugMask) {
|
bool DebugOptions::debugArtToolsOn(unsigned int debugMask) {
|
||||||
return settingsOn() && (debugMask & (1L << eDebugSetting_ArtTools)) != 0;
|
return settingsOn() &&
|
||||||
|
(debugMask & (1L << eDebugSetting_ArtTools)) != 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "minecraft/Console_Debug_enum.h"
|
#include "app/common/Console_Debug_enum.h"
|
||||||
|
|
||||||
class DebugOptions {
|
class DebugOptions {
|
||||||
public:
|
public:
|
||||||
|
|||||||
+170
-82
@@ -1,5 +1,58 @@
|
|||||||
|
#include "minecraft/GameHostOptions.h"
|
||||||
#include "app/common/Game.h"
|
#include "app/common/Game.h"
|
||||||
|
|
||||||
|
#include "platform/PlatformTypes.h"
|
||||||
|
#include "platform/profile/profile.h"
|
||||||
|
#include "platform/renderer/renderer.h"
|
||||||
|
#include "platform/storage/storage.h"
|
||||||
|
#include "app/common/App_Defines.h"
|
||||||
|
#include "minecraft/GameEnums.h"
|
||||||
|
#include "app/common/App_structs.h"
|
||||||
|
#include "app/common/Console_Debug_enum.h"
|
||||||
|
#include "app/common/DLC/DLCManager.h"
|
||||||
|
#include "app/common/DLC/DLCSkinFile.h"
|
||||||
|
#include "app/common/GameRules/GameRuleManager.h"
|
||||||
|
#include "app/common/Network/GameNetworkManager.h"
|
||||||
|
#include "app/common/Network/NetworkPlayerInterface.h"
|
||||||
|
#include "app/common/Tutorial/Tutorial.h"
|
||||||
|
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||||
|
#include "app/common/UI/All Platforms/UIStructs.h"
|
||||||
|
#include "app/common/UI/Scenes/UIScene_FullscreenProgress.h"
|
||||||
|
#include "app/linux/LinuxGame.h"
|
||||||
|
#include "app/linux/Linux_UIController.h"
|
||||||
|
#include "app/linux/Stubs/winapi_stubs.h"
|
||||||
|
#include "platform/NetTypes.h"
|
||||||
|
#include "minecraft/client/model/SkinBox.h"
|
||||||
|
#include "platform/XboxStubs.h"
|
||||||
|
#include "java/Class.h"
|
||||||
|
#include "java/File.h"
|
||||||
|
#include "java/Random.h"
|
||||||
|
#include "minecraft/client/Minecraft.h"
|
||||||
|
#include "minecraft/client/Options.h"
|
||||||
|
#include "minecraft/client/ProgressRenderer.h"
|
||||||
|
#include "minecraft/client/model/geom/Model.h"
|
||||||
|
#include "minecraft/client/multiplayer/ClientConnection.h"
|
||||||
|
#include "minecraft/client/multiplayer/MultiPlayerGameMode.h"
|
||||||
|
#include "minecraft/client/multiplayer/MultiPlayerLevel.h"
|
||||||
|
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||||
|
#include "minecraft/client/renderer/GameRenderer.h"
|
||||||
|
#include "minecraft/client/renderer/Textures.h"
|
||||||
|
#include "minecraft/client/renderer/entity/EntityRenderer.h"
|
||||||
|
#include "minecraft/client/skins/TexturePack.h"
|
||||||
|
#include "minecraft/network/packet/DisconnectPacket.h"
|
||||||
|
#include "minecraft/server/MinecraftServer.h"
|
||||||
|
#include "minecraft/stats/StatsCounter.h"
|
||||||
|
#include "minecraft/world/Container.h"
|
||||||
|
#include "minecraft/world/entity/item/MinecartHopper.h"
|
||||||
|
#include "minecraft/world/entity/player/Player.h"
|
||||||
|
#include "minecraft/world/item/crafting/Recipy.h"
|
||||||
|
#include "minecraft/world/level/tile/Tile.h"
|
||||||
|
#include "minecraft/world/level/tile/entity/HopperTileEntity.h"
|
||||||
|
#include "strings.h"
|
||||||
|
#if defined(_WINDOWS64)
|
||||||
|
#include "app/windows/XML/ATGXmlParser.h"
|
||||||
|
#include "app/windows/XML/xmlFilesCallback.h"
|
||||||
|
#endif
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -19,71 +72,24 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "app/common/App_structs.h"
|
#include "platform/input/input.h"
|
||||||
#include "app/common/Audio/SoundEngine.h"
|
#include "app/common/Audio/SoundEngine.h"
|
||||||
#include "app/common/DLC/DLCManager.h"
|
#include "app/common/Colours/ColourTable.h"
|
||||||
#include "app/common/DLC/DLCPack.h"
|
#include "app/common/DLC/DLCPack.h"
|
||||||
#include "app/common/DLC/DLCSkinFile.h"
|
#include "app/common/Localisation/StringTable.h"
|
||||||
#include "app/common/GameRules/GameRuleManager.h"
|
|
||||||
#include "app/common/Network/GameNetworkManager.h"
|
|
||||||
#include "app/common/Tutorial/Tutorial.h"
|
|
||||||
#include "app/common/UI/All Platforms/ArchiveFile.h"
|
#include "app/common/UI/All Platforms/ArchiveFile.h"
|
||||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
|
||||||
#include "app/common/UI/All Platforms/UIStructs.h"
|
|
||||||
#include "app/common/UI/ConsoleUIController.h"
|
|
||||||
#include "app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h"
|
#include "app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h"
|
||||||
#include "app/common/UI/Scenes/UIScene_FullscreenProgress.h"
|
#include "Minecraft_Macros.h"
|
||||||
#include "java/Class.h"
|
#include "util/Timer.h"
|
||||||
#include "java/File.h"
|
#include "util/StringHelpers.h"
|
||||||
#include "java/Random.h"
|
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
||||||
#include "minecraft/Console_Debug_enum.h"
|
|
||||||
#include "minecraft/GameEnums.h"
|
|
||||||
#include "minecraft/GameHostOptions.h"
|
|
||||||
#include "minecraft/GameTypes.h"
|
|
||||||
#include "minecraft/Minecraft_Macros.h"
|
|
||||||
#include "minecraft/client/Minecraft.h"
|
|
||||||
#include "minecraft/client/Options.h"
|
|
||||||
#include "minecraft/client/ProgressRenderer.h"
|
|
||||||
#include "minecraft/client/User.h"
|
#include "minecraft/client/User.h"
|
||||||
#include "minecraft/client/gui/Gui.h"
|
#include "minecraft/client/gui/Gui.h"
|
||||||
#include "minecraft/client/model/SkinBox.h"
|
|
||||||
#include "minecraft/client/model/geom/Model.h"
|
|
||||||
#include "minecraft/client/multiplayer/ClientConnection.h"
|
|
||||||
#include "minecraft/client/multiplayer/MultiPlayerGameMode.h"
|
|
||||||
#include "minecraft/client/multiplayer/MultiPlayerLevel.h"
|
|
||||||
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
|
||||||
#include "minecraft/client/renderer/GameRenderer.h"
|
|
||||||
#include "minecraft/client/renderer/Textures.h"
|
|
||||||
#include "minecraft/client/renderer/entity/EntityRenderDispatcher.h"
|
#include "minecraft/client/renderer/entity/EntityRenderDispatcher.h"
|
||||||
#include "minecraft/client/renderer/entity/EntityRenderer.h"
|
|
||||||
#include "minecraft/client/resources/Colours/ColourTable.h"
|
|
||||||
#include "minecraft/client/skins/DLCTexturePack.h"
|
#include "minecraft/client/skins/DLCTexturePack.h"
|
||||||
#include "minecraft/client/skins/TexturePack.h"
|
|
||||||
#include "minecraft/client/skins/TexturePackRepository.h"
|
#include "minecraft/client/skins/TexturePackRepository.h"
|
||||||
#include "minecraft/locale/StringTable.h"
|
|
||||||
#include "minecraft/network/packet/DisconnectPacket.h"
|
|
||||||
#include "minecraft/server/MinecraftServer.h"
|
|
||||||
#include "minecraft/server/PlayerList.h"
|
#include "minecraft/server/PlayerList.h"
|
||||||
#include "minecraft/server/level/ServerPlayer.h"
|
#include "minecraft/server/level/ServerPlayer.h"
|
||||||
#include "minecraft/stats/StatsCounter.h"
|
|
||||||
#include "minecraft/world/Container.h"
|
|
||||||
#include "minecraft/world/entity/item/MinecartHopper.h"
|
|
||||||
#include "minecraft/world/entity/player/Player.h"
|
|
||||||
#include "minecraft/world/item/crafting/Recipy.h"
|
|
||||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
|
||||||
#include "minecraft/world/level/tile/Tile.h"
|
|
||||||
#include "minecraft/world/level/tile/entity/HopperTileEntity.h"
|
|
||||||
#include "platform/PlatformTypes.h"
|
|
||||||
#include "platform/XboxStubs.h"
|
|
||||||
#include "platform/input/input.h"
|
|
||||||
#include "platform/network/NetTypes.h"
|
|
||||||
#include "platform/network/network.h"
|
|
||||||
#include "platform/profile/profile.h"
|
|
||||||
#include "platform/renderer/renderer.h"
|
|
||||||
#include "platform/storage/storage.h"
|
|
||||||
#include "strings.h"
|
|
||||||
#include "util/StringHelpers.h"
|
|
||||||
#include "util/Timer.h"
|
|
||||||
|
|
||||||
class BeaconTileEntity;
|
class BeaconTileEntity;
|
||||||
class BrewingStandTileEntity;
|
class BrewingStandTileEntity;
|
||||||
@@ -184,14 +190,31 @@ void Game::SetAppPaused(bool val) { m_bIsAppPaused = val; }
|
|||||||
|
|
||||||
// Load*Menu methods moved to MenuController
|
// Load*Menu methods moved to MenuController
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
// GAME SETTINGS
|
// GAME SETTINGS
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Skin/Cape/FavoriteSkin methods moved to SkinManager
|
// Skin/Cape/FavoriteSkin methods moved to SkinManager
|
||||||
|
|
||||||
// Mash-up pack worlds
|
// Mash-up pack worlds
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
//
|
//
|
||||||
// Remove the debug settings in the content package build
|
// Remove the debug settings in the content package build
|
||||||
@@ -199,10 +222,16 @@ void Game::SetAppPaused(bool val) { m_bIsAppPaused = val; }
|
|||||||
////////////////////////////
|
////////////////////////////
|
||||||
#if !defined(_DEBUG_MENUS_ENABLED)
|
#if !defined(_DEBUG_MENUS_ENABLED)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int Game::BannedLevelDialogReturned(
|
int Game::BannedLevelDialogReturned(
|
||||||
void* pParam, int iPad, const IPlatformStorage::EMessageResult result) {
|
void* pParam, int iPad, const IPlatformStorage::EMessageResult result) {
|
||||||
Game* pApp = (Game*)pParam;
|
Game* pApp = (Game*)pParam;
|
||||||
@@ -256,10 +285,17 @@ int Game::GetLocalPlayerCount(void) {
|
|||||||
return iPlayerC;
|
return iPlayerC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Installed DLC callback
|
// Installed DLC callback
|
||||||
|
|
||||||
|
|
||||||
// 4J-JEV: For the sake of clarity in DLCMountedCallback.
|
// 4J-JEV: For the sake of clarity in DLCMountedCallback.
|
||||||
|
#if defined(_WINDOWS64)
|
||||||
#define CONTENT_DATA_DISPLAY_NAME(a) (a.szDisplayName)
|
#define CONTENT_DATA_DISPLAY_NAME(a) (a.szDisplayName)
|
||||||
|
#else
|
||||||
|
#define CONTENT_DATA_DISPLAY_NAME(a) (a.wszDisplayName)
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef CONTENT_DATA_DISPLAY_NAME
|
#undef CONTENT_DATA_DISPLAY_NAME
|
||||||
|
|
||||||
@@ -291,6 +327,7 @@ int Game::GetLocalPlayerCount(void) {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
// int Game::DLCReadCallback(void*
|
// int Game::DLCReadCallback(void*
|
||||||
// pParam,IPlatformStorage::DLC_FILE_DETAILS *pDLCData)
|
// pParam,IPlatformStorage::DLC_FILE_DETAILS *pDLCData)
|
||||||
// {
|
// {
|
||||||
@@ -329,9 +366,8 @@ void Game::UpdateTime() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Game::isXuidDeadmau5(PlayerUID xuid) {
|
bool Game::isXuidDeadmau5(PlayerUID xuid) {
|
||||||
auto it = DLCController::MojangData.find(
|
auto it = DLCController::MojangData.find(xuid); // 4J Stu - The .at and [] accessors
|
||||||
xuid); // 4J Stu - The .at and [] accessors
|
// insert elements if they don't exist
|
||||||
// insert elements if they don't exist
|
|
||||||
if (it != DLCController::MojangData.end()) {
|
if (it != DLCController::MojangData.end()) {
|
||||||
MOJANG_DATA* pMojangData = DLCController::MojangData[xuid];
|
MOJANG_DATA* pMojangData = DLCController::MojangData[xuid];
|
||||||
if (pMojangData && pMojangData->eXuid == eXUID_Deadmau5) {
|
if (pMojangData && pMojangData->eXuid == eXUID_Deadmau5) {
|
||||||
@@ -344,13 +380,16 @@ bool Game::isXuidDeadmau5(PlayerUID xuid) {
|
|||||||
|
|
||||||
void Game::StoreLaunchData() {}
|
void Game::StoreLaunchData() {}
|
||||||
|
|
||||||
void Game::ExitGame() {
|
void Game::ExitGame() {}
|
||||||
DebugPrintf("[Game] ExitGame AFTER START\n");
|
|
||||||
PlatformRenderer.Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Invites
|
// Invites
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// FatalLoadError
|
// FatalLoadError
|
||||||
@@ -360,21 +399,28 @@ void Game::ExitGame() {
|
|||||||
// We have to assume that we've not been able to load the text for the game.
|
// We have to assume that we've not been able to load the text for the game.
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
void Game::FatalLoadError() {
|
void Game::FatalLoadError() {}
|
||||||
DebugPrintf("FatalLoadError - asserting 0 and dying...\n");
|
|
||||||
assert(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Game Host options
|
// Game Host options
|
||||||
|
|
||||||
void Game::SetGameHostOption(eGameHostOption eVal, unsigned int uiVal) {
|
void Game::SetGameHostOption(eGameHostOption eVal,
|
||||||
|
unsigned int uiVal) {
|
||||||
GameHostOptions::set(m_uiGameHostSettings, eVal, uiVal);
|
GameHostOptions::set(m_uiGameHostSettings, eVal, uiVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned int Game::GetGameHostOption(eGameHostOption eVal) {
|
unsigned int Game::GetGameHostOption(eGameHostOption eVal) {
|
||||||
return GameHostOptions::get(m_uiGameHostSettings, eVal);
|
return GameHostOptions::get(m_uiGameHostSettings, eVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Game::processSchematics(LevelChunk* levelChunk) {
|
void Game::processSchematics(LevelChunk* levelChunk) {
|
||||||
m_gameRules.processSchematics(levelChunk);
|
m_gameRules.processSchematics(levelChunk);
|
||||||
}
|
}
|
||||||
@@ -383,9 +429,12 @@ void Game::processSchematicsLighting(LevelChunk* levelChunk) {
|
|||||||
m_gameRules.processSchematicsLighting(levelChunk);
|
m_gameRules.processSchematicsLighting(levelChunk);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Game::loadDefaultGameRules() { m_gameRules.loadDefaultGameRules(); }
|
void Game::loadDefaultGameRules() {
|
||||||
|
m_gameRules.loadDefaultGameRules();
|
||||||
|
}
|
||||||
|
|
||||||
void Game::setLevelGenerationOptions(LevelGenerationOptions* levelGen) {
|
void Game::setLevelGenerationOptions(
|
||||||
|
LevelGenerationOptions* levelGen) {
|
||||||
m_gameRules.setLevelGenerationOptions(levelGen);
|
m_gameRules.setLevelGenerationOptions(levelGen);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -393,8 +442,16 @@ const char* Game::GetGameRulesString(const std::string& key) {
|
|||||||
return m_gameRules.GetGameRulesString(key);
|
return m_gameRules.GetGameRulesString(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
// PNG_TAG_tEXt, FromBigEndian, GetImageTextData, CreateImageTextData moved to
|
|
||||||
// MenuController
|
|
||||||
|
// PNG_TAG_tEXt, FromBigEndian, GetImageTextData, CreateImageTextData moved to MenuController
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
std::string Game::getEntityName(eINSTANCEOF type) {
|
std::string Game::getEntityName(eINSTANCEOF type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@@ -450,8 +507,12 @@ std::string Game::getEntityName(eINSTANCEOF type) {
|
|||||||
|
|
||||||
// m_dwContentTypeA moved to DLCController
|
// m_dwContentTypeA moved to DLCController
|
||||||
|
|
||||||
int32_t Game::RegisterMojangData(char* pXuidName, PlayerUID xuid, char* pSkin,
|
|
||||||
char* pCape) {
|
|
||||||
|
|
||||||
|
|
||||||
|
int32_t Game::RegisterMojangData(char* pXuidName, PlayerUID xuid,
|
||||||
|
char* pSkin, char* pCape) {
|
||||||
int32_t hr = 0;
|
int32_t hr = 0;
|
||||||
eXUID eTempXuid = eXUID_Undefined;
|
eXUID eTempXuid = eXUID_Undefined;
|
||||||
MOJANG_DATA* pMojangData = nullptr;
|
MOJANG_DATA* pMojangData = nullptr;
|
||||||
@@ -513,12 +574,39 @@ int32_t Game::RegisterConfigValues(char* pType, int iValue) {
|
|||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_WINDOWS64)
|
||||||
|
#elif defined(__linux__)
|
||||||
|
#else
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// DLC
|
// DLC
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// AUTOSAVE
|
// AUTOSAVE
|
||||||
void Game::SetAutosaveTimerTime(void) {
|
void Game::SetAutosaveTimerTime(void) {
|
||||||
int settingValue =
|
int settingValue = GetGameSettings(PlatformProfile.GetPrimaryPad(), eGameSetting_Autosave);
|
||||||
GetGameSettings(PlatformProfile.GetPrimaryPad(), eGameSetting_Autosave);
|
|
||||||
m_saveManager.setAutosaveTimerTime(settingValue);
|
m_saveManager.setAutosaveTimerTime(settingValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -554,8 +642,7 @@ bool Game::IsLocalMultiplayerAvailable() {
|
|||||||
// #else
|
// #else
|
||||||
// for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
|
// for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
|
||||||
// {
|
// {
|
||||||
// if( (i!=userIndex) && (PlatformInput.IsPadConnected(i)
|
// if( (i!=userIndex) && (PlatformInput.IsPadConnected(i) ||
|
||||||
//||
|
|
||||||
// PlatformProfile.IsSignedIn(i)) )
|
// PlatformProfile.IsSignedIn(i)) )
|
||||||
// {
|
// {
|
||||||
// iOtherConnectedControllers++;
|
// iOtherConnectedControllers++;
|
||||||
@@ -568,8 +655,10 @@ bool Game::IsLocalMultiplayerAvailable() {
|
|||||||
|
|
||||||
// (moved to manager class)
|
// (moved to manager class)
|
||||||
|
|
||||||
std::string Game::getFilePath(std::uint32_t packId, std::string filename,
|
std::string Game::getFilePath(std::uint32_t packId,
|
||||||
bool bAddDataFolder, std::string mountPoint) {
|
std::string filename,
|
||||||
|
bool bAddDataFolder,
|
||||||
|
std::string mountPoint) {
|
||||||
std::string path =
|
std::string path =
|
||||||
getRootPath(packId, true, bAddDataFolder, mountPoint) + filename;
|
getRootPath(packId, true, bAddDataFolder, mountPoint) + filename;
|
||||||
File f(path);
|
File f(path);
|
||||||
@@ -601,8 +690,9 @@ std::string titleUpdateTexturePackRoot = "Windows64\\DLC\\";
|
|||||||
std::string titleUpdateTexturePackRoot = "CU\\DLC\\";
|
std::string titleUpdateTexturePackRoot = "CU\\DLC\\";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string Game::getRootPath(std::uint32_t packId, bool allowOverride,
|
std::string Game::getRootPath(std::uint32_t packId,
|
||||||
bool bAddDataFolder, std::string mountPoint) {
|
bool allowOverride, bool bAddDataFolder,
|
||||||
|
std::string mountPoint) {
|
||||||
std::string path = mountPoint;
|
std::string path = mountPoint;
|
||||||
if (allowOverride) {
|
if (allowOverride) {
|
||||||
switch (packId) {
|
switch (packId) {
|
||||||
@@ -622,5 +712,3 @@ std::string Game::getRootPath(std::uint32_t packId, bool allowOverride,
|
|||||||
return path + "\\";
|
return path + "\\";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Game app;
|
|
||||||
|
|||||||
+156
-197
@@ -3,38 +3,38 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
|
||||||
#include "platform/profile/profile.h"
|
|
||||||
#include "platform/renderer/renderer.h"
|
|
||||||
#include "platform/storage/storage.h"
|
|
||||||
#include "util/Timer.h"
|
#include "util/Timer.h"
|
||||||
|
#include "platform/profile/profile.h"
|
||||||
|
#include "platform/storage/storage.h"
|
||||||
|
|
||||||
// using namespace std;
|
// using namespace std;
|
||||||
|
|
||||||
#include "app/common/App_structs.h"
|
|
||||||
#include "app/common/ArchiveManager.h"
|
#include "app/common/ArchiveManager.h"
|
||||||
#include "app/common/Audio/ConsoleSoundEngine.h"
|
|
||||||
#include "app/common/BannedListManager.h"
|
#include "app/common/BannedListManager.h"
|
||||||
#include "app/common/DLC/DLCManager.h"
|
|
||||||
#include "app/common/DLCController.h"
|
|
||||||
#include "app/common/DebugOptions.h"
|
#include "app/common/DebugOptions.h"
|
||||||
#include "app/common/GameRules/GameRuleManager.h"
|
#include "app/common/DLCController.h"
|
||||||
#include "app/common/GameSettingsManager.h"
|
#include "app/common/GameSettingsManager.h"
|
||||||
|
#include "app/common/IPlatformGame.h"
|
||||||
|
#include "app/common/App_structs.h"
|
||||||
#include "app/common/LocalizationManager.h"
|
#include "app/common/LocalizationManager.h"
|
||||||
#include "app/common/MenuController.h"
|
#include "app/common/MenuController.h"
|
||||||
#include "app/common/NetworkController.h"
|
#include "app/common/NetworkController.h"
|
||||||
#include "app/common/SaveManager.h"
|
#include "app/common/SaveManager.h"
|
||||||
#include "app/common/SkinManager.h"
|
#include "app/common/SkinManager.h"
|
||||||
#include "app/common/TerrainFeatureManager.h"
|
#include "app/common/TerrainFeatureManager.h"
|
||||||
|
#include "app/common/Audio/Consoles_SoundEngine.h"
|
||||||
|
#include "app/common/DLC/DLCManager.h"
|
||||||
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
|
#include "app/common/GameRules/GameRuleManager.h"
|
||||||
|
#include "app/common/Localisation/StringTable.h"
|
||||||
|
#include "app/common/Tutorial/TutorialEnum.h"
|
||||||
#include "app/common/UI/All Platforms/ArchiveFile.h"
|
#include "app/common/UI/All Platforms/ArchiveFile.h"
|
||||||
#include "app/common/UI/All Platforms/UIStructs.h"
|
#include "app/common/UI/All Platforms/UIStructs.h"
|
||||||
|
#include "platform/NetTypes.h"
|
||||||
#include "minecraft/client/model/SkinBox.h"
|
#include "minecraft/client/model/SkinBox.h"
|
||||||
#include "minecraft/locale/StringTable.h"
|
#include "platform/XboxStubs.h"
|
||||||
#include "minecraft/network/packet/DisconnectPacket.h"
|
#include "minecraft/network/packet/DisconnectPacket.h"
|
||||||
#include "minecraft/world/entity/item/MinecartHopper.h"
|
#include "minecraft/world/entity/item/MinecartHopper.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
|
||||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
|
||||||
#include "platform/XboxStubs.h"
|
|
||||||
#include "platform/network/NetTypes.h"
|
|
||||||
|
|
||||||
// JoinFromInviteData moved to NetworkController.h
|
// JoinFromInviteData moved to NetworkController.h
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ class Merchant;
|
|||||||
|
|
||||||
class CMinecraftAudio;
|
class CMinecraftAudio;
|
||||||
|
|
||||||
class Game {
|
class Game : public IPlatformGame {
|
||||||
public:
|
public:
|
||||||
Game();
|
Game();
|
||||||
|
|
||||||
@@ -145,8 +145,7 @@ public:
|
|||||||
|
|
||||||
bool IsAppPaused();
|
bool IsAppPaused();
|
||||||
void SetAppPaused(bool val);
|
void SetAppPaused(bool val);
|
||||||
int displaySavingMessage(const IPlatformStorage::ESavingMessage eMsg,
|
int displaySavingMessage(const IPlatformStorage::ESavingMessage eMsg, int iPad) {
|
||||||
int iPad) {
|
|
||||||
return m_gameSettingsManager.displaySavingMessage(eMsg, iPad);
|
return m_gameSettingsManager.displaySavingMessage(eMsg, iPad);
|
||||||
}
|
}
|
||||||
bool GetGameStarted() { return m_bGameStarted; }
|
bool GetGameStarted() { return m_bGameStarted; }
|
||||||
@@ -170,8 +169,7 @@ public:
|
|||||||
bool LoadEnchantingMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
bool LoadEnchantingMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
||||||
int x, int y, int z, Level* level,
|
int x, int y, int z, Level* level,
|
||||||
const std::string& name) {
|
const std::string& name) {
|
||||||
return m_menuController.loadEnchantingMenu(iPad, inventory, x, y, z,
|
return m_menuController.loadEnchantingMenu(iPad, inventory, x, y, z, level, name);
|
||||||
level, name);
|
|
||||||
}
|
}
|
||||||
bool LoadFurnaceMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
bool LoadFurnaceMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
||||||
std::shared_ptr<FurnaceTileEntity> furnace) {
|
std::shared_ptr<FurnaceTileEntity> furnace) {
|
||||||
@@ -180,8 +178,7 @@ public:
|
|||||||
bool LoadBrewingStandMenu(
|
bool LoadBrewingStandMenu(
|
||||||
int iPad, std::shared_ptr<Inventory> inventory,
|
int iPad, std::shared_ptr<Inventory> inventory,
|
||||||
std::shared_ptr<BrewingStandTileEntity> brewingStand) {
|
std::shared_ptr<BrewingStandTileEntity> brewingStand) {
|
||||||
return m_menuController.loadBrewingStandMenu(iPad, inventory,
|
return m_menuController.loadBrewingStandMenu(iPad, inventory, brewingStand);
|
||||||
brewingStand);
|
|
||||||
}
|
}
|
||||||
bool LoadContainerMenu(int iPad, std::shared_ptr<Container> inventory,
|
bool LoadContainerMenu(int iPad, std::shared_ptr<Container> inventory,
|
||||||
std::shared_ptr<Container> container) {
|
std::shared_ptr<Container> container) {
|
||||||
@@ -207,14 +204,12 @@ public:
|
|||||||
}
|
}
|
||||||
bool LoadRepairingMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
bool LoadRepairingMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
||||||
Level* level, int x, int y, int z) {
|
Level* level, int x, int y, int z) {
|
||||||
return m_menuController.loadRepairingMenu(iPad, inventory, level, x, y,
|
return m_menuController.loadRepairingMenu(iPad, inventory, level, x, y, z);
|
||||||
z);
|
|
||||||
}
|
}
|
||||||
bool LoadTradingMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
bool LoadTradingMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
||||||
std::shared_ptr<Merchant> trader, Level* level,
|
std::shared_ptr<Merchant> trader, Level* level,
|
||||||
const std::string& name) {
|
const std::string& name) {
|
||||||
return m_menuController.loadTradingMenu(iPad, inventory, trader, level,
|
return m_menuController.loadTradingMenu(iPad, inventory, trader, level, name);
|
||||||
name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LoadCommandBlockMenu(
|
bool LoadCommandBlockMenu(
|
||||||
@@ -232,8 +227,7 @@ public:
|
|||||||
bool LoadHorseMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
bool LoadHorseMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
||||||
std::shared_ptr<Container> container,
|
std::shared_ptr<Container> container,
|
||||||
std::shared_ptr<EntityHorse> horse) {
|
std::shared_ptr<EntityHorse> horse) {
|
||||||
return m_menuController.loadHorseMenu(iPad, inventory, container,
|
return m_menuController.loadHorseMenu(iPad, inventory, container, horse);
|
||||||
horse);
|
|
||||||
}
|
}
|
||||||
bool LoadBeaconMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
bool LoadBeaconMenu(int iPad, std::shared_ptr<Inventory> inventory,
|
||||||
std::shared_ptr<BeaconTileEntity> beacon) {
|
std::shared_ptr<BeaconTileEntity> beacon) {
|
||||||
@@ -248,31 +242,38 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const char* GetString(int iID);
|
static const char* GetString(int iID);
|
||||||
StringTable* getStringTable() const {
|
StringTable* getStringTable() const { return m_localizationManager.getStringTable(); }
|
||||||
return m_localizationManager.getStringTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
eGameMode GetGameMode() { return m_eGameMode; }
|
eGameMode GetGameMode() { return m_eGameMode; }
|
||||||
void SetGameMode(eGameMode eMode) { m_eGameMode = eMode; }
|
void SetGameMode(eGameMode eMode) { m_eGameMode = eMode; }
|
||||||
|
|
||||||
eXuiAction GetGlobalXuiAction() {
|
eXuiAction GetGlobalXuiAction() { return m_menuController.getGlobalXuiAction(); }
|
||||||
return m_menuController.getGlobalXuiAction();
|
void SetGlobalXuiAction(eXuiAction action) { m_menuController.setGlobalXuiAction(action); }
|
||||||
}
|
eXuiAction GetXuiAction(int iPad) { return m_menuController.getXuiAction(iPad); }
|
||||||
void SetGlobalXuiAction(eXuiAction action) {
|
|
||||||
m_menuController.setGlobalXuiAction(action);
|
|
||||||
}
|
|
||||||
eXuiAction GetXuiAction(int iPad) {
|
|
||||||
return m_menuController.getXuiAction(iPad);
|
|
||||||
}
|
|
||||||
void SetAction(int iPad, eXuiAction action, void* param = nullptr) {
|
void SetAction(int iPad, eXuiAction action, void* param = nullptr) {
|
||||||
m_menuController.setAction(iPad, action, param);
|
m_menuController.setAction(iPad, action, param);
|
||||||
}
|
}
|
||||||
void SetTMSAction(int iPad, eTMSAction action) {
|
void SetTMSAction(int iPad, eTMSAction action) {
|
||||||
m_menuController.setTMSAction(iPad, action);
|
m_menuController.setTMSAction(iPad, action);
|
||||||
}
|
}
|
||||||
eTMSAction GetTMSAction(int iPad) {
|
eTMSAction GetTMSAction(int iPad) { return m_menuController.getTMSAction(iPad); }
|
||||||
return m_menuController.getTMSAction(iPad);
|
eXuiServerAction GetXuiServerAction(int iPad) {
|
||||||
|
return m_menuController.getXuiServerAction(iPad);
|
||||||
}
|
}
|
||||||
|
void* GetXuiServerActionParam(int iPad) {
|
||||||
|
return m_menuController.getXuiServerActionParam(iPad);
|
||||||
|
}
|
||||||
|
void SetXuiServerAction(int iPad, eXuiServerAction action,
|
||||||
|
void* param = nullptr) {
|
||||||
|
m_menuController.setXuiServerAction(iPad, action, param);
|
||||||
|
}
|
||||||
|
eXuiServerAction GetGlobalXuiServerAction() {
|
||||||
|
return m_menuController.getGlobalXuiServerAction();
|
||||||
|
}
|
||||||
|
void SetGlobalXuiServerAction(eXuiServerAction action) {
|
||||||
|
m_menuController.setGlobalXuiServerAction(action);
|
||||||
|
}
|
||||||
|
|
||||||
DisconnectPacket::eDisconnectReason GetDisconnectReason() {
|
DisconnectPacket::eDisconnectReason GetDisconnectReason() {
|
||||||
return m_networkController.getDisconnectReason();
|
return m_networkController.getDisconnectReason();
|
||||||
}
|
}
|
||||||
@@ -280,16 +281,10 @@ public:
|
|||||||
m_networkController.setDisconnectReason(bVal);
|
m_networkController.setDisconnectReason(bVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GetChangingSessionType() {
|
bool GetChangingSessionType() { return m_networkController.getChangingSessionType(); }
|
||||||
return m_networkController.getChangingSessionType();
|
void SetChangingSessionType(bool bVal) { m_networkController.setChangingSessionType(bVal); }
|
||||||
}
|
|
||||||
void SetChangingSessionType(bool bVal) {
|
|
||||||
m_networkController.setChangingSessionType(bVal);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool GetReallyChangingSessionType() {
|
bool GetReallyChangingSessionType() { return m_networkController.getReallyChangingSessionType(); }
|
||||||
return m_networkController.getReallyChangingSessionType();
|
|
||||||
}
|
|
||||||
void SetReallyChangingSessionType(bool bVal) {
|
void SetReallyChangingSessionType(bool bVal) {
|
||||||
m_networkController.setReallyChangingSessionType(bVal);
|
m_networkController.setReallyChangingSessionType(bVal);
|
||||||
}
|
}
|
||||||
@@ -345,20 +340,19 @@ public:
|
|||||||
static int OldProfileVersionCallback(void* pParam, unsigned char* pucData,
|
static int OldProfileVersionCallback(void* pParam, unsigned char* pucData,
|
||||||
const unsigned short usVersion,
|
const unsigned short usVersion,
|
||||||
const int iPad) {
|
const int iPad) {
|
||||||
return GameSettingsManager::oldProfileVersionCallback(pParam, pucData,
|
return GameSettingsManager::oldProfileVersionCallback(pParam, pucData, usVersion, iPad);
|
||||||
usVersion, iPad);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int DefaultOptionsCallback(
|
static int DefaultOptionsCallback(void* pParam,
|
||||||
void* pParam, IPlatformProfile::PROFILESETTINGS* pSettings,
|
IPlatformProfile::PROFILESETTINGS* pSettings,
|
||||||
const int iPad) {
|
const int iPad) {
|
||||||
return GameSettingsManager::defaultOptionsCallback(pParam, pSettings,
|
return GameSettingsManager::defaultOptionsCallback(pParam, pSettings, iPad);
|
||||||
iPad);
|
|
||||||
}
|
}
|
||||||
int SetDefaultOptions(IPlatformProfile::PROFILESETTINGS* pSettings,
|
int SetDefaultOptions(IPlatformProfile::PROFILESETTINGS* pSettings,
|
||||||
const int iPad) {
|
const int iPad) {
|
||||||
return m_gameSettingsManager.setDefaultOptions(pSettings, iPad);
|
return m_gameSettingsManager.setDefaultOptions(pSettings, iPad);
|
||||||
}
|
}
|
||||||
|
void SetRichPresenceContext(int iPad, int contextId) override = 0;
|
||||||
|
|
||||||
void SetGameSettings(int iPad, eGameSetting eVal, unsigned char ucVal) {
|
void SetGameSettings(int iPad, eGameSetting eVal, unsigned char ucVal) {
|
||||||
m_gameSettingsManager.setGameSettings(iPad, eVal, ucVal);
|
m_gameSettingsManager.setGameSettings(iPad, eVal, ucVal);
|
||||||
@@ -382,8 +376,7 @@ public:
|
|||||||
m_skinManager.setPlayerCape(iPad, dwCapeId, GameSettingsA);
|
m_skinManager.setPlayerCape(iPad, dwCapeId, GameSettingsA);
|
||||||
}
|
}
|
||||||
void SetPlayerFavoriteSkin(int iPad, int iIndex, unsigned int uiSkinID) {
|
void SetPlayerFavoriteSkin(int iPad, int iIndex, unsigned int uiSkinID) {
|
||||||
m_skinManager.setPlayerFavoriteSkin(iPad, iIndex, uiSkinID,
|
m_skinManager.setPlayerFavoriteSkin(iPad, iIndex, uiSkinID, GameSettingsA);
|
||||||
GameSettingsA);
|
|
||||||
}
|
}
|
||||||
unsigned int GetPlayerFavoriteSkin(int iPad, int iIndex) {
|
unsigned int GetPlayerFavoriteSkin(int iPad, int iIndex) {
|
||||||
return m_skinManager.getPlayerFavoriteSkin(iPad, iIndex, GameSettingsA);
|
return m_skinManager.getPlayerFavoriteSkin(iPad, iIndex, GameSettingsA);
|
||||||
@@ -434,7 +427,9 @@ public:
|
|||||||
void SetOpacityTimer(int iPad) {
|
void SetOpacityTimer(int iPad) {
|
||||||
m_menuController.setOpacityTimer(iPad);
|
m_menuController.setOpacityTimer(iPad);
|
||||||
} // 6 seconds
|
} // 6 seconds
|
||||||
void TickOpacityTimer(int iPad) { m_menuController.tickOpacityTimer(iPad); }
|
void TickOpacityTimer(int iPad) {
|
||||||
|
m_menuController.tickOpacityTimer(iPad);
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
std::string GetPlayerSkinName(int iPad) {
|
std::string GetPlayerSkinName(int iPad) {
|
||||||
@@ -454,8 +449,7 @@ public:
|
|||||||
}
|
}
|
||||||
void CheckGameSettingsChanged(bool bOverride5MinuteTimer = false,
|
void CheckGameSettingsChanged(bool bOverride5MinuteTimer = false,
|
||||||
int iPad = XUSER_INDEX_ANY) {
|
int iPad = XUSER_INDEX_ANY) {
|
||||||
m_gameSettingsManager.checkGameSettingsChanged(bOverride5MinuteTimer,
|
m_gameSettingsManager.checkGameSettingsChanged(bOverride5MinuteTimer, iPad);
|
||||||
iPad);
|
|
||||||
}
|
}
|
||||||
void ApplyGameSettingsChanged(int iPad) {
|
void ApplyGameSettingsChanged(int iPad) {
|
||||||
m_gameSettingsManager.applyGameSettingsChanged(iPad);
|
m_gameSettingsManager.applyGameSettingsChanged(iPad);
|
||||||
@@ -468,8 +462,7 @@ public:
|
|||||||
}
|
}
|
||||||
unsigned int GetGameSettingsDebugMask(int iPad = -1,
|
unsigned int GetGameSettingsDebugMask(int iPad = -1,
|
||||||
bool bOverridePlayer = false) {
|
bool bOverridePlayer = false) {
|
||||||
return m_gameSettingsManager.getGameSettingsDebugMask(iPad,
|
return m_gameSettingsManager.getGameSettingsDebugMask(iPad, bOverridePlayer);
|
||||||
bOverridePlayer);
|
|
||||||
}
|
}
|
||||||
void SetGameSettingsDebugMask(int iPad, unsigned int uiVal) {
|
void SetGameSettingsDebugMask(int iPad, unsigned int uiVal) {
|
||||||
m_gameSettingsManager.setGameSettingsDebugMask(iPad, uiVal);
|
m_gameSettingsManager.setGameSettingsDebugMask(iPad, uiVal);
|
||||||
@@ -492,15 +485,13 @@ public:
|
|||||||
static int SignoutExitWorldThreadProc(void* lpParameter) {
|
static int SignoutExitWorldThreadProc(void* lpParameter) {
|
||||||
return NetworkController::signoutExitWorldThreadProc(lpParameter);
|
return NetworkController::signoutExitWorldThreadProc(lpParameter);
|
||||||
}
|
}
|
||||||
static int PrimaryPlayerSignedOutReturned(
|
static int PrimaryPlayerSignedOutReturned(void* pParam, int iPad,
|
||||||
void* pParam, int iPad, const IPlatformStorage::EMessageResult result) {
|
const IPlatformStorage::EMessageResult result) {
|
||||||
return NetworkController::primaryPlayerSignedOutReturned(pParam, iPad,
|
return NetworkController::primaryPlayerSignedOutReturned(pParam, iPad, result);
|
||||||
result);
|
|
||||||
}
|
}
|
||||||
static int EthernetDisconnectReturned(
|
static int EthernetDisconnectReturned(void* pParam, int iPad,
|
||||||
void* pParam, int iPad, const IPlatformStorage::EMessageResult result) {
|
const IPlatformStorage::EMessageResult result) {
|
||||||
return NetworkController::ethernetDisconnectReturned(pParam, iPad,
|
return NetworkController::ethernetDisconnectReturned(pParam, iPad, result);
|
||||||
result);
|
|
||||||
}
|
}
|
||||||
static void ProfileReadErrorCallback(void* pParam) {
|
static void ProfileReadErrorCallback(void* pParam) {
|
||||||
NetworkController::profileReadErrorCallback(pParam);
|
NetworkController::profileReadErrorCallback(pParam);
|
||||||
@@ -513,20 +504,15 @@ public:
|
|||||||
static void NotificationsCallback(void* pParam,
|
static void NotificationsCallback(void* pParam,
|
||||||
std::uint32_t dwNotification,
|
std::uint32_t dwNotification,
|
||||||
unsigned int uiParam) {
|
unsigned int uiParam) {
|
||||||
NetworkController::notificationsCallback(pParam, dwNotification,
|
NetworkController::notificationsCallback(pParam, dwNotification, uiParam);
|
||||||
uiParam);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// for the ethernet being disconnected
|
// for the ethernet being disconnected
|
||||||
static void LiveLinkChangeCallback(void* pParam, bool bConnected) {
|
static void LiveLinkChangeCallback(void* pParam, bool bConnected) {
|
||||||
NetworkController::liveLinkChangeCallback(pParam, bConnected);
|
NetworkController::liveLinkChangeCallback(pParam, bConnected);
|
||||||
}
|
}
|
||||||
bool GetLiveLinkRequired() {
|
bool GetLiveLinkRequired() { return m_networkController.getLiveLinkRequired(); }
|
||||||
return m_networkController.getLiveLinkRequired();
|
void SetLiveLinkRequired(bool required) { m_networkController.setLiveLinkRequired(required); }
|
||||||
}
|
|
||||||
void SetLiveLinkRequired(bool required) {
|
|
||||||
m_networkController.setLiveLinkRequired(required);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(_DEBUG_MENUS_ENABLED)
|
#if defined(_DEBUG_MENUS_ENABLED)
|
||||||
bool DebugSettingsOn() { return m_debugOptions.settingsOn(); }
|
bool DebugSettingsOn() { return m_debugOptions.settingsOn(); }
|
||||||
@@ -537,15 +523,11 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
void SetDebugSequence(const char* pchSeq);
|
void SetDebugSequence(const char* pchSeq);
|
||||||
// bool UploadFileToGlobalStorage(int iQuadrant,
|
// bool UploadFileToGlobalStorage(int iQuadrant,
|
||||||
// IPlatformStorage::eGlobalStorage eStorageFacility, std::string *wsFile );
|
// IPlatformStorage::eGlobalStorage eStorageFacility, std::string *wsFile );
|
||||||
|
|
||||||
// Installed DLC - delegated to DLCController
|
// Installed DLC - delegated to DLCController
|
||||||
bool StartInstallDLCProcess(int iPad) {
|
bool StartInstallDLCProcess(int iPad) { return m_dlcController.startInstallDLCProcess(iPad); }
|
||||||
return m_dlcController.startInstallDLCProcess(iPad);
|
int dlcInstalledCallback(int iOfferC, int iPad) { return m_dlcController.dlcInstalledCallback(iOfferC, iPad); }
|
||||||
}
|
|
||||||
int dlcInstalledCallback(int iOfferC, int iPad) {
|
|
||||||
return m_dlcController.dlcInstalledCallback(iOfferC, iPad);
|
|
||||||
}
|
|
||||||
void HandleDLCLicenseChange();
|
void HandleDLCLicenseChange();
|
||||||
int dlcMountedCallback(int iPad, std::uint32_t dwErr,
|
int dlcMountedCallback(int iPad, std::uint32_t dwErr,
|
||||||
std::uint32_t dwLicenceMask) {
|
std::uint32_t dwLicenceMask) {
|
||||||
@@ -554,12 +536,11 @@ public:
|
|||||||
void MountNextDLC(int iPad) { m_dlcController.mountNextDLC(iPad); }
|
void MountNextDLC(int iPad) { m_dlcController.mountNextDLC(iPad); }
|
||||||
void HandleDLC(DLCPack* pack) { m_dlcController.handleDLC(pack); }
|
void HandleDLC(DLCPack* pack) { m_dlcController.handleDLC(pack); }
|
||||||
bool DLCInstallPending() { return m_dlcController.dlcInstallPending(); }
|
bool DLCInstallPending() { return m_dlcController.dlcInstallPending(); }
|
||||||
bool DLCInstallProcessCompleted() {
|
bool DLCInstallProcessCompleted() { return m_dlcController.dlcInstallProcessCompleted(); }
|
||||||
return m_dlcController.dlcInstallProcessCompleted();
|
|
||||||
}
|
|
||||||
void ClearDLCInstalled() { m_dlcController.clearDLCInstalled(); }
|
void ClearDLCInstalled() { m_dlcController.clearDLCInstalled(); }
|
||||||
static int MarketplaceCountsCallback(
|
static int MarketplaceCountsCallback(void* pParam,
|
||||||
void* pParam, IPlatformStorage::DLC_TMS_DETAILS* details, int iPad) {
|
IPlatformStorage::DLC_TMS_DETAILS* details,
|
||||||
|
int iPad) {
|
||||||
return DLCController::marketplaceCountsCallback(pParam, details, iPad);
|
return DLCController::marketplaceCountsCallback(pParam, details, iPad);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -577,7 +558,9 @@ public:
|
|||||||
virtual void StoreLaunchData();
|
virtual void StoreLaunchData();
|
||||||
virtual void ExitGame();
|
virtual void ExitGame();
|
||||||
|
|
||||||
bool isXuidNotch(PlayerUID xuid) { return m_skinManager.isXuidNotch(xuid); }
|
bool isXuidNotch(PlayerUID xuid) {
|
||||||
|
return m_skinManager.isXuidNotch(xuid);
|
||||||
|
}
|
||||||
bool isXuidDeadmau5(PlayerUID xuid);
|
bool isXuidDeadmau5(PlayerUID xuid);
|
||||||
|
|
||||||
void AddMemoryTextureFile(const std::string& wName, std::uint8_t* pbData,
|
void AddMemoryTextureFile(const std::string& wName, std::uint8_t* pbData,
|
||||||
@@ -614,7 +597,9 @@ public:
|
|||||||
return m_archiveManager.getTPConfigVal(pwchDataFile);
|
return m_archiveManager.getTPConfigVal(pwchDataFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DefaultCapeExists() { return m_skinManager.defaultCapeExists(); }
|
bool DefaultCapeExists() {
|
||||||
|
return m_skinManager.defaultCapeExists();
|
||||||
|
}
|
||||||
// void InstallDefaultCape(); // attempt to install the default cape once
|
// void InstallDefaultCape(); // attempt to install the default cape once
|
||||||
// per game launch
|
// per game launch
|
||||||
|
|
||||||
@@ -622,14 +607,11 @@ public:
|
|||||||
void ProcessInvite(std::uint32_t dwUserIndex,
|
void ProcessInvite(std::uint32_t dwUserIndex,
|
||||||
std::uint32_t dwLocalUsersMask,
|
std::uint32_t dwLocalUsersMask,
|
||||||
const INVITE_INFO* pInviteInfo) {
|
const INVITE_INFO* pInviteInfo) {
|
||||||
m_networkController.processInvite(dwUserIndex, dwLocalUsersMask,
|
m_networkController.processInvite(dwUserIndex, dwLocalUsersMask, pInviteInfo);
|
||||||
pInviteInfo);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add credits for DLC installed - delegated to DLCController
|
// Add credits for DLC installed - delegated to DLCController
|
||||||
void AddCreditText(const char* lpStr) {
|
void AddCreditText(const char* lpStr) { m_dlcController.addCreditText(lpStr); }
|
||||||
m_dlcController.addCreditText(lpStr);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unordered_map<PlayerUID, std::uint8_t*> m_GTS_Files;
|
std::unordered_map<PlayerUID, std::uint8_t*> m_GTS_Files;
|
||||||
@@ -672,16 +654,14 @@ public:
|
|||||||
bool m_bTutorialMode;
|
bool m_bTutorialMode;
|
||||||
bool m_bIsAppPaused;
|
bool m_bIsAppPaused;
|
||||||
|
|
||||||
// m_bChangingSessionType and m_bReallyChangingSessionType moved to
|
// m_bChangingSessionType and m_bReallyChangingSessionType moved to NetworkController
|
||||||
// NetworkController
|
|
||||||
|
|
||||||
// trial, and trying to unlock full
|
// trial, and trying to unlock full
|
||||||
// version on an upsell
|
// version on an upsell
|
||||||
|
|
||||||
void loadMediaArchive() { m_archiveManager.loadMediaArchive(); }
|
void loadMediaArchive() { m_archiveManager.loadMediaArchive(); }
|
||||||
void loadStringTable() {
|
void loadStringTable() {
|
||||||
m_localizationManager.loadStringTable(
|
m_localizationManager.loadStringTable(m_archiveManager.getMediaArchive());
|
||||||
m_archiveManager.getMediaArchive());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -696,10 +676,10 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static int BannedLevelDialogReturned(
|
static int BannedLevelDialogReturned(void* pParam, int iPad,
|
||||||
void* pParam, int iPad, const IPlatformStorage::EMessageResult);
|
const IPlatformStorage::EMessageResult);
|
||||||
static int TexturePackDialogReturned(
|
static int TexturePackDialogReturned(void* pParam, int iPad,
|
||||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
IPlatformStorage::EMessageResult result) {
|
||||||
return MenuController::texturePackDialogReturned(pParam, iPad, result);
|
return MenuController::texturePackDialogReturned(pParam, iPad, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -723,8 +703,7 @@ private:
|
|||||||
eGameMode m_eGameMode; // single or multiplayer
|
eGameMode m_eGameMode; // single or multiplayer
|
||||||
|
|
||||||
// GameSettingsA reference alias into GameSettingsManager
|
// GameSettingsA reference alias into GameSettingsManager
|
||||||
GAME_SETTINGS* (&GameSettingsA)[XUSER_MAX_COUNT] =
|
GAME_SETTINGS* (&GameSettingsA)[XUSER_MAX_COUNT] = m_gameSettingsManager.GameSettingsA;
|
||||||
m_gameSettingsManager.GameSettingsA;
|
|
||||||
|
|
||||||
// m_uiLastSignInData moved to NetworkController
|
// m_uiLastSignInData moved to NetworkController
|
||||||
|
|
||||||
@@ -749,6 +728,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
static int UnlockFullExitReturned(void* pParam, int iPad,
|
static int UnlockFullExitReturned(void* pParam, int iPad,
|
||||||
IPlatformStorage::EMessageResult result) {
|
IPlatformStorage::EMessageResult result) {
|
||||||
return MenuController::unlockFullExitReturned(pParam, iPad, result);
|
return MenuController::unlockFullExitReturned(pParam, iPad, result);
|
||||||
@@ -757,8 +737,8 @@ private:
|
|||||||
IPlatformStorage::EMessageResult result) {
|
IPlatformStorage::EMessageResult result) {
|
||||||
return MenuController::unlockFullSaveReturned(pParam, iPad, result);
|
return MenuController::unlockFullSaveReturned(pParam, iPad, result);
|
||||||
}
|
}
|
||||||
static int UnlockFullInviteReturned(
|
static int UnlockFullInviteReturned(void* pParam, int iPad,
|
||||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
IPlatformStorage::EMessageResult result) {
|
||||||
return MenuController::unlockFullInviteReturned(pParam, iPad, result);
|
return MenuController::unlockFullInviteReturned(pParam, iPad, result);
|
||||||
}
|
}
|
||||||
static int TrialOverReturned(void* pParam, int iPad,
|
static int TrialOverReturned(void* pParam, int iPad,
|
||||||
@@ -771,25 +751,21 @@ private:
|
|||||||
}
|
}
|
||||||
static int ExitAndJoinFromInviteSaveDialogReturned(
|
static int ExitAndJoinFromInviteSaveDialogReturned(
|
||||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
||||||
return NetworkController::exitAndJoinFromInviteSaveDialogReturned(
|
return NetworkController::exitAndJoinFromInviteSaveDialogReturned(pParam, iPad, result);
|
||||||
pParam, iPad, result);
|
|
||||||
}
|
}
|
||||||
static int ExitAndJoinFromInviteAndSaveReturned(
|
static int ExitAndJoinFromInviteAndSaveReturned(
|
||||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
||||||
return NetworkController::exitAndJoinFromInviteAndSaveReturned(
|
return NetworkController::exitAndJoinFromInviteAndSaveReturned(pParam, iPad, result);
|
||||||
pParam, iPad, result);
|
|
||||||
}
|
}
|
||||||
static int ExitAndJoinFromInviteDeclineSaveReturned(
|
static int ExitAndJoinFromInviteDeclineSaveReturned(
|
||||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
||||||
return NetworkController::exitAndJoinFromInviteDeclineSaveReturned(
|
return NetworkController::exitAndJoinFromInviteDeclineSaveReturned(pParam, iPad, result);
|
||||||
pParam, iPad, result);
|
|
||||||
}
|
}
|
||||||
static int FatalErrorDialogReturned(
|
static int FatalErrorDialogReturned(void* pParam, int iPad,
|
||||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result);
|
IPlatformStorage::EMessageResult result);
|
||||||
static int WarningTrialTexturePackReturned(
|
static int WarningTrialTexturePackReturned(
|
||||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
||||||
return NetworkController::warningTrialTexturePackReturned(pParam, iPad,
|
return NetworkController::warningTrialTexturePackReturned(pParam, iPad, result);
|
||||||
result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
JoinFromInviteData& m_InviteData = m_networkController.m_InviteData;
|
JoinFromInviteData& m_InviteData = m_networkController.m_InviteData;
|
||||||
@@ -818,7 +794,7 @@ public:
|
|||||||
return m_localizationManager.getHTMLFontSize(size);
|
return m_localizationManager.getHTMLFontSize(size);
|
||||||
}
|
}
|
||||||
std::string FormatHTMLString(int iPad, const std::string& desc,
|
std::string FormatHTMLString(int iPad, const std::string& desc,
|
||||||
int shadowColour = 0xFFFFFFFF) {
|
int shadowColour = 0xFFFFFFFF) {
|
||||||
return m_localizationManager.formatHTMLString(iPad, desc, shadowColour);
|
return m_localizationManager.formatHTMLString(iPad, desc, shadowColour);
|
||||||
}
|
}
|
||||||
std::string GetActionReplacement(int iPad, unsigned char ucAction) {
|
std::string GetActionReplacement(int iPad, unsigned char ucAction) {
|
||||||
@@ -842,8 +818,7 @@ public:
|
|||||||
}
|
}
|
||||||
static int ExitGameFromRemoteSaveDialogReturned(
|
static int ExitGameFromRemoteSaveDialogReturned(
|
||||||
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
void* pParam, int iPad, IPlatformStorage::EMessageResult result) {
|
||||||
return MenuController::exitGameFromRemoteSaveDialogReturned(
|
return MenuController::exitGameFromRemoteSaveDialogReturned(pParam, iPad, result);
|
||||||
pParam, iPad, result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// XML
|
// XML
|
||||||
@@ -865,11 +840,10 @@ public:
|
|||||||
MOJANG_DATA* GetMojangDataForXuid(PlayerUID xuid);
|
MOJANG_DATA* GetMojangDataForXuid(PlayerUID xuid);
|
||||||
static int32_t RegisterConfigValues(char* pType, int iValue);
|
static int32_t RegisterConfigValues(char* pType, int iValue);
|
||||||
|
|
||||||
static int32_t RegisterDLCData(char* a, char* b, int c, uint64_t d,
|
static int32_t RegisterDLCData(char* a, char* b, int c, uint64_t d, uint64_t e,
|
||||||
uint64_t e, char* f, unsigned int g, int h,
|
char* f, unsigned int g, int h,
|
||||||
char* pDataFile) {
|
char* pDataFile) {
|
||||||
return DLCController::registerDLCData(a, b, c, d, e, f, g, h,
|
return DLCController::registerDLCData(a, b, c, d, e, f, g, h, pDataFile);
|
||||||
pDataFile);
|
|
||||||
}
|
}
|
||||||
bool GetDLCFullOfferIDForSkinID(const std::string& FirstSkin,
|
bool GetDLCFullOfferIDForSkinID(const std::string& FirstSkin,
|
||||||
uint64_t* pullVal) {
|
uint64_t* pullVal) {
|
||||||
@@ -882,12 +856,8 @@ public:
|
|||||||
return m_dlcController.getDLCInfoForFullOfferID(ullOfferID_Full);
|
return m_dlcController.getDLCInfoForFullOfferID(ullOfferID_Full);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int GetDLCCreditsCount() {
|
unsigned int GetDLCCreditsCount() { return m_dlcController.getDLCCreditsCount(); }
|
||||||
return m_dlcController.getDLCCreditsCount();
|
SCreditTextItemDef* GetDLCCredits(int iIndex) { return m_dlcController.getDLCCredits(iIndex); }
|
||||||
}
|
|
||||||
SCreditTextItemDef* GetDLCCredits(int iIndex) {
|
|
||||||
return m_dlcController.getDLCCredits(iIndex);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TMS
|
// TMS
|
||||||
void ReadDLCFileFromTMS(int iPad, eTMSAction action,
|
void ReadDLCFileFromTMS(int iPad, eTMSAction action,
|
||||||
@@ -895,15 +865,26 @@ public:
|
|||||||
void ReadXuidsFileFromTMS(int iPad, eTMSAction action,
|
void ReadXuidsFileFromTMS(int iPad, eTMSAction action,
|
||||||
bool bCallback = false);
|
bool bCallback = false);
|
||||||
|
|
||||||
|
// images for save thumbnail/social post
|
||||||
|
void CaptureSaveThumbnail() override = 0;
|
||||||
|
void GetSaveThumbnail(std::uint8_t** thumbnailData,
|
||||||
|
unsigned int* thumbnailSize) override = 0;
|
||||||
|
void ReleaseSaveThumbnail() override = 0;
|
||||||
|
void GetScreenshot(int iPad, std::uint8_t** screenshotData,
|
||||||
|
unsigned int* screenshotSize) override = 0;
|
||||||
|
|
||||||
|
void ReadBannedList(int iPad, eTMSAction action = (eTMSAction)0,
|
||||||
|
bool bCallback = false) override = 0;
|
||||||
|
|
||||||
// DLC data members moved to DLCController
|
// DLC data members moved to DLCController
|
||||||
// Sign-in info moved to NetworkController
|
// Sign-in info moved to NetworkController
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// void OverrideFontRenderer(bool set, bool immediate = true);
|
// void OverrideFontRenderer(bool set, bool immediate = true);
|
||||||
// void ToggleFontRenderer() {
|
// void ToggleFontRenderer() {
|
||||||
// OverrideFontRenderer(!m_bFontRendererOverridden,false); }
|
// OverrideFontRenderer(!m_bFontRendererOverridden,false); }
|
||||||
BANNEDLIST(&BannedListA)
|
BANNEDLIST (&BannedListA)[XUSER_MAX_COUNT] = m_bannedListManager.BannedListA;
|
||||||
[XUSER_MAX_COUNT] = m_bannedListManager.BannedListA;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void SetBanListCheck(int iPad, bool bVal) {
|
void SetBanListCheck(int iPad, bool bVal) {
|
||||||
@@ -921,8 +902,7 @@ public:
|
|||||||
// m_uiOpacityCountDown moved to MenuController
|
// m_uiOpacityCountDown moved to MenuController
|
||||||
// DLC flags moved to DLCController
|
// DLC flags moved to DLCController
|
||||||
// Host options - m_uiGameHostSettings moved to GameSettingsManager
|
// Host options - m_uiGameHostSettings moved to GameSettingsManager
|
||||||
unsigned int& m_uiGameHostSettings =
|
unsigned int& m_uiGameHostSettings = m_gameSettingsManager.m_uiGameHostSettings;
|
||||||
m_gameSettingsManager.m_uiGameHostSettings;
|
|
||||||
|
|
||||||
#if defined(_LARGE_WORLDS)
|
#if defined(_LARGE_WORLDS)
|
||||||
unsigned int m_GameNewWorldSize;
|
unsigned int m_GameNewWorldSize;
|
||||||
@@ -965,17 +945,13 @@ public:
|
|||||||
// World seed from png image - delegated to MenuController
|
// World seed from png image - delegated to MenuController
|
||||||
void GetImageTextData(std::uint8_t* imageData, unsigned int imageBytes,
|
void GetImageTextData(std::uint8_t* imageData, unsigned int imageBytes,
|
||||||
unsigned char* seedText, unsigned int& uiHostOptions,
|
unsigned char* seedText, unsigned int& uiHostOptions,
|
||||||
bool& bHostOptionsRead,
|
bool& bHostOptionsRead, std::uint32_t& uiTexturePack) {
|
||||||
std::uint32_t& uiTexturePack) {
|
m_menuController.getImageTextData(imageData, imageBytes, seedText, uiHostOptions, bHostOptionsRead, uiTexturePack);
|
||||||
m_menuController.getImageTextData(imageData, imageBytes, seedText,
|
|
||||||
uiHostOptions, bHostOptionsRead,
|
|
||||||
uiTexturePack);
|
|
||||||
}
|
}
|
||||||
unsigned int CreateImageTextData(std::uint8_t* textMetadata, int64_t seed,
|
unsigned int CreateImageTextData(std::uint8_t* textMetadata, int64_t seed,
|
||||||
bool hasSeed, unsigned int uiHostOptions,
|
bool hasSeed, unsigned int uiHostOptions,
|
||||||
unsigned int uiTexturePackId) {
|
unsigned int uiTexturePackId) {
|
||||||
return m_menuController.createImageTextData(
|
return m_menuController.createImageTextData(textMetadata, seed, hasSeed, uiHostOptions, uiTexturePackId);
|
||||||
textMetadata, seed, hasSeed, uiHostOptions, uiTexturePackId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Game rules
|
// Game rules
|
||||||
@@ -1003,8 +979,7 @@ public:
|
|||||||
void UpdatePlayerInfo(std::uint8_t networkSmallId,
|
void UpdatePlayerInfo(std::uint8_t networkSmallId,
|
||||||
int16_t playerColourIndex,
|
int16_t playerColourIndex,
|
||||||
unsigned int playerGamePrivileges) {
|
unsigned int playerGamePrivileges) {
|
||||||
m_networkController.updatePlayerInfo(networkSmallId, playerColourIndex,
|
m_networkController.updatePlayerInfo(networkSmallId, playerColourIndex, playerGamePrivileges);
|
||||||
playerGamePrivileges);
|
|
||||||
}
|
}
|
||||||
short GetPlayerColour(std::uint8_t networkSmallId) {
|
short GetPlayerColour(std::uint8_t networkSmallId) {
|
||||||
return m_networkController.getPlayerColour(networkSmallId);
|
return m_networkController.getPlayerColour(networkSmallId);
|
||||||
@@ -1019,9 +994,7 @@ public:
|
|||||||
bool bPromote = false) {
|
bool bPromote = false) {
|
||||||
return m_dlcController.addDLCRequest(eContentType, bPromote);
|
return m_dlcController.addDLCRequest(eContentType, bPromote);
|
||||||
}
|
}
|
||||||
bool RetrieveNextDLCContent() {
|
bool RetrieveNextDLCContent() { return m_dlcController.retrieveNextDLCContent(); }
|
||||||
return m_dlcController.retrieveNextDLCContent();
|
|
||||||
}
|
|
||||||
bool CheckTMSDLCCanStop() { return m_dlcController.checkTMSDLCCanStop(); }
|
bool CheckTMSDLCCanStop() { return m_dlcController.checkTMSDLCCanStop(); }
|
||||||
int dlcOffersReturned(int iOfferC, std::uint32_t dwType, int iPad) {
|
int dlcOffersReturned(int iOfferC, std::uint32_t dwType, int iPad) {
|
||||||
return m_dlcController.dlcOffersReturned(iOfferC, dwType, iPad);
|
return m_dlcController.dlcOffersReturned(iOfferC, dwType, iPad);
|
||||||
@@ -1037,45 +1010,26 @@ public:
|
|||||||
return m_dlcController.dlcContentRetrieved(eType);
|
return m_dlcController.dlcContentRetrieved(eType);
|
||||||
}
|
}
|
||||||
void TickDLCOffersRetrieved() { m_dlcController.tickDLCOffersRetrieved(); }
|
void TickDLCOffersRetrieved() { m_dlcController.tickDLCOffersRetrieved(); }
|
||||||
void ClearAndResetDLCDownloadQueue() {
|
void ClearAndResetDLCDownloadQueue() { m_dlcController.clearAndResetDLCDownloadQueue(); }
|
||||||
m_dlcController.clearAndResetDLCDownloadQueue();
|
bool RetrieveNextTMSPPContent() { return m_dlcController.retrieveNextTMSPPContent(); }
|
||||||
}
|
void TickTMSPPFilesRetrieved() { m_dlcController.tickTMSPPFilesRetrieved(); }
|
||||||
bool RetrieveNextTMSPPContent() {
|
void ClearTMSPPFilesRetrieved() { m_dlcController.clearTMSPPFilesRetrieved(); }
|
||||||
return m_dlcController.retrieveNextTMSPPContent();
|
|
||||||
}
|
|
||||||
void TickTMSPPFilesRetrieved() {
|
|
||||||
m_dlcController.tickTMSPPFilesRetrieved();
|
|
||||||
}
|
|
||||||
void ClearTMSPPFilesRetrieved() {
|
|
||||||
m_dlcController.clearTMSPPFilesRetrieved();
|
|
||||||
}
|
|
||||||
unsigned int AddTMSPPFileTypeRequest(eDLCContentType eType,
|
unsigned int AddTMSPPFileTypeRequest(eDLCContentType eType,
|
||||||
bool bPromote = false) {
|
bool bPromote = false) {
|
||||||
return m_dlcController.addTMSPPFileTypeRequest(eType, bPromote);
|
return m_dlcController.addTMSPPFileTypeRequest(eType, bPromote);
|
||||||
}
|
}
|
||||||
int GetDLCInfoTexturesOffersCount() {
|
int GetDLCInfoTexturesOffersCount() { return m_dlcController.getDLCInfoTexturesOffersCount(); }
|
||||||
return m_dlcController.getDLCInfoTexturesOffersCount();
|
|
||||||
}
|
|
||||||
|
|
||||||
static int TMSPPFileReturned(void* pParam, int iPad, int iUserData,
|
static int TMSPPFileReturned(void* pParam, int iPad, int iUserData,
|
||||||
IPlatformStorage::PTMSPP_FILEDATA pFileData,
|
IPlatformStorage::PTMSPP_FILEDATA pFileData,
|
||||||
const char* szFilename) {
|
const char* szFilename) {
|
||||||
return DLCController::tmsPPFileReturned(pParam, iPad, iUserData,
|
return DLCController::tmsPPFileReturned(pParam, iPad, iUserData, pFileData, szFilename);
|
||||||
pFileData, szFilename);
|
|
||||||
}
|
|
||||||
DLC_INFO* GetDLCInfoTrialOffer(int iIndex) {
|
|
||||||
return m_dlcController.getDLCInfoTrialOffer(iIndex);
|
|
||||||
}
|
|
||||||
DLC_INFO* GetDLCInfoFullOffer(int iIndex) {
|
|
||||||
return m_dlcController.getDLCInfoFullOffer(iIndex);
|
|
||||||
}
|
}
|
||||||
|
DLC_INFO* GetDLCInfoTrialOffer(int iIndex) { return m_dlcController.getDLCInfoTrialOffer(iIndex); }
|
||||||
|
DLC_INFO* GetDLCInfoFullOffer(int iIndex) { return m_dlcController.getDLCInfoFullOffer(iIndex); }
|
||||||
|
|
||||||
int GetDLCInfoTrialOffersCount() {
|
int GetDLCInfoTrialOffersCount() { return m_dlcController.getDLCInfoTrialOffersCount(); }
|
||||||
return m_dlcController.getDLCInfoTrialOffersCount();
|
int GetDLCInfoFullOffersCount() { return m_dlcController.getDLCInfoFullOffersCount(); }
|
||||||
}
|
|
||||||
int GetDLCInfoFullOffersCount() {
|
|
||||||
return m_dlcController.getDLCInfoFullOffersCount();
|
|
||||||
}
|
|
||||||
bool GetDLCFullOfferIDForPackID(const int iPackID, uint64_t* pullVal) {
|
bool GetDLCFullOfferIDForPackID(const int iPackID, uint64_t* pullVal) {
|
||||||
return m_dlcController.getDLCFullOfferIDForPackID(iPackID, pullVal);
|
return m_dlcController.getDLCFullOfferIDForPackID(iPackID, pullVal);
|
||||||
}
|
}
|
||||||
@@ -1092,10 +1046,8 @@ public:
|
|||||||
// Download status members moved to DLCController
|
// Download status members moved to DLCController
|
||||||
bool m_bCorruptSaveDeleted;
|
bool m_bCorruptSaveDeleted;
|
||||||
|
|
||||||
std::uint8_t*& m_pBannedListFileBuffer =
|
std::uint8_t*& m_pBannedListFileBuffer = m_bannedListManager.m_pBannedListFileBuffer;
|
||||||
m_bannedListManager.m_pBannedListFileBuffer;
|
unsigned int& m_dwBannedListFileSize = m_bannedListManager.m_dwBannedListFileSize;
|
||||||
unsigned int& m_dwBannedListFileSize =
|
|
||||||
m_bannedListManager.m_dwBannedListFileSize;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
unsigned int& m_dwDLCFileSize = m_dlcController.m_dwDLCFileSize;
|
unsigned int& m_dwDLCFileSize = m_dlcController.m_dwDLCFileSize;
|
||||||
@@ -1138,6 +1090,14 @@ public:
|
|||||||
return SkinManager::getSkinPathFromId(skinId);
|
return SkinManager::getSkinPathFromId(skinId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int LoadLocalTMSFile(char* wchTMSFile) override = 0;
|
||||||
|
int LoadLocalTMSFile(char* wchTMSFile,
|
||||||
|
eFileExtensionType eExt) override = 0;
|
||||||
|
void FreeLocalTMSFiles(eTMSFileType eType) override = 0;
|
||||||
|
int GetLocalTMSFileIndex(char* wchTMSFile,
|
||||||
|
bool bFilenameIncludesExtension,
|
||||||
|
eFileExtensionType eEXT) override = 0;
|
||||||
|
|
||||||
virtual bool GetTMSGlobalFileListRead() { return true; }
|
virtual bool GetTMSGlobalFileListRead() { return true; }
|
||||||
virtual bool GetTMSDLCInfoRead() { return true; }
|
virtual bool GetTMSDLCInfoRead() { return true; }
|
||||||
virtual bool GetTMSXUIDsFileRead() { return true; }
|
virtual bool GetTMSXUIDsFileRead() { return true; }
|
||||||
@@ -1172,17 +1132,10 @@ private:
|
|||||||
|
|
||||||
// 4J-PB - language and locale functions
|
// 4J-PB - language and locale functions
|
||||||
public:
|
public:
|
||||||
void LocaleAndLanguageInit() {
|
void LocaleAndLanguageInit() { m_localizationManager.localeAndLanguageInit(); }
|
||||||
m_localizationManager.localeAndLanguageInit();
|
|
||||||
}
|
|
||||||
void getLocale(std::vector<std::string>& vecWstrLocales) {
|
void getLocale(std::vector<std::string>& vecWstrLocales) {
|
||||||
m_localizationManager.getLocale(vecWstrLocales);
|
m_localizationManager.getLocale(vecWstrLocales);
|
||||||
}
|
}
|
||||||
[[nodiscard]] std::vector<std::string> getLocale() {
|
|
||||||
std::vector<std::string> v;
|
|
||||||
m_localizationManager.getLocale(v);
|
|
||||||
return v;
|
|
||||||
}
|
|
||||||
int get_eMCLang(char* pwchLocale) {
|
int get_eMCLang(char* pwchLocale) {
|
||||||
return m_localizationManager.get_eMCLang(pwchLocale);
|
return m_localizationManager.get_eMCLang(pwchLocale);
|
||||||
}
|
}
|
||||||
@@ -1190,18 +1143,24 @@ public:
|
|||||||
return m_localizationManager.get_xcLang(pwchLocale);
|
return m_localizationManager.get_xcLang(pwchLocale);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetTickTMSDLCFiles(bool bVal) {
|
void SetTickTMSDLCFiles(bool bVal) { m_dlcController.setTickTMSDLCFiles(bVal); }
|
||||||
m_dlcController.setTickTMSDLCFiles(bVal);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string getFilePath(std::uint32_t packId, std::string filename,
|
std::string getFilePath(std::uint32_t packId, std::string filename,
|
||||||
bool bAddDataFolder,
|
bool bAddDataFolder,
|
||||||
std::string mountPoint = "TPACK:");
|
std::string mountPoint = "TPACK:");
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string getRootPath(std::uint32_t packId, bool allowOverride,
|
std::string getRootPath(std::uint32_t packId, bool allowOverride,
|
||||||
bool bAddDataFolder, std::string mountPoint);
|
bool bAddDataFolder, std::string mountPoint);
|
||||||
|
|
||||||
|
public:
|
||||||
|
#if defined(_WINDOWS64)
|
||||||
|
// CMinecraftAudio audio;
|
||||||
|
#else
|
||||||
|
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Game app;
|
|
||||||
|
// singleton
|
||||||
|
// extern CMinecraftApp app;
|
||||||
@@ -2,88 +2,57 @@
|
|||||||
|
|
||||||
#include "app/common/Game.h"
|
#include "app/common/Game.h"
|
||||||
|
|
||||||
bool GameMenuService::openInventory(int iPad,
|
bool GameMenuService::openInventory(int iPad, std::shared_ptr<LocalPlayer> player, bool navigateBack) {
|
||||||
std::shared_ptr<LocalPlayer> player,
|
|
||||||
bool navigateBack) {
|
|
||||||
return game_.LoadInventoryMenu(iPad, player, navigateBack);
|
return game_.LoadInventoryMenu(iPad, player, navigateBack);
|
||||||
}
|
}
|
||||||
bool GameMenuService::openCreative(int iPad,
|
bool GameMenuService::openCreative(int iPad, std::shared_ptr<LocalPlayer> player, bool navigateBack) {
|
||||||
std::shared_ptr<LocalPlayer> player,
|
|
||||||
bool navigateBack) {
|
|
||||||
return game_.LoadCreativeMenu(iPad, player, navigateBack);
|
return game_.LoadCreativeMenu(iPad, player, navigateBack);
|
||||||
}
|
}
|
||||||
bool GameMenuService::openCrafting2x2(int iPad,
|
bool GameMenuService::openCrafting2x2(int iPad, std::shared_ptr<LocalPlayer> player) {
|
||||||
std::shared_ptr<LocalPlayer> player) {
|
|
||||||
return game_.LoadCrafting2x2Menu(iPad, player);
|
return game_.LoadCrafting2x2Menu(iPad, player);
|
||||||
}
|
}
|
||||||
bool GameMenuService::openCrafting3x3(int iPad,
|
bool GameMenuService::openCrafting3x3(int iPad, std::shared_ptr<LocalPlayer> player, int x, int y, int z) {
|
||||||
std::shared_ptr<LocalPlayer> player,
|
|
||||||
int x, int y, int z) {
|
|
||||||
return game_.LoadCrafting3x3Menu(iPad, player, x, y, z);
|
return game_.LoadCrafting3x3Menu(iPad, player, x, y, z);
|
||||||
}
|
}
|
||||||
bool GameMenuService::openEnchanting(int iPad,
|
bool GameMenuService::openEnchanting(int iPad, std::shared_ptr<Inventory> inventory, int x, int y, int z, Level* level, const std::string& name) {
|
||||||
std::shared_ptr<Inventory> inventory,
|
|
||||||
int x, int y, int z, Level* level,
|
|
||||||
const std::string& name) {
|
|
||||||
return game_.LoadEnchantingMenu(iPad, inventory, x, y, z, level, name);
|
return game_.LoadEnchantingMenu(iPad, inventory, x, y, z, level, name);
|
||||||
}
|
}
|
||||||
bool GameMenuService::openFurnace(int iPad,
|
bool GameMenuService::openFurnace(int iPad, std::shared_ptr<Inventory> inventory, std::shared_ptr<FurnaceTileEntity> furnace) {
|
||||||
std::shared_ptr<Inventory> inventory,
|
|
||||||
std::shared_ptr<FurnaceTileEntity> furnace) {
|
|
||||||
return game_.LoadFurnaceMenu(iPad, inventory, furnace);
|
return game_.LoadFurnaceMenu(iPad, inventory, furnace);
|
||||||
}
|
}
|
||||||
bool GameMenuService::openBrewingStand(
|
bool GameMenuService::openBrewingStand(int iPad, std::shared_ptr<Inventory> inventory, std::shared_ptr<BrewingStandTileEntity> brewingStand) {
|
||||||
int iPad, std::shared_ptr<Inventory> inventory,
|
|
||||||
std::shared_ptr<BrewingStandTileEntity> brewingStand) {
|
|
||||||
return game_.LoadBrewingStandMenu(iPad, inventory, brewingStand);
|
return game_.LoadBrewingStandMenu(iPad, inventory, brewingStand);
|
||||||
}
|
}
|
||||||
bool GameMenuService::openContainer(int iPad,
|
bool GameMenuService::openContainer(int iPad, std::shared_ptr<Container> inventory, std::shared_ptr<Container> container) {
|
||||||
std::shared_ptr<Container> inventory,
|
|
||||||
std::shared_ptr<Container> container) {
|
|
||||||
return game_.LoadContainerMenu(iPad, inventory, container);
|
return game_.LoadContainerMenu(iPad, inventory, container);
|
||||||
}
|
}
|
||||||
bool GameMenuService::openTrap(int iPad, std::shared_ptr<Container> inventory,
|
bool GameMenuService::openTrap(int iPad, std::shared_ptr<Container> inventory, std::shared_ptr<DispenserTileEntity> trap) {
|
||||||
std::shared_ptr<DispenserTileEntity> trap) {
|
|
||||||
return game_.LoadTrapMenu(iPad, inventory, trap);
|
return game_.LoadTrapMenu(iPad, inventory, trap);
|
||||||
}
|
}
|
||||||
bool GameMenuService::openFireworks(int iPad,
|
bool GameMenuService::openFireworks(int iPad, std::shared_ptr<LocalPlayer> player, int x, int y, int z) {
|
||||||
std::shared_ptr<LocalPlayer> player, int x,
|
|
||||||
int y, int z) {
|
|
||||||
return game_.LoadFireworksMenu(iPad, player, x, y, z);
|
return game_.LoadFireworksMenu(iPad, player, x, y, z);
|
||||||
}
|
}
|
||||||
bool GameMenuService::openSign(int iPad, std::shared_ptr<SignTileEntity> sign) {
|
bool GameMenuService::openSign(int iPad, std::shared_ptr<SignTileEntity> sign) {
|
||||||
return game_.LoadSignEntryMenu(iPad, sign);
|
return game_.LoadSignEntryMenu(iPad, sign);
|
||||||
}
|
}
|
||||||
bool GameMenuService::openRepairing(int iPad,
|
bool GameMenuService::openRepairing(int iPad, std::shared_ptr<Inventory> inventory, Level* level, int x, int y, int z) {
|
||||||
std::shared_ptr<Inventory> inventory,
|
|
||||||
Level* level, int x, int y, int z) {
|
|
||||||
return game_.LoadRepairingMenu(iPad, inventory, level, x, y, z);
|
return game_.LoadRepairingMenu(iPad, inventory, level, x, y, z);
|
||||||
}
|
}
|
||||||
bool GameMenuService::openTrading(int iPad,
|
bool GameMenuService::openTrading(int iPad, std::shared_ptr<Inventory> inventory, std::shared_ptr<Merchant> trader, Level* level, const std::string& name) {
|
||||||
std::shared_ptr<Inventory> inventory,
|
|
||||||
std::shared_ptr<Merchant> trader,
|
|
||||||
Level* level, const std::string& name) {
|
|
||||||
return game_.LoadTradingMenu(iPad, inventory, trader, level, name);
|
return game_.LoadTradingMenu(iPad, inventory, trader, level, name);
|
||||||
}
|
}
|
||||||
bool GameMenuService::openCommandBlock(
|
bool GameMenuService::openCommandBlock(int iPad, std::shared_ptr<CommandBlockEntity> commandBlock) {
|
||||||
int iPad, std::shared_ptr<CommandBlockEntity> commandBlock) {
|
|
||||||
return game_.LoadCommandBlockMenu(iPad, commandBlock);
|
return game_.LoadCommandBlockMenu(iPad, commandBlock);
|
||||||
}
|
}
|
||||||
bool GameMenuService::openHopper(int iPad, std::shared_ptr<Inventory> inventory,
|
bool GameMenuService::openHopper(int iPad, std::shared_ptr<Inventory> inventory, std::shared_ptr<HopperTileEntity> hopper) {
|
||||||
std::shared_ptr<HopperTileEntity> hopper) {
|
|
||||||
return game_.LoadHopperMenu(iPad, inventory, hopper);
|
return game_.LoadHopperMenu(iPad, inventory, hopper);
|
||||||
}
|
}
|
||||||
bool GameMenuService::openHopperMinecart(
|
bool GameMenuService::openHopperMinecart(int iPad, std::shared_ptr<Inventory> inventory, std::shared_ptr<MinecartHopper> hopper) {
|
||||||
int iPad, std::shared_ptr<Inventory> inventory,
|
|
||||||
std::shared_ptr<MinecartHopper> hopper) {
|
|
||||||
return game_.LoadHopperMenu(iPad, inventory, hopper);
|
return game_.LoadHopperMenu(iPad, inventory, hopper);
|
||||||
}
|
}
|
||||||
bool GameMenuService::openHorse(int iPad, std::shared_ptr<Inventory> inventory,
|
bool GameMenuService::openHorse(int iPad, std::shared_ptr<Inventory> inventory, std::shared_ptr<Container> container, std::shared_ptr<EntityHorse> horse) {
|
||||||
std::shared_ptr<Container> container,
|
|
||||||
std::shared_ptr<EntityHorse> horse) {
|
|
||||||
return game_.LoadHorseMenu(iPad, inventory, container, horse);
|
return game_.LoadHorseMenu(iPad, inventory, container, horse);
|
||||||
}
|
}
|
||||||
bool GameMenuService::openBeacon(int iPad, std::shared_ptr<Inventory> inventory,
|
bool GameMenuService::openBeacon(int iPad, std::shared_ptr<Inventory> inventory, std::shared_ptr<BeaconTileEntity> beacon) {
|
||||||
std::shared_ptr<BeaconTileEntity> beacon) {
|
|
||||||
return game_.LoadBeaconMenu(iPad, inventory, beacon);
|
return game_.LoadBeaconMenu(iPad, inventory, beacon);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,8 +40,9 @@ public:
|
|||||||
int iPad, std::shared_ptr<CommandBlockEntity> commandBlock) override;
|
int iPad, std::shared_ptr<CommandBlockEntity> commandBlock) override;
|
||||||
bool openHopper(int iPad, std::shared_ptr<Inventory> inventory,
|
bool openHopper(int iPad, std::shared_ptr<Inventory> inventory,
|
||||||
std::shared_ptr<HopperTileEntity> hopper) override;
|
std::shared_ptr<HopperTileEntity> hopper) override;
|
||||||
bool openHopperMinecart(int iPad, std::shared_ptr<Inventory> inventory,
|
bool openHopperMinecart(
|
||||||
std::shared_ptr<MinecartHopper> hopper) override;
|
int iPad, std::shared_ptr<Inventory> inventory,
|
||||||
|
std::shared_ptr<MinecartHopper> hopper) override;
|
||||||
bool openHorse(int iPad, std::shared_ptr<Inventory> inventory,
|
bool openHorse(int iPad, std::shared_ptr<Inventory> inventory,
|
||||||
std::shared_ptr<Container> container,
|
std::shared_ptr<Container> container,
|
||||||
std::shared_ptr<EntityHorse> horse) override;
|
std::shared_ptr<EntityHorse> horse) override;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include "app/common/GameRules/LevelGeneration/BiomeOverride.h"
|
#include "app/common/GameRules/LevelGeneration/BiomeOverride.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructure.h"
|
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructure.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
||||||
|
#include "app/common/GameRules/LevelGeneration/LevelGenerationOptions.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/StartFeature.h"
|
#include "app/common/GameRules/LevelGeneration/StartFeature.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionGenerateBox.h"
|
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionGenerateBox.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h"
|
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h"
|
||||||
@@ -15,11 +16,10 @@
|
|||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CollectItemRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/CollectItemRuleDefinition.h"
|
||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.h"
|
||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.h"
|
||||||
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h"
|
||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/NamedAreaRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/NamedAreaRuleDefinition.h"
|
||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/UpdatePlayerRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/UpdatePlayerRuleDefinition.h"
|
||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/UseTileRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/UseTileRuleDefinition.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRule.h"
|
#include "app/common/GameRules/LevelRules/Rules/GameRule.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/Rules/GameRulesInstance.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRulesInstance.h"
|
|
||||||
#include "minecraft/world/level/GameRules/LevelGenerationOptions.h"
|
|
||||||
|
|||||||
-6
@@ -2,12 +2,6 @@
|
|||||||
|
|
||||||
#include "java/InputOutputStream/DataOutputStream.h"
|
#include "java/InputOutputStream/DataOutputStream.h"
|
||||||
|
|
||||||
// Filename for the per-save game rules blob written by GameRuleManager
|
|
||||||
// and consumed by the save / converter / level storage paths. Defined
|
|
||||||
// here in minecraft/ so save-path consumers don't need to drag in the
|
|
||||||
// full app-side GameRuleManager header just for this string.
|
|
||||||
inline constexpr const char* GAME_RULE_SAVENAME = "requiredGameRules.grf";
|
|
||||||
|
|
||||||
class ConsoleGameRules {
|
class ConsoleGameRules {
|
||||||
public:
|
public:
|
||||||
enum EGameRuleType {
|
enum EGameRuleType {
|
||||||
@@ -12,21 +12,21 @@
|
|||||||
#include "app/common/DLC/DLCLocalisationFile.h"
|
#include "app/common/DLC/DLCLocalisationFile.h"
|
||||||
#include "app/common/DLC/DLCManager.h"
|
#include "app/common/DLC/DLCManager.h"
|
||||||
#include "app/common/DLC/DLCPack.h"
|
#include "app/common/DLC/DLCPack.h"
|
||||||
#include "app/common/Game.h"
|
#include "app/common/GameRules/LevelGeneration/ConsoleSchematicFile.h"
|
||||||
|
#include "app/common/GameRules/LevelGeneration/LevelGenerationOptions.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/LevelGenerators.h"
|
#include "app/common/GameRules/LevelGeneration/LevelGenerators.h"
|
||||||
#include "app/common/GameRules/LevelRules/LevelRules.h"
|
#include "app/common/GameRules/LevelRules/LevelRules.h"
|
||||||
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h"
|
||||||
|
#include "app/common/Localisation/StringTable.h"
|
||||||
|
#include "app/linux/LinuxGame.h"
|
||||||
|
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
||||||
#include "java/File.h"
|
#include "java/File.h"
|
||||||
#include "java/InputOutputStream/ByteArrayInputStream.h"
|
#include "java/InputOutputStream/ByteArrayInputStream.h"
|
||||||
#include "java/InputOutputStream/ByteArrayOutputStream.h"
|
#include "java/InputOutputStream/ByteArrayOutputStream.h"
|
||||||
#include "java/InputOutputStream/DataInputStream.h"
|
#include "java/InputOutputStream/DataInputStream.h"
|
||||||
#include "java/InputOutputStream/DataOutputStream.h"
|
#include "java/InputOutputStream/DataOutputStream.h"
|
||||||
#include "minecraft/locale/StringTable.h"
|
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
|
||||||
#include "minecraft/world/level/GameRules/LevelGenerationOptions.h"
|
|
||||||
#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h"
|
|
||||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h"
|
#include "minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h"
|
||||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
|
||||||
#include "strings.h"
|
#include "strings.h"
|
||||||
|
|
||||||
const char* GameRuleManager::wchTagNameA[] = {
|
const char* GameRuleManager::wchTagNameA[] = {
|
||||||
@@ -223,7 +223,8 @@ void GameRuleManager::loadGameRules(LevelGenerationOptions* lgo, uint8_t* dIn,
|
|||||||
unsigned int bStringTableSize = dis2.readInt();
|
unsigned int bStringTableSize = dis2.readInt();
|
||||||
std::vector<uint8_t> bStringTable(bStringTableSize);
|
std::vector<uint8_t> bStringTable(bStringTableSize);
|
||||||
dis2.read(bStringTable);
|
dis2.read(bStringTable);
|
||||||
StringTable* strings = new StringTable(bStringTable, app.getLocale());
|
StringTable* strings =
|
||||||
|
new StringTable(bStringTable.data(), bStringTable.size());
|
||||||
|
|
||||||
// Read RuleFile.
|
// Read RuleFile.
|
||||||
std::vector<uint8_t> bRuleFile(content.size() - bStringTable.size());
|
std::vector<uint8_t> bRuleFile(content.size() - bStringTable.size());
|
||||||
@@ -640,7 +641,7 @@ void GameRuleManager::processSchematicsLighting(LevelChunk* levelChunk) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GameRuleManager::loadDefaultGameRules() {
|
void GameRuleManager::loadDefaultGameRules() {
|
||||||
#if 0
|
#if !defined(__linux__)
|
||||||
#if defined(_WINDOWS64)
|
#if defined(_WINDOWS64)
|
||||||
File packedTutorialFile("Windows64Media\\Tutorial\\Tutorial.pck");
|
File packedTutorialFile("Windows64Media\\Tutorial\\Tutorial.pck");
|
||||||
if (!packedTutorialFile.exists())
|
if (!packedTutorialFile.exists())
|
||||||
@@ -656,8 +657,6 @@ void GameRuleManager::loadDefaultGameRules() {
|
|||||||
app.GetString(IDS_TUTORIALSAVENAME));
|
app.GetString(IDS_TUTORIALSAVENAME));
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
// 4jcraft: brought over from TU18 so the tutorial world loads from assets
|
|
||||||
// TODO clean this up
|
|
||||||
std::string fpTutorial = "Tutorial.pck";
|
std::string fpTutorial = "Tutorial.pck";
|
||||||
if (app.getArchiveFileSize(fpTutorial) >= 0) {
|
if (app.getArchiveFileSize(fpTutorial) >= 0) {
|
||||||
DLCPack* pack = new DLCPack("", 0xffffffff);
|
DLCPack* pack = new DLCPack("", 0xffffffff);
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "app/common/DLC/DLCGameRulesHeader.h"
|
#include "app/common/DLC/DLCGameRulesHeader.h"
|
||||||
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/LevelGenerators.h"
|
#include "app/common/GameRules/LevelGeneration/LevelGenerators.h"
|
||||||
#include "app/common/GameRules/LevelRules/LevelRules.h"
|
#include "app/common/GameRules/LevelRules/LevelRules.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
|
||||||
|
|
||||||
class LevelGenerationOptions;
|
class LevelGenerationOptions;
|
||||||
class RootGameRulesDefinition;
|
class RootGameRulesDefinition;
|
||||||
@@ -27,6 +27,8 @@ class DLCGameRulesHeader;
|
|||||||
class File;
|
class File;
|
||||||
class LevelRuleset;
|
class LevelRuleset;
|
||||||
|
|
||||||
|
#define GAME_RULE_SAVENAME "requiredGameRules.grf"
|
||||||
|
|
||||||
// 4J-JEV:
|
// 4J-JEV:
|
||||||
#define LEVEL_GEN_ID int
|
#define LEVEL_GEN_ID int
|
||||||
#define LEVEL_GEN_ID_NULL 0
|
#define LEVEL_GEN_ID_NULL 0
|
||||||
|
|||||||
@@ -3,17 +3,17 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#include "app/common/Game.h"
|
#include "ConsoleSchematicFile.h"
|
||||||
|
#include "LevelGenerationOptions.h"
|
||||||
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
|
#include "app/linux/LinuxGame.h"
|
||||||
|
#include "util/StringHelpers.h"
|
||||||
#include "java/InputOutputStream/DataOutputStream.h"
|
#include "java/InputOutputStream/DataOutputStream.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
|
||||||
#include "minecraft/world/level/GameRules/LevelGenerationOptions.h"
|
|
||||||
#include "minecraft/world/level/Level.h"
|
#include "minecraft/world/level/Level.h"
|
||||||
#include "minecraft/world/level/chunk/LevelChunk.h"
|
#include "minecraft/world/level/chunk/LevelChunk.h"
|
||||||
#include "minecraft/world/level/dimension/Dimension.h"
|
#include "minecraft/world/level/dimension/Dimension.h"
|
||||||
#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h"
|
|
||||||
#include "minecraft/world/phys/AABB.h"
|
#include "minecraft/world/phys/AABB.h"
|
||||||
#include "util/StringHelpers.h"
|
|
||||||
|
|
||||||
ApplySchematicRuleDefinition::ApplySchematicRuleDefinition(
|
ApplySchematicRuleDefinition::ApplySchematicRuleDefinition(
|
||||||
LevelGenerationOptions* levelGenOptions) {
|
LevelGenerationOptions* levelGenOptions) {
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
#include <optional>
|
#include <optional>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "ConsoleSchematicFile.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
#include "minecraft/world/phys/AABB.h"
|
#include "minecraft/world/phys/AABB.h"
|
||||||
#include "minecraft/world/phys/Vec3.h"
|
#include "minecraft/world/phys/Vec3.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#include "BiomeOverride.h"
|
#include "BiomeOverride.h"
|
||||||
|
|
||||||
#include "app/common/Game.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "java/InputOutputStream/DataOutputStream.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "app/linux/LinuxGame.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
|
||||||
#include "util/StringHelpers.h"
|
#include "util/StringHelpers.h"
|
||||||
|
#include "java/InputOutputStream/DataOutputStream.h"
|
||||||
|
|
||||||
BiomeOverride::BiomeOverride() {
|
BiomeOverride::BiomeOverride() {
|
||||||
m_tile = 0;
|
m_tile = 0;
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
|
|
||||||
class BiomeOverride : public GameRuleDefinition {
|
class BiomeOverride : public GameRuleDefinition {
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -4,20 +4,20 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "app/common/Game.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionGenerateBox.h"
|
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionGenerateBox.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h"
|
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceContainer.h"
|
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceContainer.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceSpawner.h"
|
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceSpawner.h"
|
||||||
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
|
#include "app/linux/LinuxGame.h"
|
||||||
|
#include "util/StringHelpers.h"
|
||||||
#include "java/InputOutputStream/DataOutputStream.h"
|
#include "java/InputOutputStream/DataOutputStream.h"
|
||||||
#include "minecraft/Direction.h"
|
#include "minecraft/Direction.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
|
||||||
#include "minecraft/world/level/Level.h"
|
#include "minecraft/world/level/Level.h"
|
||||||
#include "minecraft/world/level/dimension/Dimension.h"
|
#include "minecraft/world/level/dimension/Dimension.h"
|
||||||
#include "minecraft/world/level/levelgen/structure/BoundingBox.h"
|
#include "minecraft/world/level/levelgen/structure/BoundingBox.h"
|
||||||
#include "util/StringHelpers.h"
|
|
||||||
|
|
||||||
ConsoleGenerateStructure::ConsoleGenerateStructure() : StructurePiece(0) {
|
ConsoleGenerateStructure::ConsoleGenerateStructure() : StructurePiece(0) {
|
||||||
m_x = m_y = m_z = 0;
|
m_x = m_y = m_z = 0;
|
||||||
@@ -77,8 +77,8 @@ void ConsoleGenerateStructure::writeAttributes(DataOutputStream* dos,
|
|||||||
dos->writeUTF(toWString(m_dimension));
|
dos->writeUTF(toWString(m_dimension));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConsoleGenerateStructure::addAttribute(const std::string& attributeName,
|
void ConsoleGenerateStructure::addAttribute(
|
||||||
const std::string& attributeValue) {
|
const std::string& attributeName, const std::string& attributeValue) {
|
||||||
if (attributeName.compare("x") == 0) {
|
if (attributeName.compare("x") == 0) {
|
||||||
int value = fromWString<int>(attributeValue);
|
int value = fromWString<int>(attributeValue);
|
||||||
m_x = value;
|
m_x = value;
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
#include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h"
|
#include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h"
|
||||||
#include "minecraft/world/level/levelgen/structure/StructurePiece.h"
|
#include "minecraft/world/level/levelgen/structure/StructurePiece.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
|
|
||||||
class ConsoleGenerateStructureAction : public GameRuleDefinition {
|
class ConsoleGenerateStructureAction : public GameRuleDefinition {
|
||||||
public:
|
public:
|
||||||
|
|||||||
+14
-12
@@ -1,4 +1,4 @@
|
|||||||
#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h"
|
#include "ConsoleSchematicFile.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -8,10 +8,12 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "app/linux/LinuxGame.h"
|
||||||
|
#include "app/linux/Stubs/winapi_stubs.h"
|
||||||
|
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
||||||
#include "java/Class.h"
|
#include "java/Class.h"
|
||||||
#include "java/InputOutputStream/DataInputStream.h"
|
#include "java/InputOutputStream/DataInputStream.h"
|
||||||
#include "java/InputOutputStream/DataOutputStream.h"
|
#include "java/InputOutputStream/DataOutputStream.h"
|
||||||
#include "minecraft/util/Log.h"
|
|
||||||
#include "minecraft/world/entity/Entity.h"
|
#include "minecraft/world/entity/Entity.h"
|
||||||
#include "minecraft/world/entity/EntityIO.h"
|
#include "minecraft/world/entity/EntityIO.h"
|
||||||
#include "minecraft/world/entity/ItemFrame.h"
|
#include "minecraft/world/entity/ItemFrame.h"
|
||||||
@@ -20,7 +22,6 @@
|
|||||||
#include "minecraft/world/level/LightLayer.h"
|
#include "minecraft/world/level/LightLayer.h"
|
||||||
#include "minecraft/world/level/TilePos.h"
|
#include "minecraft/world/level/TilePos.h"
|
||||||
#include "minecraft/world/level/chunk/LevelChunk.h"
|
#include "minecraft/world/level/chunk/LevelChunk.h"
|
||||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
|
||||||
#include "minecraft/world/level/tile/Tile.h"
|
#include "minecraft/world/level/tile/Tile.h"
|
||||||
#include "minecraft/world/level/tile/entity/TileEntity.h"
|
#include "minecraft/world/level/tile/entity/TileEntity.h"
|
||||||
#include "minecraft/world/phys/AABB.h"
|
#include "minecraft/world/phys/AABB.h"
|
||||||
@@ -38,7 +39,7 @@ ConsoleSchematicFile::ConsoleSchematicFile() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ConsoleSchematicFile::~ConsoleSchematicFile() {
|
ConsoleSchematicFile::~ConsoleSchematicFile() {
|
||||||
Log::info("Deleting schematic file\n");
|
app.DebugPrintf("Deleting schematic file\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConsoleSchematicFile::save(DataOutputStream* dos) {
|
void ConsoleSchematicFile::save(DataOutputStream* dos) {
|
||||||
@@ -111,7 +112,7 @@ void ConsoleSchematicFile::load(DataInputStream* dis) {
|
|||||||
m_data.resize(m_dataSize);
|
m_data.resize(m_dataSize);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Log::info(
|
app.DebugPrintf(
|
||||||
"Unrecognized compression type for Schematic file "
|
"Unrecognized compression type for Schematic file "
|
||||||
"(%d)\n",
|
"(%d)\n",
|
||||||
(int)compressionType);
|
(int)compressionType);
|
||||||
@@ -138,7 +139,7 @@ void ConsoleSchematicFile::load(DataInputStream* dis) {
|
|||||||
|
|
||||||
if (te == nullptr) {
|
if (te == nullptr) {
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
Log::info(
|
app.DebugPrintf(
|
||||||
"ConsoleSchematicFile has read a nullptr tile "
|
"ConsoleSchematicFile has read a nullptr tile "
|
||||||
"entity\n");
|
"entity\n");
|
||||||
assert(0);
|
assert(0);
|
||||||
@@ -215,8 +216,8 @@ int64_t ConsoleSchematicFile::applyBlocksAndData(LevelChunk* chunk,
|
|||||||
int zEnd = std::min(destinationBox->z1, (double)(zStart & ~15) + 16);
|
int zEnd = std::min(destinationBox->z1, (double)(zStart & ~15) + 16);
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
Log::info("Range is (%d,%d,%d) to (%d,%d,%d)\n", xStart, yStart, zStart,
|
app.DebugPrintf("Range is (%d,%d,%d) to (%d,%d,%d)\n", xStart, yStart,
|
||||||
xEnd - 1, yEnd - 1, zEnd - 1);
|
zStart, xEnd - 1, yEnd - 1, zEnd - 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int rowBlocksIncluded = (yEnd - yStart) * (zEnd - zStart);
|
int rowBlocksIncluded = (yEnd - yStart) * (zEnd - zStart);
|
||||||
@@ -290,7 +291,8 @@ int64_t ConsoleSchematicFile::applyBlocksAndData(LevelChunk* chunk,
|
|||||||
dataP += (rowBlockCount - rowBlocksIncluded) / 2;
|
dataP += (rowBlockCount - rowBlocksIncluded) / 2;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log::info("ERROR: Rotation of block and data not implemented!!\n");
|
app.DebugPrintf(
|
||||||
|
"ERROR: Rotation of block and data not implemented!!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4J Stu - Hack for ME pack to replace sand with end stone in schematics
|
// 4J Stu - Hack for ME pack to replace sand with end stone in schematics
|
||||||
@@ -554,8 +556,8 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk* chunk, AABB* chunkBox,
|
|||||||
e->absMoveTo(targetX, targetY, targetZ, e->yRot, e->xRot);
|
e->absMoveTo(targetX, targetY, targetZ, e->yRot, e->xRot);
|
||||||
}
|
}
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
Log::info("Adding entity type %d at (%f,%f,%f)\n", e->GetType(), e->x,
|
app.DebugPrintf("Adding entity type %d at (%f,%f,%f)\n", e->GetType(),
|
||||||
e->y, e->z);
|
e->x, e->y, e->z);
|
||||||
#endif
|
#endif
|
||||||
e->setLevel(chunk->level);
|
e->setLevel(chunk->level);
|
||||||
e->resetSmallId();
|
e->resetSmallId();
|
||||||
@@ -615,7 +617,7 @@ void ConsoleSchematicFile::generateSchematicFile(
|
|||||||
int ySize = yEnd - yStart + 1;
|
int ySize = yEnd - yStart + 1;
|
||||||
int zSize = zEnd - zStart + 1;
|
int zSize = zEnd - zStart + 1;
|
||||||
|
|
||||||
Log::info(
|
app.DebugPrintf(
|
||||||
"Generating schematic file for area (%d,%d,%d) to (%d,%d,%d), "
|
"Generating schematic file for area (%d,%d,%d) to (%d,%d,%d), "
|
||||||
"%dx%dx%d\n",
|
"%dx%dx%d\n",
|
||||||
xStart, yStart, zStart, xEnd, yEnd, zEnd, xSize, ySize, zSize);
|
xStart, yStart, zStart, xEnd, yEnd, zEnd, xSize, ySize, zSize);
|
||||||
+21
@@ -13,6 +13,7 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "app/linux/Stubs/winapi_stubs.h"
|
||||||
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h"
|
||||||
#include "minecraft/world/phys/Vec3.h"
|
#include "minecraft/world/phys/Vec3.h"
|
||||||
|
|
||||||
@@ -42,6 +43,26 @@ public:
|
|||||||
void decrementRefCount() { --m_refCount; }
|
void decrementRefCount() { --m_refCount; }
|
||||||
bool shouldDelete() { return m_refCount <= 0; }
|
bool shouldDelete() { return m_refCount <= 0; }
|
||||||
|
|
||||||
|
typedef struct _XboxSchematicInitParam {
|
||||||
|
char name[64];
|
||||||
|
int startX;
|
||||||
|
int startY;
|
||||||
|
int startZ;
|
||||||
|
int endX;
|
||||||
|
int endY;
|
||||||
|
int endZ;
|
||||||
|
bool bSaveMobs;
|
||||||
|
|
||||||
|
Compression::ECompressionTypes compressionType;
|
||||||
|
|
||||||
|
_XboxSchematicInitParam() {
|
||||||
|
memset(name, 0, 64 * (sizeof(char)));
|
||||||
|
startX = startY = startZ = endX = endY = endZ = 0;
|
||||||
|
bSaveMobs = false;
|
||||||
|
compressionType = Compression::eCompressionType_None;
|
||||||
|
}
|
||||||
|
} XboxSchematicInitParam;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_xSize, m_ySize, m_zSize;
|
int m_xSize, m_ySize, m_zSize;
|
||||||
std::vector<std::shared_ptr<TileEntity> > m_tileEntities;
|
std::vector<std::shared_ptr<TileEntity> > m_tileEntities;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "minecraft/world/level/GameRules/LevelGenerationOptions.h"
|
#include "LevelGenerationOptions.h"
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
@@ -6,27 +6,28 @@
|
|||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
#include "minecraft/GameEnums.h"
|
||||||
#include "app/common/DLC/DLCGameRulesHeader.h"
|
#include "app/common/DLC/DLCGameRulesHeader.h"
|
||||||
#include "app/common/DLC/DLCManager.h"
|
#include "app/common/DLC/DLCManager.h"
|
||||||
#include "app/common/DLC/DLCPack.h"
|
#include "app/common/DLC/DLCPack.h"
|
||||||
#include "app/common/Game.h"
|
|
||||||
#include "app/common/GameRules/GameRuleManager.h"
|
#include "app/common/GameRules/GameRuleManager.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.h"
|
#include "app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/BiomeOverride.h"
|
#include "app/common/GameRules/LevelGeneration/BiomeOverride.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructure.h"
|
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructure.h"
|
||||||
|
#include "app/common/GameRules/LevelGeneration/ConsoleSchematicFile.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/StartFeature.h"
|
#include "app/common/GameRules/LevelGeneration/StartFeature.h"
|
||||||
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
|
#include "app/common/Localisation/StringTable.h"
|
||||||
|
#include "app/linux/LinuxGame.h"
|
||||||
|
#include "app/linux/Stubs/winapi_stubs.h"
|
||||||
#include "java/File.h"
|
#include "java/File.h"
|
||||||
#include "java/InputOutputStream/ByteArrayInputStream.h"
|
#include "java/InputOutputStream/ByteArrayInputStream.h"
|
||||||
#include "java/InputOutputStream/DataInputStream.h"
|
#include "java/InputOutputStream/DataInputStream.h"
|
||||||
#include "java/InputOutputStream/DataOutputStream.h"
|
#include "java/InputOutputStream/DataOutputStream.h"
|
||||||
#include "minecraft/GameEnums.h"
|
|
||||||
#include "minecraft/Pos.h"
|
#include "minecraft/Pos.h"
|
||||||
#include "minecraft/locale/StringTable.h"
|
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
|
||||||
#include "minecraft/world/level/Level.h"
|
#include "minecraft/world/level/Level.h"
|
||||||
#include "minecraft/world/level/chunk/LevelChunk.h"
|
#include "minecraft/world/level/chunk/LevelChunk.h"
|
||||||
#include "minecraft/world/level/dimension/Dimension.h"
|
#include "minecraft/world/level/dimension/Dimension.h"
|
||||||
#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h"
|
|
||||||
#include "minecraft/world/level/levelgen/structure/BoundingBox.h"
|
#include "minecraft/world/level/levelgen/structure/BoundingBox.h"
|
||||||
#include "minecraft/world/phys/AABB.h"
|
#include "minecraft/world/phys/AABB.h"
|
||||||
#include "platform/fs/fs.h"
|
#include "platform/fs/fs.h"
|
||||||
@@ -440,7 +441,8 @@ ConsoleSchematicFile* LevelGenerationOptions::loadSchematicFile(
|
|||||||
auto it = m_schematics.find(filename);
|
auto it = m_schematics.find(filename);
|
||||||
if (it != m_schematics.end()) {
|
if (it != m_schematics.end()) {
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
printf("We have already loaded schematic file %s\n", filename.c_str());
|
printf("We have already loaded schematic file %s\n",
|
||||||
|
filename.c_str());
|
||||||
#endif
|
#endif
|
||||||
it->second->incrementRefCount();
|
it->second->incrementRefCount();
|
||||||
return it->second;
|
return it->second;
|
||||||
@@ -469,7 +471,8 @@ ConsoleSchematicFile* LevelGenerationOptions::getSchematicFile(
|
|||||||
return schematic;
|
return schematic;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LevelGenerationOptions::releaseSchematicFile(const std::string& filename) {
|
void LevelGenerationOptions::releaseSchematicFile(
|
||||||
|
const std::string& filename) {
|
||||||
// 4J Stu - We don't want to delete them when done, but probably want to
|
// 4J Stu - We don't want to delete them when done, but probably want to
|
||||||
// keep a set of active schematics for the current world
|
// keep a set of active schematics for the current world
|
||||||
// auto it = m_schematics.find(filename);
|
// auto it = m_schematics.find(filename);
|
||||||
@@ -553,7 +556,7 @@ void LevelGenerationOptions::loadBaseSaveData() {
|
|||||||
[this](int pad, std::uint32_t err, std::uint32_t lic) {
|
[this](int pad, std::uint32_t err, std::uint32_t lic) {
|
||||||
return onPackMounted(pad, err, lic);
|
return onPackMounted(pad, err, lic);
|
||||||
},
|
},
|
||||||
"WPACK") != 997 /* ERROR_IO_PENDING */) {
|
"WPACK") != ERROR_IO_PENDING) {
|
||||||
// corrupt DLC
|
// corrupt DLC
|
||||||
setLoadedData();
|
setLoadedData();
|
||||||
app.DebugPrintf("Failed to mount LGO DLC %d for pad %d\n",
|
app.DebugPrintf("Failed to mount LGO DLC %d for pad %d\n",
|
||||||
@@ -574,7 +577,7 @@ int LevelGenerationOptions::onPackMounted(int iPad, uint32_t dwErr,
|
|||||||
uint32_t dwLicenceMask) {
|
uint32_t dwLicenceMask) {
|
||||||
LevelGenerationOptions* lgo = this;
|
LevelGenerationOptions* lgo = this;
|
||||||
lgo->m_bLoadingData = false;
|
lgo->m_bLoadingData = false;
|
||||||
if (dwErr != 0 /* ERROR_SUCCESS */) {
|
if (dwErr != ERROR_SUCCESS) {
|
||||||
// corrupt DLC
|
// corrupt DLC
|
||||||
app.DebugPrintf("Failed to mount LGO DLC for pad %d: %d\n", iPad,
|
app.DebugPrintf("Failed to mount LGO DLC for pad %d: %d\n", iPad,
|
||||||
dwErr);
|
dwErr);
|
||||||
@@ -625,8 +628,7 @@ int LevelGenerationOptions::onPackMounted(int iPad, uint32_t dwErr,
|
|||||||
uint8_t* pbData = (uint8_t*)new uint8_t[dwFileSize];
|
uint8_t* pbData = (uint8_t*)new uint8_t[dwFileSize];
|
||||||
auto readResult = PlatformFilesystem.readFile(
|
auto readResult = PlatformFilesystem.readFile(
|
||||||
save.getPath(), pbData, dwFileSize);
|
save.getPath(), pbData, dwFileSize);
|
||||||
if (readResult.status !=
|
if (readResult.status != IPlatformFilesystem::ReadStatus::Ok) {
|
||||||
IPlatformFilesystem::ReadStatus::Ok) {
|
|
||||||
app.FatalLoadError();
|
app.FatalLoadError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -8,9 +8,10 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "minecraft/locale/StringTable.h"
|
#include "app/common/DLC/DLCPack.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
|
#include "app/common/Localisation/StringTable.h"
|
||||||
#include "minecraft/world/level/levelgen/structure/StructureFeature.h"
|
#include "minecraft/world/level/levelgen/structure/StructureFeature.h"
|
||||||
|
|
||||||
class ApplySchematicRuleDefinition;
|
class ApplySchematicRuleDefinition;
|
||||||
@@ -188,8 +189,7 @@ private:
|
|||||||
bool m_bHaveMinY;
|
bool m_bHaveMinY;
|
||||||
int m_minY;
|
int m_minY;
|
||||||
std::unordered_map<std::string, ConsoleSchematicFile*> m_schematics;
|
std::unordered_map<std::string, ConsoleSchematicFile*> m_schematics;
|
||||||
std::unordered_map<ChunkRuleCacheKey, ChunkRuleCacheEntry,
|
std::unordered_map<ChunkRuleCacheKey, ChunkRuleCacheEntry, ChunkRuleCacheKeyHash>
|
||||||
ChunkRuleCacheKeyHash>
|
|
||||||
m_chunkRuleCache;
|
m_chunkRuleCache;
|
||||||
std::vector<BiomeOverride*> m_biomeOverrides;
|
std::vector<BiomeOverride*> m_biomeOverrides;
|
||||||
std::vector<StartFeature*> m_features;
|
std::vector<StartFeature*> m_features;
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "minecraft/world/level/GameRules/LevelGenerationOptions.h"
|
#include "LevelGenerationOptions.h"
|
||||||
|
|
||||||
LevelGenerators::LevelGenerators() {}
|
LevelGenerators::LevelGenerators() {}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#include "StartFeature.h"
|
#include "StartFeature.h"
|
||||||
|
|
||||||
#include "app/common/Game.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "java/InputOutputStream/DataOutputStream.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "app/linux/LinuxGame.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
|
||||||
#include "util/StringHelpers.h"
|
#include "util/StringHelpers.h"
|
||||||
|
#include "java/InputOutputStream/DataOutputStream.h"
|
||||||
|
|
||||||
StartFeature::StartFeature() {
|
StartFeature::StartFeature() {
|
||||||
m_chunkX = 0;
|
m_chunkX = 0;
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
#include "minecraft/world/level/levelgen/structure/StructureFeature.h"
|
#include "minecraft/world/level/levelgen/structure/StructureFeature.h"
|
||||||
|
|
||||||
class StartFeature : public GameRuleDefinition {
|
class StartFeature : public GameRuleDefinition {
|
||||||
|
|||||||
+5
-5
@@ -1,12 +1,12 @@
|
|||||||
#include "XboxStructureActionGenerateBox.h"
|
#include "XboxStructureActionGenerateBox.h"
|
||||||
|
|
||||||
#include "app/common/Game.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
||||||
#include "java/InputOutputStream/DataOutputStream.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "app/linux/LinuxGame.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
|
||||||
#include "minecraft/world/level/levelgen/structure/StructurePiece.h"
|
|
||||||
#include "util/StringHelpers.h"
|
#include "util/StringHelpers.h"
|
||||||
|
#include "java/InputOutputStream/DataOutputStream.h"
|
||||||
|
#include "minecraft/world/level/levelgen/structure/StructurePiece.h"
|
||||||
|
|
||||||
XboxStructureActionGenerateBox::XboxStructureActionGenerateBox() {
|
XboxStructureActionGenerateBox::XboxStructureActionGenerateBox() {
|
||||||
m_x0 = m_y0 = m_z0 = m_x1 = m_y1 = m_z1 = m_edgeTile = m_fillTile = 0;
|
m_x0 = m_y0 = m_z0 = m_x1 = m_y1 = m_z1 = m_edgeTile = m_fillTile = 0;
|
||||||
|
|||||||
+1
-1
@@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
|
||||||
|
|
||||||
class StructurePiece;
|
class StructurePiece;
|
||||||
class Level;
|
class Level;
|
||||||
|
|||||||
+5
-5
@@ -1,12 +1,12 @@
|
|||||||
#include "XboxStructureActionPlaceBlock.h"
|
#include "XboxStructureActionPlaceBlock.h"
|
||||||
|
|
||||||
#include "app/common/Game.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
||||||
#include "java/InputOutputStream/DataOutputStream.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "app/linux/LinuxGame.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
|
||||||
#include "minecraft/world/level/levelgen/structure/StructurePiece.h"
|
|
||||||
#include "util/StringHelpers.h"
|
#include "util/StringHelpers.h"
|
||||||
|
#include "java/InputOutputStream/DataOutputStream.h"
|
||||||
|
#include "minecraft/world/level/levelgen/structure/StructurePiece.h"
|
||||||
|
|
||||||
XboxStructureActionPlaceBlock::XboxStructureActionPlaceBlock() {
|
XboxStructureActionPlaceBlock::XboxStructureActionPlaceBlock() {
|
||||||
m_x = m_y = m_z = m_tile = m_data = 0;
|
m_x = m_y = m_z = m_tile = m_data = 0;
|
||||||
|
|||||||
+1
-1
@@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
|
||||||
|
|
||||||
class StructurePiece;
|
class StructurePiece;
|
||||||
class Level;
|
class Level;
|
||||||
|
|||||||
+3
-3
@@ -4,17 +4,17 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "app/common/Game.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h"
|
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h"
|
||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/AddItemRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/AddItemRuleDefinition.h"
|
||||||
|
#include "app/linux/LinuxGame.h"
|
||||||
|
#include "util/StringHelpers.h"
|
||||||
#include "minecraft/world/Container.h"
|
#include "minecraft/world/Container.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
|
||||||
#include "minecraft/world/level/Level.h"
|
#include "minecraft/world/level/Level.h"
|
||||||
#include "minecraft/world/level/levelgen/structure/BoundingBox.h"
|
#include "minecraft/world/level/levelgen/structure/BoundingBox.h"
|
||||||
#include "minecraft/world/level/levelgen/structure/StructurePiece.h"
|
#include "minecraft/world/level/levelgen/structure/StructurePiece.h"
|
||||||
#include "minecraft/world/level/tile/Tile.h"
|
#include "minecraft/world/level/tile/Tile.h"
|
||||||
#include "minecraft/world/level/tile/entity/TileEntity.h"
|
#include "minecraft/world/level/tile/entity/TileEntity.h"
|
||||||
#include "util/StringHelpers.h"
|
|
||||||
|
|
||||||
XboxStructureActionPlaceContainer::XboxStructureActionPlaceContainer() {
|
XboxStructureActionPlaceContainer::XboxStructureActionPlaceContainer() {
|
||||||
m_tile = Tile::chest_Id;
|
m_tile = Tile::chest_Id;
|
||||||
|
|||||||
+1
-1
@@ -3,8 +3,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "XboxStructureActionPlaceBlock.h"
|
#include "XboxStructureActionPlaceBlock.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
|
||||||
|
|
||||||
class AddItemRuleDefinition;
|
class AddItemRuleDefinition;
|
||||||
class StructurePiece;
|
class StructurePiece;
|
||||||
|
|||||||
+4
-3
@@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h"
|
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h"
|
||||||
#include "java/InputOutputStream/DataOutputStream.h"
|
#include "java/InputOutputStream/DataOutputStream.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
|
||||||
#include "minecraft/world/level/Level.h"
|
#include "minecraft/world/level/Level.h"
|
||||||
#include "minecraft/world/level/levelgen/structure/BoundingBox.h"
|
#include "minecraft/world/level/levelgen/structure/BoundingBox.h"
|
||||||
#include "minecraft/world/level/levelgen/structure/StructurePiece.h"
|
#include "minecraft/world/level/levelgen/structure/StructurePiece.h"
|
||||||
@@ -33,8 +33,9 @@ void XboxStructureActionPlaceSpawner::addAttribute(
|
|||||||
if (attributeName.compare("entity") == 0) {
|
if (attributeName.compare("entity") == 0) {
|
||||||
m_entityId = attributeValue;
|
m_entityId = attributeValue;
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
printf("XboxStructureActionPlaceSpawner: Adding parameter entity=%s\n",
|
printf(
|
||||||
m_entityId.c_str());
|
"XboxStructureActionPlaceSpawner: Adding parameter entity=%s\n",
|
||||||
|
m_entityId.c_str());
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
XboxStructureActionPlaceBlock::addAttribute(attributeName,
|
XboxStructureActionPlaceBlock::addAttribute(attributeName,
|
||||||
|
|||||||
+1
-1
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "XboxStructureActionPlaceBlock.h"
|
#include "XboxStructureActionPlaceBlock.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
|
||||||
|
|
||||||
class StructurePiece;
|
class StructurePiece;
|
||||||
class Level;
|
class Level;
|
||||||
|
|||||||
+4
-4
@@ -3,7 +3,10 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "app/common/Game.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
|
#include "app/linux/LinuxGame.h"
|
||||||
|
#include "util/StringHelpers.h"
|
||||||
#include "java/InputOutputStream/DataOutputStream.h"
|
#include "java/InputOutputStream/DataOutputStream.h"
|
||||||
#include "minecraft/world/item/EnchantedBookItem.h"
|
#include "minecraft/world/item/EnchantedBookItem.h"
|
||||||
#include "minecraft/world/item/Item.h"
|
#include "minecraft/world/item/Item.h"
|
||||||
@@ -11,9 +14,6 @@
|
|||||||
#include "minecraft/world/item/enchantment/Enchantment.h"
|
#include "minecraft/world/item/enchantment/Enchantment.h"
|
||||||
#include "minecraft/world/item/enchantment/EnchantmentCategory.h"
|
#include "minecraft/world/item/enchantment/EnchantmentCategory.h"
|
||||||
#include "minecraft/world/item/enchantment/EnchantmentInstance.h"
|
#include "minecraft/world/item/enchantment/EnchantmentInstance.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
|
||||||
#include "util/StringHelpers.h"
|
|
||||||
|
|
||||||
AddEnchantmentRuleDefinition::AddEnchantmentRuleDefinition() {
|
AddEnchantmentRuleDefinition::AddEnchantmentRuleDefinition() {
|
||||||
m_enchantmentId = m_enchantmentLevel = 0;
|
m_enchantmentId = m_enchantmentLevel = 0;
|
||||||
|
|||||||
+2
-2
@@ -3,8 +3,8 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "GameRuleDefinition.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
|
|
||||||
class ItemInstance;
|
class ItemInstance;
|
||||||
|
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "AddEnchantmentRuleDefinition.h"
|
#include "AddEnchantmentRuleDefinition.h"
|
||||||
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
|
#include "util/StringHelpers.h"
|
||||||
#include "java/InputOutputStream/DataOutputStream.h"
|
#include "java/InputOutputStream/DataOutputStream.h"
|
||||||
#include "minecraft/world/Container.h"
|
#include "minecraft/world/Container.h"
|
||||||
#include "minecraft/world/entity/player/Inventory.h"
|
#include "minecraft/world/entity/player/Inventory.h"
|
||||||
#include "minecraft/world/item/Item.h"
|
#include "minecraft/world/item/Item.h"
|
||||||
#include "minecraft/world/item/ItemInstance.h"
|
#include "minecraft/world/item/ItemInstance.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
|
||||||
#include "util/StringHelpers.h"
|
|
||||||
|
|
||||||
AddItemRuleDefinition::AddItemRuleDefinition() {
|
AddItemRuleDefinition::AddItemRuleDefinition() {
|
||||||
m_itemId = m_quantity = m_auxValue = m_dataTag = 0;
|
m_itemId = m_quantity = m_auxValue = m_dataTag = 0;
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "GameRuleDefinition.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
|
|
||||||
class Container;
|
class Container;
|
||||||
class AddEnchantmentRuleDefinition;
|
class AddEnchantmentRuleDefinition;
|
||||||
|
|||||||
+8
-7
@@ -1,15 +1,15 @@
|
|||||||
#include "CollectItemRuleDefinition.h"
|
#include "CollectItemRuleDefinition.h"
|
||||||
|
|
||||||
#include "app/common/Game.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
|
#include "app/common/GameRules/LevelRules/Rules/GameRule.h"
|
||||||
|
#include "app/common/GameRules/LevelRules/Rules/GameRulesInstance.h"
|
||||||
|
#include "app/linux/LinuxGame.h"
|
||||||
|
#include "util/StringHelpers.h"
|
||||||
#include "java/InputOutputStream/DataOutputStream.h"
|
#include "java/InputOutputStream/DataOutputStream.h"
|
||||||
#include "minecraft/network/Connection.h"
|
#include "minecraft/network/Connection.h"
|
||||||
#include "minecraft/network/packet/UpdateGameRuleProgressPacket.h"
|
#include "minecraft/network/packet/UpdateGameRuleProgressPacket.h"
|
||||||
#include "minecraft/world/item/ItemInstance.h"
|
#include "minecraft/world/item/ItemInstance.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
|
||||||
#include "minecraft/world/level/GameRules/GameRule.h"
|
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
|
||||||
#include "minecraft/world/level/GameRules/GameRulesInstance.h"
|
|
||||||
#include "util/StringHelpers.h"
|
|
||||||
|
|
||||||
CollectItemRuleDefinition::CollectItemRuleDefinition() {
|
CollectItemRuleDefinition::CollectItemRuleDefinition() {
|
||||||
m_itemId = 0;
|
m_itemId = 0;
|
||||||
@@ -111,7 +111,8 @@ std::string CollectItemRuleDefinition::generateXml(
|
|||||||
"\" quantity=\"SET\" descriptionName=\"OPTIONAL\" "
|
"\" quantity=\"SET\" descriptionName=\"OPTIONAL\" "
|
||||||
"promptName=\"OPTIONAL\"";
|
"promptName=\"OPTIONAL\"";
|
||||||
if (item->getAuxValue() != 0)
|
if (item->getAuxValue() != 0)
|
||||||
xml += " auxValue=\"" + toWString<int>(item->getAuxValue()) + "\"";
|
xml +=
|
||||||
|
" auxValue=\"" + toWString<int>(item->getAuxValue()) + "\"";
|
||||||
if (item->get4JData() != 0)
|
if (item->get4JData() != 0)
|
||||||
xml += " dataTag=\"" + toWString<int>(item->get4JData()) + "\"";
|
xml += " dataTag=\"" + toWString<int>(item->get4JData()) + "\"";
|
||||||
xml += "/>\n";
|
xml += "/>\n";
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "GameRuleDefinition.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRulesInstance.h"
|
#include "app/common/GameRules/LevelRules/Rules/GameRulesInstance.h"
|
||||||
|
|
||||||
class Pos;
|
class Pos;
|
||||||
class UseTileRuleDefinition;
|
class UseTileRuleDefinition;
|
||||||
|
|||||||
+4
-4
@@ -4,13 +4,13 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "app/common/Game.h"
|
|
||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.h"
|
||||||
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
|
#include "app/common/GameRules/LevelRules/Rules/GameRule.h"
|
||||||
|
#include "app/linux/LinuxGame.h"
|
||||||
|
#include "util/StringHelpers.h"
|
||||||
#include "minecraft/network/Connection.h"
|
#include "minecraft/network/Connection.h"
|
||||||
#include "minecraft/network/packet/UpdateGameRuleProgressPacket.h"
|
#include "minecraft/network/packet/UpdateGameRuleProgressPacket.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRule.h"
|
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
|
||||||
#include "util/StringHelpers.h"
|
|
||||||
|
|
||||||
void CompleteAllRuleDefinition::getChildren(
|
void CompleteAllRuleDefinition::getChildren(
|
||||||
std::vector<GameRuleDefinition*>* children) {
|
std::vector<GameRuleDefinition*>* children) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "CompoundGameRuleDefinition.h"
|
#include "CompoundGameRuleDefinition.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
|
|
||||||
class GameRule;
|
class GameRule;
|
||||||
|
|
||||||
@@ -25,8 +25,8 @@ public:
|
|||||||
virtual bool onCollectItem(GameRule* rule,
|
virtual bool onCollectItem(GameRule* rule,
|
||||||
std::shared_ptr<ItemInstance> item);
|
std::shared_ptr<ItemInstance> item);
|
||||||
|
|
||||||
static std::string generateDescriptionString(const std::string& description,
|
static std::string generateDescriptionString(
|
||||||
void* data, int dataLength);
|
const std::string& description, void* data, int dataLength);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateStatus(GameRule* rule);
|
void updateStatus(GameRule* rule);
|
||||||
|
|||||||
+4
-4
@@ -7,14 +7,14 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CollectItemRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/CollectItemRuleDefinition.h"
|
||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.h"
|
||||||
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/UpdatePlayerRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/UpdatePlayerRuleDefinition.h"
|
||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/UseTileRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/UseTileRuleDefinition.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "app/common/GameRules/LevelRules/Rules/GameRule.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRule.h"
|
#include "app/common/GameRules/LevelRules/Rules/GameRulesInstance.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
|
||||||
#include "minecraft/world/level/GameRules/GameRulesInstance.h"
|
|
||||||
#include "util/StringHelpers.h"
|
#include "util/StringHelpers.h"
|
||||||
|
|
||||||
CompoundGameRuleDefinition::CompoundGameRuleDefinition() {
|
CompoundGameRuleDefinition::CompoundGameRuleDefinition() {
|
||||||
|
|||||||
+3
-3
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "GameRuleDefinition.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRulesInstance.h"
|
#include "app/common/GameRules/LevelRules/Rules/GameRulesInstance.h"
|
||||||
|
|
||||||
class CompoundGameRuleDefinition : public GameRuleDefinition {
|
class CompoundGameRuleDefinition : public GameRuleDefinition {
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
@@ -8,14 +8,14 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "app/common/Game.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.h"
|
||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h"
|
||||||
#include "java/InputOutputStream/DataOutputStream.h"
|
#include "app/common/GameRules/LevelRules/Rules/GameRule.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "app/common/GameRules/LevelRules/Rules/GameRulesInstance.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRule.h"
|
#include "app/linux/LinuxGame.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRulesInstance.h"
|
|
||||||
#include "util/StringHelpers.h"
|
#include "util/StringHelpers.h"
|
||||||
|
#include "java/InputOutputStream/DataOutputStream.h"
|
||||||
|
|
||||||
class Connection;
|
class Connection;
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ GameRuleDefinition* GameRuleDefinition::addChild(
|
|||||||
ConsoleGameRules::EGameRuleType ruleType) {
|
ConsoleGameRules::EGameRuleType ruleType) {
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
printf("GameRuleDefinition: Attempted to add invalid child rule - %d\n",
|
printf("GameRuleDefinition: Attempted to add invalid child rule - %d\n",
|
||||||
ruleType);
|
ruleType);
|
||||||
#endif
|
#endif
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
@@ -77,13 +77,13 @@ void GameRuleDefinition::addAttribute(const std::string& attributeName,
|
|||||||
m_descriptionId = attributeValue;
|
m_descriptionId = attributeValue;
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
printf("GameRuleDefinition: Adding parameter descriptionId=%s\n",
|
printf("GameRuleDefinition: Adding parameter descriptionId=%s\n",
|
||||||
m_descriptionId.c_str());
|
m_descriptionId.c_str());
|
||||||
#endif
|
#endif
|
||||||
} else if (attributeName.compare("promptName") == 0) {
|
} else if (attributeName.compare("promptName") == 0) {
|
||||||
m_promptId = attributeValue;
|
m_promptId = attributeValue;
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
printf("GameRuleDefinition: Adding parameter m_promptId=%s\n",
|
printf("GameRuleDefinition: Adding parameter m_promptId=%s\n",
|
||||||
m_promptId.c_str());
|
m_promptId.c_str());
|
||||||
#endif
|
#endif
|
||||||
} else if (attributeName.compare("dataTag") == 0) {
|
} else if (attributeName.compare("dataTag") == 0) {
|
||||||
m_4JDataValue = fromWString<int>(attributeValue);
|
m_4JDataValue = fromWString<int>(attributeValue);
|
||||||
@@ -92,8 +92,9 @@ void GameRuleDefinition::addAttribute(const std::string& attributeName,
|
|||||||
m_4JDataValue);
|
m_4JDataValue);
|
||||||
} else {
|
} else {
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
printf("GameRuleDefinition: Attempted to add invalid attribute: %s\n",
|
printf(
|
||||||
attributeName.c_str());
|
"GameRuleDefinition: Attempted to add invalid attribute: %s\n",
|
||||||
|
attributeName.c_str());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-4
@@ -6,9 +6,9 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
|
#include "app/common/GameRules/LevelRules/Rules/GameRulesInstance.h"
|
||||||
#include "minecraft/world/item/ItemInstance.h"
|
#include "minecraft/world/item/ItemInstance.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
|
||||||
#include "minecraft/world/level/GameRules/GameRulesInstance.h"
|
|
||||||
|
|
||||||
class GameRule;
|
class GameRule;
|
||||||
class LevelRuleset;
|
class LevelRuleset;
|
||||||
@@ -81,6 +81,7 @@ public:
|
|||||||
GameRulesInstance::EGameRulesInstanceType type, LevelRuleset* rules,
|
GameRulesInstance::EGameRulesInstanceType type, LevelRuleset* rules,
|
||||||
Connection* connection);
|
Connection* connection);
|
||||||
static std::string generateDescriptionString(
|
static std::string generateDescriptionString(
|
||||||
ConsoleGameRules::EGameRuleType defType, const std::string& description,
|
ConsoleGameRules::EGameRuleType defType,
|
||||||
void* data = nullptr, int dataLength = 0);
|
const std::string& description, void* data = nullptr,
|
||||||
|
int dataLength = 0);
|
||||||
};
|
};
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#include "LevelRuleset.h"
|
#include "LevelRuleset.h"
|
||||||
|
|
||||||
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.h"
|
||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/NamedAreaRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/NamedAreaRuleDefinition.h"
|
||||||
#include "minecraft/locale/StringTable.h"
|
#include "app/common/Localisation/StringTable.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
|
||||||
|
|
||||||
class AABB;
|
class AABB;
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "CompoundGameRuleDefinition.h"
|
#include "CompoundGameRuleDefinition.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
|
|
||||||
class NamedAreaRuleDefinition;
|
class NamedAreaRuleDefinition;
|
||||||
class AABB;
|
class AABB;
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
|
||||||
#include "app/common/Game.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "java/InputOutputStream/DataOutputStream.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "app/linux/LinuxGame.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
|
||||||
#include "util/StringHelpers.h"
|
#include "util/StringHelpers.h"
|
||||||
|
#include "java/InputOutputStream/DataOutputStream.h"
|
||||||
|
|
||||||
NamedAreaRuleDefinition::NamedAreaRuleDefinition() {
|
NamedAreaRuleDefinition::NamedAreaRuleDefinition() {
|
||||||
m_name = "";
|
m_name = "";
|
||||||
@@ -41,7 +41,7 @@ void NamedAreaRuleDefinition::addAttribute(const std::string& attributeName,
|
|||||||
m_name = attributeValue;
|
m_name = attributeValue;
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
printf("NamedAreaRuleDefinition: Adding parameter name=%s\n",
|
printf("NamedAreaRuleDefinition: Adding parameter name=%s\n",
|
||||||
m_name.c_str());
|
m_name.c_str());
|
||||||
#endif
|
#endif
|
||||||
} else if (attributeName.compare("x0") == 0) {
|
} else if (attributeName.compare("x0") == 0) {
|
||||||
m_area.x0 = fromWString<int>(attributeValue);
|
m_area.x0 = fromWString<int>(attributeValue);
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "GameRuleDefinition.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "minecraft/world/phys/AABB.h"
|
#include "minecraft/world/phys/AABB.h"
|
||||||
|
|
||||||
class NamedAreaRuleDefinition : public GameRuleDefinition {
|
class NamedAreaRuleDefinition : public GameRuleDefinition {
|
||||||
|
|||||||
+4
-4
@@ -4,16 +4,16 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "app/common/Game.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/AddItemRuleDefinition.h"
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/AddItemRuleDefinition.h"
|
||||||
|
#include "app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h"
|
||||||
|
#include "app/linux/LinuxGame.h"
|
||||||
|
#include "util/StringHelpers.h"
|
||||||
#include "java/InputOutputStream/DataOutputStream.h"
|
#include "java/InputOutputStream/DataOutputStream.h"
|
||||||
#include "minecraft/Pos.h"
|
#include "minecraft/Pos.h"
|
||||||
#include "minecraft/world/entity/player/Inventory.h"
|
#include "minecraft/world/entity/player/Inventory.h"
|
||||||
#include "minecraft/world/entity/player/Player.h"
|
#include "minecraft/world/entity/player/Player.h"
|
||||||
#include "minecraft/world/food/FoodData.h"
|
#include "minecraft/world/food/FoodData.h"
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
|
||||||
#include "util/StringHelpers.h"
|
|
||||||
|
|
||||||
UpdatePlayerRuleDefinition::UpdatePlayerRuleDefinition() {
|
UpdatePlayerRuleDefinition::UpdatePlayerRuleDefinition() {
|
||||||
m_bUpdateHealth = m_bUpdateFood = m_bUpdateYRot = false;
|
m_bUpdateHealth = m_bUpdateFood = m_bUpdateYRot = false;
|
||||||
|
|||||||
+2
-2
@@ -4,8 +4,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
#include "GameRuleDefinition.h"
|
||||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
||||||
|
|
||||||
class AddItemRuleDefinition;
|
class AddItemRuleDefinition;
|
||||||
class Pos;
|
class Pos;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user