mirror of
https://github.com/open-goal/jak-project.git
synced 2024-11-23 06:09:57 +00:00
LSP: OpenGOAL Feature Support - Part 1 (#2668)
This commit is contained in:
parent
d5951c2b11
commit
057ae361bf
2
.vscode/extensions.json
vendored
2
.vscode/extensions.json
vendored
@ -3,7 +3,7 @@
|
||||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
|
||||
|
||||
// List of extensions which should be recommended for users of this workspace.
|
||||
"recommendations": ["opengoal.opengoal", "naumovs.color-highlight"],
|
||||
"recommendations": ["opengoal.opengoal"],
|
||||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
|
||||
"unwantedRecommendations": []
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ void log_print(const char* message) {
|
||||
// how many extra log files for a single program should be kept?
|
||||
constexpr int LOG_ROTATE_MAX = 5;
|
||||
|
||||
void set_file(const std::string& filename, const bool should_rotate) {
|
||||
void set_file(const std::string& filename, const bool should_rotate, const bool append) {
|
||||
ASSERT(!gLogger.fp);
|
||||
file_util::create_dir_if_needed_for_file(filename);
|
||||
|
||||
@ -133,7 +133,11 @@ void set_file(const std::string& filename, const bool should_rotate) {
|
||||
}
|
||||
}
|
||||
|
||||
if (append) {
|
||||
gLogger.fp = file_util::open_file(filename.c_str(), "a");
|
||||
} else {
|
||||
gLogger.fp = file_util::open_file(filename.c_str(), "w");
|
||||
}
|
||||
ASSERT(gLogger.fp);
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,9 @@ void log_message(level log_level, LogTime& now, const char* message);
|
||||
void log_print(const char* message);
|
||||
} // namespace internal
|
||||
|
||||
void set_file(const std::string& filename, const bool should_rotate = true);
|
||||
void set_file(const std::string& filename,
|
||||
const bool should_rotate = true,
|
||||
const bool append = false);
|
||||
void set_flush_level(level log_level);
|
||||
void set_file_level(level log_level);
|
||||
void set_stdout_level(level log_level);
|
||||
|
@ -111,20 +111,21 @@ std::string get_current_executable_path() {
|
||||
#endif
|
||||
}
|
||||
|
||||
std::optional<std::string> try_get_project_path_from_path(const std::string& path) {
|
||||
std::string::size_type pos =
|
||||
std::string(path).rfind("jak-project"); // Strip file path down to /jak-project/ directory
|
||||
if (pos == std::string::npos) {
|
||||
return {};
|
||||
}
|
||||
return std::string(path).substr(
|
||||
0, pos + 11); // + 12 to include "/jak-project" in the returned filepath
|
||||
}
|
||||
|
||||
/*!
|
||||
* See if the current executable is somewhere in jak-project/. If so, return the path to jak-project
|
||||
*/
|
||||
std::optional<std::string> try_get_jak_project_path() {
|
||||
std::string my_path = get_current_executable_path();
|
||||
|
||||
std::string::size_type pos =
|
||||
std::string(my_path).rfind("jak-project"); // Strip file path down to /jak-project/ directory
|
||||
if (pos == std::string::npos) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return std::make_optional(std::string(my_path).substr(
|
||||
0, pos + 11)); // + 12 to include "/jak-project" in the returned filepath
|
||||
return try_get_project_path_from_path(get_current_executable_path());
|
||||
}
|
||||
|
||||
std::optional<fs::path> try_get_data_dir() {
|
||||
|
@ -37,6 +37,7 @@ fs::path get_jak_project_dir();
|
||||
bool create_dir_if_needed(const fs::path& path);
|
||||
bool create_dir_if_needed_for_file(const std::string& path);
|
||||
bool create_dir_if_needed_for_file(const fs::path& path);
|
||||
std::optional<std::string> try_get_project_path_from_path(const std::string& path);
|
||||
bool setup_project_path(std::optional<fs::path> project_path_override);
|
||||
std::string get_file_path(const std::vector<std::string>& path);
|
||||
void write_binary_file(const std::string& name, const void* data, size_t size);
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <stdexcept>
|
||||
|
||||
#include "common/util/Range.h"
|
||||
@ -12,7 +13,28 @@ std::string strip_cpp_style_comments(const std::string& input);
|
||||
nlohmann::json parse_commented_json(const std::string& input, const std::string& source_name);
|
||||
Range<int> parse_json_optional_integer_range(const nlohmann::json& json);
|
||||
|
||||
#define json_serialize(field_name) j[#field_name] = obj.field_name;
|
||||
|
||||
#define json_serialize_optional(field_name) \
|
||||
if (obj.field_name) { \
|
||||
j[#field_name] = obj.field_name.value(); \
|
||||
}
|
||||
|
||||
#define json_deserialize_if_exists(field_name) \
|
||||
if (j.contains(#field_name)) { \
|
||||
j.at(#field_name).get_to(obj.field_name); \
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void json_get_optional(const nlohmann::json& json,
|
||||
const std::string& key,
|
||||
std::optional<T>& optionalValue) {
|
||||
if (json.contains(key) && !json[key].is_null()) {
|
||||
optionalValue = json[key].get<T>();
|
||||
}
|
||||
}
|
||||
|
||||
#define json_deserialize_optional_if_exists(field_name) \
|
||||
if (j.contains(#field_name)) { \
|
||||
json_get_optional(j, #field_name, obj.field_name); \
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "string_util.h"
|
||||
|
||||
#include <random>
|
||||
#include <regex>
|
||||
|
||||
#include "common/util/diff.h"
|
||||
@ -101,4 +102,23 @@ bool replace(std::string& str, const std::string& from, const std::string& to) {
|
||||
str.replace(start_pos, from.length(), to);
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string uuid() {
|
||||
static std::random_device dev;
|
||||
static std::mt19937 rng(dev());
|
||||
|
||||
std::uniform_int_distribution<int> dist(0, 15);
|
||||
|
||||
const char* v = "0123456789abcdef";
|
||||
const bool dash[] = {0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0};
|
||||
|
||||
std::string res;
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if (dash[i])
|
||||
res += "-";
|
||||
res += v[dist(rng)];
|
||||
res += v[dist(rng)];
|
||||
}
|
||||
return res;
|
||||
}
|
||||
} // namespace str_util
|
||||
|
@ -6,7 +6,7 @@
|
||||
namespace str_util {
|
||||
bool contains(const std::string& s, const std::string& substr);
|
||||
bool starts_with(const std::string& s, const std::string& prefix);
|
||||
bool ends_with(const std::string& s, const std::string& prefix);
|
||||
bool ends_with(const std::string& s, const std::string& suffix);
|
||||
std::string ltrim(const std::string& s);
|
||||
std::string rtrim(const std::string& s);
|
||||
std::string trim(const std::string& s);
|
||||
@ -21,4 +21,5 @@ std::vector<std::string> split(const ::std::string& str, char delimiter = '\n');
|
||||
std::string join(const std::vector<std::string>& strs, const std::string& join_with);
|
||||
std::vector<std::string> regex_get_capture_groups(const std::string& str, const std::string& regex);
|
||||
bool replace(std::string& str, const std::string& from, const std::string& to);
|
||||
std::string uuid();
|
||||
} // namespace str_util
|
||||
|
@ -6311,45 +6311,45 @@
|
||||
(defenum font-color
|
||||
:type uint32
|
||||
(default 0)
|
||||
(#dadada 1)
|
||||
(#ededed 2)
|
||||
(font-color-1 1)
|
||||
(font-color-2 2)
|
||||
(red 3)
|
||||
(gold-#ba9200 4)
|
||||
(yellow-#f3f300 5)
|
||||
(green-#3df23d 6)
|
||||
(blue-#003cf1 7)
|
||||
(cyan-#00fefe 8)
|
||||
(magenta-#f87df8 9)
|
||||
(#a0d5d5 10)
|
||||
(#7cbaba 11)
|
||||
(white-#ffffff 12)
|
||||
(#959595 13)
|
||||
(#f9a400 14)
|
||||
(#daf95e 15)
|
||||
(#8aa81f 16)
|
||||
(#a6b5a6 17)
|
||||
(#757f75 18)
|
||||
(#5e3f5e 19)
|
||||
(gold 4)
|
||||
(yellow 5)
|
||||
(green 6)
|
||||
(blue 7)
|
||||
(cyan 8)
|
||||
(magenta 9)
|
||||
(font-color-10 10)
|
||||
(font-color-11 11)
|
||||
(white 12)
|
||||
(font-color-13 13)
|
||||
(font-color-14 14)
|
||||
(font-color-15 15)
|
||||
(font-color-16 16)
|
||||
(font-color-17 17)
|
||||
(font-color-18 18)
|
||||
(font-color-19 19)
|
||||
(flat-yellow 20)
|
||||
(#3fbaed 21)
|
||||
(#3a3a3a 22)
|
||||
(#5c5c5c 23)
|
||||
(#f298c8 24)
|
||||
(#f46868 25)
|
||||
(#20ca98 26)
|
||||
(#8289de 27)
|
||||
(#a8f3f6 28)
|
||||
(#fef666 29)
|
||||
(#f1f104 30)
|
||||
(#8ed0f4 31)
|
||||
(#7efbfb 32)
|
||||
(#7ffcfc 33)
|
||||
(#f9f9f9 34)
|
||||
(#408080 35)
|
||||
(#e0f0e0 36)
|
||||
(#c00000 37)
|
||||
(#ffc040 38)
|
||||
(#000000 39)
|
||||
(font-color-21 21)
|
||||
(font-color-22 22)
|
||||
(font-color-23 23)
|
||||
(font-color-24 24)
|
||||
(font-color-25 25)
|
||||
(font-color-26 26)
|
||||
(font-color-27 27)
|
||||
(font-color-28 28)
|
||||
(font-color-29 29)
|
||||
(font-color-30 30)
|
||||
(font-color-31 31)
|
||||
(font-color-32 32)
|
||||
(font-color-33 33)
|
||||
(font-color-34 34)
|
||||
(font-color-35 35)
|
||||
(font-color-36 36)
|
||||
(font-color-37 37)
|
||||
(font-color-38 38)
|
||||
(font-color-39 39)
|
||||
)
|
||||
;; ---font-h:font-color
|
||||
|
||||
|
@ -167,7 +167,7 @@
|
||||
(with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) debug-buf))
|
||||
(bucket-id debug2)
|
||||
)
|
||||
(draw-string-xy arg2 s5-0 arg0 arg1 (font-color #dadada) (font-flags shadow kerning))
|
||||
(draw-string-xy arg2 s5-0 arg0 arg1 (font-color font-color-1) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -589,7 +589,7 @@
|
||||
)
|
||||
(sv-32 a0-10 a1-4 a2-2)
|
||||
)
|
||||
(s2-0 s1-0 (the-as bucket-id s0-0) *temp-string* s3-0 (font-color #dadada) (the-as vector2h #f))
|
||||
(s2-0 s1-0 (the-as bucket-id s0-0) *temp-string* s3-0 (font-color font-color-1) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1598,10 +1598,10 @@ Most functions take a boolean as their first argument. If the boolean is set to
|
||||
(font-color red)
|
||||
)
|
||||
((= v1-7 2)
|
||||
(font-color yellow-#f3f300)
|
||||
(font-color yellow)
|
||||
)
|
||||
((= v1-7 4)
|
||||
(font-color green-#3df23d)
|
||||
(font-color green)
|
||||
)
|
||||
(else
|
||||
(font-color default)
|
||||
|
@ -123,7 +123,7 @@
|
||||
(s1-0 (bucket-id debug-no-zbuf1))
|
||||
)
|
||||
(format (clear *temp-string*) "region-~D~%" (-> obj id))
|
||||
(s3-0 s2-0 (the-as bucket-id s1-0) *temp-string* arg0 (font-color #dadada) sv-32)
|
||||
(s3-0 s2-0 (the-as bucket-id s1-0) *temp-string* arg0 (font-color font-color-1) sv-32)
|
||||
)
|
||||
(+! (-> sv-32 y) 8)
|
||||
(when (>= arg1 1)
|
||||
@ -134,7 +134,7 @@
|
||||
(s1-1 (bucket-id debug-no-zbuf1))
|
||||
)
|
||||
(format (clear *temp-string*) "(on-enter ~S)" s4-1)
|
||||
(s3-1 s2-1 (the-as bucket-id s1-1) *temp-string* arg0 (font-color #dadada) sv-32)
|
||||
(s3-1 s2-1 (the-as bucket-id s1-1) *temp-string* arg0 (font-color font-color-1) sv-32)
|
||||
)
|
||||
(+! (-> sv-32 y) 8)
|
||||
)
|
||||
@ -146,7 +146,7 @@
|
||||
(s1-2 318)
|
||||
)
|
||||
(format (clear *temp-string*) "(on-inside ~S)" s4-2)
|
||||
(s3-2 s2-2 (the-as bucket-id s1-2) *temp-string* arg0 (font-color #dadada) sv-32)
|
||||
(s3-2 s2-2 (the-as bucket-id s1-2) *temp-string* arg0 (font-color font-color-1) sv-32)
|
||||
)
|
||||
(+! (-> sv-32 y) 8)
|
||||
)
|
||||
@ -158,7 +158,7 @@
|
||||
(s2-3 318)
|
||||
)
|
||||
(format (clear *temp-string*) "(on-exit ~S)" s5-1)
|
||||
(s4-3 s3-3 (the-as bucket-id s2-3) *temp-string* arg0 (font-color #dadada) sv-32)
|
||||
(s4-3 s3-3 (the-as bucket-id s2-3) *temp-string* arg0 (font-color font-color-1) sv-32)
|
||||
)
|
||||
(+! (-> sv-32 y) 8)
|
||||
)
|
||||
@ -951,7 +951,7 @@
|
||||
(s3-1 318)
|
||||
)
|
||||
(format (clear *temp-string*) "~S~%" (-> obj name))
|
||||
(s5-1 s4-1 (the-as bucket-id s3-1) *temp-string* (-> obj trans) (font-color #dadada) (the-as vector2h #f))
|
||||
(s5-1 s4-1 (the-as bucket-id s3-1) *temp-string* (-> obj trans) (font-color font-color-1) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
((method-of-type editable-sphere editable-method-10) obj)
|
||||
@ -1185,8 +1185,8 @@
|
||||
*temp-string*
|
||||
(-> gp-0 s4-1)
|
||||
(if (logtest? (-> obj flags) (editable-flag orient))
|
||||
(font-color yellow-#f3f300)
|
||||
(font-color #dadada)
|
||||
(font-color yellow)
|
||||
(font-color font-color-1)
|
||||
)
|
||||
(the-as vector2h #f)
|
||||
)
|
||||
|
@ -740,13 +740,13 @@
|
||||
)
|
||||
(set! (-> s5-0 color) (cond
|
||||
((zero? arg3)
|
||||
(font-color white-#ffffff)
|
||||
(font-color white)
|
||||
)
|
||||
(arg4
|
||||
(font-color #7cbaba)
|
||||
(font-color font-color-11)
|
||||
)
|
||||
(else
|
||||
(font-color #959595)
|
||||
(font-color font-color-13)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -807,19 +807,19 @@
|
||||
)
|
||||
(set! (-> v1-2 color) (cond
|
||||
((= (-> arg0 is-on) 'invalid)
|
||||
(font-color #5e3f5e)
|
||||
(font-color font-color-19)
|
||||
)
|
||||
((-> arg0 is-on)
|
||||
(if (zero? arg3)
|
||||
(font-color #daf95e)
|
||||
(font-color #8aa81f)
|
||||
(font-color font-color-15)
|
||||
(font-color font-color-16)
|
||||
)
|
||||
)
|
||||
((zero? arg3)
|
||||
(font-color #a6b5a6)
|
||||
(font-color font-color-17)
|
||||
)
|
||||
(else
|
||||
(font-color #757f75)
|
||||
(font-color font-color-18)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -844,15 +844,15 @@
|
||||
(set! (-> s5-0 color) (cond
|
||||
((zero? arg3)
|
||||
(if (-> arg0 grabbed-joypad-p)
|
||||
(font-color #a0d5d5)
|
||||
(font-color white-#ffffff)
|
||||
(font-color font-color-10)
|
||||
(font-color white)
|
||||
)
|
||||
)
|
||||
(arg4
|
||||
(font-color #7cbaba)
|
||||
(font-color font-color-11)
|
||||
)
|
||||
(else
|
||||
(font-color #959595)
|
||||
(font-color font-color-13)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -949,8 +949,8 @@
|
||||
(while (not (null? s1-1))
|
||||
(when (= s0-1 arg3)
|
||||
(set! (-> arg0 context font color) (if (nonzero? arg4)
|
||||
(font-color #959595)
|
||||
(font-color white-#ffffff)
|
||||
(font-color font-color-13)
|
||||
(font-color white)
|
||||
)
|
||||
)
|
||||
(let ((v1-20 (-> arg0 context font))
|
||||
|
@ -213,7 +213,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
arg1
|
||||
(-> arg0 bsphere)
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
(the-as vector2h #f)
|
||||
)
|
||||
)
|
||||
|
@ -1107,7 +1107,7 @@
|
||||
(-> (the-as process-drawable arg0) root trans)
|
||||
(if (logtest? (-> sv-16 extra perm status) (entity-perm-status bit-0 bit-1))
|
||||
(font-color red)
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 8))
|
||||
)
|
||||
@ -1123,7 +1123,7 @@
|
||||
(the-as bucket-id s3-1)
|
||||
*temp-string*
|
||||
(-> (the-as process-drawable arg0) root trans)
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 24))
|
||||
)
|
||||
)
|
||||
@ -1135,7 +1135,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(symbol->string v1-49)
|
||||
(-> (the-as process-drawable arg0) root trans)
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 24))
|
||||
)
|
||||
)
|
||||
@ -1170,7 +1170,7 @@
|
||||
(the-as bucket-id s3-3)
|
||||
*temp-string*
|
||||
(-> (the-as process-drawable arg0) root trans)
|
||||
(font-color green-#3df23d)
|
||||
(font-color green)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 8))
|
||||
)
|
||||
)
|
||||
@ -1184,7 +1184,7 @@
|
||||
"#f"
|
||||
)
|
||||
(-> (the-as process-drawable arg0) root trans)
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 16))
|
||||
)
|
||||
(label cfg-51)
|
||||
|
@ -892,7 +892,7 @@
|
||||
(+ (the int (/ (the float (+ (/ (-> s3-0 x) 16) -1792)) (-> *video-params* relative-x-scale))) -48)
|
||||
(+ (/ (-> s3-0 y) 16) -1855)
|
||||
0.0
|
||||
(font-color gold-#ba9200)
|
||||
(font-color gold)
|
||||
(font-flags shadow kerning)
|
||||
)
|
||||
)
|
||||
@ -1186,7 +1186,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> obj name)
|
||||
(-> obj trans)
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 8))
|
||||
)
|
||||
(let ((a3-2 (vector-z-quaternion! (new-stack-vector0) (the-as quaternion (-> obj quat)))))
|
||||
|
@ -1413,7 +1413,7 @@
|
||||
70
|
||||
20
|
||||
0.0
|
||||
(font-color gold-#ba9200)
|
||||
(font-color gold)
|
||||
(font-flags shadow kerning)
|
||||
)
|
||||
)
|
||||
|
@ -52,7 +52,7 @@
|
||||
(s1-0 (bucket-id debug-no-zbuf1))
|
||||
)
|
||||
(format (clear *temp-string*) "~D" s5-1)
|
||||
(s3-1 s2-1 (the-as bucket-id s1-0) *temp-string* s4-1 (font-color gold-#ba9200) (the-as vector2h #f))
|
||||
(s3-1 s2-1 (the-as bucket-id s1-0) *temp-string* s4-1 (font-color gold) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -430,7 +430,7 @@ using the fractional component of `idx` as the interpolant, return this result
|
||||
(s1-0 (bucket-id debug-no-zbuf1))
|
||||
)
|
||||
(format (clear *temp-string*) "~D" s5-1)
|
||||
(s3-1 s2-1 (the-as bucket-id s1-0) *temp-string* s4-1 (font-color gold-#ba9200) (the-as vector2h #f))
|
||||
(s3-1 s2-1 (the-as bucket-id s1-0) *temp-string* s4-1 (font-color gold) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -11,45 +11,45 @@
|
||||
(defenum font-color
|
||||
:type uint32
|
||||
(default 0)
|
||||
(#dadada 1)
|
||||
(#ededed 2)
|
||||
(font-color-1 1)
|
||||
(font-color-2 2)
|
||||
(red 3)
|
||||
(gold-#ba9200 4)
|
||||
(yellow-#f3f300 5)
|
||||
(green-#3df23d 6)
|
||||
(blue-#003cf1 7)
|
||||
(cyan-#00fefe 8)
|
||||
(magenta-#f87df8 9)
|
||||
(#a0d5d5 10)
|
||||
(#7cbaba 11)
|
||||
(white-#ffffff 12)
|
||||
(#959595 13)
|
||||
(#f9a400 14)
|
||||
(#daf95e 15)
|
||||
(#8aa81f 16)
|
||||
(#a6b5a6 17)
|
||||
(#757f75 18)
|
||||
(#5e3f5e 19)
|
||||
(gold 4)
|
||||
(yellow 5)
|
||||
(green 6)
|
||||
(blue 7)
|
||||
(cyan 8)
|
||||
(magenta 9)
|
||||
(font-color-10 10)
|
||||
(font-color-11 11)
|
||||
(white 12)
|
||||
(font-color-13 13)
|
||||
(font-color-14 14)
|
||||
(font-color-15 15)
|
||||
(font-color-16 16)
|
||||
(font-color-17 17)
|
||||
(font-color-18 18)
|
||||
(font-color-19 19)
|
||||
(flat-yellow 20)
|
||||
(#3fbaed 21)
|
||||
(#3a3a3a 22)
|
||||
(#5c5c5c 23)
|
||||
(#f298c8 24)
|
||||
(#f46868 25)
|
||||
(#20ca98 26)
|
||||
(#8289de 27)
|
||||
(#a8f3f6 28)
|
||||
(#fef666 29)
|
||||
(#f1f104 30)
|
||||
(#8ed0f4 31)
|
||||
(#7efbfb 32)
|
||||
(#7ffcfc 33)
|
||||
(#f9f9f9 34)
|
||||
(#408080 35)
|
||||
(#e0f0e0 36)
|
||||
(#c00000 37)
|
||||
(#ffc040 38)
|
||||
(#000000 39)
|
||||
(font-color-21 21)
|
||||
(font-color-22 22)
|
||||
(font-color-23 23)
|
||||
(font-color-24 24)
|
||||
(font-color-25 25)
|
||||
(font-color-26 26)
|
||||
(font-color-27 27)
|
||||
(font-color-28 28)
|
||||
(font-color-29 29)
|
||||
(font-color-30 30)
|
||||
(font-color-31 31)
|
||||
(font-color-32 32)
|
||||
(font-color-33 33)
|
||||
(font-color-34 34)
|
||||
(font-color-35 35)
|
||||
(font-color-36 36)
|
||||
(font-color-37 37)
|
||||
(font-color-38 38)
|
||||
(font-color-39 39)
|
||||
)
|
||||
;; ---font-color
|
||||
|
||||
|
@ -94,7 +94,7 @@
|
||||
(s3-0 (bucket-id debug-no-zbuf1))
|
||||
)
|
||||
(format (clear *temp-string*) "region-~D~%" (-> obj region id))
|
||||
(s5-0 s4-0 (the-as bucket-id s3-0) *temp-string* sv-36 (font-color #dadada) sv-32)
|
||||
(s5-0 s4-0 (the-as bucket-id s3-0) *temp-string* sv-36 (font-color font-color-1) sv-32)
|
||||
)
|
||||
(+! (-> sv-32 y) 8)
|
||||
(let ((s5-1 (-> obj region on-enter)))
|
||||
@ -104,7 +104,7 @@
|
||||
(s2-1 (bucket-id debug-no-zbuf1))
|
||||
)
|
||||
(format (clear *temp-string*) "(on-enter ~S)" s5-1)
|
||||
(s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* sv-36 (font-color #dadada) sv-32)
|
||||
(s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* sv-36 (font-color font-color-1) sv-32)
|
||||
)
|
||||
(+! (-> sv-32 y) 8)
|
||||
)
|
||||
@ -116,7 +116,7 @@
|
||||
(s2-2 (bucket-id debug-no-zbuf1))
|
||||
)
|
||||
(format (clear *temp-string*) "(on-inside ~S)" s5-2)
|
||||
(s4-2 s3-2 (the-as bucket-id s2-2) *temp-string* sv-36 (font-color #dadada) sv-32)
|
||||
(s4-2 s3-2 (the-as bucket-id s2-2) *temp-string* sv-36 (font-color font-color-1) sv-32)
|
||||
)
|
||||
(+! (-> sv-32 y) 8)
|
||||
)
|
||||
@ -128,7 +128,7 @@
|
||||
(s3-3 (bucket-id debug-no-zbuf1))
|
||||
)
|
||||
(format (clear *temp-string*) "(on-exit ~S)" gp-1)
|
||||
(s5-3 s4-3 (the-as bucket-id s3-3) *temp-string* sv-36 (font-color #dadada) sv-32)
|
||||
(s5-3 s4-3 (the-as bucket-id s3-3) *temp-string* sv-36 (font-color font-color-1) sv-32)
|
||||
)
|
||||
(+! (-> sv-32 y) 8)
|
||||
)
|
||||
|
@ -17,7 +17,8 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defun truncate ((arg0 float))
|
||||
"Round (toward zero) to an integer."
|
||||
"Round (toward zero) to an integer.
|
||||
@param arg0 float to truncate"
|
||||
(the float (the int arg0))
|
||||
)
|
||||
|
||||
|
@ -281,7 +281,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
|
||||
(s1-0 (bucket-id debug-no-zbuf1))
|
||||
)
|
||||
(format (clear *temp-string*) "~D" s5-1)
|
||||
(s3-0 s2-0 (the-as bucket-id s1-0) *temp-string* s4-0 (font-color cyan-#00fefe) (the-as vector2h #f))
|
||||
(s3-0 s2-0 (the-as bucket-id s1-0) *temp-string* s4-0 (font-color cyan) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -389,7 +389,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(res-lump-struct obj 'name string)
|
||||
s5-0
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 8))
|
||||
)
|
||||
(let ((s4-1 add-debug-text-3d)
|
||||
@ -402,7 +402,7 @@
|
||||
(the-as bucket-id s2-1)
|
||||
*temp-string*
|
||||
s5-0
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 16))
|
||||
)
|
||||
)
|
||||
@ -548,7 +548,7 @@
|
||||
(the-as bucket-id s2-1)
|
||||
*temp-string*
|
||||
(-> gp-0 1)
|
||||
(font-color magenta-#f87df8)
|
||||
(font-color magenta)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 8))
|
||||
)
|
||||
)
|
||||
@ -1474,7 +1474,7 @@
|
||||
(the-as bucket-id s2-0)
|
||||
*temp-string*
|
||||
(-> obj static-sphere s5-0)
|
||||
(font-color cyan-#00fefe)
|
||||
(font-color cyan)
|
||||
(the-as vector2h #f)
|
||||
)
|
||||
)
|
||||
@ -1510,7 +1510,7 @@
|
||||
(the-as bucket-id s1-1)
|
||||
*temp-string*
|
||||
(poly-centroid obj s4-1 sv-32)
|
||||
(font-color cyan-#00fefe)
|
||||
(font-color cyan)
|
||||
(the-as vector2h #f)
|
||||
)
|
||||
)
|
||||
|
@ -537,7 +537,7 @@
|
||||
)
|
||||
(format (clear *temp-string*) "~d" (+ s2-0 -1))
|
||||
(let ((a2-3 *temp-string*))
|
||||
(add-debug-text-3d #t (bucket-id debug-no-zbuf1) a2-3 s3-0 (font-color blue-#003cf1) s5-0)
|
||||
(add-debug-text-3d #t (bucket-id debug-no-zbuf1) a2-3 s3-0 (font-color blue) s5-0)
|
||||
)
|
||||
(+! (-> s5-0 x) 10)
|
||||
)
|
||||
|
@ -711,7 +711,7 @@
|
||||
(set! (-> s2-0 flags) (font-flags kerning middle left large))
|
||||
(set! (-> s2-0 origin x) (+ -1.0 (-> s2-0 origin x)))
|
||||
(set! (-> s2-0 origin y) (+ -1.0 (-> s2-0 origin y)))
|
||||
(set! (-> s2-0 color) (font-color #000000))
|
||||
(set! (-> s2-0 color) (font-color font-color-39))
|
||||
(set! (-> s2-0 origin x) (+ 1.0 (-> s2-0 origin x)))
|
||||
(set! (-> s2-0 origin y) (+ 1.0 (-> s2-0 origin y)))
|
||||
(set! (-> s2-0 color) (font-color default))
|
||||
@ -1312,7 +1312,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> v1-94 name)
|
||||
(-> v1-94 draw origin)
|
||||
(font-color yellow-#f3f300)
|
||||
(font-color yellow)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 8))
|
||||
)
|
||||
)
|
||||
|
@ -653,7 +653,7 @@
|
||||
(alloc-string-if-needed obj s5-0)
|
||||
(set! (-> obj strings s5-0 scale) 0.8)
|
||||
(set! (-> obj strings s5-0 flags) (font-flags kerning middle large))
|
||||
(set! (-> obj strings s5-0 color) (font-color green-#3df23d))
|
||||
(set! (-> obj strings s5-0 color) (font-color green))
|
||||
)
|
||||
(set! (-> obj values 2 target) (-> obj values 1 target))
|
||||
0
|
||||
@ -692,7 +692,7 @@
|
||||
(alloc-string-if-needed obj 0)
|
||||
(set! (-> obj strings 0 scale) 0.8)
|
||||
(set! (-> obj strings 0 flags) (font-flags kerning middle large))
|
||||
(set! (-> obj strings 0 color) (font-color green-#3df23d))
|
||||
(set! (-> obj strings 0 color) (font-color green))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
@ -1177,7 +1177,7 @@
|
||||
(dotimes (v1-9 14)
|
||||
(set! (-> self strings v1-9 text) #f)
|
||||
(set! (-> self strings v1-9 scale) 1.0)
|
||||
(set! (-> self strings v1-9 color) (font-color #dadada))
|
||||
(set! (-> self strings v1-9 color) (font-color font-color-1))
|
||||
(set! (-> self strings v1-9 flags) (font-flags shadow kerning large))
|
||||
(set! (-> self strings v1-9 pos 0) 0)
|
||||
(set! (-> self strings v1-9 pos 2) #xfffffff)
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
;; WARN: Return type mismatch int vs font-color.
|
||||
(defbehavior progress-selected progress ((arg0 int))
|
||||
(let ((color (font-color #7ffcfc)))
|
||||
(let ((color (font-color font-color-33)))
|
||||
(cond
|
||||
((< 4 (the-as int (logand (-> self clock integral-frame-counter) 7)))
|
||||
(set! (-> *progress-state* color-flash-counter) 1)
|
||||
@ -458,7 +458,7 @@
|
||||
)
|
||||
(set! (-> arg1 origin x) (- (-> arg1 origin x) (the float s5-0)))
|
||||
)
|
||||
(set! (-> arg1 color) (font-color #7efbfb))
|
||||
(set! (-> arg1 color) (font-color font-color-32))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@ -625,7 +625,7 @@
|
||||
(arg3
|
||||
(set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-1 color) (font-color font-color-34))
|
||||
)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
(set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y)))
|
||||
@ -684,7 +684,7 @@
|
||||
(arg3
|
||||
(set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-1 color) (font-color font-color-34))
|
||||
)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
(set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y)))
|
||||
@ -749,7 +749,7 @@
|
||||
)
|
||||
(set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y)))
|
||||
(let ((a0-6 arg1))
|
||||
(set! (-> a0-6 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-6 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 44 f28-0)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
@ -789,7 +789,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-23 arg1))
|
||||
(set! (-> a0-23 color) (font-color #7efbfb))
|
||||
(set! (-> a0-23 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1024,7 +1024,7 @@
|
||||
(set! (-> v1-7 scale) 0.75)
|
||||
)
|
||||
(let ((a0-2 arg1))
|
||||
(set! (-> a0-2 color) (font-color #7efbfb))
|
||||
(set! (-> a0-2 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-3 arg1))
|
||||
@ -1599,7 +1599,7 @@
|
||||
(set! (-> arg1 origin y) (the float sv-48))
|
||||
(set! (-> arg1 height) 50.0)
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((a0-2 arg1))
|
||||
(set! (-> a0-2 flags) (font-flags kerning middle large))
|
||||
@ -1682,7 +1682,7 @@
|
||||
(set! (-> sv-48 height) 50.0)
|
||||
(set! (-> sv-48 origin y) (the float sv-16))
|
||||
(let ((a0-2 sv-48))
|
||||
(set! (-> a0-2 color) (font-color #7efbfb))
|
||||
(set! (-> a0-2 color) (font-color font-color-32))
|
||||
)
|
||||
(set! sv-32 print-game-text)
|
||||
(let ((a0-4 (lookup-text! *common-text* s0-0 #f))
|
||||
@ -1757,7 +1757,7 @@
|
||||
(set! (-> sv-16 origin y) (the float sv-32))
|
||||
(set! (-> sv-16 height) 50.0)
|
||||
(let ((a0-2 sv-16))
|
||||
(set! (-> a0-2 color) (font-color #7efbfb))
|
||||
(set! (-> a0-2 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> sv-16 origin x) 80.0)
|
||||
(let ((a0-3 sv-16))
|
||||
@ -1844,7 +1844,7 @@
|
||||
(set! (-> sv-48 origin y) (the float sv-16))
|
||||
(set! (-> sv-48 height) 50.0)
|
||||
(let ((a0-2 sv-48))
|
||||
(set! (-> a0-2 color) (font-color #7efbfb))
|
||||
(set! (-> a0-2 color) (font-color font-color-32))
|
||||
)
|
||||
(set! sv-32 print-game-text)
|
||||
(let ((a0-4 (lookup-text! *common-text* s0-0 #f))
|
||||
@ -1937,7 +1937,7 @@
|
||||
(set! (-> a0-6 flags) (font-flags kerning middle large))
|
||||
)
|
||||
(let ((a0-7 sv-80))
|
||||
(set! (-> a0-7 color) (font-color #7efbfb))
|
||||
(set! (-> a0-7 color) (font-color font-color-32))
|
||||
)
|
||||
(set! sv-48 print-game-text)
|
||||
(let* ((a0-8 *common-text*)
|
||||
@ -2034,7 +2034,7 @@
|
||||
(let ((s2-3 arg1))
|
||||
(set! (-> s2-3 color) (if (= arg2 sv-20)
|
||||
(the-as font-color (the-as int (progress-selected 0)))
|
||||
(font-color #7efbfb)
|
||||
(font-color font-color-32)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -2220,7 +2220,7 @@
|
||||
(s2-7 *temp-string* arg1 #f 44 (bucket-id progress))
|
||||
)
|
||||
(let ((a0-45 arg1))
|
||||
(set! (-> a0-45 color) (font-color #7efbfb))
|
||||
(set! (-> a0-45 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> arg1 origin x) 250.0)
|
||||
(set! (-> arg1 origin y) 110.0)
|
||||
@ -2457,7 +2457,7 @@
|
||||
(set! (-> v1-25 height) (the float 160))
|
||||
)
|
||||
(let ((a0-16 arg1))
|
||||
(set! (-> a0-16 color) (font-color #7efbfb))
|
||||
(set! (-> a0-16 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((s5-2 print-game-text))
|
||||
(format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-dont-remove) #f) 1)
|
||||
@ -2474,7 +2474,7 @@
|
||||
(set! (-> v1-3 scale) 0.5)
|
||||
)
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 color) (font-color #7efbfb))
|
||||
(set! (-> a0-3 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((a0-4 arg1))
|
||||
(set! (-> a0-4 flags) (font-flags kerning middle left large))
|
||||
@ -2564,7 +2564,7 @@
|
||||
(set! (-> v1-1 scale) 0.5)
|
||||
)
|
||||
(let ((a0-2 arg1))
|
||||
(set! (-> a0-2 color) (font-color #7efbfb))
|
||||
(set! (-> a0-2 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 flags) (font-flags kerning middle left large))
|
||||
@ -2609,7 +2609,7 @@
|
||||
(set! (-> v1-1 scale) 0.5)
|
||||
)
|
||||
(let ((a0-2 arg1))
|
||||
(set! (-> a0-2 color) (font-color #7efbfb))
|
||||
(set! (-> a0-2 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 flags) (font-flags kerning middle left large))
|
||||
@ -2655,7 +2655,7 @@
|
||||
(set! (-> v1-1 scale) 0.5)
|
||||
)
|
||||
(let ((a0-2 arg1))
|
||||
(set! (-> a0-2 color) (font-color #7efbfb))
|
||||
(set! (-> a0-2 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 flags) (font-flags kerning middle left large))
|
||||
@ -2722,7 +2722,7 @@
|
||||
(set! (-> v1-1 scale) 0.5)
|
||||
)
|
||||
(let ((a0-2 arg1))
|
||||
(set! (-> a0-2 color) (font-color #7efbfb))
|
||||
(set! (-> a0-2 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 flags) (font-flags kerning middle left large))
|
||||
@ -2797,7 +2797,7 @@
|
||||
(set! (-> v1-1 scale) 0.5)
|
||||
)
|
||||
(let ((a0-2 arg1))
|
||||
(set! (-> a0-2 color) (font-color #7efbfb))
|
||||
(set! (-> a0-2 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 flags) (font-flags kerning middle left large))
|
||||
@ -2855,7 +2855,7 @@
|
||||
(defmethod draw-option menu-error-disc-removed-option ((obj menu-error-disc-removed-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.5)
|
||||
@ -2913,7 +2913,7 @@
|
||||
(defmethod draw-option menu-error-reading-option ((obj menu-error-reading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.5)
|
||||
@ -2969,7 +2969,7 @@
|
||||
(defmethod draw-option menu-icon-info-option ((obj menu-icon-info-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.5)
|
||||
@ -3043,7 +3043,7 @@
|
||||
(defmethod draw-option menu-format-card-option ((obj menu-format-card-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.5)
|
||||
@ -3095,7 +3095,7 @@
|
||||
(defmethod draw-option menu-already-exists-option ((obj menu-already-exists-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.5)
|
||||
@ -3139,7 +3139,7 @@
|
||||
(defmethod draw-option menu-create-game-option ((obj menu-create-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.5)
|
||||
@ -3180,7 +3180,7 @@
|
||||
(defmethod draw-option menu-video-mode-warning-option ((obj menu-video-mode-warning-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.5)
|
||||
@ -3246,7 +3246,7 @@
|
||||
(defmethod draw-option menu-video-mode-ok-option ((obj menu-video-mode-ok-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.5)
|
||||
@ -3290,7 +3290,7 @@
|
||||
(defmethod draw-option menu-progressive-mode-warning-option ((obj menu-progressive-mode-warning-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.5)
|
||||
@ -3356,7 +3356,7 @@
|
||||
(defmethod draw-option menu-progressive-mode-ok-option ((obj menu-progressive-mode-ok-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.55)
|
||||
@ -3400,7 +3400,7 @@
|
||||
(defmethod draw-option menu-quit-option ((obj menu-quit-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.55)
|
||||
@ -3459,7 +3459,7 @@
|
||||
(set! (-> a0-3 flags) (font-flags kerning middle large))
|
||||
)
|
||||
(let ((a0-4 arg1))
|
||||
(set! (-> a0-4 color) (font-color #7efbfb))
|
||||
(set! (-> a0-4 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> arg1 origin y) 100.0)
|
||||
(let ((v1-9 arg1))
|
||||
@ -3553,7 +3553,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-35 arg1))
|
||||
(set! (-> a0-35 color) (font-color #7efbfb))
|
||||
(set! (-> a0-35 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -3654,7 +3654,7 @@
|
||||
(set! (-> v1-15 height) (the float 210))
|
||||
)
|
||||
(let ((a1-9 arg1))
|
||||
(set! (-> a1-9 color) (font-color #7efbfb))
|
||||
(set! (-> a1-9 color) (font-color font-color-32))
|
||||
)
|
||||
(if (or (= (-> *setting-control* user-default language) (language-enum french))
|
||||
(= (-> *setting-control* user-default language) (language-enum spanish))
|
||||
@ -3748,7 +3748,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-21 arg1))
|
||||
(set! (-> a0-21 color) (font-color #7efbfb))
|
||||
(set! (-> a0-21 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -3988,7 +3988,7 @@
|
||||
(set! (-> arg1 origin x) 60.0)
|
||||
(set! (-> arg1 origin y) 80.0)
|
||||
(let ((a0-21 arg1))
|
||||
(set! (-> a0-21 color) (font-color #7efbfb))
|
||||
(set! (-> a0-21 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-40 (-> obj page-index)))
|
||||
(cond
|
||||
@ -4210,7 +4210,7 @@
|
||||
(let ((s3-1 arg2))
|
||||
(set! (-> s3-1 color) (if (= arg3 1)
|
||||
(the-as font-color (the-as int (progress-selected 0)))
|
||||
(font-color #7efbfb)
|
||||
(font-color font-color-32)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -4236,7 +4236,7 @@
|
||||
)
|
||||
(set! (-> arg2 origin x) 360.0)
|
||||
(let ((a0-35 arg2))
|
||||
(set! (-> a0-35 color) (font-color #7efbfb))
|
||||
(set! (-> a0-35 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -4382,7 +4382,7 @@
|
||||
(set! (-> a0-21 flags) (font-flags kerning middle large))
|
||||
)
|
||||
(let ((a0-22 arg1))
|
||||
(set! (-> a0-22 color) (font-color #7efbfb))
|
||||
(set! (-> a0-22 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> arg1 origin x) 59.0)
|
||||
(let ((v1-54 arg1))
|
||||
@ -5382,7 +5382,7 @@
|
||||
(set! (-> a0-4 flags) (font-flags kerning middle large))
|
||||
)
|
||||
(let ((a0-5 sv-140))
|
||||
(set! (-> a0-5 color) (font-color #7efbfb))
|
||||
(set! (-> a0-5 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> sv-140 origin x) 59.0)
|
||||
(set! (-> sv-140 origin y) 78.0)
|
||||
@ -5424,7 +5424,7 @@
|
||||
(set! (-> a0-23 flags) (font-flags kerning large))
|
||||
)
|
||||
(let ((a0-24 sv-140))
|
||||
(set! (-> a0-24 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-24 color) (font-color font-color-34))
|
||||
)
|
||||
(set! (-> sv-140 origin x) (+ 20.0 sv-120 (-> sv-140 origin x)))
|
||||
(let ((v1-53 sv-140))
|
||||
@ -5483,7 +5483,7 @@
|
||||
)
|
||||
(set! sv-108 (-> sv-140 origin x))
|
||||
(let ((a0-54 sv-140))
|
||||
(set! (-> a0-54 color) (font-color #7efbfb))
|
||||
(set! (-> a0-54 color) (font-color font-color-32))
|
||||
)
|
||||
(+! (-> sv-140 origin x) sv-120)
|
||||
(let ((v1-96 sv-140))
|
||||
@ -5538,7 +5538,7 @@
|
||||
(set! (-> a0-74 flags) (font-flags kerning large))
|
||||
)
|
||||
(let ((a0-75 sv-140))
|
||||
(set! (-> a0-75 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-75 color) (font-color font-color-34))
|
||||
)
|
||||
(set! (-> sv-140 origin x) (+ 20.0 sv-124 (-> sv-140 origin x)))
|
||||
(let ((v1-142 sv-140))
|
||||
@ -5597,7 +5597,7 @@
|
||||
)
|
||||
(set! sv-108 (-> sv-140 origin x))
|
||||
(let ((a0-105 sv-140))
|
||||
(set! (-> a0-105 color) (font-color #7efbfb))
|
||||
(set! (-> a0-105 color) (font-color font-color-32))
|
||||
)
|
||||
(+! (-> sv-140 origin x) sv-124)
|
||||
(let ((v1-185 sv-140))
|
||||
@ -5656,7 +5656,7 @@
|
||||
((and (zero? (-> *progress-state* game-options-item-selected)) (-> *progress-state* game-options-item-picked))
|
||||
(set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y)))
|
||||
(let ((a0-2 arg1))
|
||||
(set! (-> a0-2 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-2 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (+ -1.0 (-> arg1 origin y))) 41 f30-0)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
@ -5693,7 +5693,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-17 arg1))
|
||||
(set! (-> a0-17 color) (font-color #7efbfb))
|
||||
(set! (-> a0-17 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -5744,7 +5744,7 @@
|
||||
((and (= (-> *progress-state* game-options-item-selected) 1) (-> *progress-state* game-options-item-picked))
|
||||
(set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y)))
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-3 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (+ -1.0 (-> arg1 origin y))) 41 f30-0)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
@ -5781,7 +5781,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-20 arg1))
|
||||
(set! (-> a0-20 color) (font-color #7efbfb))
|
||||
(set! (-> a0-20 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -5841,7 +5841,7 @@
|
||||
(cond
|
||||
((and (= (-> *progress-state* game-options-item-selected) 2) (-> *progress-state* game-options-item-picked))
|
||||
(let ((a0-7 arg1))
|
||||
(set! (-> a0-7 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-7 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (-> arg1 origin y)) 44 f30-0)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
@ -5860,13 +5860,13 @@
|
||||
)
|
||||
)
|
||||
(let ((a0-12 arg1))
|
||||
(set! (-> a0-12 color) (font-color #7efbfb))
|
||||
(set! (-> a0-12 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-33 arg1))
|
||||
(set! (-> v1-33 scale) 0.5)
|
||||
)
|
||||
(let ((a0-14 arg1))
|
||||
(set! (-> a0-14 color) (font-color #7efbfb))
|
||||
(set! (-> a0-14 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> arg1 origin x) (+ -70.0 (-> arg1 origin x)))
|
||||
(let ((s5-1 print-game-text))
|
||||
@ -5908,7 +5908,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-31 arg1))
|
||||
(set! (-> a0-31 color) (font-color #7efbfb))
|
||||
(set! (-> a0-31 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -5920,7 +5920,7 @@
|
||||
(set! (-> v1-54 scale) 0.5)
|
||||
)
|
||||
(let ((a0-36 arg1))
|
||||
(set! (-> a0-36 color) (font-color #7efbfb))
|
||||
(set! (-> a0-36 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> arg1 origin y) (+ 24.0 (-> arg1 origin y)))
|
||||
(let ((a0-37 arg1))
|
||||
@ -5974,7 +5974,7 @@
|
||||
(cond
|
||||
((and (= (-> *progress-state* game-options-item-selected) 3) (-> *progress-state* game-options-item-picked))
|
||||
(let ((a0-7 arg1))
|
||||
(set! (-> a0-7 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-7 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (-> arg1 origin y)) 44 f30-0)
|
||||
(let ((s3-0 print-game-text))
|
||||
@ -5996,13 +5996,13 @@
|
||||
)
|
||||
)
|
||||
(let ((a0-14 arg1))
|
||||
(set! (-> a0-14 color) (font-color #7efbfb))
|
||||
(set! (-> a0-14 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-33 arg1))
|
||||
(set! (-> v1-33 scale) 0.5)
|
||||
)
|
||||
(let ((a0-16 arg1))
|
||||
(set! (-> a0-16 color) (font-color #7efbfb))
|
||||
(set! (-> a0-16 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> arg1 origin x) (+ -70.0 (-> arg1 origin x)))
|
||||
(let ((s5-1 print-game-text))
|
||||
@ -6044,7 +6044,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-33 arg1))
|
||||
(set! (-> a0-33 color) (font-color #7efbfb))
|
||||
(set! (-> a0-33 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -6059,7 +6059,7 @@
|
||||
(set! (-> v1-54 scale) 0.5)
|
||||
)
|
||||
(let ((a0-40 arg1))
|
||||
(set! (-> a0-40 color) (font-color #7efbfb))
|
||||
(set! (-> a0-40 color) (font-color font-color-32))
|
||||
)
|
||||
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> *language-name-remap* (-> s4-0 0)) #f))
|
||||
*temp-string*
|
||||
@ -6133,7 +6133,7 @@
|
||||
)
|
||||
(set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y)))
|
||||
(let ((a0-4 arg1))
|
||||
(set! (-> a0-4 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-4 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 42 f30-0)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
@ -6174,7 +6174,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-21 arg1))
|
||||
(set! (-> a0-21 color) (font-color #7efbfb))
|
||||
(set! (-> a0-21 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -6240,7 +6240,7 @@
|
||||
)
|
||||
(set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y)))
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-3 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 42 f30-0)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
@ -6281,7 +6281,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-20 arg1))
|
||||
(set! (-> a0-20 color) (font-color #7efbfb))
|
||||
(set! (-> a0-20 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -6340,7 +6340,7 @@
|
||||
(set! (-> v1-10 scale) 0.6)
|
||||
)
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-3 color) (font-color font-color-34))
|
||||
)
|
||||
(set! (-> arg1 width) 350.0)
|
||||
(set! (-> arg1 height) 60.0)
|
||||
@ -6415,7 +6415,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-31 arg1))
|
||||
(set! (-> a0-31 color) (font-color #7efbfb))
|
||||
(set! (-> a0-31 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -6444,7 +6444,7 @@
|
||||
(cond
|
||||
((and (zero? (-> *progress-state* qr-options-item-selected)) (-> *progress-state* qr-options-item-picked))
|
||||
(let ((a0-2 arg1))
|
||||
(set! (-> a0-2 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-2 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 50 f0-1)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
@ -6507,7 +6507,7 @@
|
||||
(cond
|
||||
((and (= (-> *progress-state* qr-options-item-selected) 1) (-> *progress-state* qr-options-item-picked))
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-3 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 50 f30-0)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
@ -6669,7 +6669,7 @@
|
||||
(set! sv-128 (-> obj value-to-modify))
|
||||
(set! (-> s5-0 origin y) (+ -8.0 (-> s5-0 origin y)))
|
||||
(let ((a0-12 s5-0))
|
||||
(set! (-> a0-12 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-12 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (+ -2.0 (-> s5-0 origin y))) 52 f30-0)
|
||||
(set! sv-144 print-game-text)
|
||||
@ -6965,7 +6965,7 @@
|
||||
arg3
|
||||
)
|
||||
(let ((a0-7 arg1))
|
||||
(set! (-> a0-7 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-7 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (+ -1.0 (-> arg1 origin y))) 42 f30-0)
|
||||
(let ((s3-1 print-game-text))
|
||||
@ -6974,13 +6974,13 @@
|
||||
)
|
||||
(set! (-> arg1 origin y) (+ 22.0 (-> arg1 origin y)))
|
||||
(let ((a0-13 arg1))
|
||||
(set! (-> a0-13 color) (font-color #7efbfb))
|
||||
(set! (-> a0-13 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-22 arg1))
|
||||
(set! (-> v1-22 scale) 0.5)
|
||||
)
|
||||
(let ((a0-15 arg1))
|
||||
(set! (-> a0-15 color) (font-color #7efbfb))
|
||||
(set! (-> a0-15 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> arg1 origin x) (+ -70.0 (-> arg1 origin x)))
|
||||
(let ((s4-1 print-game-text))
|
||||
@ -7023,7 +7023,7 @@
|
||||
(set! (-> v1-39 scale) 0.5)
|
||||
)
|
||||
(let ((a0-33 arg1))
|
||||
(set! (-> a0-33 color) (font-color #7efbfb))
|
||||
(set! (-> a0-33 color) (font-color font-color-32))
|
||||
)
|
||||
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> *stereo-mode-name-remap* s5-0) #f))
|
||||
(let ((a0-37 *temp-string*))
|
||||
@ -7085,7 +7085,7 @@
|
||||
(let ((s0-0 arg1))
|
||||
(set! (-> s0-0 color) (if (= arg2 (-> arg0 option-index))
|
||||
(the-as font-color (the-as int (progress-selected 0)))
|
||||
(font-color #7efbfb)
|
||||
(font-color font-color-32)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -7097,7 +7097,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-9 arg1))
|
||||
(set! (-> a0-9 color) (font-color #7efbfb))
|
||||
(set! (-> a0-9 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1341,7 +1341,7 @@
|
||||
(let ((s3-0 sv-144))
|
||||
(set! (-> s3-0 color) (if (and (= s4-1 (-> self option-index)) (= (-> self menu-transition) 0.0))
|
||||
(progress-selected 0)
|
||||
(font-color #7efbfb)
|
||||
(font-color font-color-32)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -3540,7 +3540,7 @@ This commonly includes things such as:
|
||||
(set! (-> v1-51 origin y) (the float a0-59))
|
||||
)
|
||||
(let ((a0-60 s1-0))
|
||||
(set! (-> a0-60 color) (font-color #fef666))
|
||||
(set! (-> a0-60 color) (font-color font-color-29))
|
||||
)
|
||||
(let ((s0-0 print-game-text))
|
||||
(set! sv-352 format)
|
||||
@ -3570,7 +3570,7 @@ This commonly includes things such as:
|
||||
)
|
||||
(let ((a0-68 s1-0))
|
||||
(set! (-> a0-68 color) (if (= s0-1 s5-0)
|
||||
(font-color #f1f104)
|
||||
(font-color font-color-30)
|
||||
(font-color default)
|
||||
)
|
||||
)
|
||||
|
@ -80,7 +80,7 @@
|
||||
(the-as bucket-id s2-0)
|
||||
*temp-string*
|
||||
s5-0
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 16))
|
||||
)
|
||||
)
|
||||
|
@ -118,7 +118,7 @@
|
||||
gp-0
|
||||
(if (logtest? (-> obj flags) (nav-node-flag-byte blocked))
|
||||
(font-color red)
|
||||
(font-color cyan-#00fefe)
|
||||
(font-color cyan)
|
||||
)
|
||||
(the-as vector2h #f)
|
||||
)
|
||||
|
@ -1139,7 +1139,7 @@ Process is recycled and moved to reserved, if it deactivates."
|
||||
*temp-string*
|
||||
sv-84
|
||||
(if (< (-> sv-20 user-count) (-> sv-20 max-user-count))
|
||||
(font-color yellow-#f3f300)
|
||||
(font-color yellow)
|
||||
(font-color red)
|
||||
)
|
||||
(the-as vector2h #f)
|
||||
|
@ -40,7 +40,7 @@
|
||||
(s2-1 324)
|
||||
)
|
||||
(format (clear *temp-string*) "~D" arg1)
|
||||
(s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* s5-0 (font-color yellow-#f3f300) (the-as vector2h #f))
|
||||
(s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* s5-0 (font-color yellow) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -66,7 +66,7 @@
|
||||
(s2-1 324)
|
||||
)
|
||||
(format (clear *temp-string*) "~D" arg0)
|
||||
(s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* s5-0 (font-color cyan-#00fefe) (the-as vector2h #f))
|
||||
(s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* s5-0 (font-color cyan) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -56,7 +56,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
spot-id
|
||||
(-> spot center)
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
(the-as vector2h #f)
|
||||
)
|
||||
)
|
||||
|
@ -830,7 +830,7 @@
|
||||
(-> obj stat-child-count)
|
||||
(-> obj allies length)
|
||||
)
|
||||
(s3-0 s2-0 (the-as bucket-id s1-0) *temp-string* s4-0 (font-color gold-#ba9200) (the-as vector2h #f))
|
||||
(s3-0 s2-0 (the-as bucket-id s1-0) *temp-string* s4-0 (font-color gold) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
(dotimes (s5-1 (-> obj spawners length))
|
||||
@ -862,7 +862,7 @@
|
||||
(the-as bucket-id s1-1)
|
||||
*temp-string*
|
||||
(-> s4-1 entity extra trans)
|
||||
(font-color yellow-#f3f300)
|
||||
(font-color yellow)
|
||||
(the-as vector2h #f)
|
||||
)
|
||||
)
|
||||
|
@ -242,7 +242,7 @@
|
||||
(add-debug-x #t (bucket-id debug2) (-> s4-0 pos) *color-white*)
|
||||
(format (clear *temp-string*) "~d" s5-0)
|
||||
(let ((a2-2 *temp-string*))
|
||||
(add-debug-text-3d #t (bucket-id debug2) a2-2 (-> s4-0 pos) (font-color #dadada) (the-as vector2h #f))
|
||||
(add-debug-text-3d #t (bucket-id debug2) a2-2 (-> s4-0 pos) (font-color font-color-1) (the-as vector2h #f))
|
||||
)
|
||||
(dotimes (s3-1 (-> s4-0 count))
|
||||
(let ((a2-3 (new 'stack-no-clear 'vector)))
|
||||
|
@ -41,15 +41,15 @@
|
||||
(alloc-string-if-needed obj 0)
|
||||
(set! (-> obj strings 0 scale) 0.55)
|
||||
(set! (-> obj strings 0 flags) (font-flags kerning middle large))
|
||||
(set! (-> obj strings 0 color) (font-color green-#3df23d))
|
||||
(set! (-> obj strings 0 color) (font-color green))
|
||||
(alloc-string-if-needed obj 1)
|
||||
(set! (-> obj strings 1 scale) 0.55)
|
||||
(set! (-> obj strings 1 flags) (font-flags kerning middle large))
|
||||
(set! (-> obj strings 1 color) (font-color green-#3df23d))
|
||||
(set! (-> obj strings 1 color) (font-color green))
|
||||
(alloc-string-if-needed obj 2)
|
||||
(set! (-> obj strings 2 scale) 0.55)
|
||||
(set! (-> obj strings 2 flags) (font-flags kerning middle large))
|
||||
(set! (-> obj strings 2 color) (font-color green-#3df23d))
|
||||
(set! (-> obj strings 2 color) (font-color green))
|
||||
(set! (-> obj sprites 1 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x23 :page #x679)))
|
||||
0
|
||||
(none)
|
||||
@ -89,7 +89,7 @@
|
||||
(set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #xe :page #x679)))
|
||||
(alloc-string-if-needed obj 0)
|
||||
(set! (-> obj strings 0 flags) (font-flags kerning middle large))
|
||||
(set! (-> obj strings 0 color) (font-color green-#3df23d))
|
||||
(set! (-> obj strings 0 color) (font-color green))
|
||||
(set! (-> obj sprites 1 tex) (lookup-texture-by-id (new 'static 'texture-id :index #xd :page #x679)))
|
||||
(set! (-> obj sprites 2 tex) (lookup-texture-by-id (new 'static 'texture-id :index #xc :page #x679)))
|
||||
0
|
||||
@ -381,7 +381,7 @@
|
||||
(let ((s2-1 (-> s5-0 lap-time-array (+ (- -1 s4-0) (-> s5-0 lap-count)))))
|
||||
(set! (-> obj strings s3-0 scale) 0.5)
|
||||
(set! (-> obj strings s3-0 flags) (font-flags kerning large))
|
||||
(set! (-> obj strings s3-0 color) (font-color #dadada))
|
||||
(set! (-> obj strings s3-0 color) (font-color font-color-1))
|
||||
(set-as-offset-from!
|
||||
(the-as hud-sprite (&+ (-> obj strings 0 pos) (* 48 s3-0)))
|
||||
(the-as vector4w (-> obj strings 1 pos))
|
||||
@ -401,7 +401,7 @@
|
||||
(let ((s3-1 (+ s3-0 1)))
|
||||
(set! (-> obj strings s3-1 scale) 0.5)
|
||||
(set! (-> obj strings s3-1 flags) (font-flags kerning right large))
|
||||
(set! (-> obj strings s3-1 color) (font-color #dadada))
|
||||
(set! (-> obj strings s3-1 color) (font-color font-color-1))
|
||||
(set-as-offset-from!
|
||||
(the-as hud-sprite (&+ (-> obj strings 0 pos) (* 48 s3-1)))
|
||||
(the-as vector4w (-> obj strings 2 pos))
|
||||
@ -441,9 +441,9 @@
|
||||
(set! (-> obj strings 0 flags) (font-flags kerning middle large))
|
||||
(set! (-> obj strings 0 color) (font-color red))
|
||||
(set! (-> obj strings 1 flags) (font-flags kerning large))
|
||||
(set! (-> obj strings 1 color) (font-color #dadada))
|
||||
(set! (-> obj strings 1 color) (font-color font-color-1))
|
||||
(set! (-> obj strings 2 flags) (font-flags kerning large))
|
||||
(set! (-> obj strings 2 color) (font-color #dadada))
|
||||
(set! (-> obj strings 2 color) (font-color font-color-1))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
@ -1256,7 +1256,7 @@
|
||||
70
|
||||
20
|
||||
0.0
|
||||
(font-color gold-#ba9200)
|
||||
(font-color gold)
|
||||
(font-flags shadow kerning)
|
||||
)
|
||||
)
|
||||
@ -1292,7 +1292,7 @@
|
||||
70
|
||||
20
|
||||
0.0
|
||||
(font-color gold-#ba9200)
|
||||
(font-color gold)
|
||||
(font-flags shadow kerning)
|
||||
)
|
||||
)
|
||||
|
@ -413,7 +413,7 @@
|
||||
(s2-0 318)
|
||||
)
|
||||
(format (clear *temp-string*) "~D" arg0)
|
||||
(s4-1 s3-1 (the-as bucket-id s2-0) *temp-string* s5-0 (font-color #dadada) (the-as vector2h #f))
|
||||
(s4-1 s3-1 (the-as bucket-id s2-0) *temp-string* s5-0 (font-color font-color-1) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -533,8 +533,8 @@
|
||||
(set! (-> sv-112 scale) 0.7)
|
||||
(dotimes (s5-4 (-> gp-1 length))
|
||||
(if (= (-> self selected) s5-4)
|
||||
(set! (-> sv-112 color) (font-color #f1f104))
|
||||
(set! (-> sv-112 color) (font-color #dadada))
|
||||
(set! (-> sv-112 color) (font-color font-color-30))
|
||||
(set! (-> sv-112 color) (font-color font-color-1))
|
||||
)
|
||||
(print-game-text
|
||||
(lookup-text! *common-text* (the-as text-id (-> gp-1 s5-4)) #f)
|
||||
|
@ -135,7 +135,7 @@
|
||||
(the-as bucket-id s4-0)
|
||||
*temp-string*
|
||||
(get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) 0.0 'interp)
|
||||
(font-color green-#3df23d)
|
||||
(font-color green)
|
||||
(the-as vector2h #f)
|
||||
)
|
||||
)
|
||||
|
@ -539,8 +539,8 @@
|
||||
(set! (-> sv-112 scale) 0.7)
|
||||
(dotimes (s5-4 (-> gp-1 length))
|
||||
(if (= (-> self selected) s5-4)
|
||||
(set! (-> sv-112 color) (font-color #f1f104))
|
||||
(set! (-> sv-112 color) (font-color #dadada))
|
||||
(set! (-> sv-112 color) (font-color font-color-30))
|
||||
(set! (-> sv-112 color) (font-color font-color-1))
|
||||
)
|
||||
(print-game-text
|
||||
(lookup-text! *common-text* (the-as text-id (-> gp-1 s5-4)) #f)
|
||||
|
@ -245,21 +245,21 @@
|
||||
|
||||
(let ((items-drawn (-> lst offset))
|
||||
(i 0)
|
||||
(color (font-color white-#ffffff))
|
||||
(color (font-color white))
|
||||
(text-len (the draw-string-result 0)))
|
||||
|
||||
(with-dma-buffer-add-bucket ((buf (-> (current-frame) debug-buf))
|
||||
(bucket-id debug-no-zbuf1))
|
||||
|
||||
(when (nonzero? (length title))
|
||||
(set! text-len (draw-string-xy title buf 9 (+ 28 4 (* items-drawn 14)) (font-color white-#ffffff) (font-flags shadow kerning)))
|
||||
(set! text-len (draw-string-xy title buf 9 (+ 28 4 (* items-drawn 14)) (font-color white) (font-flags shadow kerning)))
|
||||
(1+! items-drawn)
|
||||
)
|
||||
|
||||
(do-atx-list (item lst)
|
||||
(let ((selected? (= i (-> lst selection))))
|
||||
|
||||
(set! color (if (= (-> item extra) sel-obj) (font-color green-#3df23d) (font-color white-#ffffff)))
|
||||
(set! color (if (= (-> item extra) sel-obj) (font-color green) (font-color white)))
|
||||
|
||||
(let ((this-len (draw-string-xy (-> item group name) buf 21 (+ 28 4 (* items-drawn 14)) color (font-flags shadow kerning))))
|
||||
(if (> this-len text-len)
|
||||
|
@ -82,5 +82,5 @@
|
||||
(-> *pc-settings* speedrunner-mode?)
|
||||
(enum->string speedrun-category (-> *speedrun-info* category))
|
||||
(-> *autosplit-info-jak2* res-fortress-escape))
|
||||
buf 0 (- 220 (* 8 4)) (font-color #fef666) (font-flags shadow kerning))))
|
||||
buf 0 (- 220 (* 8 4)) (font-color font-color-29) (font-flags shadow kerning))))
|
||||
(none))
|
||||
|
@ -95,6 +95,9 @@ class Compiler {
|
||||
std::vector<std::pair<std::string, replxx::Replxx::Color>> const& user_data);
|
||||
bool knows_object_file(const std::string& name);
|
||||
MakeSystem& make_system() { return m_make; }
|
||||
std::set<std::string> lookup_symbol_infos_starting_with(const std::string& prefix) const;
|
||||
std::vector<SymbolInfo>* lookup_exact_name_info(const std::string& name) const;
|
||||
std::optional<TypeSpec> lookup_typespec(const std::string& symbol_name) const;
|
||||
|
||||
private:
|
||||
GameVersion m_version;
|
||||
@ -126,8 +129,6 @@ class Compiler {
|
||||
} m_debug_stats;
|
||||
|
||||
void setup_goos_forms();
|
||||
std::set<std::string> lookup_symbol_infos_starting_with(const std::string& prefix) const;
|
||||
std::vector<SymbolInfo>* lookup_exact_name_info(const std::string& name) const;
|
||||
bool get_true_or_false(const goos::Object& form, const goos::Object& boolean);
|
||||
bool try_getting_macro_from_goos(const goos::Object& macro_name, goos::Object* dest);
|
||||
bool expand_macro_once(const goos::Object& src, goos::Object* out, Env* env);
|
||||
|
@ -599,6 +599,13 @@ std::vector<SymbolInfo>* Compiler::lookup_exact_name_info(const std::string& nam
|
||||
}
|
||||
}
|
||||
|
||||
std::optional<TypeSpec> Compiler::lookup_typespec(const std::string& symbol_name) const {
|
||||
if (m_symbol_types.find(symbol_name) != m_symbol_types.end()) {
|
||||
return m_symbol_types.at(symbol_name);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
Val* Compiler::compile_load_project(const goos::Object& form, const goos::Object& rest, Env*) {
|
||||
auto args = get_va(form, rest);
|
||||
va_check(form, args, {goos::ObjectType::STRING}, {});
|
||||
|
@ -138,43 +138,36 @@ std::vector<ArgumentDocumentation> get_args_from_docstring(std::vector<GoalArg>
|
||||
}
|
||||
auto lines = str_util::split(docstring);
|
||||
for (const auto& line : lines) {
|
||||
if (str_util::starts_with(line, "@param")) {
|
||||
const auto trimmed_line = str_util::ltrim(line);
|
||||
if (str_util::starts_with(trimmed_line, "@param")) {
|
||||
// Get the info from the @param line
|
||||
const auto& tokens =
|
||||
str_util::regex_get_capture_groups(line, "(@param.)\\s?([^\\s]*)\\s(.*)");
|
||||
str_util::regex_get_capture_groups(trimmed_line, "(@param.)\\s?([^\\s]*)\\s(.*)");
|
||||
if (tokens.size() != 3) {
|
||||
lg::warn("invalid docstring line - {}, skipping", line);
|
||||
lg::warn("invalid docstring line - {}, skipping", trimmed_line);
|
||||
continue;
|
||||
}
|
||||
const auto& param_type = str_util::trim(tokens[0]);
|
||||
const auto& param_name = str_util::trim(tokens[1]);
|
||||
const auto& param_description = str_util::trim(tokens[2]);
|
||||
// First, let's find the appropriate arg_doc -- if we can't, skip it as well!
|
||||
std::optional<ArgumentDocumentation> find_arg_doc;
|
||||
for (const auto& arg : arg_docs) {
|
||||
// Locate the appropriate arg based on the name
|
||||
for (auto& arg : arg_docs) {
|
||||
if (arg.name == param_name) {
|
||||
find_arg_doc = arg;
|
||||
}
|
||||
}
|
||||
if (!find_arg_doc) {
|
||||
lg::warn("@param name '{}', doesn't correspond with an arg name in line '{}', skipping",
|
||||
param_name, line);
|
||||
continue;
|
||||
}
|
||||
auto& arg_doc = find_arg_doc.value();
|
||||
arg_doc.description = param_description;
|
||||
arg.description = param_description;
|
||||
if (param_type == "@param") {
|
||||
// a normal arg, nothing fancy
|
||||
} else if (param_type == "@param_") {
|
||||
// it's unused
|
||||
arg_doc.is_unused = true;
|
||||
arg.is_unused = true;
|
||||
} else if (param_type == "@param!") {
|
||||
// the params value is mutated within the function body
|
||||
arg_doc.is_mutated = true;
|
||||
arg.is_mutated = true;
|
||||
} else if (param_type == "@param?") {
|
||||
// the param is optional -- there are checks to see if it was provided or not so its safe to
|
||||
// pass "nothing"
|
||||
arg_doc.is_optional = true;
|
||||
// the param is optional -- there are checks to see if it was provided or not so its
|
||||
// safe to pass "nothing"
|
||||
arg.is_optional = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +1,20 @@
|
||||
add_executable(lsp
|
||||
main.cpp
|
||||
transport/stdio.cpp
|
||||
state/workspace.cpp
|
||||
handlers/lsp_router.cpp
|
||||
main.cpp
|
||||
protocol/common_types.cpp
|
||||
protocol/completion.cpp
|
||||
protocol/document_color.cpp
|
||||
protocol/document_diagnostics.cpp
|
||||
protocol/document_symbols.cpp
|
||||
protocol/document_synchronization.cpp
|
||||
protocol/document_diagnostics.cpp
|
||||
protocol/hover.cpp
|
||||
state/data/mips_instruction.cpp)
|
||||
protocol/progress_report.cpp
|
||||
state/data/mips_instruction.cpp
|
||||
state/lsp_requester.cpp
|
||||
state/workspace.cpp
|
||||
transport/stdio.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(lsp common decomp tree-sitter)
|
||||
target_compile_definitions(lsp PRIVATE -DJSON_DIAGNOSTICS=1)
|
||||
|
||||
target_link_libraries(lsp common decomp compiler tree-sitter)
|
||||
|
@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "common/log/log.h"
|
||||
|
||||
#include "lsp/protocol/initialize_result.h"
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "lsp/handlers/initialize.h"
|
||||
#include "lsp/protocol/error_codes.h"
|
||||
#include "text_document/completion.h"
|
||||
#include "text_document/document_color.h"
|
||||
#include "text_document/document_symbol.h"
|
||||
#include "text_document/document_synchronization.h"
|
||||
#include "text_document/go_to.h"
|
||||
@ -27,6 +28,11 @@ LSPRoute::LSPRoute(std::function<std::optional<json>(Workspace&, int, json)> req
|
||||
: m_route_type(LSPRouteType::REQUEST_RESPONSE), m_request_handler(request_handler) {}
|
||||
|
||||
void LSPRouter::init_routes() {
|
||||
m_routes["shutdown"] =
|
||||
LSPRoute([](Workspace& workspace, int id, nlohmann::json params) -> std::optional<json> {
|
||||
lg::info("Shutting down LSP due to explicit request");
|
||||
exit(0);
|
||||
});
|
||||
m_routes["initialize"] = LSPRoute(initialize_handler);
|
||||
m_routes["initialize"].m_generic_post_action = [](Workspace& workspace) {
|
||||
workspace.set_initialized(true);
|
||||
@ -39,6 +45,13 @@ void LSPRouter::init_routes() {
|
||||
m_routes["textDocument/hover"] = LSPRoute(hover_handler);
|
||||
m_routes["textDocument/definition"] = LSPRoute(go_to_definition_handler);
|
||||
m_routes["textDocument/completion"] = LSPRoute(get_completions_handler);
|
||||
m_routes["textDocument/documentColor"] = LSPRoute(document_color_handler);
|
||||
// TODO - m_routes["textDocument/signatureHelp"] = LSPRoute(get_completions_handler);
|
||||
// Not Yet Supported Routes, noops
|
||||
m_routes["$/cancelRequest"] = LSPRoute();
|
||||
m_routes["textDocument/documentLink"] = LSPRoute();
|
||||
m_routes["textDocument/codeLens"] = LSPRoute();
|
||||
m_routes["textDocument/colorPresentation"] = LSPRoute();
|
||||
}
|
||||
|
||||
json error_resp(ErrorCodes error_code, const std::string& error_message) {
|
||||
|
@ -3,14 +3,12 @@
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
#include "common/util/json_util.h"
|
||||
|
||||
#include "lsp/state/app.h"
|
||||
#include "lsp/state/workspace.h"
|
||||
#include "lsp/transport/stdio.h"
|
||||
|
||||
#include "third-party/json.hpp"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
enum class LSPRouteType { NOOP = 0, NOTIFICATION = 1, REQUEST_RESPONSE = 2 };
|
||||
|
||||
class LSPRoute {
|
||||
|
@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include "lsp/protocol/common_types.h"
|
||||
@ -8,8 +10,9 @@
|
||||
std::optional<json> get_completions_handler(Workspace& workspace, int id, json params) {
|
||||
auto converted_params = params.get<LSPSpec::CompletionParams>();
|
||||
|
||||
// TODO - these need to be cached,
|
||||
|
||||
// TODO - implement response object
|
||||
|
||||
return json::array();
|
||||
;
|
||||
}
|
||||
|
77
lsp/handlers/text_document/document_color.h
Normal file
77
lsp/handlers/text_document/document_color.h
Normal file
@ -0,0 +1,77 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include "common/util/string_util.h"
|
||||
|
||||
#include "lsp/protocol/common_types.h"
|
||||
#include "lsp/protocol/document_color.h"
|
||||
|
||||
float hexToFloat(const std::string& hex) {
|
||||
int value = std::stoi(hex, nullptr, 16);
|
||||
return static_cast<float>(value) / 255.0f;
|
||||
}
|
||||
|
||||
std::optional<LSPSpec::Color> color_hexstring_to_lsp_color(const std::string& color_name) {
|
||||
if (!str_util::contains(color_name, "#")) {
|
||||
return {};
|
||||
}
|
||||
const auto color_tokens = str_util::split(color_name, '#');
|
||||
const auto hexstring = color_tokens.at(1);
|
||||
std::string red_hex = hexstring.substr(0, 2);
|
||||
std::string green_hex = hexstring.substr(2, 2);
|
||||
std::string blue_hex = hexstring.substr(4, 2);
|
||||
|
||||
float red = hexToFloat(red_hex);
|
||||
float green = hexToFloat(green_hex);
|
||||
float blue = hexToFloat(blue_hex);
|
||||
|
||||
return LSPSpec::Color{red, green, blue, 1.0};
|
||||
}
|
||||
|
||||
std::optional<json> document_color_handler(Workspace& workspace, int id, json raw_params) {
|
||||
auto params = raw_params.get<LSPSpec::DocumentColorParams>();
|
||||
json colors = json::array();
|
||||
|
||||
// TODO - hex strings aren't desirable in the `font-color` enum
|
||||
// this could be used for the `new 'static 'rgba` instances but that requires proper
|
||||
// AST support as it cannot (and should not) be assumed that all 4 components will be on the same
|
||||
// line
|
||||
return colors;
|
||||
|
||||
//// Iterate through document, mark text colors ourselves
|
||||
// auto file_type = workspace.determine_filetype_from_uri(params.textDocument.m_uri);
|
||||
|
||||
// if (file_type == Workspace::FileType::OpenGOAL) {
|
||||
// auto tracked_file = workspace.get_tracked_og_file(params.textDocument.m_uri);
|
||||
// if (!tracked_file) {
|
||||
// return {};
|
||||
// }
|
||||
|
||||
// // This is something that is ok to be a regex, because it's very niche
|
||||
// for (int i = 0; i < tracked_file->m_lines.size(); i++) {
|
||||
// const auto& line = tracked_file->m_lines.at(i);
|
||||
// std::smatch matches;
|
||||
// std::regex regex("\\(font-color ([^)]*)\\)");
|
||||
|
||||
// std::sregex_iterator iter(line.begin(), line.end(), regex);
|
||||
// std::sregex_iterator end;
|
||||
|
||||
// for (; iter != end; iter++) {
|
||||
// std::smatch match = *iter;
|
||||
// std::string capture_group = match.str(1);
|
||||
// LSPSpec::ColorInformation color_info;
|
||||
// color_info.range = {{i, match.position(1)}, {i, match.position(1) + match.size()}};
|
||||
// const auto color = color_hexstring_to_lsp_color(capture_group);
|
||||
// if (!color) {
|
||||
// continue;
|
||||
// }
|
||||
// color_info.color = color.value();
|
||||
// colors.push_back(color_info);
|
||||
// lg::debug("color - {}", capture_group);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
// return colors;
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include "lsp/protocol/common_types.h"
|
||||
|
@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include "lsp/protocol/document_diagnostics.h"
|
||||
@ -26,18 +28,22 @@ void did_close_handler(Workspace& workspace, json raw_params) {
|
||||
workspace.stop_tracking_file(params.m_textDocument.m_uri);
|
||||
}
|
||||
|
||||
std::optional<json> did_open_push_diagnostics(Workspace& workspace, json params) {
|
||||
auto converted_params = params.get<LSPSpec::DidOpenTextDocumentParams>();
|
||||
auto tracked_file = workspace.get_tracked_ir_file(converted_params.m_textDocument.m_uri);
|
||||
std::optional<json> did_open_push_diagnostics(Workspace& workspace, json raw_params) {
|
||||
auto params = raw_params.get<LSPSpec::DidOpenTextDocumentParams>();
|
||||
const auto file_type =
|
||||
workspace.determine_filetype_from_languageid(params.m_textDocument.m_languageId);
|
||||
|
||||
LSPSpec::PublishDiagnosticParams publish_params;
|
||||
publish_params.m_uri = params.m_textDocument.m_uri;
|
||||
publish_params.m_version = params.m_textDocument.m_version;
|
||||
|
||||
if (file_type == Workspace::FileType::OpenGOALIR) {
|
||||
auto tracked_file = workspace.get_tracked_ir_file(params.m_textDocument.m_uri);
|
||||
if (!tracked_file) {
|
||||
return {};
|
||||
}
|
||||
|
||||
LSPSpec::PublishDiagnosticParams publish_params;
|
||||
publish_params.m_uri = converted_params.m_textDocument.m_uri;
|
||||
publish_params.m_diagnostics = tracked_file.value().m_diagnostics;
|
||||
publish_params.m_version = converted_params.m_textDocument.m_version;
|
||||
}
|
||||
|
||||
json response;
|
||||
response["method"] = "textDocument/publishDiagnostics";
|
||||
@ -48,16 +54,20 @@ std::optional<json> did_open_push_diagnostics(Workspace& workspace, json params)
|
||||
|
||||
std::optional<json> did_change_push_diagnostics(Workspace& workspace, json raw_params) {
|
||||
auto params = raw_params.get<LSPSpec::DidChangeTextDocumentParams>();
|
||||
const auto file_type = workspace.determine_filetype_from_uri(params.m_textDocument.m_uri);
|
||||
|
||||
LSPSpec::PublishDiagnosticParams publish_params;
|
||||
publish_params.m_uri = params.m_textDocument.m_uri;
|
||||
publish_params.m_version = params.m_textDocument.m_version;
|
||||
|
||||
if (file_type == Workspace::FileType::OpenGOALIR) {
|
||||
auto tracked_file = workspace.get_tracked_ir_file(params.m_textDocument.m_uri);
|
||||
|
||||
if (!tracked_file) {
|
||||
return {};
|
||||
}
|
||||
|
||||
LSPSpec::PublishDiagnosticParams publish_params;
|
||||
publish_params.m_uri = params.m_textDocument.m_uri;
|
||||
publish_params.m_diagnostics = tracked_file.value().m_diagnostics;
|
||||
publish_params.m_version = params.m_textDocument.m_version;
|
||||
}
|
||||
|
||||
json response;
|
||||
response["method"] = "textDocument/publishDiagnostics";
|
||||
|
@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include "lsp/protocol/common_types.h"
|
||||
@ -5,33 +7,26 @@
|
||||
#include "lsp/state/data/mips_instructions.h"
|
||||
#include "lsp/state/workspace.h"
|
||||
|
||||
std::optional<json> go_to_definition_handler(Workspace& workspace, int id, json params) {
|
||||
auto converted_params = params.get<LSPSpec::TextDocumentPositionParams>();
|
||||
auto tracked_file = workspace.get_tracked_ir_file(converted_params.m_textDocument.m_uri);
|
||||
|
||||
if (!tracked_file) {
|
||||
lg::debug("GOTODEF - no file");
|
||||
return {};
|
||||
}
|
||||
std::optional<json> go_to_definition_handler(Workspace& workspace, int id, json raw_params) {
|
||||
auto params = raw_params.get<LSPSpec::TextDocumentPositionParams>();
|
||||
const auto file_type = workspace.determine_filetype_from_uri(params.m_textDocument.m_uri);
|
||||
|
||||
json locations = json::array();
|
||||
auto symbol_name = tracked_file->get_symbol_at_position(converted_params.m_position);
|
||||
|
||||
if (!symbol_name) {
|
||||
lg::debug("GOTODEF - no symbol");
|
||||
if (file_type == Workspace::FileType::OpenGOALIR) {
|
||||
auto tracked_file = workspace.get_tracked_ir_file(params.m_textDocument.m_uri);
|
||||
if (!tracked_file) {
|
||||
return {};
|
||||
}
|
||||
auto symbol_name = tracked_file->get_symbol_at_position(params.m_position);
|
||||
if (!symbol_name) {
|
||||
return {};
|
||||
}
|
||||
|
||||
lg::debug("GOTODEF - symbol - {}", symbol_name.value());
|
||||
|
||||
auto symbol_info = workspace.get_definition_info_from_all_types(symbol_name.value(),
|
||||
tracked_file->m_all_types_uri);
|
||||
|
||||
if (!symbol_info) {
|
||||
lg::debug("GOTODEF - no symbol info");
|
||||
return {};
|
||||
}
|
||||
|
||||
LSPSpec::Location location;
|
||||
location.m_uri = tracked_file->m_all_types_uri;
|
||||
location.m_range.m_start = {(uint32_t)symbol_info.value().definition_info->line_idx_to_display,
|
||||
@ -39,6 +34,33 @@ std::optional<json> go_to_definition_handler(Workspace& workspace, int id, json
|
||||
location.m_range.m_end = {(uint32_t)symbol_info.value().definition_info->line_idx_to_display,
|
||||
(uint32_t)symbol_info.value().definition_info->pos_in_line};
|
||||
locations.push_back(location);
|
||||
} else if (file_type == Workspace::FileType::OpenGOAL) {
|
||||
auto tracked_file = workspace.get_tracked_og_file(params.m_textDocument.m_uri);
|
||||
if (!tracked_file) {
|
||||
return {};
|
||||
}
|
||||
const auto symbol = tracked_file->get_symbol_at_position(params.m_position);
|
||||
if (!symbol) {
|
||||
return {};
|
||||
}
|
||||
const auto& symbol_info =
|
||||
workspace.get_global_symbol_info(tracked_file.value(), symbol.value());
|
||||
if (!symbol_info) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const auto& def_loc =
|
||||
workspace.get_symbol_def_location(tracked_file.value(), symbol_info.value());
|
||||
if (!def_loc) {
|
||||
return {};
|
||||
}
|
||||
|
||||
LSPSpec::Location location;
|
||||
location.m_uri = def_loc->filename;
|
||||
location.m_range.m_start = {(uint32_t)def_loc->line_idx, (uint32_t)def_loc->char_idx};
|
||||
location.m_range.m_end = {(uint32_t)def_loc->line_idx, (uint32_t)def_loc->char_idx};
|
||||
locations.push_back(location);
|
||||
}
|
||||
|
||||
return locations;
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <regex>
|
||||
|
||||
#include "goalc/compiler/docs/DocTypes.h"
|
||||
#include "lsp/protocol/common_types.h"
|
||||
#include "lsp/protocol/hover.h"
|
||||
#include "lsp/state/data/mips_instructions.h"
|
||||
@ -14,31 +17,25 @@ bool is_number(const std::string& s) {
|
||||
std::vector<std::string> og_method_names = {"new", "delete", "print", "inspect", "length",
|
||||
"asize-of", "copy", "relocate", "mem-usage"};
|
||||
|
||||
std::optional<json> hover_handler(Workspace& workspace, int id, json params) {
|
||||
auto converted_params = params.get<LSPSpec::TextDocumentPositionParams>();
|
||||
auto tracked_file = workspace.get_tracked_ir_file(converted_params.m_textDocument.m_uri);
|
||||
|
||||
if (!tracked_file) {
|
||||
return {};
|
||||
}
|
||||
|
||||
std::optional<LSPSpec::Hover> hover_handler_ir(Workspace& workspace,
|
||||
const LSPSpec::TextDocumentPositionParams& params,
|
||||
const WorkspaceIRFile& tracked_file) {
|
||||
// See if it's an OpenGOAL symbol or a MIPS mnemonic
|
||||
auto symbol_name = tracked_file->get_symbol_at_position(converted_params.m_position);
|
||||
auto token_at_pos = tracked_file->get_mips_instruction_at_position(converted_params.m_position);
|
||||
auto symbol_name = tracked_file.get_symbol_at_position(params.m_position);
|
||||
auto token_at_pos = tracked_file.get_mips_instruction_at_position(params.m_position);
|
||||
if (!symbol_name && !token_at_pos) {
|
||||
return {};
|
||||
}
|
||||
|
||||
// TODO - try specifying the range so it highlights everything, ie. `c.lt.s`
|
||||
|
||||
LSPSpec::MarkupContent markup;
|
||||
markup.m_kind = "markdown";
|
||||
|
||||
// TODO - try specifying the range so it highlights everything, ie. `c.lt.s`
|
||||
// Prefer symbols
|
||||
if (symbol_name) {
|
||||
lg::debug("hover - symbol match - {}", symbol_name.value());
|
||||
auto symbol_info = workspace.get_definition_info_from_all_types(symbol_name.value(),
|
||||
tracked_file->m_all_types_uri);
|
||||
tracked_file.m_all_types_uri);
|
||||
if (symbol_info && symbol_info.value().docstring.has_value()) {
|
||||
std::string docstring = symbol_info.value().docstring.value();
|
||||
lg::debug("hover - symbol has docstring - {}", docstring);
|
||||
@ -58,13 +55,13 @@ std::optional<json> hover_handler(Workspace& workspace, int id, json params) {
|
||||
}
|
||||
// Get this symbols info
|
||||
auto symbol_info =
|
||||
workspace.get_definition_info_from_all_types(name, tracked_file->m_all_types_uri);
|
||||
workspace.get_definition_info_from_all_types(name, tracked_file.m_all_types_uri);
|
||||
if (!symbol_info) {
|
||||
symbol_replacements[name] = fmt::format("_{}_", name);
|
||||
} else {
|
||||
// Construct path
|
||||
auto symbol_uri =
|
||||
fmt::format("{}#L{}%2C{}", tracked_file->m_all_types_uri,
|
||||
fmt::format("{}#L{}%2C{}", tracked_file.m_all_types_uri,
|
||||
symbol_info.value().definition_info->line_idx_to_display + 1,
|
||||
symbol_info.value().definition_info->pos_in_line);
|
||||
symbol_replacements[name] = fmt::format("[{}]({})", name, symbol_uri);
|
||||
@ -159,6 +156,123 @@ std::optional<json> hover_handler(Workspace& workspace, int id, json params) {
|
||||
hover_resp.m_contents = markup;
|
||||
return hover_resp;
|
||||
}
|
||||
}
|
||||
|
||||
std::string truncate_docstring(const std::string& docstring) {
|
||||
std::string truncated = "";
|
||||
const auto lines = str_util::split(docstring);
|
||||
for (const auto& line : lines) {
|
||||
const auto trimmed_line = str_util::ltrim(line);
|
||||
if (str_util::starts_with(trimmed_line, "@")) {
|
||||
break;
|
||||
}
|
||||
truncated += trimmed_line + "\n";
|
||||
}
|
||||
return truncated;
|
||||
}
|
||||
|
||||
std::optional<json> hover_handler(Workspace& workspace, int id, json raw_params) {
|
||||
auto params = raw_params.get<LSPSpec::TextDocumentPositionParams>();
|
||||
auto file_type = workspace.determine_filetype_from_uri(params.m_textDocument.m_uri);
|
||||
|
||||
if (file_type == Workspace::FileType::OpenGOALIR) {
|
||||
auto tracked_file = workspace.get_tracked_ir_file(params.m_textDocument.m_uri);
|
||||
if (!tracked_file) {
|
||||
return {};
|
||||
}
|
||||
return hover_handler_ir(workspace, params, tracked_file.value());
|
||||
} else if (file_type == Workspace::FileType::OpenGOAL) {
|
||||
auto tracked_file = workspace.get_tracked_og_file(params.m_textDocument.m_uri);
|
||||
if (!tracked_file) {
|
||||
return {};
|
||||
}
|
||||
// TODO - replace with AST usage instead of figuring out the symbol ourselves
|
||||
const auto symbol = tracked_file->get_symbol_at_position(params.m_position);
|
||||
if (!symbol) {
|
||||
lg::debug("hover - no symbol");
|
||||
return {};
|
||||
}
|
||||
// TODO - there is an issue with docstrings and overridden methods
|
||||
const auto& symbol_info =
|
||||
workspace.get_global_symbol_info(tracked_file.value(), symbol.value());
|
||||
if (!symbol_info) {
|
||||
lg::debug("hover - no symbol info - {}", symbol.value());
|
||||
return {};
|
||||
}
|
||||
LSPSpec::MarkupContent markup;
|
||||
markup.m_kind = "markdown";
|
||||
|
||||
const auto args =
|
||||
Docs::get_args_from_docstring(symbol_info->args(), symbol_info->meta().docstring);
|
||||
std::string signature = "";
|
||||
bool takes_args = true;
|
||||
if (symbol_info->kind() == SymbolInfo::Kind::FUNCTION) {
|
||||
signature += "function ";
|
||||
} else if (symbol_info->kind() == SymbolInfo::Kind::METHOD) {
|
||||
signature += "method ";
|
||||
} else if (symbol_info->kind() == SymbolInfo::Kind::MACRO) {
|
||||
signature += "macro ";
|
||||
} else {
|
||||
takes_args = false;
|
||||
}
|
||||
// TODO - others useful, probably states?
|
||||
signature += symbol.value();
|
||||
if (takes_args) {
|
||||
signature += "(";
|
||||
for (int i = 0; i < args.size(); i++) {
|
||||
const auto& arg = args.at(i);
|
||||
if (i == args.size() - 1) {
|
||||
signature += fmt::format("{}: {}", arg.name, arg.type);
|
||||
} else {
|
||||
signature += fmt::format("{}: {}, ", arg.name, arg.type);
|
||||
}
|
||||
}
|
||||
signature += ")";
|
||||
if (symbol_info->kind() == SymbolInfo::Kind::FUNCTION &&
|
||||
workspace.get_symbol_typespec(tracked_file.value(), symbol.value())) {
|
||||
signature +=
|
||||
fmt::format(": {}", workspace.get_symbol_typespec(tracked_file.value(), symbol.value())
|
||||
->last_arg()
|
||||
.base_type());
|
||||
} else if (symbol_info->kind() == SymbolInfo::Kind::METHOD) {
|
||||
signature += fmt::format(": {}", symbol_info->method_info().type.last_arg().base_type());
|
||||
}
|
||||
} else if (workspace.get_symbol_typespec(tracked_file.value(), symbol.value())) {
|
||||
signature += fmt::format(
|
||||
": {}", workspace.get_symbol_typespec(tracked_file.value(), symbol.value())->base_type());
|
||||
}
|
||||
|
||||
std::string body = fmt::format("```opengoal\n{}\n```\n\n", signature);
|
||||
body += "___\n\n";
|
||||
if (!symbol_info->meta().docstring.empty()) {
|
||||
body += truncate_docstring(symbol_info->meta().docstring) + "\n\n";
|
||||
}
|
||||
|
||||
// TODO - support @see/@returns/[[reference]]
|
||||
for (const auto& arg : args) {
|
||||
std::string param_line = "";
|
||||
if (arg.is_mutated) {
|
||||
param_line += fmt::format("*@param!* `{}: {}`", arg.name, arg.type);
|
||||
} else if (arg.is_optional) {
|
||||
param_line += fmt::format("*@param?* `{}: {}`", arg.name, arg.type);
|
||||
} else if (arg.is_unused) {
|
||||
param_line += fmt::format("*@param_* `{}: {}`", arg.name, arg.type);
|
||||
} else {
|
||||
param_line += fmt::format("*@param* `{}: {}`", arg.name, arg.type);
|
||||
}
|
||||
if (!arg.description.empty()) {
|
||||
param_line += fmt::format(" - {}\n\n", arg.description);
|
||||
} else {
|
||||
param_line += "\n\n";
|
||||
}
|
||||
body += param_line;
|
||||
}
|
||||
|
||||
markup.m_value = body;
|
||||
LSPSpec::Hover hover_resp;
|
||||
hover_resp.m_contents = markup;
|
||||
return hover_resp;
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
10
lsp/main.cpp
10
lsp/main.cpp
@ -35,7 +35,7 @@
|
||||
|
||||
void setup_logging(bool verbose, std::string log_file) {
|
||||
if (!log_file.empty()) {
|
||||
lg::set_file(log_file, false);
|
||||
lg::set_file(log_file, false, true);
|
||||
}
|
||||
if (verbose) {
|
||||
lg::set_file_level(lg::level::debug);
|
||||
@ -91,6 +91,14 @@ int main(int argc, char** argv) {
|
||||
|
||||
if (message_buffer.message_completed()) {
|
||||
json body = message_buffer.body();
|
||||
// If the request doesn't have a 'method', then it's not a request
|
||||
// skip it, but log it. We don't depend on any requests from the client yet
|
||||
// currently they are mostly just notifications
|
||||
if (!body.contains("method")) {
|
||||
lg::warn("Response received from client - {}", body.dump());
|
||||
message_buffer.clear();
|
||||
continue;
|
||||
}
|
||||
auto method_name = body["method"].get<std::string>();
|
||||
lg::info(">>> Received message of method '{}'", method_name);
|
||||
auto responses = lsp_router.route_message(message_buffer, appstate);
|
||||
|
@ -67,3 +67,26 @@ void LSPSpec::from_json(const json& j, TextDocumentPositionParams& obj) {
|
||||
j.at("textDocument").get_to(obj.m_textDocument);
|
||||
j.at("position").get_to(obj.m_position);
|
||||
}
|
||||
|
||||
void LSPSpec::to_json(json& j, const MarkupContent& obj) {
|
||||
j = json{{"kind", obj.m_kind}, {"value", obj.m_value}};
|
||||
}
|
||||
|
||||
void LSPSpec::from_json(const json& j, MarkupContent& obj) {
|
||||
j.at("kind").get_to(obj.m_kind);
|
||||
j.at("value").get_to(obj.m_value);
|
||||
}
|
||||
|
||||
void LSPSpec::to_json(json& j, const Color& obj) {
|
||||
json_serialize(red);
|
||||
json_serialize(green);
|
||||
json_serialize(blue);
|
||||
json_serialize(alpha);
|
||||
}
|
||||
|
||||
void LSPSpec::from_json(const json& j, Color& obj) {
|
||||
json_deserialize_if_exists(red);
|
||||
json_deserialize_if_exists(green);
|
||||
json_deserialize_if_exists(blue);
|
||||
json_deserialize_if_exists(alpha);
|
||||
}
|
||||
|
@ -5,12 +5,10 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "third-party/json.hpp"
|
||||
|
||||
using json = nlohmann::json;
|
||||
#include "common/util/json_util.h"
|
||||
|
||||
namespace LSPSpec {
|
||||
// TODO - eventually parse this
|
||||
|
||||
typedef std::string URI;
|
||||
typedef std::string DocumentUri;
|
||||
|
||||
@ -78,4 +76,50 @@ struct TextDocumentPositionParams {
|
||||
|
||||
void to_json(json& j, const TextDocumentPositionParams& obj);
|
||||
void from_json(const json& j, TextDocumentPositionParams& obj);
|
||||
|
||||
// A `MarkupContent` literal represents a string value which content is
|
||||
// interpreted base on its kind flag. Currently the protocol supports
|
||||
// `plaintext` and `markdown` as markup kinds.
|
||||
//
|
||||
// If the kind is `markdown` then the value can contain fenced code blocks like
|
||||
// in GitHub issues.
|
||||
//
|
||||
// Here is an example how such a string can be constructed using
|
||||
// JavaScript / TypeScript:
|
||||
// ```typescript
|
||||
// let markdown: MarkdownContent = {
|
||||
// kind: MarkupKind.Markdown,
|
||||
// value: [
|
||||
// '# Header',
|
||||
// 'Some text',
|
||||
// '```typescript',
|
||||
// 'someCode();',
|
||||
// '```'
|
||||
// ].join('\n')
|
||||
// };
|
||||
// ```
|
||||
//
|
||||
// *Please Note* that clients might sanitize the return markdown. A client could
|
||||
// decide to remove HTML from the markdown to avoid script execution.
|
||||
struct MarkupContent {
|
||||
std::string m_kind; // Actually a MarkupKind which is either 'plaintext' or 'markdown'
|
||||
std::string m_value;
|
||||
};
|
||||
|
||||
void to_json(json& j, const MarkupContent& obj);
|
||||
void from_json(const json& j, MarkupContent& obj);
|
||||
|
||||
// Represents a color in RGBA space.
|
||||
struct Color {
|
||||
// The red component of this color in the range [0-1].
|
||||
float red;
|
||||
// The green component of this color in the range [0-1].
|
||||
float green;
|
||||
// The blue component of this color in the range [0-1].
|
||||
float blue;
|
||||
// The alpha component of this color in the range [0-1].
|
||||
float alpha;
|
||||
};
|
||||
void to_json(json& j, const Color& obj);
|
||||
void from_json(const json& j, Color& obj);
|
||||
} // namespace LSPSpec
|
||||
|
@ -8,3 +8,7 @@ void LSPSpec::from_json(const json& j, CompletionParams& obj) {
|
||||
j.at("textDocument").get_to(obj.m_textDocument);
|
||||
j.at("position").get_to(obj.m_position);
|
||||
}
|
||||
|
||||
void LSPSpec::to_json(json& j, const CompletionList& obj) {}
|
||||
|
||||
void LSPSpec::from_json(const json& j, CompletionList& obj) {}
|
||||
|
@ -29,4 +29,99 @@ struct CompletionParams {
|
||||
void to_json(json& j, const CompletionParams& obj);
|
||||
void from_json(const json& j, CompletionParams& obj);
|
||||
|
||||
/// @brief Additional details for a completion item label.
|
||||
struct CompletionItemLabelDetails {
|
||||
/// An optional string which is rendered less prominently directly after {@link
|
||||
/// CompletionItem.label label}, without any spacing. Should be used for function signatures or
|
||||
/// type annotations.
|
||||
std::optional<std::string> detail;
|
||||
/// An optional string which is rendered less prominently after {@link
|
||||
/// CompletionItemLabelDetails.detail}. Should be used for fully qualified names or file path.
|
||||
std::optional<std::string> description;
|
||||
};
|
||||
|
||||
/// @brief The kind of a completion entry.
|
||||
enum class CompletionItemKind {
|
||||
Text = 1,
|
||||
Method = 2,
|
||||
Function = 3,
|
||||
Constructor = 4,
|
||||
Field = 5,
|
||||
Variable = 6,
|
||||
Class = 7,
|
||||
Interface = 8,
|
||||
Module = 9,
|
||||
Property = 10,
|
||||
Unit = 11,
|
||||
Value = 12,
|
||||
Enum = 13,
|
||||
Keyword = 14,
|
||||
Snippet = 15,
|
||||
Color = 16,
|
||||
File = 17,
|
||||
Reference = 18,
|
||||
Folder = 19,
|
||||
EnumMember = 20,
|
||||
Constant = 21,
|
||||
Struct = 22,
|
||||
Event = 23,
|
||||
Operator = 24,
|
||||
TypeParameter = 25
|
||||
};
|
||||
|
||||
/// Completion item tags are extra annotations that tweak the rendering of a completion item.
|
||||
enum class CompletionItemTag {
|
||||
/// Render a completion as obsolete, usually using a strike-out.
|
||||
Deprecated = 1
|
||||
};
|
||||
|
||||
struct CompletionItem {
|
||||
/// The label of this completion item.
|
||||
///
|
||||
/// The label property is also by default the text that is inserted when selecting this
|
||||
/// completion.
|
||||
///
|
||||
/// If label details are provided the label itself should be an unqualified name of the completion
|
||||
/// item.
|
||||
std::string label;
|
||||
/// Additional details for the label
|
||||
std::optional<CompletionItemLabelDetails> labelDetails;
|
||||
/// The kind of this completion item. Based of the kind an icon is chosen by the editor. The
|
||||
/// standardized set of available values is defined in `CompletionItemKind`.
|
||||
std::optional<CompletionItemKind> kind;
|
||||
/// Tags for this completion item.
|
||||
std::optional<std::vector<CompletionItemTag>> tags;
|
||||
/// A human-readable string with additional information about this item, like type or symbol
|
||||
/// information.
|
||||
std::optional<std::string> detail;
|
||||
/// A human-readable string that represents a doc-comment.
|
||||
std::optional<std::string> documentation;
|
||||
// NOTE - skipped deprecated
|
||||
/// Select this item when showing.
|
||||
///
|
||||
/// *Note* that only one completion item can be selected and that the tool / client decides which
|
||||
/// item that is. The rule is that the *first* item of those that match best is selected.
|
||||
std::optional<bool> preselect;
|
||||
/// A string that should be used when comparing this item with other items. When omitted the label
|
||||
/// is used as the sort text for this item.
|
||||
std::optional<std::string> sortText;
|
||||
/// A string that should be used when filtering a set of completion items. When omitted the label
|
||||
/// is used as the filter text for this item.
|
||||
std::optional<std::string> filterText;
|
||||
// TODO - a lot of other fields...
|
||||
};
|
||||
|
||||
struct CompletionList {
|
||||
/// This list is not complete. Further typing should result in recomputing this list.
|
||||
///
|
||||
/// Recomputed lists have all their items replaced (not appended) in the incomplete completion
|
||||
/// sessions.
|
||||
bool m_isIncomplete;
|
||||
/// The completion items.
|
||||
std::vector<CompletionItem> m_items;
|
||||
};
|
||||
|
||||
void to_json(json& j, const CompletionList& obj);
|
||||
void from_json(const json& j, CompletionList& obj);
|
||||
|
||||
} // namespace LSPSpec
|
||||
|
19
lsp/protocol/document_color.cpp
Normal file
19
lsp/protocol/document_color.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
#include "document_color.h"
|
||||
|
||||
void LSPSpec::to_json(json& j, const DocumentColorParams& obj) {
|
||||
json_serialize(textDocument);
|
||||
}
|
||||
|
||||
void LSPSpec::from_json(const json& j, DocumentColorParams& obj) {
|
||||
json_deserialize_if_exists(textDocument);
|
||||
}
|
||||
|
||||
void LSPSpec::to_json(json& j, const ColorInformation& obj) {
|
||||
json_serialize(range);
|
||||
json_serialize(color);
|
||||
}
|
||||
|
||||
void LSPSpec::from_json(const json& j, ColorInformation& obj) {
|
||||
json_deserialize_if_exists(range);
|
||||
json_deserialize_if_exists(color);
|
||||
}
|
24
lsp/protocol/document_color.h
Normal file
24
lsp/protocol/document_color.h
Normal file
@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include "common_types.h"
|
||||
|
||||
namespace LSPSpec {
|
||||
struct DocumentColorParams {
|
||||
// The text document.
|
||||
TextDocumentIdentifier textDocument;
|
||||
};
|
||||
|
||||
void to_json(json& j, const DocumentColorParams& obj);
|
||||
void from_json(const json& j, DocumentColorParams& obj);
|
||||
|
||||
struct ColorInformation {
|
||||
// The range in the document where this color appears.
|
||||
Range range;
|
||||
// The actual color value for this color range.
|
||||
Color color;
|
||||
};
|
||||
|
||||
void to_json(json& j, const ColorInformation& obj);
|
||||
void from_json(const json& j, ColorInformation& obj);
|
||||
|
||||
} // namespace LSPSpec
|
@ -1,14 +1,5 @@
|
||||
#include "hover.h"
|
||||
|
||||
void LSPSpec::to_json(json& j, const MarkupContent& obj) {
|
||||
j = json{{"kind", obj.m_kind}, {"value", obj.m_value}};
|
||||
}
|
||||
|
||||
void LSPSpec::from_json(const json& j, MarkupContent& obj) {
|
||||
j.at("kind").get_to(obj.m_kind);
|
||||
j.at("value").get_to(obj.m_value);
|
||||
}
|
||||
|
||||
void LSPSpec::to_json(json& j, const Hover& obj) {
|
||||
j = json{{"contents", obj.m_contents}};
|
||||
if (obj.m_range) {
|
||||
|
@ -3,40 +3,6 @@
|
||||
#include "common_types.h"
|
||||
|
||||
namespace LSPSpec {
|
||||
/**
|
||||
* A `MarkupContent` literal represents a string value which content is
|
||||
* interpreted base on its kind flag. Currently the protocol supports
|
||||
* `plaintext` and `markdown` as markup kinds.
|
||||
*
|
||||
* If the kind is `markdown` then the value can contain fenced code blocks like
|
||||
* in GitHub issues.
|
||||
*
|
||||
* Here is an example how such a string can be constructed using
|
||||
* JavaScript / TypeScript:
|
||||
* ```typescript
|
||||
* let markdown: MarkdownContent = {
|
||||
* kind: MarkupKind.Markdown,
|
||||
* value: [
|
||||
* '# Header',
|
||||
* 'Some text',
|
||||
* '```typescript',
|
||||
* 'someCode();',
|
||||
* '```'
|
||||
* ].join('\n')
|
||||
* };
|
||||
* ```
|
||||
*
|
||||
* *Please Note* that clients might sanitize the return markdown. A client could
|
||||
* decide to remove HTML from the markdown to avoid script execution.
|
||||
*/
|
||||
struct MarkupContent {
|
||||
std::string m_kind; // Actually a MarkupKind which is either 'plaintext' or 'markdown'
|
||||
std::string m_value;
|
||||
};
|
||||
|
||||
void to_json(json& j, const MarkupContent& obj);
|
||||
void from_json(const json& j, MarkupContent& obj);
|
||||
|
||||
struct Hover {
|
||||
/// @brief The hover's content
|
||||
MarkupContent m_contents;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// TODO - convert this a proper class
|
||||
// TODO - convert this to a proper class
|
||||
|
||||
#include "third-party/json.hpp"
|
||||
|
||||
@ -40,6 +40,7 @@ class InitializeResult {
|
||||
{"completionProvider", completion_provider},
|
||||
{"signatureHelpProvider", signature_help_provider},
|
||||
{"definitionProvider", true},
|
||||
{"colorProvider", true},
|
||||
{"referencesProvider", false},
|
||||
{"documentHighlightProvider", false},
|
||||
{"documentSymbolProvider",
|
||||
|
79
lsp/protocol/progress_report.cpp
Normal file
79
lsp/protocol/progress_report.cpp
Normal file
@ -0,0 +1,79 @@
|
||||
#include "progress_report.h"
|
||||
|
||||
void LSPSpec::to_json(json& j, const WorkDoneProgressCreateParams& obj) {
|
||||
json_serialize(token);
|
||||
}
|
||||
|
||||
void LSPSpec::from_json(const json& j, WorkDoneProgressCreateParams& obj) {
|
||||
json_deserialize_if_exists(token);
|
||||
}
|
||||
|
||||
void LSPSpec::to_json(json& j, const ProgressPayloadBegin& obj) {
|
||||
json_serialize(kind);
|
||||
json_serialize(title);
|
||||
json_serialize(cancellable);
|
||||
json_serialize_optional(message);
|
||||
json_serialize_optional(percentage);
|
||||
}
|
||||
|
||||
void LSPSpec::from_json(const json& j, ProgressPayloadBegin& obj) {
|
||||
json_deserialize_if_exists(kind);
|
||||
json_deserialize_if_exists(title);
|
||||
json_deserialize_if_exists(cancellable);
|
||||
json_deserialize_optional_if_exists(message);
|
||||
json_deserialize_optional_if_exists(percentage);
|
||||
}
|
||||
|
||||
void LSPSpec::to_json(json& j, const ProgressParamsBegin& obj) {
|
||||
json_serialize(token);
|
||||
json_serialize(value);
|
||||
}
|
||||
|
||||
void LSPSpec::from_json(const json& j, ProgressParamsBegin& obj) {
|
||||
json_deserialize_if_exists(token);
|
||||
json_deserialize_if_exists(value);
|
||||
}
|
||||
|
||||
void LSPSpec::to_json(json& j, const ProgressPayloadReport& obj) {
|
||||
json_serialize(kind);
|
||||
json_serialize(cancellable);
|
||||
json_serialize_optional(message);
|
||||
json_serialize_optional(percentage);
|
||||
}
|
||||
|
||||
void LSPSpec::from_json(const json& j, ProgressPayloadReport& obj) {
|
||||
json_deserialize_if_exists(kind);
|
||||
json_deserialize_if_exists(cancellable);
|
||||
json_deserialize_optional_if_exists(message);
|
||||
json_deserialize_optional_if_exists(percentage);
|
||||
}
|
||||
|
||||
void LSPSpec::to_json(json& j, const ProgressParamsReport& obj) {
|
||||
json_serialize(token);
|
||||
json_serialize(value);
|
||||
}
|
||||
|
||||
void LSPSpec::from_json(const json& j, ProgressParamsReport& obj) {
|
||||
json_deserialize_if_exists(token);
|
||||
json_deserialize_if_exists(value);
|
||||
}
|
||||
|
||||
void LSPSpec::to_json(json& j, const ProgressPayloadEnd& obj) {
|
||||
json_serialize(kind);
|
||||
json_serialize_optional(message);
|
||||
}
|
||||
|
||||
void LSPSpec::from_json(const json& j, ProgressPayloadEnd& obj) {
|
||||
json_deserialize_if_exists(kind);
|
||||
json_deserialize_optional_if_exists(message);
|
||||
}
|
||||
|
||||
void LSPSpec::to_json(json& j, const ProgressParamsEnd& obj) {
|
||||
json_serialize(token);
|
||||
json_serialize(value);
|
||||
}
|
||||
|
||||
void LSPSpec::from_json(const json& j, ProgressParamsEnd& obj) {
|
||||
json_deserialize_if_exists(token);
|
||||
json_deserialize_if_exists(value);
|
||||
}
|
105
lsp/protocol/progress_report.h
Normal file
105
lsp/protocol/progress_report.h
Normal file
@ -0,0 +1,105 @@
|
||||
#pragma once
|
||||
|
||||
#include "common_types.h"
|
||||
|
||||
namespace LSPSpec {
|
||||
struct WorkDoneProgressCreateParams {
|
||||
// The token to be used to report progress. (can also be an integer)
|
||||
std::string token;
|
||||
};
|
||||
|
||||
void to_json(json& j, const WorkDoneProgressCreateParams& obj);
|
||||
void from_json(const json& j, WorkDoneProgressCreateParams& obj);
|
||||
|
||||
struct ProgressPayloadBegin {
|
||||
std::string kind = "begin";
|
||||
// Mandatory title of the progress operation. Used to briefly inform about
|
||||
// the kind of operation being performed.
|
||||
//
|
||||
// Examples: "Indexing" or "Linking dependencies".
|
||||
std::string title;
|
||||
// Controls if a cancel button should show to allow the user to cancel the
|
||||
// long running operation. Clients that don't support cancellation are
|
||||
// allowed to ignore the setting.
|
||||
bool cancellable = false;
|
||||
// Optional, more detailed associated progress message. Contains
|
||||
// complementary information to the `title`.
|
||||
//
|
||||
// Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
|
||||
// If unset, the previous progress message (if any) is still valid.
|
||||
std::optional<std::string> message;
|
||||
// Optional progress percentage to display (value 100 is considered 100%).
|
||||
// If not provided infinite progress is assumed and clients are allowed
|
||||
// to ignore the `percentage` value in subsequent in report notifications.
|
||||
//
|
||||
// The value should be steadily rising. Clients are free to ignore values
|
||||
// that are not following this rule. The value range is [0, 100]
|
||||
std::optional<uint32_t> percentage;
|
||||
};
|
||||
void to_json(json& j, const ProgressPayloadBegin& obj);
|
||||
void from_json(const json& j, ProgressPayloadBegin& obj);
|
||||
|
||||
struct ProgressParamsBegin {
|
||||
// The progress token provided by the client or server.
|
||||
std::string token;
|
||||
// Payload
|
||||
ProgressPayloadBegin value;
|
||||
};
|
||||
|
||||
void to_json(json& j, const ProgressParamsBegin& obj);
|
||||
void from_json(const json& j, ProgressParamsBegin& obj);
|
||||
|
||||
struct ProgressPayloadReport {
|
||||
std::string kind = "report";
|
||||
// Controls enablement state of a cancel button. This property is only valid
|
||||
// if a cancel button got requested in the `WorkDoneProgressBegin` payload.
|
||||
//
|
||||
// Clients that don't support cancellation or don't support control the
|
||||
// button's enablement state are allowed to ignore the setting.
|
||||
bool cancellable = false;
|
||||
// Optional, more detailed associated progress message. Contains
|
||||
// complementary information to the `title`.
|
||||
//
|
||||
// Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
|
||||
// If unset, the previous progress message (if any) is still valid.
|
||||
std::optional<std::string> message;
|
||||
// Optional progress percentage to display (value 100 is considered 100%).
|
||||
// If not provided infinite progress is assumed and clients are allowed
|
||||
// to ignore the `percentage` value in subsequent in report notifications.
|
||||
//
|
||||
// The value should be steadily rising. Clients are free to ignore values
|
||||
// that are not following this rule. The value range is [0, 100]
|
||||
std::optional<uint32_t> percentage;
|
||||
};
|
||||
void to_json(json& j, const ProgressPayloadReport& obj);
|
||||
void from_json(const json& j, ProgressPayloadReport& obj);
|
||||
|
||||
struct ProgressParamsReport {
|
||||
// The progress token provided by the client or server.
|
||||
std::string token;
|
||||
// Payload
|
||||
ProgressPayloadReport value;
|
||||
};
|
||||
|
||||
void to_json(json& j, const ProgressParamsReport& obj);
|
||||
void from_json(const json& j, ProgressParamsReport& obj);
|
||||
|
||||
struct ProgressPayloadEnd {
|
||||
std::string kind = "end";
|
||||
// Optional, a final message indicating to for example indicate the outcome
|
||||
// of the operation.
|
||||
std::optional<std::string> message;
|
||||
};
|
||||
void to_json(json& j, const ProgressPayloadEnd& obj);
|
||||
void from_json(const json& j, ProgressPayloadEnd& obj);
|
||||
|
||||
struct ProgressParamsEnd {
|
||||
// The progress token provided by the client or server.
|
||||
std::string token;
|
||||
// Payload
|
||||
ProgressPayloadEnd value;
|
||||
};
|
||||
|
||||
void to_json(json& j, const ProgressParamsEnd& obj);
|
||||
void from_json(const json& j, ProgressParamsEnd& obj);
|
||||
} // namespace LSPSpec
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "workspace.h"
|
||||
#include "lsp/state/workspace.h"
|
||||
|
||||
struct AppState {
|
||||
Workspace workspace;
|
||||
|
76
lsp/state/lsp_requester.cpp
Normal file
76
lsp/state/lsp_requester.cpp
Normal file
@ -0,0 +1,76 @@
|
||||
#include "lsp_requester.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "common/log/log.h"
|
||||
#include "common/util/string_util.h"
|
||||
|
||||
#include "lsp/protocol/progress_report.h"
|
||||
|
||||
void LSPRequester::send_request(const json& params, const std::string& method) {
|
||||
json req;
|
||||
req["id"] = str_util::uuid();
|
||||
req["method"] = method;
|
||||
req["params"] = params;
|
||||
req["jsonrpc"] = "2.0";
|
||||
|
||||
std::string request;
|
||||
request.append("Content-Length: " + std::to_string(req.dump().size()) + "\r\n");
|
||||
request.append("Content-Type: application/vscode-jsonrpc;charset=utf-8\r\n");
|
||||
request.append("\r\n");
|
||||
request += req.dump();
|
||||
|
||||
// Send requests immediately, as they may be done during the handling of a client request
|
||||
lg::info("Sending Request {}", method);
|
||||
std::cout << request.c_str() << std::flush;
|
||||
}
|
||||
|
||||
void LSPRequester::send_notification(const json& params, const std::string& method) {
|
||||
json notification;
|
||||
notification["method"] = method;
|
||||
notification["params"] = params;
|
||||
notification["jsonrpc"] = "2.0";
|
||||
|
||||
std::string request;
|
||||
request.append("Content-Length: " + std::to_string(notification.dump().size()) + "\r\n");
|
||||
request.append("Content-Type: application/vscode-jsonrpc;charset=utf-8\r\n");
|
||||
request.append("\r\n");
|
||||
request += notification.dump();
|
||||
|
||||
// Send requests immediately, as they may be done during the handling of a client request
|
||||
lg::info("Sending Notification {}", method);
|
||||
std::cout << request.c_str() << std::flush;
|
||||
}
|
||||
|
||||
void LSPRequester::send_progress_create_request(const std::string& token,
|
||||
const std::string& title) {
|
||||
LSPSpec::WorkDoneProgressCreateParams params;
|
||||
params.token = token;
|
||||
send_request(params, "window/workDoneProgress/create");
|
||||
LSPSpec::ProgressPayloadBegin beginPayload;
|
||||
beginPayload.title = title;
|
||||
LSPSpec::ProgressParamsBegin beginParams;
|
||||
beginParams.token = token;
|
||||
beginParams.value = beginPayload;
|
||||
send_notification(beginParams, "$/progress");
|
||||
}
|
||||
|
||||
void LSPRequester::send_progress_update_request(const std::string& token,
|
||||
const std::string& message) {
|
||||
LSPSpec::ProgressPayloadReport reportPayload;
|
||||
reportPayload.message = message;
|
||||
LSPSpec::ProgressParamsReport reportParams;
|
||||
reportParams.token = token;
|
||||
reportParams.value = reportPayload;
|
||||
send_notification(reportParams, "$/progress");
|
||||
}
|
||||
|
||||
void LSPRequester::send_progress_finish_request(const std::string& token,
|
||||
const std::string& message) {
|
||||
LSPSpec::ProgressPayloadEnd endPayload;
|
||||
endPayload.message = message;
|
||||
LSPSpec::ProgressParamsEnd endParams;
|
||||
endParams.token = token;
|
||||
endParams.value = endPayload;
|
||||
send_notification(endParams, "$/progress");
|
||||
}
|
19
lsp/state/lsp_requester.h
Normal file
19
lsp/state/lsp_requester.h
Normal file
@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
#include "common/util/json_util.h"
|
||||
|
||||
#include "lsp/transport/stdio.h"
|
||||
|
||||
class LSPRequester {
|
||||
public:
|
||||
void send_progress_create_request(const std::string& token, const std::string& title);
|
||||
void send_progress_update_request(const std::string& token, const std::string& message);
|
||||
void send_progress_finish_request(const std::string& token, const std::string& message);
|
||||
|
||||
private:
|
||||
void send_request(const json& payload, const std::string& method);
|
||||
void send_notification(const json& payload, const std::string& method);
|
||||
};
|
@ -5,6 +5,7 @@
|
||||
#include <sstream>
|
||||
|
||||
#include "common/log/log.h"
|
||||
#include "common/util/string_util.h"
|
||||
|
||||
#include "lsp/protocol/common_types.h"
|
||||
|
||||
@ -31,18 +32,52 @@ std::string url_encode(const std::string& value) {
|
||||
return escaped.str();
|
||||
}
|
||||
|
||||
std::string url_decode(const std::string& input) {
|
||||
std::ostringstream decoded;
|
||||
|
||||
for (std::size_t i = 0; i < input.length(); ++i) {
|
||||
if (input[i] == '%') {
|
||||
// Check if there are enough characters remaining
|
||||
if (i + 2 < input.length()) {
|
||||
// Convert the next two characters after '%' into an integer value
|
||||
std::istringstream hexStream(input.substr(i + 1, 2));
|
||||
int hexValue = 0;
|
||||
hexStream >> std::hex >> hexValue;
|
||||
|
||||
// Append the decoded character to the result
|
||||
decoded << static_cast<char>(hexValue);
|
||||
|
||||
// Skip the next two characters
|
||||
i += 2;
|
||||
}
|
||||
} else if (input[i] == '+') {
|
||||
// Replace '+' with space character ' '
|
||||
decoded << ' ';
|
||||
} else {
|
||||
// Append the character as is
|
||||
decoded << input[i];
|
||||
}
|
||||
}
|
||||
|
||||
return decoded.str();
|
||||
}
|
||||
|
||||
LSPSpec::DocumentUri uri_from_path(fs::path path) {
|
||||
std::string path_str = path.string();
|
||||
// Replace slash type on windows
|
||||
#ifdef _WIN32
|
||||
std::replace(path_str.begin(), path_str.end(), '\\', '/');
|
||||
#endif
|
||||
auto path_str = file_util::convert_to_unix_path_separators(path.string());
|
||||
// vscode works with proper URL encoded URIs for file paths
|
||||
// which means we have to roll our own...
|
||||
path_str = url_encode(path_str);
|
||||
return fmt::format("file:///{}", path_str);
|
||||
}
|
||||
|
||||
std::string uri_to_path(LSPSpec::DocumentUri uri) {
|
||||
auto decoded_uri = url_decode(uri);
|
||||
if (str_util::starts_with(decoded_uri, "file:///")) {
|
||||
decoded_uri = decoded_uri.substr(8);
|
||||
}
|
||||
return decoded_uri;
|
||||
}
|
||||
|
||||
Workspace::Workspace(){};
|
||||
Workspace::~Workspace(){};
|
||||
|
||||
@ -54,6 +89,31 @@ void Workspace::set_initialized(bool new_value) {
|
||||
m_initialized = new_value;
|
||||
}
|
||||
|
||||
Workspace::FileType Workspace::determine_filetype_from_languageid(const std::string& language_id) {
|
||||
if (language_id == "opengoal") {
|
||||
return FileType::OpenGOAL;
|
||||
} else if (language_id == "opengoal-ir") {
|
||||
return FileType::OpenGOALIR;
|
||||
}
|
||||
return FileType::Unsupported;
|
||||
}
|
||||
|
||||
Workspace::FileType Workspace::determine_filetype_from_uri(const LSPSpec::DocumentUri& file_uri) {
|
||||
if (str_util::ends_with(file_uri, ".gc")) {
|
||||
return FileType::OpenGOAL;
|
||||
} else if (str_util::ends_with(file_uri, "ir2.asm")) {
|
||||
return FileType::OpenGOALIR;
|
||||
}
|
||||
return FileType::Unsupported;
|
||||
}
|
||||
|
||||
std::optional<WorkspaceOGFile> Workspace::get_tracked_og_file(const LSPSpec::URI& file_uri) {
|
||||
if (m_tracked_og_files.find(file_uri) == m_tracked_og_files.end()) {
|
||||
return {};
|
||||
}
|
||||
return m_tracked_og_files[file_uri];
|
||||
}
|
||||
|
||||
std::optional<WorkspaceIRFile> Workspace::get_tracked_ir_file(const LSPSpec::URI& file_uri) {
|
||||
if (m_tracked_ir_files.count(file_uri) == 0) {
|
||||
return {};
|
||||
@ -74,6 +134,77 @@ std::optional<DefinitionMetadata> Workspace::get_definition_info_from_all_types(
|
||||
return dts.symbol_metadata_map.at(symbol_name);
|
||||
}
|
||||
|
||||
// TODO - a gross hack that should go away when the language isn't so tightly coupled to the jak
|
||||
// games
|
||||
//
|
||||
// This is bad because jak 2 now uses some code from the jak1 folder, and also wouldn't be able to
|
||||
// be determined (jak1 or jak2?) if we had a proper 'common' folder(s).
|
||||
std::optional<GameVersion> determine_game_version_from_uri(const LSPSpec::DocumentUri& uri) {
|
||||
const auto path = uri_to_path(uri);
|
||||
if (str_util::contains(path, "goal_src/jak1")) {
|
||||
return GameVersion::Jak1;
|
||||
} else if (str_util::contains(path, "goal_src/jak2")) {
|
||||
return GameVersion::Jak2;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
std::optional<SymbolInfo> Workspace::get_global_symbol_info(const WorkspaceOGFile& file,
|
||||
const std::string& symbol_name) {
|
||||
if (m_compiler_instances.find(file.m_game_version) == m_compiler_instances.end()) {
|
||||
lg::debug("Compiler not instantiated for game version - {}",
|
||||
version_to_game_name(file.m_game_version));
|
||||
return {};
|
||||
}
|
||||
const auto& compiler = m_compiler_instances[file.m_game_version].get();
|
||||
const auto symbol_infos = compiler->lookup_exact_name_info(symbol_name);
|
||||
if (!symbol_infos || symbol_infos->empty()) {
|
||||
return {};
|
||||
} else if (symbol_infos->size() > 1) {
|
||||
// TODO - handle this (overriden methods is the main issue here)
|
||||
lg::debug("Found symbol info, but found multiple infos - {}", symbol_infos->size());
|
||||
return {};
|
||||
}
|
||||
const auto& symbol = symbol_infos->at(0);
|
||||
return symbol;
|
||||
}
|
||||
|
||||
std::optional<TypeSpec> Workspace::get_symbol_typespec(const WorkspaceOGFile& file,
|
||||
const std::string& symbol_name) {
|
||||
if (m_compiler_instances.find(file.m_game_version) == m_compiler_instances.end()) {
|
||||
lg::debug("Compiler not instantiated for game version - {}",
|
||||
version_to_game_name(file.m_game_version));
|
||||
return {};
|
||||
}
|
||||
const auto& compiler = m_compiler_instances[file.m_game_version].get();
|
||||
const auto typespec = compiler->lookup_typespec(symbol_name);
|
||||
if (typespec) {
|
||||
return typespec;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
std::optional<Docs::DefinitionLocation> Workspace::get_symbol_def_location(
|
||||
const WorkspaceOGFile& file,
|
||||
const SymbolInfo& symbol_info) {
|
||||
if (m_compiler_instances.find(file.m_game_version) == m_compiler_instances.end()) {
|
||||
lg::debug("Compiler not instantiated for game version - {}",
|
||||
version_to_game_name(file.m_game_version));
|
||||
return {};
|
||||
}
|
||||
const auto& compiler = m_compiler_instances[file.m_game_version].get();
|
||||
std::optional<Docs::DefinitionLocation> def_loc;
|
||||
const auto& goos_info = compiler->get_goos().reader.db.get_short_info_for(symbol_info.src_form());
|
||||
if (goos_info) {
|
||||
Docs::DefinitionLocation new_def_loc;
|
||||
new_def_loc.filename = uri_from_path(goos_info->filename);
|
||||
new_def_loc.line_idx = goos_info->line_idx_to_display;
|
||||
new_def_loc.char_idx = goos_info->pos_in_line;
|
||||
def_loc = new_def_loc;
|
||||
}
|
||||
return def_loc;
|
||||
}
|
||||
|
||||
void Workspace::start_tracking_file(const LSPSpec::DocumentUri& file_uri,
|
||||
const std::string& language_id,
|
||||
const std::string& content) {
|
||||
@ -89,8 +220,35 @@ void Workspace::start_tracking_file(const LSPSpec::DocumentUri& file_uri,
|
||||
m_tracked_all_types_files[file.m_all_types_uri].parse_type_system();
|
||||
}
|
||||
}
|
||||
} else if (language_id == "opengoal") {
|
||||
auto game_version = determine_game_version_from_uri(file_uri);
|
||||
if (!game_version) {
|
||||
lg::debug("Could not determine game version from path - {}", file_uri);
|
||||
return;
|
||||
}
|
||||
// TODO - this should happen on a separate thread so the LSP is not blocking during this lengthy
|
||||
// step
|
||||
if (m_compiler_instances.find(*game_version) == m_compiler_instances.end()) {
|
||||
lg::debug(
|
||||
"first time encountering a OpenGOAL file for game version - {}, initializing a compiler",
|
||||
version_to_game_name(*game_version));
|
||||
const auto project_path = file_util::try_get_project_path_from_path(uri_to_path(file_uri));
|
||||
lg::debug("Detected project path - {}", project_path.value());
|
||||
if (!file_util::setup_project_path(project_path)) {
|
||||
lg::debug("unable to setup project path, not initializing a compiler");
|
||||
return;
|
||||
}
|
||||
m_requester.send_progress_create_request("indexing-jak2", "Indexing - Jak 2");
|
||||
m_compiler_instances.emplace(game_version.value(),
|
||||
std::make_unique<Compiler>(game_version.value()));
|
||||
// TODO - if this fails, annotate some errors, adjust progress
|
||||
m_compiler_instances.at(*game_version)->run_front_end_on_string("(make-group \"all-code\")");
|
||||
m_requester.send_progress_finish_request("indexing-jak2", "Indexed - Jak 2");
|
||||
}
|
||||
// TODO - otherwise, just `ml` the file instead of rebuilding the entire thing
|
||||
// TODO - if the file fails to `ml`, annotate some errors
|
||||
m_tracked_og_files[file_uri] = WorkspaceOGFile(content, *game_version);
|
||||
}
|
||||
// TODO - only supporting IR files currently!
|
||||
}
|
||||
|
||||
void Workspace::update_tracked_file(const LSPSpec::DocumentUri& file_uri,
|
||||
@ -131,6 +289,34 @@ void Workspace::stop_tracking_file(const LSPSpec::DocumentUri& file_uri) {
|
||||
}
|
||||
}
|
||||
|
||||
WorkspaceOGFile::WorkspaceOGFile(const std::string& content, const GameVersion& game_version)
|
||||
: m_game_version(game_version) {
|
||||
m_lines = str_util::split(content);
|
||||
lg::info("Added new OG file. {} lines with {} symbols and {} diagnostics", m_lines.size(),
|
||||
m_symbols.size(), m_diagnostics.size());
|
||||
}
|
||||
|
||||
std::optional<std::string> WorkspaceOGFile::get_symbol_at_position(
|
||||
const LSPSpec::Position position) const {
|
||||
// Split the line on typical word boundaries
|
||||
std::string line = m_lines.at(position.m_line);
|
||||
std::smatch matches;
|
||||
std::regex regex("[\\w\\.\\-_!<>*?]+");
|
||||
std::regex_token_iterator<std::string::iterator> rend;
|
||||
|
||||
std::regex_token_iterator<std::string::iterator> match(line.begin(), line.end(), regex);
|
||||
while (match != rend) {
|
||||
auto match_start = std::distance(line.begin(), match->first);
|
||||
auto match_end = match_start + match->length();
|
||||
if (position.m_character >= match_start && position.m_character <= match_end) {
|
||||
return match->str();
|
||||
}
|
||||
match++;
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
WorkspaceIRFile::WorkspaceIRFile(const std::string& content) {
|
||||
// Get all lines of file
|
||||
std::string::size_type pos = 0;
|
||||
@ -151,7 +337,7 @@ WorkspaceIRFile::WorkspaceIRFile(const std::string& content) {
|
||||
find_function_symbol(m_lines.size() - 1, line);
|
||||
identify_diagnostics(m_lines.size() - 1, line);
|
||||
|
||||
lg::info("Added new file. {} lines with {} symbols and {} diagnostics", m_lines.size(),
|
||||
lg::info("Added new IR file. {} lines with {} symbols and {} diagnostics", m_lines.size(),
|
||||
m_symbols.size(), m_diagnostics.size());
|
||||
}
|
||||
|
||||
@ -273,7 +459,7 @@ void WorkspaceIRFile::identify_diagnostics(const uint32_t line_num_zero_based,
|
||||
}
|
||||
|
||||
std::optional<std::string> WorkspaceIRFile::get_mips_instruction_at_position(
|
||||
const LSPSpec::Position position) {
|
||||
const LSPSpec::Position position) const {
|
||||
// Split the line on typical word boundaries
|
||||
std::string line = m_lines.at(position.m_line);
|
||||
std::smatch matches;
|
||||
@ -292,7 +478,7 @@ std::optional<std::string> WorkspaceIRFile::get_mips_instruction_at_position(
|
||||
}
|
||||
|
||||
std::optional<std::string> WorkspaceIRFile::get_symbol_at_position(
|
||||
const LSPSpec::Position position) {
|
||||
const LSPSpec::Position position) const {
|
||||
// Split the line on typical word boundaries
|
||||
std::string line = m_lines.at(position.m_line);
|
||||
std::smatch matches;
|
||||
|
@ -7,9 +7,27 @@
|
||||
#include "common/util/FileUtil.h"
|
||||
|
||||
#include "decompiler/util/DecompilerTypeSystem.h"
|
||||
#include "goalc/compiler/Compiler.h"
|
||||
#include "goalc/compiler/docs/DocTypes.h"
|
||||
#include "lsp/protocol/common_types.h"
|
||||
#include "lsp/protocol/document_diagnostics.h"
|
||||
#include "lsp/protocol/document_symbols.h"
|
||||
#include "lsp/state/lsp_requester.h"
|
||||
|
||||
class WorkspaceOGFile {
|
||||
public:
|
||||
WorkspaceOGFile(){};
|
||||
WorkspaceOGFile(const std::string& content, const GameVersion& game_version);
|
||||
// TODO - make private
|
||||
int32_t version;
|
||||
// TODO - keep an AST of the file instead
|
||||
std::vector<std::string> m_lines;
|
||||
std::vector<LSPSpec::DocumentSymbol> m_symbols;
|
||||
std::vector<LSPSpec::Diagnostic> m_diagnostics;
|
||||
GameVersion m_game_version;
|
||||
|
||||
std::optional<std::string> get_symbol_at_position(const LSPSpec::Position position) const;
|
||||
};
|
||||
|
||||
class WorkspaceIRFile {
|
||||
public:
|
||||
@ -24,17 +42,16 @@ class WorkspaceIRFile {
|
||||
LSPSpec::DocumentUri m_all_types_uri = "";
|
||||
fs::path m_all_types_file_path;
|
||||
|
||||
std::optional<std::string> get_mips_instruction_at_position(const LSPSpec::Position position);
|
||||
std::optional<std::string> get_symbol_at_position(const LSPSpec::Position position);
|
||||
std::optional<std::string> get_mips_instruction_at_position(
|
||||
const LSPSpec::Position position) const;
|
||||
std::optional<std::string> get_symbol_at_position(const LSPSpec::Position position) const;
|
||||
|
||||
private:
|
||||
void find_all_types_path(const std::string& line);
|
||||
void find_function_symbol(const uint32_t line_num_zero_based, const std::string& line);
|
||||
/// @brief Make any relevant diagnostics on the IR line.
|
||||
/// Make any relevant diagnostics on the IR line.
|
||||
/// It's assumed each line in an IR can have atmost one diagnostic, and they are contained to just
|
||||
/// that line!
|
||||
/// @param line_num_zero_based
|
||||
/// @param line
|
||||
void identify_diagnostics(const uint32_t line_num_zero_based, const std::string& line);
|
||||
};
|
||||
|
||||
@ -57,24 +74,49 @@ class WorkspaceAllTypesFile {
|
||||
|
||||
class Workspace {
|
||||
public:
|
||||
enum class FileType { OpenGOAL, OpenGOALIR, Unsupported };
|
||||
Workspace();
|
||||
virtual ~Workspace();
|
||||
|
||||
bool is_initialized();
|
||||
void set_initialized(bool new_value);
|
||||
|
||||
// Even though when a file is initially opened it has the language id
|
||||
// many subsequent requests only provide a uri to the file
|
||||
// and it's a lot faster to check the end of a string, then multiple tracked file maps
|
||||
FileType determine_filetype_from_languageid(const std::string& language_id);
|
||||
FileType determine_filetype_from_uri(const LSPSpec::DocumentUri& file_uri);
|
||||
|
||||
void start_tracking_file(const LSPSpec::DocumentUri& file_uri,
|
||||
const std::string& language_id,
|
||||
const std::string& content);
|
||||
void update_tracked_file(const LSPSpec::DocumentUri& file_uri, const std::string& content);
|
||||
void stop_tracking_file(const LSPSpec::DocumentUri& file_uri);
|
||||
std::optional<WorkspaceOGFile> get_tracked_og_file(const LSPSpec::URI& file_uri);
|
||||
std::optional<WorkspaceIRFile> get_tracked_ir_file(const LSPSpec::URI& file_uri);
|
||||
std::optional<DefinitionMetadata> get_definition_info_from_all_types(
|
||||
const std::string& symbol_name,
|
||||
const LSPSpec::DocumentUri& all_types_uri);
|
||||
std::optional<SymbolInfo> get_global_symbol_info(const WorkspaceOGFile& file,
|
||||
const std::string& symbol_name);
|
||||
std::optional<TypeSpec> get_symbol_typespec(const WorkspaceOGFile& file,
|
||||
const std::string& symbol_name);
|
||||
std::optional<Docs::DefinitionLocation> get_symbol_def_location(const WorkspaceOGFile& file,
|
||||
const SymbolInfo& symbol_info);
|
||||
|
||||
private:
|
||||
LSPRequester m_requester;
|
||||
bool m_initialized = false;
|
||||
std::unordered_map<LSPSpec::DocumentUri, WorkspaceOGFile> m_tracked_og_files = {};
|
||||
std::unordered_map<LSPSpec::DocumentUri, WorkspaceIRFile> m_tracked_ir_files = {};
|
||||
std::unordered_map<LSPSpec::DocumentUri, WorkspaceAllTypesFile> m_tracked_all_types_files = {};
|
||||
|
||||
// TODO:
|
||||
// OpenGOAL is still incredibly tightly coupled to the jak projects as a language
|
||||
//
|
||||
// In the future, information like GameVersion should just be within the project file
|
||||
// and then we can track projects instead of games
|
||||
//
|
||||
// Until that decoupling happens, things like this will remain fairly clunky.
|
||||
std::unordered_map<GameVersion, std::unique_ptr<Compiler>> m_compiler_instances;
|
||||
};
|
||||
|
2
test/decompiler/reference/jak2/engine/camera/cam-layout_REF.gc
generated
vendored
2
test/decompiler/reference/jak2/engine/camera/cam-layout_REF.gc
generated
vendored
@ -300,7 +300,7 @@
|
||||
(with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) debug-buf))
|
||||
(bucket-id debug2)
|
||||
)
|
||||
(draw-string-xy arg2 s5-0 arg0 arg1 (font-color #dadada) (font-flags shadow kerning))
|
||||
(draw-string-xy arg2 s5-0 arg0 arg1 (font-color font-color-1) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
|
||||
|
2
test/decompiler/reference/jak2/engine/collide/collide-edge-grab_REF.gc
generated
vendored
2
test/decompiler/reference/jak2/engine/collide/collide-edge-grab_REF.gc
generated
vendored
@ -649,7 +649,7 @@
|
||||
)
|
||||
(sv-32 a0-10 a1-4 a2-2)
|
||||
)
|
||||
(s2-0 s1-0 (the-as bucket-id s0-0) *temp-string* s3-0 (font-color #dadada) (the-as vector2h #f))
|
||||
(s2-0 s1-0 (the-as bucket-id s0-0) *temp-string* s3-0 (font-color font-color-1) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
14
test/decompiler/reference/jak2/engine/debug/debug_REF.gc
generated
vendored
14
test/decompiler/reference/jak2/engine/debug/debug_REF.gc
generated
vendored
@ -42,7 +42,6 @@
|
||||
|
||||
;; definition (debug) for function add-debug-point
|
||||
;; INFO: Used lq/sq
|
||||
;; ERROR: Failed store: (s.w! (+ a0-6 8) 0) at op 152
|
||||
(defun-debug add-debug-point ((enable-draw symbol) (bucket bucket-id) (pt vector))
|
||||
(if (not enable-draw)
|
||||
(return #f)
|
||||
@ -156,7 +155,6 @@
|
||||
|
||||
;; definition (debug) for function internal-draw-debug-line
|
||||
;; INFO: Used lq/sq
|
||||
;; ERROR: Failed store: (s.w! (+ a0-29 8) 0) at op 271
|
||||
(defun-debug internal-draw-debug-line ((bucket bucket-id) (start vector) (end vector) (start-color rgba) (mode symbol) (end-color rgba))
|
||||
(local-vars (var-end vector) (sv-128 vector) (sv-144 vector))
|
||||
(set! var-end end)
|
||||
@ -290,7 +288,6 @@
|
||||
|
||||
;; definition (debug) for function internal-draw-debug-text-3d
|
||||
;; INFO: Used lq/sq
|
||||
;; ERROR: Failed store: (s.w! (+ v1-12 8) 0) at op 54
|
||||
(defun-debug internal-draw-debug-text-3d ((bucket bucket-id) (text string) (position vector) (color font-color) (screen-offset vector2h))
|
||||
(let ((screen-pos (new 'stack-no-clear 'vector4w)))
|
||||
(set! (-> screen-pos quad) (the-as uint128 0))
|
||||
@ -349,7 +346,6 @@
|
||||
|
||||
;; definition (debug) for function add-debug-flat-triangle
|
||||
;; INFO: Used lq/sq
|
||||
;; ERROR: Failed store: (s.w! (+ a0-13 8) 0) at op 153
|
||||
(defun-debug add-debug-flat-triangle ((enable symbol) (bucket bucket-id) (p0 vector) (p1 vector) (p2 vector) (color rgba))
|
||||
(local-vars (sv-160 vector) (sv-176 vector))
|
||||
(set! sv-160 p0)
|
||||
@ -656,7 +652,6 @@
|
||||
|
||||
;; definition (debug) for function add-debug-line2d
|
||||
;; INFO: Used lq/sq
|
||||
;; ERROR: Failed store: (s.w! (+ v1-12 8) 0) at op 115
|
||||
(defun-debug add-debug-line2d ((enable symbol) (bucket bucket-id) (start vector4w) (end vector4w) (color vector4w))
|
||||
(if (not enable)
|
||||
(return #f)
|
||||
@ -1438,7 +1433,6 @@
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Stack slot offset 32 signed mismatch
|
||||
;; WARN: Stack slot offset 32 signed mismatch
|
||||
;; ERROR: Failed store: (s.w! (+ v1-9 8) 0) at op 47
|
||||
(defun-debug debug-percent-bar ((enable symbol) (bucket bucket-id) (x int) (y int) (percentage float) (color rgba) (width int) (height int))
|
||||
(local-vars (sv-16 int) (sv-32 float))
|
||||
(set! sv-16 y)
|
||||
@ -1462,7 +1456,6 @@
|
||||
|
||||
;; definition (debug) for function debug-pad-display
|
||||
;; INFO: Used lq/sq
|
||||
;; ERROR: Failed store: (s.w! (+ v1-16 8) 0) at op 75
|
||||
(defun-debug debug-pad-display ((pad cpad-info))
|
||||
(let ((stick-history (new 'static 'inline-array vector 32
|
||||
(new 'static 'vector)
|
||||
@ -1612,7 +1605,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 3 of type debug-vertex-stats
|
||||
;; INFO: this function exists in multiple non-identical object files
|
||||
(defmethod inspect debug-vertex-stats ((obj debug-vertex-stats))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tlength: ~D~%" (-> obj length))
|
||||
@ -1735,7 +1727,6 @@
|
||||
;; definition (debug) for function add-debug-cursor
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
;; ERROR: Failed store: (s.w! (+ v1-9 8) 0) at op 38
|
||||
(defun-debug add-debug-cursor ((enable symbol) (bucket bucket-id) (x int) (y int) (arg4 int))
|
||||
(when enable
|
||||
(with-dma-buffer-add-bucket ((buf (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
@ -1753,10 +1744,10 @@
|
||||
(font-color red)
|
||||
)
|
||||
((= v1-7 2)
|
||||
(font-color yellow-#f3f300)
|
||||
(font-color yellow)
|
||||
)
|
||||
((= v1-7 4)
|
||||
(font-color green-#3df23d)
|
||||
(font-color green)
|
||||
)
|
||||
(else
|
||||
(font-color default)
|
||||
@ -1894,7 +1885,6 @@
|
||||
;; definition (debug) for function add-debug-bound
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
;; ERROR: Failed store: (s.w! (+ a0-3 8) 0) at op 36
|
||||
;; WARN: Function add-debug-bound has a return type of none, but the expression builder found a return statement.
|
||||
(defun-debug add-debug-bound ((buf bucket-id) (pts (inline-array vector)) (c0 int) (c1 rgba) (flash rgba) (arg5 int))
|
||||
(local-vars (sv-16 pointer) (sv-32 int))
|
||||
|
21
test/decompiler/reference/jak2/engine/debug/editable_REF.gc
generated
vendored
21
test/decompiler/reference/jak2/engine/debug/editable_REF.gc
generated
vendored
@ -124,7 +124,7 @@
|
||||
(s1-0 318)
|
||||
)
|
||||
(format (clear *temp-string*) "region-~D~%" (-> obj id))
|
||||
(s3-0 s2-0 (the-as bucket-id s1-0) *temp-string* arg0 (font-color #dadada) sv-32)
|
||||
(s3-0 s2-0 (the-as bucket-id s1-0) *temp-string* arg0 (font-color font-color-1) sv-32)
|
||||
)
|
||||
(+! (-> sv-32 y) 8)
|
||||
(when (>= arg1 1)
|
||||
@ -135,7 +135,7 @@
|
||||
(s1-1 318)
|
||||
)
|
||||
(format (clear *temp-string*) "(on-enter ~S)" s4-1)
|
||||
(s3-1 s2-1 (the-as bucket-id s1-1) *temp-string* arg0 (font-color #dadada) sv-32)
|
||||
(s3-1 s2-1 (the-as bucket-id s1-1) *temp-string* arg0 (font-color font-color-1) sv-32)
|
||||
)
|
||||
(+! (-> sv-32 y) 8)
|
||||
)
|
||||
@ -147,7 +147,7 @@
|
||||
(s1-2 318)
|
||||
)
|
||||
(format (clear *temp-string*) "(on-inside ~S)" s4-2)
|
||||
(s3-2 s2-2 (the-as bucket-id s1-2) *temp-string* arg0 (font-color #dadada) sv-32)
|
||||
(s3-2 s2-2 (the-as bucket-id s1-2) *temp-string* arg0 (font-color font-color-1) sv-32)
|
||||
)
|
||||
(+! (-> sv-32 y) 8)
|
||||
)
|
||||
@ -159,7 +159,7 @@
|
||||
(s2-3 318)
|
||||
)
|
||||
(format (clear *temp-string*) "(on-exit ~S)" s5-1)
|
||||
(s4-3 s3-3 (the-as bucket-id s2-3) *temp-string* arg0 (font-color #dadada) sv-32)
|
||||
(s4-3 s3-3 (the-as bucket-id s2-3) *temp-string* arg0 (font-color font-color-1) sv-32)
|
||||
)
|
||||
(+! (-> sv-32 y) 8)
|
||||
)
|
||||
@ -1022,7 +1022,14 @@
|
||||
(s3-1 318)
|
||||
)
|
||||
(format (clear *temp-string*) "~S~%" (-> obj name))
|
||||
(s5-1 s4-1 (the-as bucket-id s3-1) *temp-string* (-> obj trans) (font-color #dadada) (the-as vector2h #f))
|
||||
(s5-1
|
||||
s4-1
|
||||
(the-as bucket-id s3-1)
|
||||
*temp-string*
|
||||
(-> obj trans)
|
||||
(font-color font-color-1)
|
||||
(the-as vector2h #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
((method-of-type editable-sphere editable-method-10) obj)
|
||||
@ -1274,8 +1281,8 @@
|
||||
*temp-string*
|
||||
(-> gp-0 s4-1)
|
||||
(if (logtest? (-> obj flags) (editable-flag orient))
|
||||
(font-color yellow-#f3f300)
|
||||
(font-color #dadada)
|
||||
(font-color yellow)
|
||||
(font-color font-color-1)
|
||||
)
|
||||
(the-as vector2h #f)
|
||||
)
|
||||
|
37
test/decompiler/reference/jak2/engine/debug/menu_REF.gc
generated
vendored
37
test/decompiler/reference/jak2/engine/debug/menu_REF.gc
generated
vendored
@ -912,7 +912,6 @@
|
||||
)
|
||||
|
||||
;; definition for function debug-menu-item-submenu-render
|
||||
;; ERROR: Failed store: (s.w! (+ v1-9 8) 0) at op 42
|
||||
(defun debug-menu-item-submenu-render ((arg0 debug-menu-item-submenu) (arg1 int) (arg2 int) (arg3 int) (arg4 symbol))
|
||||
(let ((s5-0 (-> arg0 parent context font)))
|
||||
(let ((v1-2 s5-0)
|
||||
@ -923,13 +922,13 @@
|
||||
)
|
||||
(set! (-> s5-0 color) (cond
|
||||
((zero? arg3)
|
||||
(font-color white-#ffffff)
|
||||
(font-color white)
|
||||
)
|
||||
(arg4
|
||||
(font-color #7cbaba)
|
||||
(font-color font-color-11)
|
||||
)
|
||||
(else
|
||||
(font-color #959595)
|
||||
(font-color font-color-13)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -944,7 +943,6 @@
|
||||
)
|
||||
|
||||
;; definition for function debug-menu-item-function-render
|
||||
;; ERROR: Failed store: (s.w! (+ v1-3 8) 0) at op 49
|
||||
(defun debug-menu-item-function-render ((arg0 debug-menu-item-function) (arg1 int) (arg2 int) (arg3 int) (arg4 symbol))
|
||||
(let ((v1-2 (-> arg0 parent context font)))
|
||||
(let ((a0-1 v1-2)
|
||||
@ -981,7 +979,6 @@
|
||||
)
|
||||
|
||||
;; definition for function debug-menu-item-flag-render
|
||||
;; ERROR: Failed store: (s.w! (+ v1-3 8) 0) at op 47
|
||||
(defun debug-menu-item-flag-render ((arg0 debug-menu-item-flag) (arg1 int) (arg2 int) (arg3 int) (arg4 symbol))
|
||||
(let ((v1-2 (-> arg0 parent context font)))
|
||||
(let ((a0-1 v1-2)
|
||||
@ -992,19 +989,19 @@
|
||||
)
|
||||
(set! (-> v1-2 color) (cond
|
||||
((= (-> arg0 is-on) 'invalid)
|
||||
(font-color #5e3f5e)
|
||||
(font-color font-color-19)
|
||||
)
|
||||
((-> arg0 is-on)
|
||||
(if (zero? arg3)
|
||||
(font-color #daf95e)
|
||||
(font-color #8aa81f)
|
||||
(font-color font-color-15)
|
||||
(font-color font-color-16)
|
||||
)
|
||||
)
|
||||
((zero? arg3)
|
||||
(font-color #a6b5a6)
|
||||
(font-color font-color-17)
|
||||
)
|
||||
(else
|
||||
(font-color #757f75)
|
||||
(font-color font-color-18)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1018,7 +1015,6 @@
|
||||
)
|
||||
|
||||
;; definition for function debug-menu-item-var-render
|
||||
;; ERROR: Failed store: (s.w! (+ v1-16 8) 0) at op 95
|
||||
(defun debug-menu-item-var-render ((arg0 debug-menu-item-var) (arg1 int) (arg2 int) (arg3 int) (arg4 symbol))
|
||||
(let ((s5-0 (-> arg0 parent context font)))
|
||||
(let ((v1-2 s5-0)
|
||||
@ -1030,15 +1026,15 @@
|
||||
(set! (-> s5-0 color) (cond
|
||||
((zero? arg3)
|
||||
(if (-> arg0 grabbed-joypad-p)
|
||||
(font-color #a0d5d5)
|
||||
(font-color white-#ffffff)
|
||||
(font-color font-color-10)
|
||||
(font-color white)
|
||||
)
|
||||
)
|
||||
(arg4
|
||||
(font-color #7cbaba)
|
||||
(font-color font-color-11)
|
||||
)
|
||||
(else
|
||||
(font-color #959595)
|
||||
(font-color font-color-13)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1104,7 +1100,6 @@
|
||||
|
||||
;; definition for function debug-menu-render
|
||||
;; INFO: Used lq/sq
|
||||
;; ERROR: Failed store: (s.w! (+ v1-9 8) 0) at op 47
|
||||
(defun debug-menu-render ((arg0 debug-menu) (arg1 int) (arg2 int) (arg3 debug-menu-node) (arg4 int))
|
||||
(local-vars (sv-16 dma-buffer) (sv-32 pointer))
|
||||
(let ((v1-0 0))
|
||||
@ -1138,8 +1133,8 @@
|
||||
(while (not (null? s1-1))
|
||||
(when (= s0-1 arg3)
|
||||
(set! (-> arg0 context font color) (if (nonzero? arg4)
|
||||
(font-color #959595)
|
||||
(font-color white-#ffffff)
|
||||
(font-color font-color-13)
|
||||
(font-color white)
|
||||
)
|
||||
)
|
||||
(let ((v1-20 (-> arg0 context font))
|
||||
@ -1695,7 +1690,3 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
8
test/decompiler/reference/jak2/engine/draw/drawable_REF.gc
generated
vendored
8
test/decompiler/reference/jak2/engine/draw/drawable_REF.gc
generated
vendored
@ -181,7 +181,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
arg1
|
||||
(-> arg0 bsphere)
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
(the-as vector2h #f)
|
||||
)
|
||||
)
|
||||
@ -1717,7 +1717,6 @@
|
||||
|
||||
;; definition for function default-init-buffer
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
;; ERROR: Failed store: (s.w! (+ t1-0 8) t2-1) at op 24
|
||||
(defun default-init-buffer ((arg0 bucket-id) (arg1 gs-zbuf) (arg2 gs-test))
|
||||
(let ((v1-6 (-> *display* frames (-> *display* on-screen) bucket-group arg0)))
|
||||
(when (!= v1-6 (-> v1-6 last))
|
||||
@ -1750,7 +1749,6 @@
|
||||
|
||||
;; definition for function default-end-buffer
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
;; ERROR: Failed store: (s.w! (+ t1-0 8) t2-1) at op 24
|
||||
(defun default-end-buffer ((arg0 bucket-id) (arg1 gs-zbuf) (arg2 gs-test))
|
||||
(let ((v1-6 (-> *display* frames (-> *display* on-screen) bucket-group arg0)))
|
||||
(when (!= v1-6 (-> v1-6 last))
|
||||
@ -2176,7 +2174,3 @@
|
||||
(display-sync arg0)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
10
test/decompiler/reference/jak2/engine/entity/entity_REF.gc
generated
vendored
10
test/decompiler/reference/jak2/engine/entity/entity_REF.gc
generated
vendored
@ -1308,7 +1308,7 @@
|
||||
(-> (the-as process-drawable arg0) root trans)
|
||||
(if (logtest? (-> sv-16 extra perm status) (entity-perm-status bit-0 bit-1))
|
||||
(font-color red)
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 8))
|
||||
)
|
||||
@ -1324,7 +1324,7 @@
|
||||
(the-as bucket-id s3-1)
|
||||
*temp-string*
|
||||
(-> (the-as process-drawable arg0) root trans)
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 24))
|
||||
)
|
||||
)
|
||||
@ -1336,7 +1336,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(symbol->string v1-49)
|
||||
(-> (the-as process-drawable arg0) root trans)
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 24))
|
||||
)
|
||||
)
|
||||
@ -1371,7 +1371,7 @@
|
||||
(the-as bucket-id s3-3)
|
||||
*temp-string*
|
||||
(-> (the-as process-drawable arg0) root trans)
|
||||
(font-color green-#3df23d)
|
||||
(font-color green)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 8))
|
||||
)
|
||||
)
|
||||
@ -1385,7 +1385,7 @@
|
||||
"#f"
|
||||
)
|
||||
(-> (the-as process-drawable arg0) root trans)
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 16))
|
||||
)
|
||||
(label cfg-51)
|
||||
|
4
test/decompiler/reference/jak2/engine/game/game-info_REF.gc
generated
vendored
4
test/decompiler/reference/jak2/engine/game/game-info_REF.gc
generated
vendored
@ -780,7 +780,7 @@
|
||||
(+ (the int (/ (the float (+ (/ (-> s3-0 x) 16) -1792)) (-> *video-params* relative-x-scale))) -48)
|
||||
(+ (/ (-> s3-0 y) 16) -1855)
|
||||
0.0
|
||||
(font-color gold-#ba9200)
|
||||
(font-color gold)
|
||||
(font-flags shadow kerning)
|
||||
)
|
||||
)
|
||||
@ -1082,7 +1082,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> obj name)
|
||||
(-> obj trans)
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 8))
|
||||
)
|
||||
(let ((a3-2 (vector-z-quaternion! (new-stack-vector0) (the-as quaternion (-> obj quat)))))
|
||||
|
16
test/decompiler/reference/jak2/engine/game/task/task-control_REF.gc
generated
vendored
16
test/decompiler/reference/jak2/engine/game/task/task-control_REF.gc
generated
vendored
@ -1458,16 +1458,8 @@
|
||||
(when (and (not (logtest? (-> obj flags) (fail-mission-flags famflags-6)))
|
||||
(= (get-status *gui-control* (-> obj message-id)) (gui-status active))
|
||||
)
|
||||
(let ((gp-0 (new
|
||||
'stack
|
||||
'font-context
|
||||
*font-default-matrix*
|
||||
70
|
||||
20
|
||||
0.0
|
||||
(font-color gold-#ba9200)
|
||||
(font-flags shadow kerning)
|
||||
)
|
||||
(let ((gp-0
|
||||
(new 'stack 'font-context *font-default-matrix* 70 20 0.0 (font-color gold) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 origin x) 120.0)
|
||||
@ -2387,7 +2379,3 @@
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
4
test/decompiler/reference/jak2/engine/geometry/path_REF.gc
generated
vendored
4
test/decompiler/reference/jak2/engine/geometry/path_REF.gc
generated
vendored
@ -48,7 +48,7 @@
|
||||
(s1-0 318)
|
||||
)
|
||||
(format (clear *temp-string*) "~D" s5-1)
|
||||
(s3-1 s2-1 (the-as bucket-id s1-0) *temp-string* s4-1 (font-color gold-#ba9200) (the-as vector2h #f))
|
||||
(s3-1 s2-1 (the-as bucket-id s1-0) *temp-string* s4-1 (font-color gold) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -447,7 +447,7 @@ using the fractional component of `idx` as the interpolant, return this result
|
||||
(s1-0 318)
|
||||
)
|
||||
(format (clear *temp-string*) "~D" s5-1)
|
||||
(s3-1 s2-1 (the-as bucket-id s1-0) *temp-string* s4-1 (font-color gold-#ba9200) (the-as vector2h #f))
|
||||
(s3-1 s2-1 (the-as bucket-id s1-0) *temp-string* s4-1 (font-color gold) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
8
test/decompiler/reference/jak2/engine/level/region_REF.gc
generated
vendored
8
test/decompiler/reference/jak2/engine/level/region_REF.gc
generated
vendored
@ -101,7 +101,7 @@
|
||||
(s3-0 318)
|
||||
)
|
||||
(format (clear *temp-string*) "region-~D~%" (-> obj region id))
|
||||
(s5-0 s4-0 (the-as bucket-id s3-0) *temp-string* sv-36 (font-color #dadada) sv-32)
|
||||
(s5-0 s4-0 (the-as bucket-id s3-0) *temp-string* sv-36 (font-color font-color-1) sv-32)
|
||||
)
|
||||
(+! (-> sv-32 y) 8)
|
||||
(let ((s5-1 (-> obj region on-enter)))
|
||||
@ -111,7 +111,7 @@
|
||||
(s2-1 318)
|
||||
)
|
||||
(format (clear *temp-string*) "(on-enter ~S)" s5-1)
|
||||
(s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* sv-36 (font-color #dadada) sv-32)
|
||||
(s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* sv-36 (font-color font-color-1) sv-32)
|
||||
)
|
||||
(+! (-> sv-32 y) 8)
|
||||
)
|
||||
@ -123,7 +123,7 @@
|
||||
(s2-2 318)
|
||||
)
|
||||
(format (clear *temp-string*) "(on-inside ~S)" s5-2)
|
||||
(s4-2 s3-2 (the-as bucket-id s2-2) *temp-string* sv-36 (font-color #dadada) sv-32)
|
||||
(s4-2 s3-2 (the-as bucket-id s2-2) *temp-string* sv-36 (font-color font-color-1) sv-32)
|
||||
)
|
||||
(+! (-> sv-32 y) 8)
|
||||
)
|
||||
@ -135,7 +135,7 @@
|
||||
(s3-3 318)
|
||||
)
|
||||
(format (clear *temp-string*) "(on-exit ~S)" gp-1)
|
||||
(s5-3 s4-3 (the-as bucket-id s3-3) *temp-string* sv-36 (font-color #dadada) sv-32)
|
||||
(s5-3 s4-3 (the-as bucket-id s3-3) *temp-string* sv-36 (font-color font-color-1) sv-32)
|
||||
)
|
||||
(+! (-> sv-32 y) 8)
|
||||
)
|
||||
|
2
test/decompiler/reference/jak2/engine/nav/nav-control_REF.gc
generated
vendored
2
test/decompiler/reference/jak2/engine/nav/nav-control_REF.gc
generated
vendored
@ -324,7 +324,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
|
||||
(s1-0 318)
|
||||
)
|
||||
(format (clear *temp-string*) "~D" s5-1)
|
||||
(s3-0 s2-0 (the-as bucket-id s1-0) *temp-string* s4-0 (font-color cyan-#00fefe) (the-as vector2h #f))
|
||||
(s3-0 s2-0 (the-as bucket-id s1-0) *temp-string* s4-0 (font-color cyan) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
10
test/decompiler/reference/jak2/engine/nav/nav-mesh_REF.gc
generated
vendored
10
test/decompiler/reference/jak2/engine/nav/nav-mesh_REF.gc
generated
vendored
@ -409,7 +409,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(res-lump-struct obj 'name string)
|
||||
s5-0
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 8))
|
||||
)
|
||||
(let ((s4-1 add-debug-text-3d)
|
||||
@ -422,7 +422,7 @@
|
||||
(the-as bucket-id s2-1)
|
||||
*temp-string*
|
||||
s5-0
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 16))
|
||||
)
|
||||
)
|
||||
@ -576,7 +576,7 @@
|
||||
(the-as bucket-id s2-1)
|
||||
*temp-string*
|
||||
(-> gp-0 1)
|
||||
(font-color magenta-#f87df8)
|
||||
(font-color magenta)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 8))
|
||||
)
|
||||
)
|
||||
@ -1565,7 +1565,7 @@
|
||||
(the-as bucket-id s2-0)
|
||||
*temp-string*
|
||||
(-> obj static-sphere s5-0)
|
||||
(font-color cyan-#00fefe)
|
||||
(font-color cyan)
|
||||
(the-as vector2h #f)
|
||||
)
|
||||
)
|
||||
@ -1601,7 +1601,7 @@
|
||||
(the-as bucket-id s1-1)
|
||||
*temp-string*
|
||||
(poly-centroid obj s4-1 sv-32)
|
||||
(font-color cyan-#00fefe)
|
||||
(font-color cyan)
|
||||
(the-as vector2h #f)
|
||||
)
|
||||
)
|
||||
|
2
test/decompiler/reference/jak2/engine/process-drawable/process-drawable_REF.gc
generated
vendored
2
test/decompiler/reference/jak2/engine/process-drawable/process-drawable_REF.gc
generated
vendored
@ -510,7 +510,7 @@
|
||||
)
|
||||
(format (clear *temp-string*) "~d" (+ s2-0 -1))
|
||||
(let ((a2-3 *temp-string*))
|
||||
(add-debug-text-3d #t (bucket-id debug-no-zbuf1) a2-3 s3-0 (font-color blue-#003cf1) s5-0)
|
||||
(add-debug-text-3d #t (bucket-id debug-no-zbuf1) a2-3 s3-0 (font-color blue) s5-0)
|
||||
)
|
||||
(+! (-> s5-0 x) 10)
|
||||
)
|
||||
|
4
test/decompiler/reference/jak2/engine/scene/scene_REF.gc
generated
vendored
4
test/decompiler/reference/jak2/engine/scene/scene_REF.gc
generated
vendored
@ -875,7 +875,7 @@
|
||||
(set! (-> s2-0 flags) (font-flags kerning middle left large))
|
||||
(set! (-> s2-0 origin x) (+ -1.0 (-> s2-0 origin x)))
|
||||
(set! (-> s2-0 origin y) (+ -1.0 (-> s2-0 origin y)))
|
||||
(set! (-> s2-0 color) (font-color #000000))
|
||||
(set! (-> s2-0 color) (font-color font-color-39))
|
||||
(set! (-> s2-0 origin x) (+ 1.0 (-> s2-0 origin x)))
|
||||
(set! (-> s2-0 origin y) (+ 1.0 (-> s2-0 origin y)))
|
||||
(set! (-> s2-0 color) (font-color default))
|
||||
@ -1479,7 +1479,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> v1-94 name)
|
||||
(-> v1-94 draw origin)
|
||||
(font-color yellow-#f3f300)
|
||||
(font-color yellow)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 8))
|
||||
)
|
||||
)
|
||||
|
8
test/decompiler/reference/jak2/engine/ui/hud-classes_REF.gc
generated
vendored
8
test/decompiler/reference/jak2/engine/ui/hud-classes_REF.gc
generated
vendored
@ -687,7 +687,7 @@
|
||||
(alloc-string-if-needed obj s5-0)
|
||||
(set! (-> obj strings s5-0 scale) 0.8)
|
||||
(set! (-> obj strings s5-0 flags) (font-flags kerning middle large))
|
||||
(set! (-> obj strings s5-0 color) (font-color green-#3df23d))
|
||||
(set! (-> obj strings s5-0 color) (font-color green))
|
||||
)
|
||||
(set! (-> obj values 2 target) (-> obj values 1 target))
|
||||
0
|
||||
@ -732,7 +732,7 @@
|
||||
(alloc-string-if-needed obj 0)
|
||||
(set! (-> obj strings 0 scale) 0.8)
|
||||
(set! (-> obj strings 0 flags) (font-flags kerning middle large))
|
||||
(set! (-> obj strings 0 color) (font-color green-#3df23d))
|
||||
(set! (-> obj strings 0 color) (font-color green))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@ -1200,7 +1200,3 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
148
test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc
generated
vendored
148
test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc
generated
vendored
@ -4,7 +4,7 @@
|
||||
;; definition for function progress-selected
|
||||
;; WARN: Return type mismatch int vs font-color.
|
||||
(defbehavior progress-selected progress ((arg0 int))
|
||||
(let ((color (font-color #7ffcfc)))
|
||||
(let ((color (font-color font-color-33)))
|
||||
(cond
|
||||
((< 4 (the-as int (logand (-> self clock integral-frame-counter) 7)))
|
||||
(set! (-> *progress-state* color-flash-counter) 1)
|
||||
@ -475,7 +475,7 @@
|
||||
)
|
||||
(set! (-> arg1 origin x) (- (-> arg1 origin x) (the float s5-0)))
|
||||
)
|
||||
(set! (-> arg1 color) (font-color #7efbfb))
|
||||
(set! (-> arg1 color) (font-color font-color-32))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@ -654,7 +654,7 @@
|
||||
(arg3
|
||||
(set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-1 color) (font-color font-color-34))
|
||||
)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
(set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y)))
|
||||
@ -715,7 +715,7 @@
|
||||
(arg3
|
||||
(set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-1 color) (font-color font-color-34))
|
||||
)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
(set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y)))
|
||||
@ -782,7 +782,7 @@
|
||||
)
|
||||
(set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y)))
|
||||
(let ((a0-6 arg1))
|
||||
(set! (-> a0-6 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-6 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 44 f28-0)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
@ -822,7 +822,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-23 arg1))
|
||||
(set! (-> a0-23 color) (font-color #7efbfb))
|
||||
(set! (-> a0-23 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1061,7 +1061,7 @@
|
||||
(set! (-> v1-7 scale) 0.75)
|
||||
)
|
||||
(let ((a0-2 arg1))
|
||||
(set! (-> a0-2 color) (font-color #7efbfb))
|
||||
(set! (-> a0-2 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-3 arg1))
|
||||
@ -1643,7 +1643,7 @@
|
||||
(set! (-> arg1 origin y) (the float sv-48))
|
||||
(set! (-> arg1 height) 50.0)
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((a0-2 arg1))
|
||||
(set! (-> a0-2 flags) (font-flags kerning middle large))
|
||||
@ -1728,7 +1728,7 @@
|
||||
(set! (-> sv-48 height) 50.0)
|
||||
(set! (-> sv-48 origin y) (the float sv-16))
|
||||
(let ((a0-2 sv-48))
|
||||
(set! (-> a0-2 color) (font-color #7efbfb))
|
||||
(set! (-> a0-2 color) (font-color font-color-32))
|
||||
)
|
||||
(set! sv-32 print-game-text)
|
||||
(let ((a0-4 (lookup-text! *common-text* s0-0 #f))
|
||||
@ -1805,7 +1805,7 @@
|
||||
(set! (-> sv-16 origin y) (the float sv-32))
|
||||
(set! (-> sv-16 height) 50.0)
|
||||
(let ((a0-2 sv-16))
|
||||
(set! (-> a0-2 color) (font-color #7efbfb))
|
||||
(set! (-> a0-2 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> sv-16 origin x) 80.0)
|
||||
(let ((a0-3 sv-16))
|
||||
@ -1894,7 +1894,7 @@
|
||||
(set! (-> sv-48 origin y) (the float sv-16))
|
||||
(set! (-> sv-48 height) 50.0)
|
||||
(let ((a0-2 sv-48))
|
||||
(set! (-> a0-2 color) (font-color #7efbfb))
|
||||
(set! (-> a0-2 color) (font-color font-color-32))
|
||||
)
|
||||
(set! sv-32 print-game-text)
|
||||
(let ((a0-4 (lookup-text! *common-text* s0-0 #f))
|
||||
@ -1989,7 +1989,7 @@
|
||||
(set! (-> a0-6 flags) (font-flags kerning middle large))
|
||||
)
|
||||
(let ((a0-7 sv-80))
|
||||
(set! (-> a0-7 color) (font-color #7efbfb))
|
||||
(set! (-> a0-7 color) (font-color font-color-32))
|
||||
)
|
||||
(set! sv-48 print-game-text)
|
||||
(let* ((a0-8 *common-text*)
|
||||
@ -2179,7 +2179,7 @@
|
||||
(let ((s2-3 arg1))
|
||||
(set! (-> s2-3 color) (if (= arg2 sv-20)
|
||||
(the-as font-color (the-as int (progress-selected 0)))
|
||||
(font-color #7efbfb)
|
||||
(font-color font-color-32)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -2365,7 +2365,7 @@
|
||||
(s2-7 *temp-string* arg1 #f 44 (bucket-id progress))
|
||||
)
|
||||
(let ((a0-45 arg1))
|
||||
(set! (-> a0-45 color) (font-color #7efbfb))
|
||||
(set! (-> a0-45 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> arg1 origin x) 250.0)
|
||||
(set! (-> arg1 origin y) 110.0)
|
||||
@ -2604,7 +2604,7 @@
|
||||
(set! (-> v1-25 height) (the float 160))
|
||||
)
|
||||
(let ((a0-16 arg1))
|
||||
(set! (-> a0-16 color) (font-color #7efbfb))
|
||||
(set! (-> a0-16 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((s5-2 print-game-text))
|
||||
(format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-dont-remove) #f) 1)
|
||||
@ -2623,7 +2623,7 @@
|
||||
(set! (-> v1-3 scale) 0.5)
|
||||
)
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 color) (font-color #7efbfb))
|
||||
(set! (-> a0-3 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((a0-4 arg1))
|
||||
(set! (-> a0-4 flags) (font-flags kerning middle left large))
|
||||
@ -2715,7 +2715,7 @@
|
||||
(set! (-> v1-1 scale) 0.5)
|
||||
)
|
||||
(let ((a0-2 arg1))
|
||||
(set! (-> a0-2 color) (font-color #7efbfb))
|
||||
(set! (-> a0-2 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 flags) (font-flags kerning middle left large))
|
||||
@ -2762,7 +2762,7 @@
|
||||
(set! (-> v1-1 scale) 0.5)
|
||||
)
|
||||
(let ((a0-2 arg1))
|
||||
(set! (-> a0-2 color) (font-color #7efbfb))
|
||||
(set! (-> a0-2 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 flags) (font-flags kerning middle left large))
|
||||
@ -2810,7 +2810,7 @@
|
||||
(set! (-> v1-1 scale) 0.5)
|
||||
)
|
||||
(let ((a0-2 arg1))
|
||||
(set! (-> a0-2 color) (font-color #7efbfb))
|
||||
(set! (-> a0-2 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 flags) (font-flags kerning middle left large))
|
||||
@ -2879,7 +2879,7 @@
|
||||
(set! (-> v1-1 scale) 0.5)
|
||||
)
|
||||
(let ((a0-2 arg1))
|
||||
(set! (-> a0-2 color) (font-color #7efbfb))
|
||||
(set! (-> a0-2 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 flags) (font-flags kerning middle left large))
|
||||
@ -2956,7 +2956,7 @@
|
||||
(set! (-> v1-1 scale) 0.5)
|
||||
)
|
||||
(let ((a0-2 arg1))
|
||||
(set! (-> a0-2 color) (font-color #7efbfb))
|
||||
(set! (-> a0-2 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 flags) (font-flags kerning middle left large))
|
||||
@ -3016,7 +3016,7 @@
|
||||
(defmethod draw-option menu-error-disc-removed-option ((obj menu-error-disc-removed-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.5)
|
||||
@ -3076,7 +3076,7 @@
|
||||
(defmethod draw-option menu-error-reading-option ((obj menu-error-reading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.5)
|
||||
@ -3134,7 +3134,7 @@
|
||||
(defmethod draw-option menu-icon-info-option ((obj menu-icon-info-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.5)
|
||||
@ -3210,7 +3210,7 @@
|
||||
(defmethod draw-option menu-format-card-option ((obj menu-format-card-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.5)
|
||||
@ -3264,7 +3264,7 @@
|
||||
(defmethod draw-option menu-already-exists-option ((obj menu-already-exists-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.5)
|
||||
@ -3310,7 +3310,7 @@
|
||||
(defmethod draw-option menu-create-game-option ((obj menu-create-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.5)
|
||||
@ -3353,7 +3353,7 @@
|
||||
(defmethod draw-option menu-video-mode-warning-option ((obj menu-video-mode-warning-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.5)
|
||||
@ -3421,7 +3421,7 @@
|
||||
(defmethod draw-option menu-video-mode-ok-option ((obj menu-video-mode-ok-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.5)
|
||||
@ -3467,7 +3467,7 @@
|
||||
(defmethod draw-option menu-progressive-mode-warning-option ((obj menu-progressive-mode-warning-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.5)
|
||||
@ -3535,7 +3535,7 @@
|
||||
(defmethod draw-option menu-progressive-mode-ok-option ((obj menu-progressive-mode-ok-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.55)
|
||||
@ -3581,7 +3581,7 @@
|
||||
(defmethod draw-option menu-quit-option ((obj menu-quit-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
||||
(let ((a0-1 arg1))
|
||||
(set! (-> a0-1 color) (font-color #7efbfb))
|
||||
(set! (-> a0-1 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-2 arg1))
|
||||
(set! (-> v1-2 scale) 0.55)
|
||||
@ -3643,7 +3643,7 @@
|
||||
(set! (-> a0-3 flags) (font-flags kerning middle large))
|
||||
)
|
||||
(let ((a0-4 arg1))
|
||||
(set! (-> a0-4 color) (font-color #7efbfb))
|
||||
(set! (-> a0-4 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> arg1 origin y) 100.0)
|
||||
(let ((v1-9 arg1))
|
||||
@ -3735,7 +3735,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-35 arg1))
|
||||
(set! (-> a0-35 color) (font-color #7efbfb))
|
||||
(set! (-> a0-35 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -3839,7 +3839,7 @@
|
||||
(set! (-> v1-15 height) (the float 210))
|
||||
)
|
||||
(let ((a1-9 arg1))
|
||||
(set! (-> a1-9 color) (font-color #7efbfb))
|
||||
(set! (-> a1-9 color) (font-color font-color-32))
|
||||
)
|
||||
(if (or (= (-> *setting-control* user-default language) (language-enum french))
|
||||
(= (-> *setting-control* user-default language) (language-enum spanish))
|
||||
@ -3933,7 +3933,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-21 arg1))
|
||||
(set! (-> a0-21 color) (font-color #7efbfb))
|
||||
(set! (-> a0-21 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -4254,7 +4254,7 @@
|
||||
(set! (-> arg1 origin x) 60.0)
|
||||
(set! (-> arg1 origin y) 80.0)
|
||||
(let ((a0-21 arg1))
|
||||
(set! (-> a0-21 color) (font-color #7efbfb))
|
||||
(set! (-> a0-21 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-40 (-> obj page-index)))
|
||||
(cond
|
||||
@ -4477,7 +4477,7 @@
|
||||
(let ((s3-1 arg2))
|
||||
(set! (-> s3-1 color) (if (= arg3 1)
|
||||
(the-as font-color (the-as int (progress-selected 0)))
|
||||
(font-color #7efbfb)
|
||||
(font-color font-color-32)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -4503,7 +4503,7 @@
|
||||
)
|
||||
(set! (-> arg2 origin x) 360.0)
|
||||
(let ((a0-35 arg2))
|
||||
(set! (-> a0-35 color) (font-color #7efbfb))
|
||||
(set! (-> a0-35 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -4951,7 +4951,7 @@
|
||||
(set! (-> a0-21 flags) (font-flags kerning middle large))
|
||||
)
|
||||
(let ((a0-22 arg1))
|
||||
(set! (-> a0-22 color) (font-color #7efbfb))
|
||||
(set! (-> a0-22 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> arg1 origin x) 59.0)
|
||||
(let ((v1-54 arg1))
|
||||
@ -6100,7 +6100,7 @@
|
||||
(set! (-> a0-4 flags) (font-flags kerning middle large))
|
||||
)
|
||||
(let ((a0-5 sv-140))
|
||||
(set! (-> a0-5 color) (font-color #7efbfb))
|
||||
(set! (-> a0-5 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> sv-140 origin x) 59.0)
|
||||
(set! (-> sv-140 origin y) 78.0)
|
||||
@ -6142,7 +6142,7 @@
|
||||
(set! (-> a0-23 flags) (font-flags kerning large))
|
||||
)
|
||||
(let ((a0-24 sv-140))
|
||||
(set! (-> a0-24 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-24 color) (font-color font-color-34))
|
||||
)
|
||||
(set! (-> sv-140 origin x) (+ 20.0 sv-120 (-> sv-140 origin x)))
|
||||
(let ((v1-53 sv-140))
|
||||
@ -6201,7 +6201,7 @@
|
||||
)
|
||||
(set! sv-108 (-> sv-140 origin x))
|
||||
(let ((a0-54 sv-140))
|
||||
(set! (-> a0-54 color) (font-color #7efbfb))
|
||||
(set! (-> a0-54 color) (font-color font-color-32))
|
||||
)
|
||||
(+! (-> sv-140 origin x) sv-120)
|
||||
(let ((v1-96 sv-140))
|
||||
@ -6256,7 +6256,7 @@
|
||||
(set! (-> a0-74 flags) (font-flags kerning large))
|
||||
)
|
||||
(let ((a0-75 sv-140))
|
||||
(set! (-> a0-75 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-75 color) (font-color font-color-34))
|
||||
)
|
||||
(set! (-> sv-140 origin x) (+ 20.0 sv-124 (-> sv-140 origin x)))
|
||||
(let ((v1-142 sv-140))
|
||||
@ -6315,7 +6315,7 @@
|
||||
)
|
||||
(set! sv-108 (-> sv-140 origin x))
|
||||
(let ((a0-105 sv-140))
|
||||
(set! (-> a0-105 color) (font-color #7efbfb))
|
||||
(set! (-> a0-105 color) (font-color font-color-32))
|
||||
)
|
||||
(+! (-> sv-140 origin x) sv-124)
|
||||
(let ((v1-185 sv-140))
|
||||
@ -6376,7 +6376,7 @@
|
||||
((and (zero? (-> *progress-state* game-options-item-selected)) (-> *progress-state* game-options-item-picked))
|
||||
(set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y)))
|
||||
(let ((a0-2 arg1))
|
||||
(set! (-> a0-2 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-2 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (+ -1.0 (-> arg1 origin y))) 41 f30-0)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
@ -6413,7 +6413,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-17 arg1))
|
||||
(set! (-> a0-17 color) (font-color #7efbfb))
|
||||
(set! (-> a0-17 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -6466,7 +6466,7 @@
|
||||
((and (= (-> *progress-state* game-options-item-selected) 1) (-> *progress-state* game-options-item-picked))
|
||||
(set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y)))
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-3 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (+ -1.0 (-> arg1 origin y))) 41 f30-0)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
@ -6503,7 +6503,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-20 arg1))
|
||||
(set! (-> a0-20 color) (font-color #7efbfb))
|
||||
(set! (-> a0-20 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -6565,7 +6565,7 @@
|
||||
(cond
|
||||
((and (= (-> *progress-state* game-options-item-selected) 2) (-> *progress-state* game-options-item-picked))
|
||||
(let ((a0-7 arg1))
|
||||
(set! (-> a0-7 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-7 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (-> arg1 origin y)) 44 f30-0)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
@ -6584,13 +6584,13 @@
|
||||
)
|
||||
)
|
||||
(let ((a0-12 arg1))
|
||||
(set! (-> a0-12 color) (font-color #7efbfb))
|
||||
(set! (-> a0-12 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-33 arg1))
|
||||
(set! (-> v1-33 scale) 0.5)
|
||||
)
|
||||
(let ((a0-14 arg1))
|
||||
(set! (-> a0-14 color) (font-color #7efbfb))
|
||||
(set! (-> a0-14 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> arg1 origin x) (+ -70.0 (-> arg1 origin x)))
|
||||
(let ((s5-1 print-game-text))
|
||||
@ -6632,7 +6632,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-31 arg1))
|
||||
(set! (-> a0-31 color) (font-color #7efbfb))
|
||||
(set! (-> a0-31 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -6644,7 +6644,7 @@
|
||||
(set! (-> v1-54 scale) 0.5)
|
||||
)
|
||||
(let ((a0-36 arg1))
|
||||
(set! (-> a0-36 color) (font-color #7efbfb))
|
||||
(set! (-> a0-36 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> arg1 origin y) (+ 24.0 (-> arg1 origin y)))
|
||||
(let ((a0-37 arg1))
|
||||
@ -6700,7 +6700,7 @@
|
||||
(cond
|
||||
((and (= (-> *progress-state* game-options-item-selected) 3) (-> *progress-state* game-options-item-picked))
|
||||
(let ((a0-7 arg1))
|
||||
(set! (-> a0-7 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-7 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (-> arg1 origin y)) 44 f30-0)
|
||||
(let ((s3-0 print-game-text))
|
||||
@ -6722,13 +6722,13 @@
|
||||
)
|
||||
)
|
||||
(let ((a0-14 arg1))
|
||||
(set! (-> a0-14 color) (font-color #7efbfb))
|
||||
(set! (-> a0-14 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-33 arg1))
|
||||
(set! (-> v1-33 scale) 0.5)
|
||||
)
|
||||
(let ((a0-16 arg1))
|
||||
(set! (-> a0-16 color) (font-color #7efbfb))
|
||||
(set! (-> a0-16 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> arg1 origin x) (+ -70.0 (-> arg1 origin x)))
|
||||
(let ((s5-1 print-game-text))
|
||||
@ -6770,7 +6770,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-33 arg1))
|
||||
(set! (-> a0-33 color) (font-color #7efbfb))
|
||||
(set! (-> a0-33 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -6785,7 +6785,7 @@
|
||||
(set! (-> v1-54 scale) 0.5)
|
||||
)
|
||||
(let ((a0-40 arg1))
|
||||
(set! (-> a0-40 color) (font-color #7efbfb))
|
||||
(set! (-> a0-40 color) (font-color font-color-32))
|
||||
)
|
||||
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> *language-name-remap* (-> s4-0 0)) #f))
|
||||
*temp-string*
|
||||
@ -6863,7 +6863,7 @@
|
||||
)
|
||||
(set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y)))
|
||||
(let ((a0-4 arg1))
|
||||
(set! (-> a0-4 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-4 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 42 f30-0)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
@ -6904,7 +6904,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-21 arg1))
|
||||
(set! (-> a0-21 color) (font-color #7efbfb))
|
||||
(set! (-> a0-21 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -6972,7 +6972,7 @@
|
||||
)
|
||||
(set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y)))
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-3 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 42 f30-0)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
@ -7013,7 +7013,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-20 arg1))
|
||||
(set! (-> a0-20 color) (font-color #7efbfb))
|
||||
(set! (-> a0-20 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -7074,7 +7074,7 @@
|
||||
(set! (-> v1-10 scale) 0.6)
|
||||
)
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-3 color) (font-color font-color-34))
|
||||
)
|
||||
(set! (-> arg1 width) 350.0)
|
||||
(set! (-> arg1 height) 60.0)
|
||||
@ -7149,7 +7149,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-31 arg1))
|
||||
(set! (-> a0-31 color) (font-color #7efbfb))
|
||||
(set! (-> a0-31 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -7180,7 +7180,7 @@
|
||||
(cond
|
||||
((and (zero? (-> *progress-state* qr-options-item-selected)) (-> *progress-state* qr-options-item-picked))
|
||||
(let ((a0-2 arg1))
|
||||
(set! (-> a0-2 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-2 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 50 f0-1)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
@ -7245,7 +7245,7 @@
|
||||
(cond
|
||||
((and (= (-> *progress-state* qr-options-item-selected) 1) (-> *progress-state* qr-options-item-picked))
|
||||
(let ((a0-3 arg1))
|
||||
(set! (-> a0-3 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-3 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 50 f30-0)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
||||
@ -7410,7 +7410,7 @@
|
||||
(set! sv-128 (-> obj value-to-modify))
|
||||
(set! (-> s5-0 origin y) (+ -8.0 (-> s5-0 origin y)))
|
||||
(let ((a0-12 s5-0))
|
||||
(set! (-> a0-12 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-12 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (+ -2.0 (-> s5-0 origin y))) 52 f30-0)
|
||||
(set! sv-144 print-game-text)
|
||||
@ -7708,7 +7708,7 @@
|
||||
arg3
|
||||
)
|
||||
(let ((a0-7 arg1))
|
||||
(set! (-> a0-7 color) (font-color #f9f9f9))
|
||||
(set! (-> a0-7 color) (font-color font-color-34))
|
||||
)
|
||||
(draw-highlight (the int (+ -1.0 (-> arg1 origin y))) 42 f30-0)
|
||||
(let ((s3-1 print-game-text))
|
||||
@ -7717,13 +7717,13 @@
|
||||
)
|
||||
(set! (-> arg1 origin y) (+ 22.0 (-> arg1 origin y)))
|
||||
(let ((a0-13 arg1))
|
||||
(set! (-> a0-13 color) (font-color #7efbfb))
|
||||
(set! (-> a0-13 color) (font-color font-color-32))
|
||||
)
|
||||
(let ((v1-22 arg1))
|
||||
(set! (-> v1-22 scale) 0.5)
|
||||
)
|
||||
(let ((a0-15 arg1))
|
||||
(set! (-> a0-15 color) (font-color #7efbfb))
|
||||
(set! (-> a0-15 color) (font-color font-color-32))
|
||||
)
|
||||
(set! (-> arg1 origin x) (+ -70.0 (-> arg1 origin x)))
|
||||
(let ((s4-1 print-game-text))
|
||||
@ -7766,7 +7766,7 @@
|
||||
(set! (-> v1-39 scale) 0.5)
|
||||
)
|
||||
(let ((a0-33 arg1))
|
||||
(set! (-> a0-33 color) (font-color #7efbfb))
|
||||
(set! (-> a0-33 color) (font-color font-color-32))
|
||||
)
|
||||
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> *stereo-mode-name-remap* s5-0) #f))
|
||||
(let ((a0-37 *temp-string*))
|
||||
@ -7831,7 +7831,7 @@
|
||||
(let ((s0-0 arg1))
|
||||
(set! (-> s0-0 color) (if (= arg2 (-> arg0 option-index))
|
||||
(the-as font-color (the-as int (progress-selected 0)))
|
||||
(font-color #7efbfb)
|
||||
(font-color font-color-32)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -7843,7 +7843,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((a0-9 arg1))
|
||||
(set! (-> a0-9 color) (font-color #7efbfb))
|
||||
(set! (-> a0-9 color) (font-color font-color-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
2
test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc
generated
vendored
2
test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc
generated
vendored
@ -1462,7 +1462,7 @@
|
||||
(let ((s3-0 sv-144))
|
||||
(set! (-> s3-0 color) (if (and (= s4-1 (-> self option-index)) (= (-> self menu-transition) 0.0))
|
||||
(the-as font-color (the-as int (progress-selected 0)))
|
||||
(font-color #7efbfb)
|
||||
(font-color font-color-32)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
4
test/decompiler/reference/jak2/levels/city/common/ctywide-obs_REF.gc
generated
vendored
4
test/decompiler/reference/jak2/levels/city/common/ctywide-obs_REF.gc
generated
vendored
@ -3684,7 +3684,7 @@ This commonly includes things such as:
|
||||
(set! (-> v1-51 origin y) (the float a0-59))
|
||||
)
|
||||
(let ((a0-60 s1-0))
|
||||
(set! (-> a0-60 color) (font-color #fef666))
|
||||
(set! (-> a0-60 color) (font-color font-color-29))
|
||||
)
|
||||
(let ((s0-0 print-game-text))
|
||||
(set! sv-352 format)
|
||||
@ -3714,7 +3714,7 @@ This commonly includes things such as:
|
||||
)
|
||||
(let ((a0-68 s1-0))
|
||||
(set! (-> a0-68 color) (if (= s0-1 s5-0)
|
||||
(font-color #f1f104)
|
||||
(font-color font-color-30)
|
||||
(font-color default)
|
||||
)
|
||||
)
|
||||
|
6
test/decompiler/reference/jak2/levels/city/common/height-map_REF.gc
generated
vendored
6
test/decompiler/reference/jak2/levels/city/common/height-map_REF.gc
generated
vendored
@ -80,7 +80,7 @@
|
||||
(the-as bucket-id s2-0)
|
||||
*temp-string*
|
||||
s5-0
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
(new 'static 'vector2h :data (new 'static 'array int16 2 0 16))
|
||||
)
|
||||
)
|
||||
@ -258,7 +258,3 @@
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
2
test/decompiler/reference/jak2/levels/city/common/nav-graph_REF.gc
generated
vendored
2
test/decompiler/reference/jak2/levels/city/common/nav-graph_REF.gc
generated
vendored
@ -127,7 +127,7 @@
|
||||
gp-0
|
||||
(if (logtest? (-> obj flags) (nav-node-flag-byte blocked))
|
||||
(font-color red)
|
||||
(font-color cyan-#00fefe)
|
||||
(font-color cyan)
|
||||
)
|
||||
(the-as vector2h #f)
|
||||
)
|
||||
|
2
test/decompiler/reference/jak2/levels/city/common/traffic-engine_REF.gc
generated
vendored
2
test/decompiler/reference/jak2/levels/city/common/traffic-engine_REF.gc
generated
vendored
@ -1223,7 +1223,7 @@ Process is recycled and moved to reserved, if it deactivates."
|
||||
*temp-string*
|
||||
sv-84
|
||||
(if (< (-> sv-20 user-count) (-> sv-20 max-user-count))
|
||||
(font-color yellow-#f3f300)
|
||||
(font-color yellow)
|
||||
(font-color red)
|
||||
)
|
||||
(the-as vector2h #f)
|
||||
|
4
test/decompiler/reference/jak2/levels/city/common/trail_REF.gc
generated
vendored
4
test/decompiler/reference/jak2/levels/city/common/trail_REF.gc
generated
vendored
@ -35,7 +35,7 @@
|
||||
(s2-1 324)
|
||||
)
|
||||
(format (clear *temp-string*) "~D" arg1)
|
||||
(s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* s5-0 (font-color yellow-#f3f300) (the-as vector2h #f))
|
||||
(s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* s5-0 (font-color yellow) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -63,7 +63,7 @@
|
||||
(s2-1 324)
|
||||
)
|
||||
(format (clear *temp-string*) "~D" arg0)
|
||||
(s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* s5-0 (font-color cyan-#00fefe) (the-as vector2h #f))
|
||||
(s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* s5-0 (font-color cyan) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
2
test/decompiler/reference/jak2/levels/common/ai/bot_REF.gc
generated
vendored
2
test/decompiler/reference/jak2/levels/common/ai/bot_REF.gc
generated
vendored
@ -54,7 +54,7 @@
|
||||
(bucket-id debug-no-zbuf1)
|
||||
spot-id
|
||||
(-> spot center)
|
||||
(font-color #dadada)
|
||||
(font-color font-color-1)
|
||||
(the-as vector2h #f)
|
||||
)
|
||||
)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user