mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-28 17:32:54 +00:00
chore: format repo, add format script
This commit is contained in:
parent
50f6bf8e68
commit
347265c362
|
|
@ -1,182 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Heuristic dead-include detector for app/ includes in minecraft/.
|
||||
|
||||
For each minecraft/ source file that includes a header from app/, check
|
||||
whether the file references any of the top-level identifiers that header
|
||||
defines. If zero references, the include is a candidate for removal.
|
||||
|
||||
Usage:
|
||||
python3 scripts/find_dead_app_includes.py [--apply] [DIR ...]
|
||||
|
||||
Without --apply, prints candidates only. With --apply, removes them.
|
||||
DIR is one or more subdirectories of targets/minecraft/ to scope the
|
||||
sweep (e.g. world/entity, server). Defaults to all of targets/minecraft/.
|
||||
|
||||
Caveats:
|
||||
- The "identifiers a header defines" heuristic catches type names,
|
||||
function names, struct/class/enum names, and macros. It can miss
|
||||
constants used through unusual paths and is fooled by includes that
|
||||
are needed only for transitive type completion. Always build clean
|
||||
after applying.
|
||||
- Comments and strings are not stripped from the consumer scan, so a
|
||||
file that mentions an app symbol only in a comment will look "live"
|
||||
and the include is conservatively kept.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parent.parent
|
||||
MINECRAFT_ROOT = REPO_ROOT / "targets" / "minecraft"
|
||||
APP_ROOT = REPO_ROOT / "targets" / "app"
|
||||
|
||||
INCLUDE_RE = re.compile(r'^\s*#\s*include\s*"(app/[^"]+)"\s*$', re.MULTILINE)
|
||||
|
||||
# Identifier-extracting regexes for header analysis. Best-effort.
|
||||
IDENT_RES = [
|
||||
# class/struct/union/enum tag definitions
|
||||
re.compile(r'\b(?:class|struct|union|enum(?:\s+class)?)\s+([A-Za-z_]\w*)'),
|
||||
# typedef NAME or typedef ... NAME;
|
||||
re.compile(r'\btypedef\b[^;]*?\b([A-Za-z_]\w*)\s*(?:\[|;)'),
|
||||
# using NAME = ...
|
||||
re.compile(r'\busing\s+([A-Za-z_]\w*)\s*='),
|
||||
# function declarations: WORD WORD ( where second WORD is identifier
|
||||
# this is too loose; skip in favour of usage by name
|
||||
# #define MACRO
|
||||
re.compile(r'^\s*#\s*define\s+([A-Za-z_]\w*)', re.MULTILINE),
|
||||
# extern variable declarations
|
||||
re.compile(r'\bextern\b[^;]*?\b([A-Za-z_]\w*)\s*[;\[(]'),
|
||||
]
|
||||
|
||||
CXX_KEYWORDS = {
|
||||
"if", "else", "while", "for", "do", "switch", "case", "default",
|
||||
"break", "continue", "return", "void", "int", "char", "short", "long",
|
||||
"float", "double", "bool", "true", "false", "nullptr", "class", "struct",
|
||||
"union", "enum", "namespace", "using", "typedef", "template", "typename",
|
||||
"const", "constexpr", "static", "extern", "inline", "virtual", "override",
|
||||
"final", "public", "private", "protected", "friend", "this", "new",
|
||||
"delete", "sizeof", "auto", "decltype", "operator", "throw", "try",
|
||||
"catch", "noexcept", "mutable", "volatile", "register", "explicit",
|
||||
"signed", "unsigned", "wchar_t", "char8_t", "char16_t", "char32_t",
|
||||
"size_t", "ptrdiff_t", "nullptr_t", "ifndef", "ifdef", "endif", "define",
|
||||
"include", "pragma", "elif", "error", "warning", "line", "undef",
|
||||
"alignas", "alignof", "concept", "requires", "co_await", "co_yield",
|
||||
"co_return", "consteval", "constinit", "static_cast", "dynamic_cast",
|
||||
"reinterpret_cast", "const_cast",
|
||||
}
|
||||
|
||||
|
||||
def extract_header_identifiers(header_path: Path) -> set[str]:
|
||||
"""Best-effort extraction of identifiers a header defines."""
|
||||
if not header_path.exists():
|
||||
return set()
|
||||
try:
|
||||
text = header_path.read_text(encoding="utf-8", errors="surrogateescape")
|
||||
except OSError:
|
||||
return set()
|
||||
idents: set[str] = set()
|
||||
for regex in IDENT_RES:
|
||||
for match in regex.finditer(text):
|
||||
name = match.group(1)
|
||||
if name and name not in CXX_KEYWORDS and not name.startswith("_"):
|
||||
idents.add(name)
|
||||
return idents
|
||||
|
||||
|
||||
def file_references_any(file_text: str, idents: set[str]) -> bool:
|
||||
"""Check if any identifier appears as a whole-word match in the file."""
|
||||
if not idents:
|
||||
return False
|
||||
# Build one big alternation
|
||||
pattern = r'\b(?:' + '|'.join(re.escape(i) for i in idents) + r')\b'
|
||||
return re.search(pattern, file_text) is not None
|
||||
|
||||
|
||||
def collect_minecraft_files(roots: list[Path]) -> list[Path]:
|
||||
files: list[Path] = []
|
||||
for root in roots:
|
||||
for dirpath, _dirnames, filenames in os.walk(root):
|
||||
for name in filenames:
|
||||
if name.endswith((".cpp", ".c", ".h", ".hpp")):
|
||||
files.append(Path(dirpath) / name)
|
||||
files.sort()
|
||||
return files
|
||||
|
||||
|
||||
def analyse(roots: list[Path], apply: bool) -> int:
|
||||
files = collect_minecraft_files(roots)
|
||||
header_cache: dict[str, set[str]] = {}
|
||||
candidate_count = 0
|
||||
|
||||
for path in files:
|
||||
try:
|
||||
text = path.read_text(encoding="utf-8", errors="surrogateescape")
|
||||
except OSError:
|
||||
continue
|
||||
includes = INCLUDE_RE.findall(text)
|
||||
if not includes:
|
||||
continue
|
||||
# Strip the include lines from the text we scan for symbols, so we
|
||||
# don't false-positive on the include path itself mentioning the
|
||||
# symbol name (e.g. ColourTable.h).
|
||||
scan_text = INCLUDE_RE.sub("", text)
|
||||
dead_includes: list[str] = []
|
||||
for include_path in includes:
|
||||
cache_key = include_path
|
||||
if cache_key not in header_cache:
|
||||
header_path = REPO_ROOT / "targets" / include_path
|
||||
header_cache[cache_key] = extract_header_identifiers(header_path)
|
||||
idents = header_cache[cache_key]
|
||||
if not idents:
|
||||
# Header has no extractable identifiers (or doesn't exist).
|
||||
# Conservatively skip - don't claim it's dead.
|
||||
continue
|
||||
if not file_references_any(scan_text, idents):
|
||||
dead_includes.append(include_path)
|
||||
if dead_includes:
|
||||
candidate_count += len(dead_includes)
|
||||
rel = path.relative_to(REPO_ROOT)
|
||||
for inc in dead_includes:
|
||||
print(f"{rel}: {inc}")
|
||||
if apply:
|
||||
new_text = text
|
||||
for inc in dead_includes:
|
||||
pattern = re.compile(
|
||||
r'^\s*#\s*include\s*"' + re.escape(inc) + r'"\s*\n',
|
||||
re.MULTILINE,
|
||||
)
|
||||
new_text = pattern.sub("", new_text)
|
||||
path.write_text(new_text, encoding="utf-8", errors="surrogateescape")
|
||||
|
||||
print(f"\n{candidate_count} candidate dead include lines"
|
||||
f" {'removed' if apply else 'identified'}")
|
||||
return 0
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--apply", action="store_true",
|
||||
help="Actually remove the candidate includes")
|
||||
parser.add_argument("dirs", nargs="*",
|
||||
help="Subdirectories of targets/minecraft/ to scan")
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.dirs:
|
||||
roots = [MINECRAFT_ROOT / d for d in args.dirs]
|
||||
for r in roots:
|
||||
if not r.exists():
|
||||
print(f"error: {r} does not exist", file=sys.stderr)
|
||||
return 1
|
||||
else:
|
||||
roots = [MINECRAFT_ROOT]
|
||||
|
||||
return analyse(roots, args.apply)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
183
scripts/format.py
Normal file
183
scripts/format.py
Normal file
|
|
@ -0,0 +1,183 @@
|
|||
#!/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,108 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Conservative sweep: remove dead app/linux/LinuxGame.h includes from minecraft/.
|
||||
|
||||
LinuxGame.h is included by 155 files in targets/minecraft/ but most of
|
||||
those are leftover from before the IGameServices refactor. The only real
|
||||
reasons to include it are:
|
||||
- to use the global `LinuxGame app;` extern
|
||||
- to use the LinuxGame class type by name
|
||||
- to use C4JStringTable (forward-declared in the header)
|
||||
|
||||
For each minecraft/ file that includes LinuxGame.h, this script checks
|
||||
whether the file references any of: LinuxGame, C4JStringTable, or
|
||||
contains `app.`/`app::`. If none of those appear, the include is dead
|
||||
and removed.
|
||||
|
||||
Usage:
|
||||
python3 scripts/sweep_linuxgame_includes.py [--apply]
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parent.parent
|
||||
MINECRAFT_ROOT = REPO_ROOT / "targets" / "minecraft"
|
||||
|
||||
INCLUDE_RE = re.compile(
|
||||
r'^[ \t]*#[ \t]*include[ \t]*"app/linux/LinuxGame\.h"[ \t]*\n',
|
||||
re.MULTILINE,
|
||||
)
|
||||
|
||||
# Patterns that mean the include is genuinely needed.
|
||||
# LinuxGame.h transitively pulls in Game.h (LinuxGame : public Game), so any
|
||||
# reference to the Game class also keeps the include alive.
|
||||
USAGE_PATTERNS = [
|
||||
re.compile(r'\bLinuxGame\b'),
|
||||
re.compile(r'\bC4JStringTable\b'),
|
||||
re.compile(r'\bapp\s*\.'),
|
||||
re.compile(r'\bapp\s*::'),
|
||||
re.compile(r'\bGame\s*::'),
|
||||
re.compile(r'\bGame\s*\*'),
|
||||
re.compile(r'\bGame\s*&'),
|
||||
re.compile(r'class\s+\w+\s*:\s*(?:public|private|protected)?\s*Game\b'),
|
||||
]
|
||||
|
||||
|
||||
def strip_comments(text: str) -> str:
|
||||
text = re.sub(r'/\*.*?\*/', '', text, flags=re.DOTALL)
|
||||
text = re.sub(r'//[^\n]*', '', text)
|
||||
return text
|
||||
|
||||
|
||||
def file_needs_linuxgame(text: str) -> bool:
|
||||
# Strip the LinuxGame.h include line itself before checking, to avoid
|
||||
# the include path matching `LinuxGame`. Also strip comments so
|
||||
# references in commented-out code don't keep the include alive.
|
||||
scan = INCLUDE_RE.sub("", text)
|
||||
scan = strip_comments(scan)
|
||||
for pat in USAGE_PATTERNS:
|
||||
if pat.search(scan):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--apply", action="store_true",
|
||||
help="Actually remove the dead includes")
|
||||
args = parser.parse_args()
|
||||
|
||||
candidates: list[Path] = []
|
||||
for dirpath, _dirnames, filenames in os.walk(MINECRAFT_ROOT):
|
||||
for name in filenames:
|
||||
if not name.endswith((".cpp", ".c", ".h", ".hpp")):
|
||||
continue
|
||||
path = Path(dirpath) / name
|
||||
try:
|
||||
text = path.read_text(encoding="utf-8", errors="surrogateescape")
|
||||
except OSError:
|
||||
continue
|
||||
if not INCLUDE_RE.search(text):
|
||||
continue
|
||||
if file_needs_linuxgame(text):
|
||||
continue
|
||||
candidates.append(path)
|
||||
|
||||
candidates.sort()
|
||||
for path in candidates:
|
||||
print(path.relative_to(REPO_ROOT))
|
||||
|
||||
print(f"\n{len(candidates)} files have a dead LinuxGame.h include")
|
||||
|
||||
if args.apply:
|
||||
for path in candidates:
|
||||
text = path.read_text(encoding="utf-8", errors="surrogateescape")
|
||||
new_text = INCLUDE_RE.sub("", text)
|
||||
path.write_text(new_text, encoding="utf-8", errors="surrogateescape")
|
||||
print(f"Removed from {len(candidates)} files")
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Conservative sweep: remove dead app/linux/Stubs/winapi_stubs.h includes.
|
||||
|
||||
winapi_stubs.h provides Windows API typedefs and constants for Linux
|
||||
(LARGE_INTEGER, FILETIME, ERROR_*, etc.). Many minecraft/ files include
|
||||
it as transitive leftovers and never actually reference any of those
|
||||
symbols.
|
||||
|
||||
Usage:
|
||||
python3 scripts/sweep_winapi_stubs_includes.py [--apply]
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parent.parent
|
||||
MINECRAFT_ROOT = REPO_ROOT / "targets" / "minecraft"
|
||||
|
||||
INCLUDE_RE = re.compile(
|
||||
r'^[ \t]*#[ \t]*include[ \t]*"app/linux/Stubs/winapi_stubs\.h"[ \t]*\n',
|
||||
re.MULTILINE,
|
||||
)
|
||||
|
||||
# Symbols defined by winapi_stubs.h. If any appear in the consumer, the
|
||||
# include is needed.
|
||||
USAGE_PATTERNS = [
|
||||
re.compile(r'\bLARGE_INTEGER\b'),
|
||||
re.compile(r'\bULARGE_INTEGER\b'),
|
||||
re.compile(r'\bFILETIME\b'),
|
||||
re.compile(r'\bSYSTEMTIME\b'),
|
||||
re.compile(r'\bERROR_SUCCESS\b'),
|
||||
re.compile(r'\bERROR_IO_PENDING\b'),
|
||||
re.compile(r'\bERROR_CANCELLED\b'),
|
||||
re.compile(r'\bMEM_COMMIT\b'),
|
||||
re.compile(r'\bMEM_RESERVE\b'),
|
||||
re.compile(r'\bMEM_DECOMMIT\b'),
|
||||
re.compile(r'\bPAGE_READWRITE\b'),
|
||||
re.compile(r'\bDWORD\b'),
|
||||
re.compile(r'\bBYTE\b'),
|
||||
re.compile(r'\bWORD\b'),
|
||||
re.compile(r'\bHANDLE\b'),
|
||||
re.compile(r'\bHRESULT\b'),
|
||||
re.compile(r'\bGetLastError\b'),
|
||||
re.compile(r'\bGetFileSize\b'),
|
||||
re.compile(r'\bGetSystemTime\b'),
|
||||
re.compile(r'\bSystemTimeToFileTime\b'),
|
||||
re.compile(r'\bMakeAbsoluteSD\b'),
|
||||
re.compile(r'\bSetFilePointer\b'),
|
||||
re.compile(r'\bReadFile\b'),
|
||||
re.compile(r'\bWriteFile\b'),
|
||||
re.compile(r'\bCloseHandle\b'),
|
||||
re.compile(r'\bCreateFile\b'),
|
||||
re.compile(r'\bVirtualAlloc\b'),
|
||||
re.compile(r'\bVirtualFree\b'),
|
||||
re.compile(r'\bSleep\s*\('),
|
||||
re.compile(r'\bWaitForSingleObject\b'),
|
||||
re.compile(r'\bSetEvent\b'),
|
||||
re.compile(r'\bResetEvent\b'),
|
||||
re.compile(r'\bInterlocked'),
|
||||
re.compile(r'\bOutputDebugString\b'),
|
||||
re.compile(r'\bMessageBox\b'),
|
||||
]
|
||||
|
||||
|
||||
def strip_comments(text: str) -> str:
|
||||
"""Strip C++ // and /* */ comments. Approximate but good enough for
|
||||
detecting whether a symbol appears in real code vs commented-out
|
||||
code."""
|
||||
# Strip /* ... */ comments (multiline)
|
||||
text = re.sub(r'/\*.*?\*/', '', text, flags=re.DOTALL)
|
||||
# Strip // ... comments (single line)
|
||||
text = re.sub(r'//[^\n]*', '', text)
|
||||
return text
|
||||
|
||||
|
||||
def needs_winapi(text: str) -> bool:
|
||||
scan = INCLUDE_RE.sub("", text)
|
||||
scan = strip_comments(scan)
|
||||
return any(p.search(scan) for p in USAGE_PATTERNS)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--apply", action="store_true",
|
||||
help="Actually remove the dead includes")
|
||||
args = parser.parse_args()
|
||||
|
||||
candidates: list[Path] = []
|
||||
for dirpath, _dirnames, filenames in os.walk(MINECRAFT_ROOT):
|
||||
for name in filenames:
|
||||
if not name.endswith((".cpp", ".c", ".h", ".hpp")):
|
||||
continue
|
||||
path = Path(dirpath) / name
|
||||
try:
|
||||
text = path.read_text(encoding="utf-8", errors="surrogateescape")
|
||||
except OSError:
|
||||
continue
|
||||
if not INCLUDE_RE.search(text):
|
||||
continue
|
||||
if needs_winapi(text):
|
||||
continue
|
||||
candidates.append(path)
|
||||
|
||||
candidates.sort()
|
||||
for path in candidates:
|
||||
print(path.relative_to(REPO_ROOT))
|
||||
|
||||
print(f"\n{len(candidates)} files have a dead winapi_stubs.h include")
|
||||
|
||||
if args.apply:
|
||||
for path in candidates:
|
||||
text = path.read_text(encoding="utf-8", errors="surrogateescape")
|
||||
new_text = INCLUDE_RE.sub("", text)
|
||||
path.write_text(new_text, encoding="utf-8", errors="surrogateescape")
|
||||
print(f"Removed from {len(candidates)} files")
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
#include <cstdint>
|
||||
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/GameTypes.h"
|
||||
#include "minecraft/client/model/SkinBox.h"
|
||||
#include "platform/network/NetTypes.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "platform/network/NetTypes.h"
|
||||
#include "platform/profile/ProfileConstants.h"
|
||||
#include "platform/storage/storage.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
#include <vector>
|
||||
|
||||
#include "app/common/Audio/ConsoleSoundEngine.h"
|
||||
#include "app/common/Iggy/include/rrCore.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/Iggy/include/rrCore.h"
|
||||
#include "java/Random.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
|
|
@ -20,9 +20,9 @@
|
|||
#include "minecraft/util/Mth.h"
|
||||
#include "minecraft/world/entity/Mob.h"
|
||||
#include "minecraft/world/level/storage/LevelData.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "platform/fs/fs.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
|
||||
#define STB_VORBIS_HEADER_ONLY
|
||||
#include "stb_vorbis.c"
|
||||
|
|
@ -880,4 +880,3 @@ char* SoundEngine::ConvertSoundPathToName(const std::string& name,
|
|||
bool bConvertSpaces) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ class Random;
|
|||
#include <string>
|
||||
|
||||
#include "app/common/Audio/ConsoleSoundEngine.h"
|
||||
#include "app/common/Iggy/include/rrCore.h"
|
||||
#include "app/common/Audio/SoundTypes.h"
|
||||
#include "app/common/Iggy/include/rrCore.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
|
||||
// Forward-declare the miniaudio backing state. The full struct lives in
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
#include "DLCManager.h"
|
||||
#include "app/common/DLC/DLCGameRules.h"
|
||||
#include "app/common/GameRules/GameRuleManager.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/GameRules/GameRuleManager.h"
|
||||
|
||||
class StringTable;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
#include "DLCFile.h"
|
||||
#include "DLCPack.h"
|
||||
#include "app/common/GameRules/GameRuleManager.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"
|
||||
|
|
@ -482,7 +482,7 @@ bool DLCManager::processDLCDataFile(unsigned int& dwFilesProcessed,
|
|||
std::uint8_t* pbTemp =
|
||||
&pbData
|
||||
[dwTemp]; //+
|
||||
//sizeof(IPlatformStorage::DLC_FILE_DETAILS)*ulFileCount;
|
||||
// sizeof(IPlatformStorage::DLC_FILE_DETAILS)*ulFileCount;
|
||||
DLC_READ_DETAIL(&fileBuf, pbData, uiCurrentByte);
|
||||
|
||||
for (unsigned int i = 0; i < uiFileCount; i++) {
|
||||
|
|
|
|||
|
|
@ -1,52 +1,5 @@
|
|||
#include "app/common/Game.h"
|
||||
|
||||
#include "app/common/App_structs.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/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/common/UI/ConsoleUIController.h"
|
||||
#include "java/Class.h"
|
||||
#include "java/File.h"
|
||||
#include "java/Random.h"
|
||||
#include "minecraft/Console_Debug_enum.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/GameHostOptions.h"
|
||||
#include "minecraft/GameTypes.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/Options.h"
|
||||
#include "minecraft/client/ProgressRenderer.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/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 "platform/PlatformTypes.h"
|
||||
#include "platform/XboxStubs.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 <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
|
@ -66,22 +19,69 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "app/common/App_structs.h"
|
||||
#include "app/common/Audio/SoundEngine.h"
|
||||
#include "app/common/DLC/DLCManager.h"
|
||||
#include "app/common/DLC/DLCPack.h"
|
||||
#include "app/common/DLC/DLCSkinFile.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/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/UIScene_FullscreenProgress.h"
|
||||
#include "java/Class.h"
|
||||
#include "java/File.h"
|
||||
#include "java/Random.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/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/EntityRenderer.h"
|
||||
#include "minecraft/client/resources/Colours/ColourTable.h"
|
||||
#include "minecraft/client/skins/DLCTexturePack.h"
|
||||
#include "minecraft/client/skins/TexturePack.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/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"
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
#include <mutex>
|
||||
|
||||
#include "platform/profile/profile.h"
|
||||
#include "platform/storage/storage.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
#include "platform/storage/storage.h"
|
||||
#include "util/Timer.h"
|
||||
|
||||
// using namespace std;
|
||||
|
|
@ -25,7 +25,6 @@
|
|||
#include "app/common/SaveManager.h"
|
||||
#include "app/common/SkinManager.h"
|
||||
#include "app/common/TerrainFeatureManager.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "app/common/UI/All Platforms/ArchiveFile.h"
|
||||
#include "app/common/UI/All Platforms/UIStructs.h"
|
||||
#include "minecraft/client/model/SkinBox.h"
|
||||
|
|
@ -33,8 +32,9 @@
|
|||
#include "minecraft/network/packet/DisconnectPacket.h"
|
||||
#include "minecraft/world/entity/item/MinecartHopper.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "platform/network/NetTypes.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "platform/network/NetTypes.h"
|
||||
|
||||
// JoinFromInviteData moved to NetworkController.h
|
||||
|
||||
|
|
|
|||
|
|
@ -12,11 +12,10 @@
|
|||
#include "app/common/DLC/DLCLocalisationFile.h"
|
||||
#include "app/common/DLC/DLCManager.h"
|
||||
#include "app/common/DLC/DLCPack.h"
|
||||
#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/GameRules/LevelGeneration/LevelGenerators.h"
|
||||
#include "app/common/GameRules/LevelRules/LevelRules.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "java/File.h"
|
||||
#include "java/InputOutputStream/ByteArrayInputStream.h"
|
||||
#include "java/InputOutputStream/ByteArrayOutputStream.h"
|
||||
|
|
@ -25,6 +24,7 @@
|
|||
#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/compression.h"
|
||||
#include "strings.h"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include <cmath>
|
||||
|
||||
#include "app/common/Game.h"
|
||||
#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
|
|
@ -12,6 +11,7 @@
|
|||
#include "minecraft/world/level/Level.h"
|
||||
#include "minecraft/world/level/chunk/LevelChunk.h"
|
||||
#include "minecraft/world/level/dimension/Dimension.h"
|
||||
#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h"
|
||||
#include "minecraft/world/phys/AABB.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
#include <string>
|
||||
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h"
|
||||
#include "minecraft/world/phys/AABB.h"
|
||||
#include "minecraft/world/phys/Vec3.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@
|
|||
|
||||
#include <algorithm>
|
||||
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionGenerateBox.h"
|
||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h"
|
||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceContainer.h"
|
||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceSpawner.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/Direction.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
|
|
|
|||
|
|
@ -9,13 +9,12 @@
|
|||
#include "app/common/DLC/DLCGameRulesHeader.h"
|
||||
#include "app/common/DLC/DLCManager.h"
|
||||
#include "app/common/DLC/DLCPack.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/GameRules/GameRuleManager.h"
|
||||
#include "app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.h"
|
||||
#include "app/common/GameRules/LevelGeneration/BiomeOverride.h"
|
||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructure.h"
|
||||
#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h"
|
||||
#include "app/common/GameRules/LevelGeneration/StartFeature.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "java/File.h"
|
||||
#include "java/InputOutputStream/ByteArrayInputStream.h"
|
||||
#include "java/InputOutputStream/DataInputStream.h"
|
||||
|
|
@ -27,6 +26,7 @@
|
|||
#include "minecraft/world/level/Level.h"
|
||||
#include "minecraft/world/level/chunk/LevelChunk.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/phys/AABB.h"
|
||||
#include "platform/fs/fs.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "XboxStructureActionGenerateBox.h"
|
||||
|
||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "XboxStructureActionPlaceBlock.h"
|
||||
|
||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRuleDefinition.h"
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/AddItemRuleDefinition.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "minecraft/world/Container.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/Level.h"
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.h"
|
||||
#include "minecraft/network/Connection.h"
|
||||
#include "minecraft/network/packet/UpdateGameRuleProgressPacket.h"
|
||||
#include "minecraft/world/level/GameRules/GameRule.h"
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
|
||||
#include "minecraft/world/level/GameRules/GameRule.h"
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/AddItemRuleDefinition.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/AddItemRuleDefinition.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/Pos.h"
|
||||
#include "minecraft/world/entity/player/Inventory.h"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#include "app/common/Audio/SoundEngine.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/Network/GameNetworkManager.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "minecraft/Console_Debug_enum.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
#include "app/common/Audio/SoundEngine.h"
|
||||
#include "platform/game/game.h"
|
||||
#include "app/common/DLC/DLCManager.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/GameRules/GameRuleManager.h"
|
||||
|
|
@ -7,9 +6,8 @@
|
|||
#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/In-Game Menu Screens/UIScene_PauseMenu.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/GameTypes.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
|
|
@ -26,10 +24,11 @@
|
|||
#include "minecraft/client/skins/DLCTexturePack.h"
|
||||
#include "minecraft/client/skins/TexturePack.h"
|
||||
#include "minecraft/client/skins/TexturePackRepository.h"
|
||||
#include "platform/network/network.h"
|
||||
#include "minecraft/server/MinecraftServer.h"
|
||||
#include "minecraft/stats/StatsCounter.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "platform/game/game.h"
|
||||
#include "platform/network/network.h"
|
||||
#include "platform/profile/profile.h"
|
||||
#include "platform/storage/storage.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
|
@ -469,7 +468,8 @@ void Game::HandleXuiActions(void) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
PlatformGame.SetRichPresenceContext(i, CONTEXT_GAME_STATE_BLANK);
|
||||
PlatformGame.SetRichPresenceContext(
|
||||
i, CONTEXT_GAME_STATE_BLANK);
|
||||
if (g_NetworkManager.IsLocalGame()) {
|
||||
PlatformProfile.SetCurrentGameActivity(
|
||||
i, CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE,
|
||||
|
|
@ -994,12 +994,11 @@ void Game::HandleXuiActions(void) {
|
|||
// streaming audio from the default texture pack now
|
||||
// reset the streaming sounds back to the normal ones
|
||||
static_cast<SoundEngine*>(pMinecraft->soundEngine)
|
||||
->SetStreamingSounds(eStream_Overworld_Calm1,
|
||||
eStream_Overworld_piano3,
|
||||
eStream_Nether1,
|
||||
eStream_Nether4,
|
||||
eStream_end_dragon,
|
||||
eStream_end_end, eStream_CD_1);
|
||||
->SetStreamingSounds(
|
||||
eStream_Overworld_Calm1,
|
||||
eStream_Overworld_piano3, eStream_Nether1,
|
||||
eStream_Nether4, eStream_end_dragon,
|
||||
eStream_end_end, eStream_CD_1);
|
||||
pMinecraft->soundEngine->playStreaming("", 0, 0, 0, 1,
|
||||
1);
|
||||
|
||||
|
|
@ -1288,7 +1287,9 @@ void Game::HandleXuiActions(void) {
|
|||
} break;
|
||||
case eAppAction_DebugText:
|
||||
// launch the xui for text entry
|
||||
{ SetAction(i, eAppAction_Idle); }
|
||||
{
|
||||
SetAction(i, eAppAction_Idle);
|
||||
}
|
||||
break;
|
||||
|
||||
case eAppAction_ReloadTexturePack: {
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "SDL_video.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
|
||||
#ifndef _ENABLEIGGY
|
||||
void* IggyGDrawMallocAnnotated(SINTa size, const char* file, int line) {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#ifndef __LINUX_IGGY_GDRAW_H__
|
||||
#define __LINUX_IGGY_GDRAW_H__
|
||||
|
||||
#include "app/common/Iggy/include/rrCore.h"
|
||||
#include "app/common/Iggy/include/gdraw.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/Iggy/include/rrCore.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
#include "app/common/Iggy/include/iggy.h"
|
||||
|
||||
#define STUBBED \
|
||||
{}
|
||||
{ \
|
||||
}
|
||||
|
||||
RADEXPFUNC inline IggyValuePath* RADEXPLINK IggyPlayerRootPath(Iggy* f) {
|
||||
STUBBED;
|
||||
|
|
|
|||
|
|
@ -489,16 +489,15 @@ IDOCN typedef struct {
|
|||
rrbool(RADLINK* connection_valid)(
|
||||
Iggy* swf, HIGGYEXP iggyexp); // Iggy queries this to check if Iggy
|
||||
// Explorer is still connected
|
||||
S32(RADLINK* poll_command)
|
||||
(Iggy* swf, HIGGYEXP iggyexp,
|
||||
U8** buffer); // stores command in *buffer, returns number of bytes
|
||||
S32(RADLINK* poll_command)(
|
||||
Iggy* swf, HIGGYEXP iggyexp,
|
||||
U8** buffer); // stores command in *buffer, returns number of bytes
|
||||
void(RADLINK* send_command)(
|
||||
Iggy* swf, HIGGYEXP iggyexp, U8 command, void* buffer,
|
||||
S32 len); // writes a command with a payload of buffer:len
|
||||
S32(RADLINK* get_storage)
|
||||
(Iggy* swf, HIGGYEXP iggyexp,
|
||||
U8** buffer); // returns temporary storage Iggy
|
||||
// can use for assembling commands
|
||||
S32(RADLINK* get_storage)(Iggy* swf, HIGGYEXP iggyexp,
|
||||
U8** buffer); // returns temporary storage Iggy
|
||||
// can use for assembling commands
|
||||
rrbool(RADLINK* attach)(
|
||||
Iggy* swf, HIGGYEXP iggyexp, iggyexp_detach_callback* cb, void* cbdata,
|
||||
IggyForPerfmonFunctions*
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
#include <string>
|
||||
|
||||
#include "app/common/App_structs.h"
|
||||
#include "app/common/UI/All Platforms/ArchiveFile.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/All Platforms/ArchiveFile.h"
|
||||
#include "java/Random.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
|
|
|
|||
|
|
@ -8,9 +8,8 @@
|
|||
#include "app/common/Game.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/common/Game.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "app/common/UI/Scenes/UIScene_FullscreenProgress.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/ProgressRenderer.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
#include "GameNetworkManager.h"
|
||||
#include "platform/game/game.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
|
|
@ -10,14 +9,12 @@
|
|||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
#include "minecraft/network/Socket.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/GameRules/GameRuleManager.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "app/common/UI/All Platforms/UIStructs.h"
|
||||
#include "app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h"
|
||||
#include "java/File.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
|
|
@ -30,9 +27,9 @@
|
|||
#include "minecraft/client/skins/TexturePack.h"
|
||||
#include "minecraft/client/skins/TexturePackRepository.h"
|
||||
#include "minecraft/network/Connection.h"
|
||||
#include "minecraft/network/Socket.h"
|
||||
#include "minecraft/network/packet/DisconnectPacket.h"
|
||||
#include "minecraft/network/packet/PreLoginPacket.h"
|
||||
#include "platform/network/network.h"
|
||||
#include "minecraft/server/MinecraftServer.h"
|
||||
#include "minecraft/server/PlayerList.h"
|
||||
#include "minecraft/server/ServerAction.h"
|
||||
|
|
@ -47,13 +44,14 @@
|
|||
#include "minecraft/world/level/tile/Tile.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "platform/fs/fs.h"
|
||||
#include "platform/game/game.h"
|
||||
#include "platform/input/input.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 "platform/network/network.h"
|
||||
|
||||
class FriendSessionInfo;
|
||||
class INVITE_INFO;
|
||||
|
|
@ -350,7 +348,8 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft,
|
|||
createdConnections.push_back(connection);
|
||||
|
||||
int primaryPad = PlatformProfile.GetPrimaryPad();
|
||||
PlatformGame.SetRichPresenceContext(primaryPad, CONTEXT_GAME_STATE_BLANK);
|
||||
PlatformGame.SetRichPresenceContext(primaryPad,
|
||||
CONTEXT_GAME_STATE_BLANK);
|
||||
if (GetPlayerCount() >
|
||||
1) // Are we offline or online, and how many players are there
|
||||
{
|
||||
|
|
@ -381,7 +380,8 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft,
|
|||
Socket* socket = pNetworkPlayer->GetSocket();
|
||||
app.DebugPrintf(
|
||||
"Closing socket due to player %d not being signed in any "
|
||||
"more\n", idx);
|
||||
"more\n",
|
||||
idx);
|
||||
if (!socket->close(false)) socket->close(true);
|
||||
|
||||
continue;
|
||||
|
|
@ -452,7 +452,8 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft,
|
|||
if (g_NetworkManager.IsLeavingGame() || !IsInSession()) break;
|
||||
|
||||
if (PlatformProfile.IsSignedIn(idx) && !connection->isClosed()) {
|
||||
PlatformGame.SetRichPresenceContext(idx, CONTEXT_GAME_STATE_BLANK);
|
||||
PlatformGame.SetRichPresenceContext(idx,
|
||||
CONTEXT_GAME_STATE_BLANK);
|
||||
if (IsLocalGame())
|
||||
PlatformProfile.SetCurrentGameActivity(
|
||||
idx, CONTEXT_PRESENCE_MULTIPLAYEROFFLINE, false);
|
||||
|
|
@ -1328,7 +1329,9 @@ void CGameNetworkManager::GameInviteReceived(int userIndex,
|
|||
// pInviteInfo;
|
||||
|
||||
// tell the app to process this
|
||||
{ app.ProcessInvite(userIndex, localUsersMask, pInviteInfo); }
|
||||
{
|
||||
app.ProcessInvite(userIndex, localUsersMask, pInviteInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,12 +4,13 @@
|
|||
#include <format>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "minecraft/network/INetworkService.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
#include "platform/network/NetTypes.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "platform/network/IPlatformNetwork.h"
|
||||
#include "platform/network/NetTypes.h"
|
||||
#include "platform/network/network.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
|
||||
class ClientConnection;
|
||||
class Minecraft;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include "app/common/DLC/DLCPack.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/Network/GameNetworkManager.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/ProgressRenderer.h"
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
#include "app/common/App_structs.h"
|
||||
#include "minecraft/network/packet/DisconnectPacket.h"
|
||||
#include "platform/network/NetTypes.h"
|
||||
#include "platform/XboxStubs.h"
|
||||
#include "platform/network/NetTypes.h"
|
||||
#include "platform/storage/storage.h"
|
||||
|
||||
struct INVITE_INFO;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/Network/GameNetworkManager.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "minecraft/server/MinecraftServer.h"
|
||||
#include "minecraft/server/ServerAction.h"
|
||||
#include "platform/profile/profile.h"
|
||||
|
|
|
|||
|
|
@ -4,17 +4,17 @@
|
|||
|
||||
#include "app/common/Tutorial/Constraints/TutorialConstraint.h"
|
||||
#include "app/common/Tutorial/Tutorial.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/multiplayer/ClientConnection.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
#include "minecraft/network/packet/PlayerInfoPacket.h"
|
||||
#include "platform/network/network.h"
|
||||
#include "minecraft/world/entity/player/Abilities.h"
|
||||
#include "minecraft/world/entity/player/Player.h"
|
||||
#include "minecraft/world/level/LevelSettings.h"
|
||||
#include "minecraft/world/phys/AABB.h"
|
||||
#include "minecraft/world/phys/Vec3.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "platform/network/network.h"
|
||||
|
||||
ChangeStateConstraint::ChangeStateConstraint(
|
||||
Tutorial* tutorial, eTutorial_State targetState,
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
#include <cstddef>
|
||||
|
||||
#include "TutorialConstraint.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "minecraft/world/phys/AABB.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
|
||||
class AABB;
|
||||
class Tutorial;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h"
|
||||
#include "app/common/Tutorial/Constraints/AreaConstraint.h"
|
||||
#include "app/common/Tutorial/Constraints/ChangeStateConstraint.h"
|
||||
|
|
@ -23,7 +24,6 @@
|
|||
#include "app/common/Tutorial/Tasks/UseTileTask.h"
|
||||
#include "app/common/Tutorial/Tasks/XuiCraftingTask.h"
|
||||
#include "app/common/Tutorial/Tutorial.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "minecraft/world/effect/MobEffect.h"
|
||||
#include "minecraft/world/item/Item.h"
|
||||
#include "minecraft/world/item/alchemy/PotionMacros.h"
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
#include "app/common/Tutorial/Hints/TutorialHint.h"
|
||||
#include "app/common/Tutorial/Tutorial.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
#include "minecraft/world/phys/AABB.h"
|
||||
#include "minecraft/world/phys/Vec3.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
|
||||
AreaHint::AreaHint(eTutorial_Hint id, Tutorial* tutorial,
|
||||
eTutorial_State displayState, eTutorial_State completeState,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "TutorialHint.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "minecraft/world/phys/AABB.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
|
||||
class AABB;
|
||||
class Tutorial;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ int DiggerItemHint::attack(std::shared_ptr<ItemInstance> item,
|
|||
if (itemFound) {
|
||||
// It's also possible that we could hit TileEntities (eg falling
|
||||
// sand) so don't want to give this hint then
|
||||
if (entity->instanceof (eTYPE_MOB)) {
|
||||
if (entity->instanceof(eTYPE_MOB)) {
|
||||
return IDS_TUTORIAL_HINT_ATTACK_WITH_TOOL;
|
||||
} else {
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
// using namespace std;
|
||||
|
||||
#include "TutorialHint.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "java/Class.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
|
||||
class ItemInstance;
|
||||
class Tutorial;
|
||||
|
|
@ -17,7 +17,7 @@ public:
|
|||
LookAtEntityHint(eTutorial_Hint id, Tutorial* tutorial, int descriptionId,
|
||||
int titleId, eINSTANCEOF type);
|
||||
// TODO: 4jcraft added, this was not implemented
|
||||
~LookAtEntityHint(){};
|
||||
~LookAtEntityHint() {};
|
||||
|
||||
virtual bool onLookAtEntity(eINSTANCEOF type);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
#include "app/common/Tutorial/Hints/TutorialHint.h"
|
||||
#include "app/common/Tutorial/Tutorial.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "minecraft/world/item/Item.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
|
||||
LookAtTileHint::LookAtTileHint(eTutorial_Hint id, Tutorial* tutorial,
|
||||
int tiles[], unsigned int tilesLength,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public:
|
|||
unsigned int tilesLength, int iconOverride = -1,
|
||||
int iData = -1, int iDataOverride = -1);
|
||||
// TODO: 4jcraft, added, destructor was never implemented
|
||||
~LookAtTileHint(){};
|
||||
~LookAtTileHint() {};
|
||||
|
||||
virtual bool onLookAt(int id, int iData = 0);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
#include "app/common/Tutorial/Hints/TutorialHint.h"
|
||||
#include "app/common/Tutorial/Tutorial.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "minecraft/world/item/ItemInstance.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
|
||||
TakeItemHint::TakeItemHint(eTutorial_Hint id, Tutorial* tutorial, int items[],
|
||||
unsigned int itemsLength)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public:
|
|||
TakeItemHint(eTutorial_Hint id, Tutorial* tutorial, int items[],
|
||||
unsigned int itemsLength);
|
||||
// TODO: 4jcraft, added, it was never implemented
|
||||
virtual ~TakeItemHint(){};
|
||||
virtual ~TakeItemHint() {};
|
||||
|
||||
virtual bool onTake(std::shared_ptr<ItemInstance> item);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#include "TutorialHint.h"
|
||||
|
||||
#include "app/common/Tutorial/Tutorial.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
#include "minecraft/world/level/material/Material.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
|
||||
class Entity;
|
||||
class ItemInstance;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "java/Class.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
|
||||
class Entity;
|
||||
class ItemInstance;
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@
|
|||
#include "app/common/Tutorial/Constraints/InputConstraint.h"
|
||||
#include "app/common/Tutorial/Tasks/TutorialTask.h"
|
||||
#include "app/common/Tutorial/Tutorial.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
#include "minecraft/world/level/material/Material.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "platform/input/input.h"
|
||||
|
||||
ChoiceTask::ChoiceTask(
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/Tutorial/Constraints/InputConstraint.h"
|
||||
#include "app/common/Tutorial/Tasks/TutorialTask.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
#include <memory>
|
||||
|
||||
#include "app/common/Tutorial/Tasks/ChoiceTask.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "java/Class.h"
|
||||
#include "minecraft/world/entity/Entity.h"
|
||||
#include "minecraft/world/entity/animal/EntityHorse.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
|
||||
class Tutorial;
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ int HorseChoiceTask::getDescriptionId() {
|
|||
}
|
||||
|
||||
void HorseChoiceTask::onLookAtEntity(std::shared_ptr<Entity> entity) {
|
||||
if ((m_eHorseType < 0) && entity->instanceof (eTYPE_HORSE)) {
|
||||
if ((m_eHorseType < 0) && entity->instanceof(eTYPE_HORSE)) {
|
||||
std::shared_ptr<EntityHorse> horse =
|
||||
std::dynamic_pointer_cast<EntityHorse>(entity);
|
||||
if (horse->isAdult()) m_eHorseType = horse->getType();
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ RideEntityTask::RideEntityTask(const int eType, Tutorial* tutorial,
|
|||
bool RideEntityTask::isCompleted() { return bIsCompleted; }
|
||||
|
||||
void RideEntityTask::onRideEntity(std::shared_ptr<Entity> entity) {
|
||||
if (entity->instanceof ((eINSTANCEOF)m_eType)) {
|
||||
if (entity->instanceof((eINSTANCEOF)m_eType)) {
|
||||
bIsCompleted = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "TutorialMessage.h"
|
||||
#include "app/common/App_structs.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/Tutorial/Constraints/TutorialConstraint.h"
|
||||
#include "app/common/Tutorial/Hints/DiggerItemHint.h"
|
||||
#include "app/common/Tutorial/Hints/LookAtEntityHint.h"
|
||||
|
|
@ -20,7 +21,6 @@
|
|||
#include "app/common/Tutorial/Tasks/RideEntityTask.h"
|
||||
#include "app/common/Tutorial/Tasks/TutorialTask.h"
|
||||
#include "app/common/UI/All Platforms/UIStructs.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "java/Class.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
|
|
@ -2802,8 +2802,8 @@ void Tutorial::onLookAtEntity(std::shared_ptr<Entity> entity) {
|
|||
}
|
||||
}
|
||||
|
||||
if ((m_CurrentState == e_Tutorial_State_Gameplay) && entity->instanceof
|
||||
(eTYPE_HORSE)) {
|
||||
if ((m_CurrentState == e_Tutorial_State_Gameplay) &&
|
||||
entity->instanceof(eTYPE_HORSE)) {
|
||||
changeTutorialState(e_Tutorial_State_Horse);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,17 +7,17 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "app/common/Audio/SoundTypes.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/Tutorial/Tutorial.h"
|
||||
#include "app/common/Tutorial/TutorialMode.h"
|
||||
#include "app/common/UI/All Platforms/UIStructs.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerGameMode.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
#include "minecraft/client/player/LocalPlayer.h"
|
||||
#include "app/common/Audio/SoundTypes.h"
|
||||
#include "minecraft/util/HtmlString.h"
|
||||
#include "minecraft/world/entity/player/Inventory.h"
|
||||
#include "minecraft/world/inventory/AbstractContainerMenu.h"
|
||||
|
|
@ -782,7 +782,9 @@ void IUIScene_AbstractContainerMenu::onMouseTick() {
|
|||
buttonX = eToolTipPickUpHalf;
|
||||
}
|
||||
|
||||
{ buttonRT = eToolTipWhatIsThis; }
|
||||
{
|
||||
buttonRT = eToolTipWhatIsThis;
|
||||
}
|
||||
} else {
|
||||
// Nothing in slot and nothing in hand.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
#include <memory>
|
||||
|
||||
#include "UIStructs.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
|
||||
class HtmlString;
|
||||
class ItemInstance;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
#include <assert.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include "app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h"
|
||||
#include "java/InputOutputStream/ByteArrayOutputStream.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h"
|
||||
#include "java/InputOutputStream/ByteArrayOutputStream.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/multiplayer/ClientConnection.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
|
|
|
|||
|
|
@ -7,16 +7,16 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "app/common/Audio/SoundTypes.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/Tutorial/Tutorial.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "minecraft/Console_Debug_enum.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerGameMode.h"
|
||||
#include "minecraft/client/player/LocalPlayer.h"
|
||||
#include "app/common/Audio/SoundTypes.h"
|
||||
#include "minecraft/stats/GenericStats.h"
|
||||
#include "minecraft/world/entity/player/Inventory.h"
|
||||
#include "minecraft/world/entity/player/Player.h"
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
#include <memory>
|
||||
|
||||
#include "app/common/Tutorial/Tutorial.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerGameMode.h"
|
||||
#include "minecraft/world/item/Item.h"
|
||||
#include "minecraft/world/item/crafting/Recipy.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
|
||||
class LocalPlayer;
|
||||
class ItemInstance;
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h"
|
||||
#include "app/common/Audio/SoundTypes.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "java/JavaMath.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerGameMode.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
#include "app/common/Audio/SoundTypes.h"
|
||||
#include "minecraft/world/SimpleContainer.h"
|
||||
#include "minecraft/world/entity/Painting.h"
|
||||
#include "minecraft/world/entity/animal/EntityHorse.h"
|
||||
|
|
|
|||
|
|
@ -3,12 +3,10 @@
|
|||
#include <cmath>
|
||||
#include <memory>
|
||||
|
||||
#include "platform/profile/profile.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "java/Class.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/SharedConstants.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerGameMode.h"
|
||||
|
|
@ -22,6 +20,8 @@
|
|||
#include "minecraft/world/entity/player/Player.h"
|
||||
#include "minecraft/world/food/FoodData.h"
|
||||
#include "minecraft/world/level/material/Material.h"
|
||||
#include "platform/profile/profile.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
|
||||
IUIScene_HUD::IUIScene_HUD() {
|
||||
m_lastActiveSlot = -1;
|
||||
|
|
@ -79,9 +79,10 @@ void IUIScene_HUD::updateFrameTick() {
|
|||
|
||||
SetDisplayName(PlatformProfile.GetDisplayName(iPad));
|
||||
|
||||
SetTooltipsEnabled(((ui.GetMenuDisplayed(PlatformProfile.GetPrimaryPad())) ||
|
||||
(app.GetGameSettings(PlatformProfile.GetPrimaryPad(),
|
||||
eGameSetting_Tooltips) != 0)));
|
||||
SetTooltipsEnabled(
|
||||
((ui.GetMenuDisplayed(PlatformProfile.GetPrimaryPad())) ||
|
||||
(app.GetGameSettings(PlatformProfile.GetPrimaryPad(),
|
||||
eGameSetting_Tooltips) != 0)));
|
||||
|
||||
SetActiveSlot(pMinecraft->localplayers[iPad]->inventory->selected);
|
||||
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@
|
|||
|
||||
#include "app/common/DLC/DLCManager.h"
|
||||
#include "app/common/DLC/DLCPack.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/GameRules/GameRuleManager.h"
|
||||
#include "app/common/Network/GameNetworkManager.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/ProgressRenderer.h"
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@
|
|||
|
||||
#include <algorithm>
|
||||
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/Tutorial/Tutorial.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "util/StringHelpers.h"
|
||||
#include "java/InputOutputStream/ByteArrayOutputStream.h"
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
|
|
@ -24,6 +23,7 @@
|
|||
#include "minecraft/world/item/trading/MerchantRecipe.h"
|
||||
#include "minecraft/world/item/trading/MerchantRecipeList.h"
|
||||
#include "strings.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
IUIScene_TradingMenu::IUIScene_TradingMenu() {
|
||||
m_validOffersCount = 0;
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@
|
|||
#include <vector>
|
||||
|
||||
#include "app/common/Tutorial/Tutorial.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "minecraft/util/HtmlString.h"
|
||||
#include "minecraft/world/inventory/MerchantMenu.h"
|
||||
#include "minecraft/world/item/Rarity.h"
|
||||
#include "minecraft/world/item/trading/Merchant.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
|
||||
class MerchantRecipe;
|
||||
class HtmlString;
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
#include "UIEnums.h"
|
||||
#include "minecraft/GameHostOptions.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
#include "platform/storage/storage.h"
|
||||
#include "platform/thread/C4JThread.h"
|
||||
|
||||
class Container;
|
||||
class Inventory;
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/Controls/UIControl.h"
|
||||
#include "app/common/UI/Controls/UIControl_Label.h"
|
||||
#include "app/common/UI/UILayer.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "app/common/Iggy/include/rrCore.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "app/common/UI/Controls/UIControl.h"
|
||||
#include "app/common/UI/Controls/UIControl_Label.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/rrCore.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
|
||||
class UILayer;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "UIComponent_DebugUIMarketingGuide.h"
|
||||
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "app/common/UI/Controls/UIControl_Label.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#include "UIComponent_MenuBackground.h"
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/UILayer.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "app/common/Iggy/include/rrCore.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/rrCore.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
|
||||
class UILayer;
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
#include <mutex>
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/UILayer.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#include "UIComponent_PressStartToPlay.h"
|
||||
|
||||
#include "app/common/UI/Controls/UIControl_Label.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "app/common/UI/Controls/UIControl_Label.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "strings.h"
|
||||
|
||||
class UILayer;
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "app/common/UI/Controls/UIControl.h"
|
||||
#include "app/common/UI/Controls/UIControl_Label.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
#include "UIComponent_Tooltips.h"
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "app/common/UI/UILayer.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/UI/UIString.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "platform/profile/profile.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
#include "app/common/Iggy/include/rrCore.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/Iggy/include/rrCore.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/UI/UIString.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "platform/PlatformTypes.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
|
|
|
|||
|
|
@ -4,19 +4,19 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/Tutorial/Tutorial.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "app/common/UI/Controls/UIControl_Label.h"
|
||||
#include "app/common/UI/UILayer.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
#include "minecraft/world/item/Item.h"
|
||||
#include "minecraft/world/item/ItemInstance.h"
|
||||
#include "minecraft/world/level/tile/Tile.h"
|
||||
#include "minecraft/world/tutorial/TutorialEnum.h"
|
||||
#include "platform/profile/profile.h"
|
||||
#include "strings.h"
|
||||
#include "util/StringHelpers.h"
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "app/common/UI/All Platforms/UIStructs.h"
|
||||
#include "app/common/UI/Controls/UIControl.h"
|
||||
#include "app/common/UI/Controls/UIControl_Label.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@
|
|||
#include <algorithm>
|
||||
#include <memory>
|
||||
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/Components/UIComponent_Chat.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "app/common/UI/Controls/UIControl_Label.h"
|
||||
#include "app/common/UI/UILayer.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/UI/ConsoleUIController.h"
|
||||
#include "minecraft/GameEnums.h"
|
||||
#include "minecraft/SharedConstants.h"
|
||||
#include "minecraft/client/Minecraft.h"
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/All Platforms/IUIScene_HUD.h"
|
||||
#include "app/common/UI/All Platforms/UIEnums.h"
|
||||
#include "app/common/UI/Controls/UIControl.h"
|
||||
#include "app/common/UI/Controls/UIControl_Label.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
|
|
|
|||
|
|
@ -1,18 +1,19 @@
|
|||
|
||||
|
||||
// GDraw GL backend for Linux
|
||||
#include "platform/renderer/renderer.h"
|
||||
#include "renderer/gl/gl_compat.h"
|
||||
#include "ConsoleUIController.h"
|
||||
#include "app/common/UI/All Platforms/UIStructs.h"
|
||||
|
||||
#include "app/common/Iggy/gdraw/gdraw.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/All Platforms/UIStructs.h"
|
||||
#include "platform/renderer/renderer.h"
|
||||
#include "renderer/gl/gl_compat.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
#include "app/common/Iggy/include/rrCore.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/Iggy/include/gdraw.h"
|
||||
#include "app/common/Iggy/include/rrCore.h"
|
||||
|
||||
ConsoleUIController ui;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "app/common/UI/All Platforms/UIStructs.h"
|
||||
#include "app/common/UI/UIController.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/Iggy/include/rrCore.h"
|
||||
#include "app/common/UI/All Platforms/UIStructs.h"
|
||||
#include "app/common/UI/UIController.h"
|
||||
#include "platform/profile/profile.h"
|
||||
|
||||
class ConsoleUIController : public UIController {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
#include "UIControl.h"
|
||||
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
#include "app/common/Iggy/include/rrCore.h"
|
||||
#include "app/common/Game.h"
|
||||
#include "app/common/Iggy/include/rrCore.h"
|
||||
#include "java/JavaMath.h"
|
||||
|
||||
UIControl::UIControl() {
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/Controls/UIControl.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/UI/UIString.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/Controls/UIControl.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/UI/UIString.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#include "UIControl_BeaconEffectButton.h"
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/Controls/UIControl.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/Controls/UIControl.h"
|
||||
#include "app/common/UI/Controls/UIControl_BeaconEffectButton.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#include "UIControl_BitmapIcon.h"
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/Controls/UIControl.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/Controls/UIControl.h"
|
||||
#include "app/common/UI/Controls/UIControl_BitmapIcon.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#include "UIControl_Button.h"
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/Controls/UIControl.h"
|
||||
#include "app/common/UI/Controls/UIControl_Base.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/UI/UIString.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/Controls/UIControl_Base.h"
|
||||
#include "app/common/UI/Controls/UIControl_Button.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/UI/UIString.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#include "UIControl_ButtonList.h"
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/Controls/UIControl.h"
|
||||
#include "app/common/UI/Controls/UIControl_Base.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/UI/UIString.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/Controls/UIControl_Base.h"
|
||||
#include "app/common/UI/Controls/UIControl_ButtonList.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/UI/UIString.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#include "UIControl_CheckBox.h"
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/Controls/UIControl.h"
|
||||
#include "app/common/UI/Controls/UIControl_Base.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/UI/UIString.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/Controls/UIControl_Base.h"
|
||||
#include "app/common/UI/Controls/UIControl_CheckBox.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/UI/UIString.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#include "UIControl_Cursor.h"
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/Controls/UIControl.h"
|
||||
#include "app/common/UI/Controls/UIControl_Base.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/Controls/UIControl_Base.h"
|
||||
#include "app/common/UI/Controls/UIControl_Cursor.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#include "UIControl_DLCList.h"
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/Controls/UIControl.h"
|
||||
#include "app/common/UI/Controls/UIControl_ButtonList.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#include "app/common/UI/Controls/UIControl_DLCList.h"
|
||||
#include "app/common/UI/UIScene.h"
|
||||
#include "app/common/Iggy/include/iggy.h"
|
||||
#ifndef _ENABLEIGGY
|
||||
#include "app/common/Iggy/iggy_stubs.h"
|
||||
#endif
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue