mirror of
https://github.com/open-goal/jak-project
synced 2026-07-07 14:13:45 -04:00
g/j2: Some more work on the SQL editor - dump and seed light data (#2954)
This commit is contained in:
@@ -8273,8 +8273,8 @@
|
||||
:size-assert #x30c
|
||||
:flag-assert #xb0000030c
|
||||
(:methods
|
||||
(cam-setting-data-method-9 (_type_ engine engine-pers engine) cam-setting-data 9)
|
||||
(cam-setting-data-method-10 (_type_ object (pointer process) float int) none 10)
|
||||
(cam-setting-data-method-9 (_type_ engine engine-pers engine) _type_ 9)
|
||||
(cam-setting-data-method-10 (_type_ object (pointer process) object int) _type_ 10)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -28444,7 +28444,7 @@
|
||||
|
||||
(define-extern region-tree-execute (function symbol vector vector none))
|
||||
(define-extern region-execute (function none))
|
||||
(define-extern region-prim-lookup-by-id (function int symbol symbol drawable-region-prim))
|
||||
(define-extern region-prim-lookup-by-id (function int symbol int drawable-region-prim))
|
||||
(define-extern region-lookup-by-id (function int region))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@@ -31852,7 +31852,7 @@
|
||||
(locked symbol :offset-assert 8)
|
||||
(id uint64 :offset-assert 16)
|
||||
(filter editable-filter :offset-assert 24)
|
||||
(tree string :offset-assert 28)
|
||||
(tree symbol :offset-assert 28)
|
||||
(level string :offset-assert 32)
|
||||
(on-enter string :offset-assert 36)
|
||||
(on-inside string :offset-assert 40)
|
||||
@@ -31942,8 +31942,8 @@
|
||||
(selection (array editable) :offset-assert 32)
|
||||
(filter editable-filter 2 :offset-assert 36)
|
||||
(target editable :offset-assert 44)
|
||||
(target-mode uint32 :offset-assert 48) ;; enum?
|
||||
(target-command basic :offset-assert 52) ;; editable-command?
|
||||
(target-mode editable-command :offset-assert 48)
|
||||
(target-command editable-command :offset-assert 52)
|
||||
(target-message string :offset-assert 56)
|
||||
(edit-plane editable-plane :offset-assert 60)
|
||||
(edit-plane-center vector :inline :offset-assert 64)
|
||||
@@ -31959,12 +31959,12 @@
|
||||
:flag-assert #x120000007c
|
||||
(:methods
|
||||
(new (symbol type int) _type_ 0)
|
||||
(editable-array-method-9 (_type_ editable-command editable-array) symbol :behavior editable-player 9)
|
||||
(editable-array-method-9 (_type_ editable-command mouse-info) symbol :behavior editable-player 9)
|
||||
(editable-array-method-10 (_type_ vector int) editable 10)
|
||||
(editable-array-method-11 (_type_) int 11)
|
||||
(editable-array-method-12 (_type_ editable-array) none 12)
|
||||
(editable-array-method-13 (_type_ uint basic string) none 13)
|
||||
(editable-array-method-14 (_type_ (function symbol) symbol) none 14)
|
||||
(editable-array-method-13 (_type_ editable-command editable-command string) none 13)
|
||||
(editable-array-method-14 (_type_ (function editable editable-region symbol) editable-region) (array editable) 14)
|
||||
(editable-array-method-15 (_type_ editable) none 15)
|
||||
(editable-array-method-16 (_type_) none 16)
|
||||
(editable-array-method-17 (_type_ vector vector) vector 17)
|
||||
@@ -32045,7 +32045,7 @@
|
||||
:flag-assert #x2000000028
|
||||
(:methods
|
||||
(new (symbol type editable-region) _type_ 0)
|
||||
(editable-plane-method-30 (_type_ matrix) int 30)
|
||||
(editable-plane-method-30 (_type_ (inline-array vector)) int 30)
|
||||
(editable-plane-method-31 (_type_ vector) vector 31)
|
||||
)
|
||||
)
|
||||
@@ -32058,7 +32058,7 @@
|
||||
(left-handed basic :offset-assert 216)
|
||||
(light-names basic :offset-assert 220)
|
||||
(external-cam-mode symbol :offset-assert 224)
|
||||
(command function 6 :offset-assert 228)
|
||||
(command editable-command 6 :offset-assert 228)
|
||||
(close-menu-time time-frame :offset-assert 256)
|
||||
)
|
||||
:method-count-assert 22
|
||||
@@ -32104,9 +32104,9 @@
|
||||
|
||||
(define-extern cleanup-selection (function editable-array none))
|
||||
(define-extern insert-box (function editable-array vector none))
|
||||
(define-extern execute-select (function editable-array editable-command editable-array symbol))
|
||||
(define-extern execute-mouse-move (function editable-array editable-command editable-array symbol))
|
||||
(define-extern execute-move (function editable-array editable-command editable-array symbol))
|
||||
(define-extern execute-select (function editable-array editable-command mouse-info symbol))
|
||||
(define-extern execute-mouse-move (function editable-array editable-command mouse-info symbol))
|
||||
(define-extern execute-move (function editable-array editable-command mouse-info symbol))
|
||||
(define-extern editable-player-init (function symbol none :behavior editable-player)) ;; TODO - return type not confirmed
|
||||
(define-extern *editable-menu-context* debug-menu-context)
|
||||
(define-extern editable-menu-command (function int none))
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
[0, "(function none)"],
|
||||
[3, "(function int float float float)"],
|
||||
[4, "(function int float float symbol)"],
|
||||
[24, "(function editable symbol symbol)"],
|
||||
[24, "(function editable editable-region symbol)"],
|
||||
[25, "(function editable symbol symbol)"],
|
||||
[28, "(function editable symbol)"]
|
||||
],
|
||||
|
||||
@@ -703,13 +703,8 @@
|
||||
[32, "vector"]
|
||||
],
|
||||
"(method 31 editable-face)": [[16, "matrix"]],
|
||||
"(method 13 editable-face)": [
|
||||
[64, ["inline-array", "vector", 6]],
|
||||
[160, "vector"],
|
||||
[48, "vector"],
|
||||
[32, "vector"],
|
||||
[16, "vector"]
|
||||
],
|
||||
"(method 13 editable-plane)": [[64, ["inline-array", "vector", 4]]],
|
||||
"(method 13 editable-face)": [[64, ["inline-array", "vector", 6]]],
|
||||
"execute-mouse-move": [
|
||||
[80, "vector"],
|
||||
[96, "vector"],
|
||||
@@ -734,7 +729,7 @@
|
||||
[240, ["array", "editable-point", 6]]
|
||||
],
|
||||
"(method 10 editable-face)": [[16, ["inline-array", "vector", 6]]],
|
||||
"(method 10 editable-plane)": [[16, "matrix"]],
|
||||
"(method 10 editable-plane)": [[16, ["inline-array", "vector", 4]]],
|
||||
"(method 9 game-task-node-info)": [[16, ["inline-array", "qword", 8]]],
|
||||
"(code retry task-manager)": [[16, "event-message-block"]],
|
||||
"(code complete task-manager)": [[16, "event-message-block"]],
|
||||
|
||||
@@ -641,7 +641,39 @@
|
||||
[[433, 448], "a0", "handle"],
|
||||
[[434, 441], "v1", "handle"],
|
||||
[[454, 467], "a0", "handle"],
|
||||
[[455, 462], "v1", "handle"]
|
||||
[[455, 462], "v1", "handle"],
|
||||
[9, "a3", "float"],
|
||||
[62, "a3", "float"],
|
||||
[88, "a3", "float"],
|
||||
[114, "a3", "float"],
|
||||
[119, "a3", "float"],
|
||||
[140, "a3", "float"],
|
||||
[145, "a3", "float"],
|
||||
[154, "a3", "float"],
|
||||
[161, "a3", "float"],
|
||||
[168, "a3", "float"],
|
||||
[174, "a3", "float"],
|
||||
[14, "a3", "float"],
|
||||
[36, "a3", "float"],
|
||||
[55, "a3", "float"],
|
||||
[67, "a3", "float"],
|
||||
[81, "a3", "float"],
|
||||
[93, "a3", "float"],
|
||||
[107, "a3", "float"],
|
||||
[114, "a3", "float"],
|
||||
[133, "a3", "float"],
|
||||
[230, "a3", "float"],
|
||||
[236, "a3", "float"],
|
||||
[242, "a3", "float"],
|
||||
[248, "a3", "float"],
|
||||
[254, "a3", "float"],
|
||||
[260, "a3", "float"],
|
||||
[266, "a3", "float"],
|
||||
[272, "a3", "float"],
|
||||
[278, "a3", "float"],
|
||||
[383, "a3", "float"],
|
||||
[467, "a3", "float"],
|
||||
[473, "a3", "float"]
|
||||
],
|
||||
"(method 9 art)": [[9, "v1", "pointer"]],
|
||||
"(method 12 art-group)": [[12, "a0", "art-joint-anim"]],
|
||||
@@ -1941,10 +1973,15 @@
|
||||
[25, "t9", "(function editable-plane editable-array none)"]
|
||||
],
|
||||
"(method 29 editable-face)": [
|
||||
[318, "a0", "(array editable-point)"],
|
||||
[234, "a1", "editable-point"],
|
||||
[206, "v0", "(array editable-point)"],
|
||||
[241, "f0", "float"]
|
||||
[241, "f0", "float"],
|
||||
[226, "a2", "(array editable-point)"],
|
||||
[306, "a0", "(array editable-point)"],
|
||||
[311, "a0", "(array editable-point)"],
|
||||
[340, "a0", "(array editable-point)"],
|
||||
[360, "a0", "(array editable-point)"],
|
||||
[381, "a1", "(array editable-point)"],
|
||||
[387, "a1", "(array editable-point)"]
|
||||
],
|
||||
"(method 27 editable-face)": [
|
||||
[9, "t9", "(function editable-face editable-array editable)"],
|
||||
@@ -4243,8 +4280,8 @@
|
||||
[311, "a0", "(pointer uint128)"],
|
||||
[360, "a0", "(pointer uint128)"]
|
||||
],
|
||||
"(method 13 editable-face)": [[[31, 84], "s3", "(inline-array vector)"]],
|
||||
"(method 13 editable-plane)": [[[37, 90], "s3", "(inline-array vector)"]],
|
||||
"(method 13 editable-face)": [[[57, 84], "s3", "(inline-array vector)"]],
|
||||
"(method 13 editable-plane)": [[[53, 90], "s3", "(inline-array vector)"]],
|
||||
"target-standard-event-handler": [
|
||||
[45, "v1", "(pointer process)"],
|
||||
[93, "a0", "vector"],
|
||||
|
||||
@@ -4380,5 +4380,15 @@
|
||||
"s5-0": "compressed-data-dest",
|
||||
"v1-4": "compressed-data-size"
|
||||
}
|
||||
},
|
||||
"(method 13 editable-face)": {
|
||||
"vars": {
|
||||
"s3-1": ["points", "(inline-array vector)"]
|
||||
}
|
||||
},
|
||||
"(method 13 editable-plane)": {
|
||||
"vars": {
|
||||
"s3-1": ["points", "(inline-array vector)"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,6 +104,9 @@ void OpenGlDebugGui::draw(const DmaStats& dma_stats) {
|
||||
ImGui::MenuItem("Profiler", nullptr, &m_draw_profiler);
|
||||
ImGui::MenuItem("Small Profiler", nullptr, &small_profiler);
|
||||
ImGui::MenuItem("Loader", nullptr, &m_draw_loader);
|
||||
if (ImGui::MenuItem("Reboot In Debug Mode!")) {
|
||||
want_reboot_in_debug = true;
|
||||
}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
@@ -118,6 +121,7 @@ void OpenGlDebugGui::draw(const DmaStats& dma_stats) {
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
ImGui::MenuItem("Subtitle Editor", nullptr, &m_subtitle_editor);
|
||||
ImGui::MenuItem("Debug Text Filter", nullptr, &m_filters_menu);
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
@@ -135,7 +139,7 @@ void OpenGlDebugGui::draw(const DmaStats& dma_stats) {
|
||||
ImGui::TreePop();
|
||||
}
|
||||
ImGui::Checkbox("Ignore Hide ImGui Bind", &Gfx::g_debug_settings.ignore_hide_imgui);
|
||||
if (ImGui::BeginMenu("Frame Rate")) {
|
||||
if (ImGui::TreeNode("Frame Rate")) {
|
||||
ImGui::Checkbox("Framelimiter", &Gfx::g_global_settings.framelimiter);
|
||||
ImGui::InputFloat("Target FPS", &target_fps_input);
|
||||
if (ImGui::MenuItem("Apply")) {
|
||||
@@ -144,9 +148,9 @@ void OpenGlDebugGui::draw(const DmaStats& dma_stats) {
|
||||
ImGui::Separator();
|
||||
ImGui::Checkbox("Accurate Lag Mode", &Gfx::g_global_settings.experimental_accurate_lag);
|
||||
ImGui::Checkbox("Sleep in Frame Limiter", &Gfx::g_global_settings.sleep_in_frame_limiter);
|
||||
ImGui::EndMenu();
|
||||
ImGui::TreePop();
|
||||
}
|
||||
ImGui::MenuItem("Filters", nullptr, &m_filters_menu);
|
||||
ImGui::Checkbox("Treat Pad0 as Pad1", &Gfx::g_debug_settings.treat_pad0_as_pad1);
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
@@ -158,16 +162,12 @@ void OpenGlDebugGui::draw(const DmaStats& dma_stats) {
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu("Debug Mode")) {
|
||||
if (ImGui::MenuItem("Reboot now!")) {
|
||||
want_reboot_in_debug = true;
|
||||
}
|
||||
ImGui::EndMenu();
|
||||
if (!Gfx::g_debug_settings.ignore_hide_imgui) {
|
||||
ImGui::Text("%s", fmt::format("Toggle toolbar with {}",
|
||||
sdl_util::get_keyboard_button_name(
|
||||
Gfx::g_debug_settings.hide_imgui_key, InputModifiers()))
|
||||
.c_str());
|
||||
}
|
||||
ImGui::Text("%s", fmt::format("Press {} to toggle this toolbar",
|
||||
sdl_util::get_keyboard_button_name(
|
||||
Gfx::g_debug_settings.hide_imgui_key, InputModifiers()))
|
||||
.c_str());
|
||||
}
|
||||
ImGui::EndMainMenuBar();
|
||||
|
||||
|
||||
@@ -828,6 +828,14 @@ u32 pc_rand() {
|
||||
return (u32)extra_random_generator();
|
||||
}
|
||||
|
||||
void pc_treat_pad0_as_pad1(u32 symptr) {
|
||||
Gfx::g_debug_settings.treat_pad0_as_pad1 = symbol_to_bool(symptr);
|
||||
}
|
||||
|
||||
u32 pc_is_imgui_visible() {
|
||||
return bool_to_symbol(Gfx::g_debug_settings.show_imgui);
|
||||
}
|
||||
|
||||
/// Initializes all functions that are common across all game versions
|
||||
/// These functions have the same implementation and do not use any game specific functions (other
|
||||
/// than the one to create a function in the first place)
|
||||
@@ -909,6 +917,8 @@ void init_common_pc_port_functions(
|
||||
// Return the current OS as a symbol. Actually returns what it was compiled for!
|
||||
make_func_symbol_func("pc-get-os", (void*)pc_get_os);
|
||||
make_func_symbol_func("pc-get-unix-timestamp", (void*)pc_get_unix_timestamp);
|
||||
make_func_symbol_func("pc-treat-pad0-as-pad1", (void*)pc_treat_pad0_as_pad1);
|
||||
make_func_symbol_func("pc-is-imgui-visible?", (void*)pc_is_imgui_visible);
|
||||
|
||||
// file related functions
|
||||
make_func_symbol_func("pc-filepath-exists?", (void*)pc_filepath_exists);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "common/goal_constants.h"
|
||||
#include "common/log/log.h"
|
||||
#include "common/symbols.h"
|
||||
#include "common/util/string_util.h"
|
||||
|
||||
#include "game/kernel/common/kdsnetm.h"
|
||||
#include "game/kernel/common/klink.h"
|
||||
@@ -143,7 +144,8 @@ int sql_query_sync(Ptr<String> string_in) {
|
||||
SendAck();
|
||||
*/
|
||||
|
||||
const std::string query_str = string_in->data();
|
||||
std::string query_str = string_in->data();
|
||||
str_util::replace(query_str, "LAST_INSERT_ID()", "last_insert_rowid()");
|
||||
lg::debug("[SQL] Query '{}'", query_str);
|
||||
|
||||
// ensure the DB is initialized
|
||||
@@ -159,22 +161,27 @@ int sql_query_sync(Ptr<String> string_in) {
|
||||
|
||||
auto sym = find_symbol_from_c("sql-result");
|
||||
if (sym.offset) {
|
||||
Ptr<Type> type = Ptr<Type>(sym->value());
|
||||
auto new_result_ptr = call_method_of_type_arg2(intern_from_c("debug").offset, type,
|
||||
GOAL_NEW_METHOD, type.offset, 1);
|
||||
|
||||
// TODO - can their sql-result type not return multiple rows and the data is just the columns?
|
||||
// or do they make assumptions and iterate the data like a 2d flattened array
|
||||
SQLResult* new_result = Ptr<SQLResult>(new_result_ptr).c();
|
||||
|
||||
int num_values = 0;
|
||||
//
|
||||
// Collect string results
|
||||
std::vector<std::string> results;
|
||||
for (const auto& row : result.rows) {
|
||||
num_values += row.size();
|
||||
for (const auto& val : row) {
|
||||
new_result->data[0] = Ptr<String>(make_debug_string_from_c(val.data()));
|
||||
lg::debug("[SQL] Result \"{}\"", val.data());
|
||||
results.push_back(val.data());
|
||||
}
|
||||
}
|
||||
new_result->len = num_values;
|
||||
|
||||
// Make the GOAL type to hold them
|
||||
Ptr<Type> type = Ptr<Type>(sym->value());
|
||||
auto new_result_ptr = call_method_of_type_arg2(intern_from_c("debug").offset, type,
|
||||
GOAL_NEW_METHOD, type.offset, results.size());
|
||||
SQLResult* new_result = Ptr<SQLResult>(new_result_ptr).c();
|
||||
for (int i = 0; i < results.size(); i++) {
|
||||
new_result->data[i] = Ptr<String>(make_debug_string_from_c(results.at(i).data()));
|
||||
}
|
||||
new_result->len = results.size();
|
||||
|
||||
// TODO - possible values here (when to set them?)
|
||||
// 'error = the default, fairly obvious
|
||||
|
||||
@@ -688,6 +688,59 @@ u32 alloc_vagdir_names(u32 heap_sym) {
|
||||
return s7.offset;
|
||||
}
|
||||
|
||||
// std::vector<std::string> valid_levels = {
|
||||
// "default-level", "intro", "demo", "title", "vinroom", "drillmid", "drill",
|
||||
// "drillb", "drillmtn", "sewer", "sewerb", "sewer", "sewescb", "tomba",
|
||||
// "tombb", "tombc", "tombd", "tombe", "tombext", "tombboss", "under",
|
||||
// "underb", "palcab", "palshaft", "palboss", "palroof", "palout", "throne",
|
||||
// "palent", "prison", "forexita", "forexitb", "forresca", "forrescb", "fordumpa",
|
||||
// "fordumpb", "fordumpc", "fordumpd", "strip", "ruins", "sagehut", "atoll",
|
||||
// "atollext", "mountain", "mtnext", "forest", "forestb", "mincan", "ctywide",
|
||||
// "ctykora", "ctyasha", "ctygena", "ctygenb", "ctygenc", "ctysluma", "ctyslumb",
|
||||
// "ctyslumc", "ctyport", "ctyfarma", "ctyfarmb", "ctyinda", "consite", "consiteb",
|
||||
// "ctyindb", "ctymarka", "ctymarkb", "ctypal", "stadium", "stadiumb", "stadiumc",
|
||||
// "stadiumd", "skatea", "garage", "stadblmp", "onintent", "kiosk", "oracle",
|
||||
// "hideout", "hiphog", "gungame", "dig1", "dig3a", "dig3b", "caspad",
|
||||
// "castle", "casboss", "casext", "cascity", "village1", "introcst", "nest",
|
||||
// "nestb", "outrocst", "portwall", "island1", "skatepark", "halfpipe", "vistest",
|
||||
// "woodstest", "tobytest", "chartest", "dptest", "ctyfence", "4aaron", "4pal01",
|
||||
// "andrew01", "bsbs", "eitest", "miketest", "tatetest", "teststdc", "teststdd",
|
||||
// "wasall", "stadocc"};
|
||||
//
|
||||
// std::vector<std::string> levels_dumped_lights = {};
|
||||
// std::vector<std::string> levels_dumped_regions = {};
|
||||
// std::vector<std::string> levels_dumped_samples = {};
|
||||
|
||||
inline u64 bool_to_symbol(const bool val) {
|
||||
return val ? static_cast<u64>(s7.offset) + true_symbol_offset(g_game_version) : s7.offset;
|
||||
}
|
||||
|
||||
// u64 pc_has_level_been_dumped_lights(u32 level_name_str) {
|
||||
// auto level_name = std::string(Ptr<String>(level_name_str).c()->data());
|
||||
//
|
||||
// for (const auto& level : levels_dumped_lights) {
|
||||
// if (level == level_name) {
|
||||
// return bool_to_symbol(true);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// levels_dumped_lights.push_back(level_name);
|
||||
// return bool_to_symbol(false);
|
||||
//}
|
||||
//
|
||||
// u64 pc_has_level_been_dumped_regions(u32 level_name_str) {
|
||||
// auto level_name = std::string(Ptr<String>(level_name_str).c()->data());
|
||||
//
|
||||
// for (const auto& level : levels_dumped_regions) {
|
||||
// if (level == level_name) {
|
||||
// return bool_to_symbol(true);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// levels_dumped_regions.push_back(level_name);
|
||||
// return bool_to_symbol(false);
|
||||
//}
|
||||
|
||||
void InitMachine_PCPort() {
|
||||
// PC Port added functions
|
||||
init_common_pc_port_functions(
|
||||
@@ -710,6 +763,11 @@ void InitMachine_PCPort() {
|
||||
// debugging tools
|
||||
make_function_symbol_from_c("alloc-vagdir-names", (void*)alloc_vagdir_names);
|
||||
|
||||
/*make_function_symbol_from_c("has-level-been-dumped-lights?",
|
||||
(void*)pc_has_level_been_dumped_lights);
|
||||
make_function_symbol_from_c("has-level-been-dumped-regions?",
|
||||
(void*)pc_has_level_been_dumped_regions);*/
|
||||
|
||||
// setup string constants
|
||||
auto user_dir_path = file_util::get_user_config_dir();
|
||||
intern_from_c("*pc-user-dir-base-path*")->value() =
|
||||
@@ -838,6 +896,8 @@ void initialize_sql_db() {
|
||||
fs::path db_path = file_util::get_user_misc_dir(g_game_version) / "jak2-editor.db";
|
||||
file_util::create_dir_if_needed_for_file(db_path);
|
||||
|
||||
const bool did_db_exist = file_util::file_exists(db_path.string());
|
||||
|
||||
// Attempt to open the database
|
||||
const auto opened = sql_db.open_db(db_path.string());
|
||||
(void)opened;
|
||||
@@ -851,6 +911,29 @@ void initialize_sql_db() {
|
||||
|
||||
const auto success = sql_db.run_query(file_util::read_text_file(schema_file));
|
||||
// TODO - error check
|
||||
|
||||
// If the database did not originally exist, let's seed it with original game data
|
||||
if (!did_db_exist) {
|
||||
lg::warn("[SQL]: Seeding database, this may take a bit");
|
||||
fs::path level_info_fixture = file_util::get_jak_project_dir() / "goal_src" / "jak2" / "tools" /
|
||||
"db-fixtures" / "fixture-level_info.sql";
|
||||
if (file_util::file_exists(level_info_fixture.string())) {
|
||||
const auto success = sql_db.run_query(file_util::read_text_file(level_info_fixture));
|
||||
// TODO - error check
|
||||
}
|
||||
fs::path light_fixture = file_util::get_jak_project_dir() / "goal_src" / "jak2" / "tools" /
|
||||
"db-fixtures" / "fixture-light.sql";
|
||||
if (file_util::file_exists(light_fixture.string())) {
|
||||
const auto success = sql_db.run_query(file_util::read_text_file(light_fixture));
|
||||
// TODO - error check
|
||||
}
|
||||
fs::path region_fixture = file_util::get_jak_project_dir() / "goal_src" / "jak2" / "tools" /
|
||||
"db-fixtures" / "fixture-region.sql";
|
||||
if (file_util::file_exists(region_fixture.string())) {
|
||||
const auto success = sql_db.run_query(file_util::read_text_file(region_fixture));
|
||||
// TODO - error check
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sqlite::GenericResponse run_sql_query(const std::string& query) {
|
||||
|
||||
+9
-1
@@ -68,7 +68,15 @@ int scePadRead(int port, int /*slot*/, u8* rdata) {
|
||||
|
||||
std::optional<std::shared_ptr<PadData>> pad_data = std::nullopt;
|
||||
if (Display::GetMainDisplay()) {
|
||||
pad_data = Display::GetMainDisplay()->get_input_manager()->get_current_data(port);
|
||||
if (Gfx::g_debug_settings.treat_pad0_as_pad1) {
|
||||
if (port == 0) {
|
||||
pad_data = Display::GetMainDisplay()->get_input_manager()->get_current_data(1);
|
||||
} else {
|
||||
pad_data = Display::GetMainDisplay()->get_input_manager()->get_current_data(0);
|
||||
}
|
||||
} else {
|
||||
pad_data = Display::GetMainDisplay()->get_input_manager()->get_current_data(port);
|
||||
}
|
||||
}
|
||||
|
||||
if (pad_data) {
|
||||
|
||||
+6
-1
@@ -109,7 +109,12 @@ s32 sceOpen(const char* filename, s32 flag) {
|
||||
} break;
|
||||
|
||||
default: {
|
||||
fp = file_util::open_file(name.c_str(), "w");
|
||||
// either append or truncate
|
||||
if (flag & SCE_TRUNC) {
|
||||
fp = file_util::open_file(name.c_str(), "w");
|
||||
} else {
|
||||
fp = file_util::open_file(name.c_str(), "a+");
|
||||
}
|
||||
} break;
|
||||
}
|
||||
if (!fp) {
|
||||
|
||||
@@ -18,6 +18,7 @@ struct DebugSettings {
|
||||
bool monospaced_font = true;
|
||||
bool alternate_style = false;
|
||||
bool ignore_hide_imgui = false;
|
||||
bool treat_pad0_as_pad1 = false;
|
||||
|
||||
std::vector<DebugTextFilter> text_filters = {};
|
||||
bool text_check_range = false;
|
||||
|
||||
@@ -1675,7 +1675,7 @@ Most functions take a boolean as their first argument. If the boolean is set to
|
||||
|
||||
(defun add-debug-bound-internal ((buf dma-buffer) (pts (inline-array vector)) (num-pts int) (color0 rgba) (color1 rgba) (flip-tex int))
|
||||
"Draw a boundary polygon using the boundary renderer. This renderer reuses components of the sky render
|
||||
to properly clip (and subdivide) very large polgons.
|
||||
to properly clip (and subdivide) very large polygons.
|
||||
This is intended to be called by add-debug-bound, after it has set up dma buffers for the boundary rendering."
|
||||
(rlet ((vf27 :class vf))
|
||||
(set-vector!
|
||||
|
||||
@@ -369,7 +369,7 @@
|
||||
(locked symbol :offset-assert 8)
|
||||
(id uint64 :offset-assert 16)
|
||||
(filter editable-filter :offset-assert 24)
|
||||
(tree string :offset-assert 28)
|
||||
(tree symbol :offset-assert 28)
|
||||
(level string :offset-assert 32)
|
||||
(on-enter string :offset-assert 36)
|
||||
(on-inside string :offset-assert 40)
|
||||
@@ -435,8 +435,8 @@
|
||||
(selection (array editable) :offset-assert 32)
|
||||
(filter editable-filter 2 :offset-assert 36)
|
||||
(target editable :offset-assert 44)
|
||||
(target-mode uint32 :offset-assert 48)
|
||||
(target-command basic :offset-assert 52)
|
||||
(target-mode editable-command :offset-assert 48)
|
||||
(target-command editable-command :offset-assert 52)
|
||||
(target-message string :offset-assert 56)
|
||||
(edit-plane editable-plane :offset-assert 60)
|
||||
(edit-plane-center vector :inline :offset-assert 64)
|
||||
@@ -452,12 +452,12 @@
|
||||
:flag-assert #x120000007c
|
||||
(:methods
|
||||
(new (symbol type int) _type_ 0)
|
||||
(editable-array-method-9 (_type_ editable-command editable-array) symbol :behavior editable-player 9)
|
||||
(editable-array-method-9 (_type_ editable-command mouse-info) symbol :behavior editable-player 9)
|
||||
(editable-array-method-10 (_type_ vector int) editable 10)
|
||||
(editable-array-method-11 (_type_) int 11)
|
||||
(editable-array-method-12 (_type_ editable-array) none 12)
|
||||
(editable-array-method-13 (_type_ uint basic string) none 13)
|
||||
(editable-array-method-14 (_type_ (function symbol) symbol) none 14)
|
||||
(editable-array-method-13 (_type_ editable-command editable-command string) none 13)
|
||||
(editable-array-method-14 (_type_ (function editable editable-region symbol) editable-region) (array editable) 14)
|
||||
(editable-array-method-15 (_type_ editable) none 15)
|
||||
(editable-array-method-16 (_type_) none 16)
|
||||
(editable-array-method-17 (_type_ vector vector) vector 17)
|
||||
@@ -474,7 +474,7 @@
|
||||
(set! (-> s5-0 region-lock?) #f)
|
||||
(set! (-> s5-0 move-lock?) #f)
|
||||
(set! (-> s5-0 target) #f)
|
||||
(set! (-> s5-0 target-command) (the-as basic 0))
|
||||
(set! (-> s5-0 target-command) (editable-command none))
|
||||
(set! (-> s5-0 target-message) #f)
|
||||
(set! (-> s5-0 selection)
|
||||
(the-as (array editable) ((method-of-type array new) allocation array editable arg0))
|
||||
@@ -636,7 +636,7 @@
|
||||
((length int32 :offset-assert 24)
|
||||
(normal vector :inline :offset-assert 32)
|
||||
(center vector :inline :offset-assert 48)
|
||||
(vertex editable-point 6 :offset-assert 64)
|
||||
(vertex editable-point 6 :offset-assert 64) ;; can hold up to 6 (kinda a weird number...) but still does just define 1 face!
|
||||
)
|
||||
:method-count-assert 32
|
||||
:size-assert #x58
|
||||
@@ -669,16 +669,16 @@
|
||||
)
|
||||
|
||||
(deftype editable-plane (editable)
|
||||
((length int32 :offset-assert 24)
|
||||
(radius float :offset-assert 28)
|
||||
(vertex editable-point 2 :offset-assert 32)
|
||||
"Modified from the original, in the original editor code a plane is defined by a normal vector (2 points) and a radius (equal side lengths)"
|
||||
((length int32)
|
||||
(normal vector :inline)
|
||||
(position vector :inline)
|
||||
(vertex editable-point 4)
|
||||
)
|
||||
:method-count-assert 32
|
||||
:size-assert #x28
|
||||
:flag-assert #x2000000028
|
||||
(:methods
|
||||
(new (symbol type editable-region) _type_ 0)
|
||||
(editable-plane-method-30 (_type_ matrix) int 30)
|
||||
(editable-plane-method-30 (_type_ (inline-array vector)) int 30)
|
||||
(editable-plane-method-31 (_type_ vector) vector 31)
|
||||
)
|
||||
)
|
||||
@@ -699,21 +699,20 @@
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 owner) '())
|
||||
(set! (-> gp-0 radius) 20480.0)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
|
||||
(deftype editable-player (process-drawable)
|
||||
((current editable-array :offset-assert 200)
|
||||
(select-command function :offset-assert 204)
|
||||
(move-command function :offset-assert 208)
|
||||
(extra-command function :offset-assert 212)
|
||||
(left-handed basic :offset-assert 216)
|
||||
(light-names basic :offset-assert 220)
|
||||
(external-cam-mode symbol :offset-assert 224)
|
||||
(command function 6 :offset-assert 228)
|
||||
(close-menu-time time-frame :offset-assert 256)
|
||||
((current editable-array :offset-assert 200)
|
||||
(select-command function :offset-assert 204)
|
||||
(move-command function :offset-assert 208)
|
||||
(extra-command function :offset-assert 212)
|
||||
(left-handed basic :offset-assert 216)
|
||||
(light-names basic :offset-assert 220)
|
||||
(external-cam-mode symbol :offset-assert 224)
|
||||
(command editable-command 6 :offset-assert 228)
|
||||
(close-menu-time time-frame :offset-assert 256)
|
||||
)
|
||||
:heap-base #x90
|
||||
:method-count-assert 22
|
||||
@@ -743,5 +742,3 @@
|
||||
(define *editable-work* (new 'global 'editable-work))
|
||||
|
||||
(define *editable* (the-as (pointer editable-player) #f))
|
||||
|
||||
0
|
||||
|
||||
@@ -104,64 +104,64 @@
|
||||
(+! (-> s3-0 x) f30-0)
|
||||
(+! (-> s3-0 z) f30-0)
|
||||
(set! (-> arg0 data (-> s5-0 7)) (new 'debug 'editable-point s3-0 s4-0))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as mouse-info #f))
|
||||
(select-editable! (-> arg0 data (-> s5-0 0)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 1)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 2)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 3)) #t)
|
||||
(set! (-> arg0 region) s4-0)
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as mouse-info #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as mouse-info #f))
|
||||
(select-editable! (-> arg0 data (-> s5-0 4)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 5)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 6)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 7)) #t)
|
||||
(set! (-> arg0 region) s4-0)
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command flip-side) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as mouse-info #f))
|
||||
(editable-array-method-9 arg0 (editable-command flip-side) (the-as mouse-info #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as mouse-info #f))
|
||||
(select-editable! (-> arg0 data (-> s5-0 0)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 2)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 4)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 6)) #t)
|
||||
(set! (-> arg0 region) s4-0)
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as mouse-info #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as mouse-info #f))
|
||||
(select-editable! (-> arg0 data (-> s5-0 1)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 3)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 5)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 7)) #t)
|
||||
(set! (-> arg0 region) s4-0)
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command flip-side) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as mouse-info #f))
|
||||
(editable-array-method-9 arg0 (editable-command flip-side) (the-as mouse-info #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as mouse-info #f))
|
||||
(select-editable! (-> arg0 data (-> s5-0 0)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 1)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 4)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 5)) #t)
|
||||
(set! (-> arg0 region) s4-0)
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command flip-side) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as mouse-info #f))
|
||||
(editable-array-method-9 arg0 (editable-command flip-side) (the-as mouse-info #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as mouse-info #f))
|
||||
(select-editable! (-> arg0 data (-> s5-0 2)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 3)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 6)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 7)) #t)
|
||||
(set! (-> arg0 region) s4-0)
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as mouse-info #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as mouse-info #f))
|
||||
(set! (-> arg0 region) s4-0)
|
||||
)
|
||||
(dotimes (s4-1 8)
|
||||
(select-editable! (-> arg0 data (-> s5-0 s4-1)) #t)
|
||||
)
|
||||
)
|
||||
(editable-array-method-9 arg0 (editable-command select-current-owner) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-current-owner) (the-as mouse-info #f))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun execute-select ((arg0 editable-array) (arg1 editable-command) (arg2 editable-array))
|
||||
(defun execute-select ((arg0 editable-array) (arg1 editable-command) (arg2 mouse-info))
|
||||
(case arg1
|
||||
(((editable-command select-none))
|
||||
(let* ((s5-1 (-> arg0 length))
|
||||
@@ -205,8 +205,8 @@
|
||||
(t9-4 (method-of-object a0-7 editable-array-method-10))
|
||||
(a1-12 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-12 x) (-> arg2 edit-plane-normal x))
|
||||
(set! (-> a1-12 y) (-> arg2 edit-plane-normal y))
|
||||
(set! (-> a1-12 x) (-> arg2 posx))
|
||||
(set! (-> a1-12 y) (-> arg2 posy))
|
||||
(set! (-> a1-12 z) 0.0)
|
||||
(set! (-> a1-12 w) 1.0)
|
||||
(let ((s4-3 (t9-4 a0-7 a1-12 0)))
|
||||
@@ -226,8 +226,8 @@
|
||||
(t9-9 (method-of-object a0-12 editable-array-method-10))
|
||||
(a1-16 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-16 x) (-> arg2 edit-plane-normal x))
|
||||
(set! (-> a1-16 y) (-> arg2 edit-plane-normal y))
|
||||
(set! (-> a1-16 x) (-> arg2 posx))
|
||||
(set! (-> a1-16 y) (-> arg2 posy))
|
||||
(set! (-> a1-16 z) 0.0)
|
||||
(set! (-> a1-16 w) 1.0)
|
||||
(let ((s5-3 (t9-9 a0-12 a1-16 1)))
|
||||
@@ -246,8 +246,8 @@
|
||||
(t9-13 (method-of-object a0-16 editable-array-method-10))
|
||||
(a1-19 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-19 x) (-> arg2 edit-plane-normal x))
|
||||
(set! (-> a1-19 y) (-> arg2 edit-plane-normal y))
|
||||
(set! (-> a1-19 x) (-> arg2 posx))
|
||||
(set! (-> a1-19 y) (-> arg2 posy))
|
||||
(set! (-> a1-19 z) 0.0)
|
||||
(set! (-> a1-19 w) 1.0)
|
||||
(let ((s4-6 (t9-13 a0-16 a1-19 0)))
|
||||
@@ -270,8 +270,8 @@
|
||||
(t9-19 (method-of-object a0-22 editable-array-method-10))
|
||||
(a1-24 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-24 x) (-> arg2 edit-plane-normal x))
|
||||
(set! (-> a1-24 y) (-> arg2 edit-plane-normal y))
|
||||
(set! (-> a1-24 x) (-> arg2 posx))
|
||||
(set! (-> a1-24 y) (-> arg2 posy))
|
||||
(set! (-> a1-24 z) 0.0)
|
||||
(set! (-> a1-24 w) 1.0)
|
||||
(let ((s4-8 (t9-19 a0-22 a1-24 0)))
|
||||
@@ -294,8 +294,8 @@
|
||||
(t9-25 (method-of-object a0-28 editable-array-method-10))
|
||||
(a1-29 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-29 x) (-> arg2 edit-plane-normal x))
|
||||
(set! (-> a1-29 y) (-> arg2 edit-plane-normal y))
|
||||
(set! (-> a1-29 x) (-> arg2 posx))
|
||||
(set! (-> a1-29 y) (-> arg2 posy))
|
||||
(set! (-> a1-29 z) 0.0)
|
||||
(set! (-> a1-29 w) 1.0)
|
||||
(let ((s4-10 (t9-25 a0-28 a1-29 0)))
|
||||
@@ -463,7 +463,7 @@
|
||||
)
|
||||
)
|
||||
(((editable-command cancel))
|
||||
(editable-array-method-13 arg0 (the-as uint 0) (the-as basic 0) (the-as string #f))
|
||||
(editable-array-method-13 arg0 (editable-command none) (editable-command none) (the-as string #f))
|
||||
)
|
||||
(((editable-command pick-target))
|
||||
(sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t))
|
||||
@@ -471,23 +471,23 @@
|
||||
(t9-41 (method-of-object a0-71 editable-array-method-10))
|
||||
(a1-58 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-58 x) (-> arg2 edit-plane-normal x))
|
||||
(set! (-> a1-58 y) (-> arg2 edit-plane-normal y))
|
||||
(set! (-> a1-58 x) (-> arg2 posx))
|
||||
(set! (-> a1-58 y) (-> arg2 posy))
|
||||
(set! (-> a1-58 z) 0.0)
|
||||
(set! (-> a1-58 w) 1.0)
|
||||
(let ((v1-208 (t9-41 a0-71 a1-58 0)))
|
||||
(when v1-208
|
||||
(set! (-> arg0 target) v1-208)
|
||||
(editable-array-method-9 arg0 (the-as editable-command (-> arg0 target-command)) arg2)
|
||||
(editable-array-method-9 arg0 (-> arg0 target-command) arg2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(editable-array-method-13 arg0 (the-as uint 0) (the-as basic 0) (the-as string #f))
|
||||
(editable-array-method-13 arg0 (editable-command none) (editable-command none) (the-as string #f))
|
||||
)
|
||||
(((editable-command pick-loc) (editable-command pick-yes-no))
|
||||
(sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t))
|
||||
(editable-array-method-9 arg0 (the-as editable-command (-> arg0 target-command)) arg2)
|
||||
(editable-array-method-13 arg0 (the-as uint 0) (the-as basic 0) (the-as string #f))
|
||||
(editable-array-method-9 arg0 (-> arg0 target-command) arg2)
|
||||
(editable-array-method-13 arg0 (editable-command none) (editable-command none) (the-as string #f))
|
||||
)
|
||||
(((editable-command edit-plane-clear))
|
||||
(sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t))
|
||||
@@ -510,8 +510,8 @@
|
||||
(else
|
||||
(editable-array-method-14
|
||||
arg0
|
||||
(the-as (function symbol) (lambda ((arg0 editable)) (type? arg0 editable-plane)))
|
||||
#f
|
||||
(the-as (function editable editable-region symbol) (lambda ((arg0 editable)) (type? arg0 editable-plane)))
|
||||
(the-as editable-region #f)
|
||||
)
|
||||
(cond
|
||||
((>= (-> arg0 selection length) 1)
|
||||
@@ -519,7 +519,12 @@
|
||||
(editable-array-method-16 arg0)
|
||||
)
|
||||
(else
|
||||
(editable-array-method-13 arg0 (the-as uint 14) (the-as basic 45) "pick the plane to edit-from")
|
||||
(editable-array-method-13
|
||||
arg0
|
||||
(editable-command pick-target)
|
||||
(editable-command edit-plane-set)
|
||||
"pick the plane to edit-from"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -569,7 +574,7 @@
|
||||
#t
|
||||
)
|
||||
|
||||
(defun execute-mouse-move ((arg0 editable-array) (arg1 editable-command) (arg2 editable-array))
|
||||
(defun execute-mouse-move ((arg0 editable-array) (arg1 editable-command) (arg2 mouse-info))
|
||||
(local-vars (f0-6 float) (f0-18 float) (f0-29 float))
|
||||
(case arg1
|
||||
(((editable-command camera-tumble))
|
||||
@@ -608,14 +613,14 @@
|
||||
(set-setting! 'mouse-input 'abs #t 0)
|
||||
)
|
||||
(((editable-command drag-move-x))
|
||||
(let ((v1-25 (-> arg2 level-offset))
|
||||
(a0-12 (-> arg2 edit-plane-normal))
|
||||
(let ((v1-25 (-> arg2 pos 1))
|
||||
(a0-12 (-> arg2 pos))
|
||||
(s5-1 (new-stack-vector0))
|
||||
(s4-1 (-> *math-camera* trans))
|
||||
)
|
||||
0.0
|
||||
(let* ((f0-4 (- (-> v1-25 x) (-> a0-12 x)))
|
||||
(f1-2 (- (-> v1-25 y) (-> a0-12 y)))
|
||||
(let* ((f0-4 (- (-> v1-25 x) (-> a0-12 0 x)))
|
||||
(f1-2 (- (-> v1-25 y) (-> a0-12 0 y)))
|
||||
(f30-1 (if (< (fabs f1-2) (fabs f0-4))
|
||||
f0-4
|
||||
f1-2
|
||||
@@ -658,14 +663,14 @@
|
||||
(cleanup-selection arg0)
|
||||
)
|
||||
(((editable-command drag-move-y))
|
||||
(let ((v1-54 (-> arg2 level-offset))
|
||||
(a0-20 (-> arg2 edit-plane-normal))
|
||||
(let ((v1-54 (-> arg2 pos 1))
|
||||
(a0-20 (-> arg2 pos))
|
||||
(s5-2 (new-stack-vector0))
|
||||
(s4-2 (-> *math-camera* trans))
|
||||
)
|
||||
0.0
|
||||
(let* ((f0-16 (- (-> v1-54 x) (-> a0-20 x)))
|
||||
(f1-8 (- (-> v1-54 y) (-> a0-20 y)))
|
||||
(let* ((f0-16 (- (-> v1-54 x) (-> a0-20 0 x)))
|
||||
(f1-8 (- (-> v1-54 y) (-> a0-20 0 y)))
|
||||
(f30-2 (if (< (fabs f1-8) (fabs f0-16))
|
||||
f0-16
|
||||
f1-8
|
||||
@@ -708,14 +713,14 @@
|
||||
(cleanup-selection arg0)
|
||||
)
|
||||
(((editable-command drag-move-z))
|
||||
(let ((v1-83 (-> arg2 level-offset))
|
||||
(a0-28 (-> arg2 edit-plane-normal))
|
||||
(let ((v1-83 (-> arg2 pos 1))
|
||||
(a0-28 (-> arg2 pos))
|
||||
(s5-3 (new-stack-vector0))
|
||||
(s4-3 (-> *math-camera* trans))
|
||||
)
|
||||
0.0
|
||||
(let* ((f0-27 (- (-> v1-83 x) (-> a0-28 x)))
|
||||
(f1-15 (- (-> v1-83 y) (-> a0-28 y)))
|
||||
(let* ((f0-27 (- (-> v1-83 x) (-> a0-28 0 x)))
|
||||
(f1-15 (- (-> v1-83 y) (-> a0-28 0 y)))
|
||||
(f30-3 (if (< (fabs f1-15) (fabs f0-27))
|
||||
f0-27
|
||||
f1-15
|
||||
@@ -758,8 +763,8 @@
|
||||
(cleanup-selection arg0)
|
||||
)
|
||||
(((editable-command drag-move-xz))
|
||||
(let ((s5-4 (-> arg2 level-offset))
|
||||
(s4-4 (-> arg2 edit-plane-normal))
|
||||
(let ((s5-4 (-> arg2 pos 1))
|
||||
(s4-4 (-> arg2 pos))
|
||||
(s3-4 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s3-4 x) 0.0)
|
||||
@@ -774,7 +779,7 @@
|
||||
(while (< s0-6 s1-5)
|
||||
(when (and a0-36 (logtest? (-> a0-36 flags) (editable-flag selected)))
|
||||
(if (= (-> s2-4 w) 0.0)
|
||||
(editable-method-20 a0-36 s5-4 s4-4 s3-4 s2-4)
|
||||
(editable-method-20 a0-36 s5-4 (the-as vector s4-4) s3-4 s2-4)
|
||||
(editable-method-15 a0-36 s2-4 56)
|
||||
)
|
||||
)
|
||||
@@ -786,8 +791,8 @@
|
||||
(cleanup-selection arg0)
|
||||
)
|
||||
(((editable-command drag-move-xy))
|
||||
(let ((s5-5 (-> arg2 level-offset))
|
||||
(s4-5 (-> arg2 edit-plane-normal))
|
||||
(let ((s5-5 (-> arg2 pos 1))
|
||||
(s4-5 (-> arg2 pos))
|
||||
(s3-5 (-> *math-camera* inv-camera-rot vector 2))
|
||||
(s2-5 (new-stack-vector0))
|
||||
)
|
||||
@@ -800,7 +805,7 @@
|
||||
(while (< s0-7 s1-6)
|
||||
(when (and a0-40 (logtest? (-> a0-40 flags) (editable-flag selected)))
|
||||
(if (= (-> s2-5 w) 0.0)
|
||||
(editable-method-20 a0-40 s5-5 s4-5 s3-5 s2-5)
|
||||
(editable-method-20 a0-40 s5-5 (the-as vector s4-5) s3-5 s2-5)
|
||||
(editable-method-15 a0-40 s2-5 56)
|
||||
)
|
||||
)
|
||||
@@ -818,11 +823,11 @@
|
||||
#t
|
||||
)
|
||||
|
||||
(defun execute-move ((arg0 editable-array) (arg1 editable-command) (arg2 editable-array))
|
||||
(defun execute-move ((arg0 editable-array) (arg1 editable-command) (arg2 mouse-info))
|
||||
(case arg1
|
||||
(((editable-command drag-resize))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s4-0 x) (* 100.0 (- (-> arg2 edit-plane-normal x) (-> arg2 level-offset x))))
|
||||
(set! (-> s4-0 x) (* 100.0 (- (-> arg2 posx) (-> arg2 pos 1 x))))
|
||||
(set! (-> s4-0 y) 0.0)
|
||||
(set! (-> s4-0 z) 0.0)
|
||||
(set! (-> s4-0 w) 1.0)
|
||||
@@ -881,7 +886,7 @@
|
||||
(set! (-> arg0 region) (new 'debug 'editable-region))
|
||||
)
|
||||
(sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t))
|
||||
(let* ((a2-3 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (-> arg2 edit-plane-normal)))
|
||||
(let* ((a2-3 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (the-as vector (-> arg2 pos))))
|
||||
(s3-4 (new 'debug 'editable-sphere a2-3 2048.0 (-> arg0 region)))
|
||||
)
|
||||
(set! (-> arg0 data s4-3) s3-4)
|
||||
@@ -898,7 +903,7 @@
|
||||
(set! (-> arg0 region) (new 'debug 'editable-region))
|
||||
)
|
||||
(sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t))
|
||||
(let* ((a2-7 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (-> arg2 edit-plane-normal)))
|
||||
(let* ((a2-7 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (the-as vector (-> arg2 pos))))
|
||||
(s3-6 (new 'debug 'editable-point a2-7 (-> arg0 region)))
|
||||
)
|
||||
(set! (-> arg0 data s4-4) s3-6)
|
||||
@@ -912,7 +917,7 @@
|
||||
(let ((s4-5 (editable-array-method-11 arg0)))
|
||||
(when (>= s4-5 0)
|
||||
(sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t))
|
||||
(let* ((a2-11 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (-> arg2 edit-plane-normal)))
|
||||
(let* ((a2-11 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (the-as vector (-> arg2 pos))))
|
||||
(s3-8 (new 'debug 'editable-sample a2-11 *editable-sample-region*))
|
||||
)
|
||||
(set! (-> arg0 data s4-5) s3-8)
|
||||
@@ -938,7 +943,7 @@
|
||||
(let ((s4-7 (editable-array-method-11 arg0)))
|
||||
(when (>= s4-7 0)
|
||||
(sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t))
|
||||
(let* ((a2-18 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (-> arg2 edit-plane-normal)))
|
||||
(let* ((a2-18 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (the-as vector (-> arg2 pos))))
|
||||
(s3-13 (new 'debug 'editable-light a2-18 2048.0 *editable-light-region*))
|
||||
)
|
||||
(set! (-> arg0 data s4-7) s3-13)
|
||||
@@ -954,7 +959,7 @@
|
||||
(let ((s4-8 (editable-array-method-11 arg0)))
|
||||
(when (>= s4-8 0)
|
||||
(sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t))
|
||||
(let* ((a2-22 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (-> arg2 edit-plane-normal)))
|
||||
(let* ((a2-22 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (the-as vector (-> arg2 pos))))
|
||||
(s3-15 (new 'debug 'editable-entity a2-22 *editable-entity-region*))
|
||||
)
|
||||
(set! (-> arg0 data s4-8) s3-15)
|
||||
@@ -969,7 +974,7 @@
|
||||
(if (and (-> arg0 region) (-> arg0 region locked))
|
||||
(set! (-> arg0 region) (new 'debug 'editable-region))
|
||||
)
|
||||
(let ((a1-42 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (-> arg2 edit-plane-normal))))
|
||||
(let ((a1-42 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (the-as vector (-> arg2 pos)))))
|
||||
(insert-box arg0 a1-42)
|
||||
)
|
||||
)
|
||||
@@ -983,10 +988,10 @@
|
||||
(editable-array-method-14
|
||||
arg0
|
||||
(the-as
|
||||
(function symbol)
|
||||
(function editable editable-region symbol)
|
||||
(lambda ((arg0 editable) (arg1 symbol)) (and (type? arg0 editable-point) (= (-> arg0 region) arg1)))
|
||||
)
|
||||
(the-as symbol (-> arg0 region))
|
||||
(-> arg0 region)
|
||||
)
|
||||
(let ((s5-5 (-> arg0 selection length)))
|
||||
(cond
|
||||
@@ -998,7 +1003,12 @@
|
||||
(+! s5-5 1)
|
||||
)
|
||||
(else
|
||||
(editable-array-method-13 arg0 (the-as uint 14) (the-as basic 33) "pick the point to complete the face")
|
||||
(editable-array-method-13
|
||||
arg0
|
||||
(editable-command pick-target)
|
||||
(editable-command insert-face)
|
||||
"pick the point to complete the face"
|
||||
)
|
||||
(return #f)
|
||||
)
|
||||
)
|
||||
@@ -1039,11 +1049,8 @@
|
||||
0
|
||||
(editable-array-method-14
|
||||
arg0
|
||||
(the-as
|
||||
(function symbol)
|
||||
(lambda ((arg0 editable) (arg1 symbol)) (and (type? arg0 editable-point) (= (-> arg0 region) arg1)))
|
||||
)
|
||||
(the-as symbol (-> arg0 region))
|
||||
(lambda ((arg0 editable) (arg1 editable-region)) (and (type? arg0 editable-point) (= (-> arg0 region) arg1)))
|
||||
(-> arg0 region)
|
||||
)
|
||||
(let ((s5-7 (-> arg0 selection length)))
|
||||
(cond
|
||||
@@ -1055,7 +1062,12 @@
|
||||
(+! s5-7 1)
|
||||
)
|
||||
(else
|
||||
(editable-array-method-13 arg0 (the-as uint 14) (the-as basic 34) "pick the point to complete the plane")
|
||||
(editable-array-method-13
|
||||
arg0
|
||||
(editable-command pick-target)
|
||||
(editable-command insert-plane)
|
||||
"pick the point to complete the plane"
|
||||
)
|
||||
(return #f)
|
||||
)
|
||||
)
|
||||
@@ -1094,7 +1106,7 @@
|
||||
#t
|
||||
)
|
||||
|
||||
(defmethod editable-array-method-9 editable-array ((obj editable-array) (arg0 editable-command) (arg1 editable-array))
|
||||
(defmethod editable-array-method-9 editable-array ((obj editable-array) (arg0 editable-command) (arg1 mouse-info))
|
||||
(if (execute-select obj arg0 arg1)
|
||||
(return #f)
|
||||
)
|
||||
@@ -1220,7 +1232,12 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(editable-array-method-13 obj (the-as uint 14) (the-as basic 41) "pick the editable to use the y from")
|
||||
(editable-array-method-13
|
||||
obj
|
||||
(editable-command pick-target)
|
||||
(editable-command snap-y)
|
||||
"pick the editable to use the y from"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1243,7 +1260,12 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(editable-array-method-13 obj (the-as uint 14) (the-as basic 40) "pick the editable to use the xz from")
|
||||
(editable-array-method-13
|
||||
obj
|
||||
(editable-command pick-target)
|
||||
(editable-command snap-xz)
|
||||
"pick the editable to use the xz from"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1269,7 +1291,12 @@
|
||||
(sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t))
|
||||
(if (-> obj target)
|
||||
(editable-method-21 (-> obj target) (-> obj region))
|
||||
(editable-array-method-13 obj (the-as uint 14) (the-as basic 49) "pick the editable to add to current region")
|
||||
(editable-array-method-13
|
||||
obj
|
||||
(editable-command pick-target)
|
||||
(editable-command region-add)
|
||||
"pick the editable to add to current region"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1367,7 +1394,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(editable-array-method-9 obj (editable-command update-game) (the-as editable-array #f))
|
||||
(editable-array-method-9 obj (editable-command update-game) (the-as mouse-info #f))
|
||||
)
|
||||
((= arg0 (editable-command update-game))
|
||||
(reset-light-hash *light-hash*)
|
||||
@@ -1393,6 +1420,9 @@
|
||||
)
|
||||
|
||||
(defmethod deactivate editable-player ((obj editable-player))
|
||||
;; og:preserve-this
|
||||
;; Put the pad back to normal
|
||||
(pc-treat-pad0-as-pad1 #f)
|
||||
(dotimes (v1-0 (-> *level* length))
|
||||
(let ((a1-3 (-> *level* level v1-0)))
|
||||
(if (= (-> a1-3 status) 'active)
|
||||
@@ -1447,27 +1477,26 @@
|
||||
)
|
||||
(when #t
|
||||
(format *stdcon* "~0K")
|
||||
(format *stdcon* "~%~%") ;; added
|
||||
(format *stdcon* "~16S~16S~16S~%" "Left button" "Middle button" "Right button")
|
||||
(format
|
||||
*stdcon*
|
||||
"~16S~16S~16S~%"
|
||||
(editable-command->string
|
||||
(if (and (nonzero? (-> obj command 1)) (or (zero? (-> obj command 0)) (mouse-hold? left)))
|
||||
(the-as editable-command (-> obj command 1))
|
||||
(the-as editable-command (-> obj command 0))
|
||||
(if (and (nonzero? (-> obj command 1)) (or (= (-> obj command 0) (editable-command none)) (mouse-hold? left)))
|
||||
(-> obj command 1)
|
||||
(-> obj command 0)
|
||||
)
|
||||
)
|
||||
(editable-command->string
|
||||
(if (and (nonzero? (-> obj command 5)) (or (zero? (-> obj command 4)) (mouse-hold? middle)))
|
||||
(the-as editable-command (-> obj command 5))
|
||||
(the-as editable-command (-> obj command 4))
|
||||
(if (and (nonzero? (-> obj command 5)) (or (= (-> obj command 4) (editable-command none)) (mouse-hold? middle)))
|
||||
(-> obj command 5)
|
||||
(-> obj command 4)
|
||||
)
|
||||
)
|
||||
(editable-command->string
|
||||
(if (and (nonzero? (-> obj command 3)) (or (zero? (-> obj command 2)) (mouse-hold? right)))
|
||||
(the-as editable-command (-> obj command 3))
|
||||
(the-as editable-command (-> obj command 2))
|
||||
(if (and (nonzero? (-> obj command 3)) (or (= (-> obj command 2) (editable-command none)) (mouse-hold? right)))
|
||||
(-> obj command 3)
|
||||
(-> obj command 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1580,8 +1609,8 @@
|
||||
((28 27 35 29 31 32)
|
||||
(the-as object (editable-array-method-13
|
||||
(-> self current)
|
||||
(the-as uint 15)
|
||||
(the-as basic a2-1)
|
||||
(editable-command pick-loc)
|
||||
(the-as editable-command a2-1)
|
||||
"click on the point to insert at (up target, down camera)"
|
||||
)
|
||||
)
|
||||
@@ -1590,22 +1619,22 @@
|
||||
(if (not (-> self left-handed))
|
||||
(the-as object (editable-array-method-13
|
||||
(-> self current)
|
||||
(the-as uint 16)
|
||||
(the-as basic a2-1)
|
||||
(editable-command pick-yes-no)
|
||||
(the-as editable-command a2-1)
|
||||
"press x to confirm, square to cancel"
|
||||
)
|
||||
)
|
||||
(the-as object (editable-array-method-13
|
||||
(-> self current)
|
||||
(the-as uint 16)
|
||||
(the-as basic a2-1)
|
||||
(editable-command pick-yes-no)
|
||||
(the-as editable-command a2-1)
|
||||
"press down to confirm, left to cancel"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(editable-array-method-9 (-> self current) (the-as editable-command a2-1) (the-as editable-array *mouse*))
|
||||
(editable-array-method-9 (-> self current) (the-as editable-command a2-1) *mouse*)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1647,7 +1676,7 @@
|
||||
)
|
||||
(('select)
|
||||
(let ((gp-2 (-> event param 0)))
|
||||
(editable-array-method-9 (-> self current) (editable-command select-none) (the-as editable-array #f))
|
||||
(editable-array-method-9 (-> self current) (editable-command select-none) (the-as mouse-info #f))
|
||||
(let* ((s5-1 (-> self current length))
|
||||
(s4-1 0)
|
||||
(a0-36 (-> self current data s4-1))
|
||||
@@ -1866,116 +1895,116 @@
|
||||
((and (or (cpad-hold? 1 l2) (cpad-hold? 1 r2))
|
||||
(or (and (cpad-hold? 1 left) (not (-> self left-handed))) (and (cpad-hold? 1 square) (-> self left-handed)))
|
||||
)
|
||||
(set! (-> self command 0) (the-as function 48))
|
||||
(set! (-> self command 1) (the-as function 0))
|
||||
(set! (-> self command 2) (the-as function 47))
|
||||
(set! (-> self command 3) (the-as function 0))
|
||||
(set! (-> self command 4) (the-as function 49))
|
||||
(set! (-> self command 5) (the-as function 0))
|
||||
(set! (-> self command 0) (editable-command copy-region))
|
||||
(set! (-> self command 1) (editable-command none))
|
||||
(set! (-> self command 2) (editable-command delete-region))
|
||||
(set! (-> self command 3) (editable-command none))
|
||||
(set! (-> self command 4) (editable-command region-add))
|
||||
(set! (-> self command 5) (editable-command none))
|
||||
0
|
||||
)
|
||||
((and (or (cpad-hold? 1 l2) (cpad-hold? 1 r2))
|
||||
(or (and (cpad-hold? 1 right) (not (-> self left-handed))) (and (cpad-hold? 1 circle) (-> self left-handed)))
|
||||
)
|
||||
(set! (-> self command 0) (the-as function 52))
|
||||
(set! (-> self command 1) (the-as function 0))
|
||||
(set! (-> self command 2) (the-as function 36))
|
||||
(set! (-> self command 3) (the-as function 0))
|
||||
(set! (-> self command 4) (the-as function 37))
|
||||
(set! (-> self command 5) (the-as function 0))
|
||||
(set! (-> self command 0) (editable-command update-game))
|
||||
(set! (-> self command 1) (editable-command none))
|
||||
(set! (-> self command 2) (editable-command delete))
|
||||
(set! (-> self command 3) (editable-command none))
|
||||
(set! (-> self command 4) (editable-command copy))
|
||||
(set! (-> self command 5) (editable-command none))
|
||||
0
|
||||
)
|
||||
((and (or (cpad-hold? 1 l2) (cpad-hold? 1 r2))
|
||||
(or (and (cpad-hold? 1 up) (not (-> self left-handed))) (and (cpad-hold? 1 triangle) (-> self left-handed)))
|
||||
)
|
||||
(set! (-> self command 0) (the-as function 6))
|
||||
(set! (-> self command 1) (the-as function 0))
|
||||
(set! (-> self command 2) (the-as function 53))
|
||||
(set! (-> self command 3) (the-as function 0))
|
||||
(set! (-> self command 4) (the-as function 42))
|
||||
(set! (-> self command 5) (the-as function 0))
|
||||
(set! (-> self command 0) (editable-command select-none))
|
||||
(set! (-> self command 1) (editable-command none))
|
||||
(set! (-> self command 2) (editable-command print-region-info))
|
||||
(set! (-> self command 3) (editable-command none))
|
||||
(set! (-> self command 4) (editable-command flip-side))
|
||||
(set! (-> self command 5) (editable-command none))
|
||||
0
|
||||
)
|
||||
((and (or (cpad-hold? 1 l2) (cpad-hold? 1 r2))
|
||||
(or (and (cpad-hold? 1 down) (not (-> self left-handed))) (and (cpad-hold? 1 x) (-> self left-handed)))
|
||||
)
|
||||
(set! (-> self command 0) (the-as function 29))
|
||||
(set! (-> self command 1) (the-as function 0))
|
||||
(set! (-> self command 2) (the-as function 30))
|
||||
(set! (-> self command 3) (the-as function 0))
|
||||
(set! (-> self command 4) (the-as function 32))
|
||||
(set! (-> self command 5) (the-as function 0))
|
||||
(set! (-> self command 0) (editable-command insert-sample))
|
||||
(set! (-> self command 1) (editable-command none))
|
||||
(set! (-> self command 2) (editable-command insert-sample-camera))
|
||||
(set! (-> self command 3) (editable-command none))
|
||||
(set! (-> self command 4) (editable-command insert-entity))
|
||||
(set! (-> self command 5) (editable-command none))
|
||||
0
|
||||
)
|
||||
((or (cpad-hold? 1 l2) (cpad-hold? 1 r2))
|
||||
(set! (-> self command 0) (the-as function 0))
|
||||
(set! (-> self command 1) (the-as function 24))
|
||||
(set! (-> self command 2) (the-as function 0))
|
||||
(set! (-> self command 3) (the-as function 26))
|
||||
(set! (-> self command 4) (the-as function 0))
|
||||
(set! (-> self command 5) (the-as function 25))
|
||||
(set! (-> self command 0) (editable-command none))
|
||||
(set! (-> self command 1) (editable-command camera-tumble))
|
||||
(set! (-> self command 2) (editable-command none))
|
||||
(set! (-> self command 3) (editable-command camera-xz))
|
||||
(set! (-> self command 4) (editable-command none))
|
||||
(set! (-> self command 5) (editable-command camera-xy))
|
||||
)
|
||||
((and (cpad-hold? 1 up)
|
||||
(cpad-hold? 1 left)
|
||||
(or (and (cpad-hold? 1 up) (not (-> self left-handed))) (and (cpad-hold? 1 triangle) (-> self left-handed)))
|
||||
)
|
||||
(set! (-> self command 0) (the-as function 3))
|
||||
(set! (-> self command 1) (the-as function 0))
|
||||
(set! (-> self command 2) (the-as function 9))
|
||||
(set! (-> self command 3) (the-as function 0))
|
||||
(set! (-> self command 4) (the-as function 8))
|
||||
(set! (-> self command 5) (the-as function 0))
|
||||
(set! (-> self command 0) (editable-command select-one))
|
||||
(set! (-> self command 1) (editable-command none))
|
||||
(set! (-> self command 2) (editable-command select-prim))
|
||||
(set! (-> self command 3) (editable-command none))
|
||||
(set! (-> self command 4) (editable-command select-face))
|
||||
(set! (-> self command 5) (editable-command none))
|
||||
0
|
||||
)
|
||||
((or (and (cpad-hold? 1 left) (not (-> self left-handed))) (and (cpad-hold? 1 square) (-> self left-handed)))
|
||||
(set! (-> self command 0) (the-as function 0))
|
||||
(set! (-> self command 1) (the-as function 20))
|
||||
(set! (-> self command 2) (the-as function 0))
|
||||
(set! (-> self command 3) (the-as function 22))
|
||||
(set! (-> self command 4) (the-as function 0))
|
||||
(set! (-> self command 5) (the-as function 21))
|
||||
(set! (-> self command 0) (editable-command none))
|
||||
(set! (-> self command 1) (editable-command drag-move-x))
|
||||
(set! (-> self command 2) (editable-command none))
|
||||
(set! (-> self command 3) (editable-command drag-move-z))
|
||||
(set! (-> self command 4) (editable-command none))
|
||||
(set! (-> self command 5) (editable-command drag-move-y))
|
||||
)
|
||||
((or (and (cpad-hold? 1 right) (not (-> self left-handed))) (and (cpad-hold? 1 circle) (-> self left-handed)))
|
||||
(set! (-> self command 0) (the-as function 31))
|
||||
(set! (-> self command 1) (the-as function 0))
|
||||
(set! (-> self command 2) (the-as function 27))
|
||||
(set! (-> self command 3) (the-as function 0))
|
||||
(set! (-> self command 4) (the-as function 28))
|
||||
(set! (-> self command 5) (the-as function 0))
|
||||
(set! (-> self command 0) (editable-command insert-light))
|
||||
(set! (-> self command 1) (editable-command none))
|
||||
(set! (-> self command 2) (editable-command insert-sphere))
|
||||
(set! (-> self command 3) (editable-command none))
|
||||
(set! (-> self command 4) (editable-command insert-point))
|
||||
(set! (-> self command 5) (editable-command none))
|
||||
0
|
||||
)
|
||||
((or (and (cpad-hold? 1 up) (not (-> self left-handed))) (and (cpad-hold? 1 triangle) (-> self left-handed)))
|
||||
(set! (-> self command 0) (the-as function 3))
|
||||
(set! (-> self command 1) (the-as function 0))
|
||||
(set! (-> self command 2) (the-as function 4))
|
||||
(set! (-> self command 3) (the-as function 0))
|
||||
(set! (-> self command 4) (the-as function 7))
|
||||
(set! (-> self command 5) (the-as function 0))
|
||||
(set! (-> self command 0) (editable-command select-one))
|
||||
(set! (-> self command 1) (editable-command none))
|
||||
(set! (-> self command 2) (editable-command select-toggle))
|
||||
(set! (-> self command 3) (editable-command none))
|
||||
(set! (-> self command 4) (editable-command select-region))
|
||||
(set! (-> self command 5) (editable-command none))
|
||||
0
|
||||
)
|
||||
((or (and (cpad-hold? 1 down) (not (-> self left-handed))) (and (cpad-hold? 1 x) (-> self left-handed)))
|
||||
(set! (-> self command 0) (the-as function 33))
|
||||
(set! (-> self command 1) (the-as function 0))
|
||||
(set! (-> self command 2) (the-as function 35))
|
||||
(set! (-> self command 3) (the-as function 0))
|
||||
(set! (-> self command 4) (the-as function 34))
|
||||
(set! (-> self command 5) (the-as function 0))
|
||||
(set! (-> self command 0) (editable-command insert-face))
|
||||
(set! (-> self command 1) (editable-command none))
|
||||
(set! (-> self command 2) (editable-command insert-box))
|
||||
(set! (-> self command 3) (editable-command none))
|
||||
(set! (-> self command 4) (editable-command insert-plane))
|
||||
(set! (-> self command 5) (editable-command none))
|
||||
0
|
||||
)
|
||||
(else
|
||||
(set! (-> self command 0) (the-as function 0))
|
||||
(set! (-> self command 1) (the-as function 18))
|
||||
(set! (-> self command 2) (the-as function 0))
|
||||
(set! (-> self command 3) (the-as function 23))
|
||||
(set! (-> self command 4) (the-as function 0))
|
||||
(set! (-> self command 5) (the-as function 19))
|
||||
(set! (-> self command 0) (editable-command none))
|
||||
(set! (-> self command 1) (editable-command drag-move-xy))
|
||||
(set! (-> self command 2) (editable-command none))
|
||||
(set! (-> self command 3) (editable-command drag-resize))
|
||||
(set! (-> self command 4) (editable-command none))
|
||||
(set! (-> self command 5) (editable-command drag-move-xz))
|
||||
)
|
||||
)
|
||||
(case (-> self current target-mode)
|
||||
((14 15)
|
||||
(set! (-> self command 0) (the-as function (-> self current target-mode)))
|
||||
(((editable-command pick-target) (editable-command pick-loc))
|
||||
(set! (-> self command 0) (-> self current target-mode))
|
||||
)
|
||||
((16)
|
||||
(((editable-command pick-yes-no))
|
||||
(when (!= *master-mode* 'menu)
|
||||
(cond
|
||||
((not (-> self left-handed))
|
||||
@@ -1983,16 +2012,12 @@
|
||||
((cpad-hold? 1 x)
|
||||
(logclear! (-> *cpad-list* cpads 1 button0-abs 0) (pad-buttons x))
|
||||
(logclear! (-> *cpad-list* cpads 1 button0-rel 0) (pad-buttons x))
|
||||
(editable-array-method-9
|
||||
gp-0
|
||||
(the-as editable-command (-> self current target-mode))
|
||||
(the-as editable-array *mouse*)
|
||||
)
|
||||
(editable-array-method-9 gp-0 (-> self current target-mode) *mouse*)
|
||||
)
|
||||
((cpad-pressed? 1 square)
|
||||
(logclear! (-> *cpad-list* cpads 1 button0-abs 0) (pad-buttons square))
|
||||
(logclear! (-> *cpad-list* cpads 1 button0-rel 0) (pad-buttons square))
|
||||
(editable-array-method-9 gp-0 (editable-command cancel) (the-as editable-array *mouse*))
|
||||
(editable-array-method-9 gp-0 (editable-command cancel) *mouse*)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2001,16 +2026,12 @@
|
||||
((cpad-hold? 1 down)
|
||||
(logclear! (-> *cpad-list* cpads 1 button0-abs 0) (pad-buttons down))
|
||||
(logclear! (-> *cpad-list* cpads 1 button0-rel 0) (pad-buttons down))
|
||||
(editable-array-method-9
|
||||
gp-0
|
||||
(the-as editable-command (-> self current target-mode))
|
||||
(the-as editable-array *mouse*)
|
||||
)
|
||||
(editable-array-method-9 gp-0 (-> self current target-mode) *mouse*)
|
||||
)
|
||||
((cpad-pressed? 1 left)
|
||||
(logclear! (-> *cpad-list* cpads 1 button0-abs 0) (pad-buttons left))
|
||||
(logclear! (-> *cpad-list* cpads 1 button0-rel 0) (pad-buttons left))
|
||||
(editable-array-method-9 gp-0 (editable-command cancel) (the-as editable-array *mouse*))
|
||||
(editable-array-method-9 gp-0 (editable-command cancel) *mouse*)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2019,34 +2040,34 @@
|
||||
)
|
||||
)
|
||||
(if (mouse-pressed? left)
|
||||
(editable-array-method-9 gp-0 (the-as editable-command (-> self command 0)) (the-as editable-array *mouse*))
|
||||
(editable-array-method-9 gp-0 (-> self command 0) *mouse*)
|
||||
)
|
||||
(if (mouse-hold? left)
|
||||
(editable-array-method-9 gp-0 (the-as editable-command (-> self command 1)) (the-as editable-array *mouse*))
|
||||
(editable-array-method-9 gp-0 (-> self command 1) *mouse*)
|
||||
)
|
||||
(if (mouse-pressed? right)
|
||||
(editable-array-method-9 gp-0 (the-as editable-command (-> self command 2)) (the-as editable-array *mouse*))
|
||||
(editable-array-method-9 gp-0 (-> self command 2) *mouse*)
|
||||
)
|
||||
(if (mouse-hold? right)
|
||||
(editable-array-method-9 gp-0 (the-as editable-command (-> self command 3)) (the-as editable-array *mouse*))
|
||||
(editable-array-method-9 gp-0 (-> self command 3) *mouse*)
|
||||
)
|
||||
(when (mouse-pressed? middle)
|
||||
(let ((a2-11 (-> self command 4)))
|
||||
(case a2-11
|
||||
((36)
|
||||
(((editable-command delete))
|
||||
(if (not (-> self left-handed))
|
||||
(editable-array-method-13 gp-0 (the-as uint 16) a2-11 "press x to confirm, square to cancel")
|
||||
(editable-array-method-13 gp-0 (the-as uint 16) a2-11 "press down to confirm, left to cancel")
|
||||
(editable-array-method-13 gp-0 (editable-command pick-yes-no) a2-11 "press x to confirm, square to cancel")
|
||||
(editable-array-method-13 gp-0 (editable-command pick-yes-no) a2-11 "press down to confirm, left to cancel")
|
||||
)
|
||||
)
|
||||
(else
|
||||
(editable-array-method-9 gp-0 (the-as editable-command a2-11) (the-as editable-array *mouse*))
|
||||
(editable-array-method-9 gp-0 a2-11 *mouse*)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (mouse-hold? middle)
|
||||
(editable-array-method-9 gp-0 (the-as editable-command (-> self command 5)) (the-as editable-array *mouse*))
|
||||
(editable-array-method-9 gp-0 (-> self command 5) *mouse*)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2081,12 +2102,12 @@
|
||||
(set! (-> self extra-command) (the-as function 23))
|
||||
(set! (-> self left-handed) #f)
|
||||
(set! (-> self light-names) #f)
|
||||
(set! (-> self command 0) (-> self select-command))
|
||||
(set! (-> self command 1) (the-as function 0))
|
||||
(set! (-> self command 2) (the-as function 0))
|
||||
(set! (-> self command 3) (-> self extra-command))
|
||||
(set! (-> self command 4) (the-as function 0))
|
||||
(set! (-> self command 5) (-> self move-command))
|
||||
(set! (-> self command 0) (the-as editable-command (-> self select-command)))
|
||||
(set! (-> self command 1) (editable-command none))
|
||||
(set! (-> self command 2) (editable-command none))
|
||||
(set! (-> self command 3) (the-as editable-command (-> self extra-command)))
|
||||
(set! (-> self command 4) (editable-command none))
|
||||
(set! (-> self command 5) (the-as editable-command (-> self move-command)))
|
||||
(let* ((s5-0 (-> self current))
|
||||
(s4-0 (method-of-object s5-0 editable-array-method-12))
|
||||
(s3-0 (if arg0
|
||||
@@ -2122,7 +2143,10 @@
|
||||
(set! (-> self event-hook) (-> (method-of-object self idle) event))
|
||||
(set! (-> self external-cam-mode) *external-cam-mode*)
|
||||
(set! *external-cam-mode* 'pad-1)
|
||||
(editable-array-method-9 (-> self current) (editable-command update-game) (the-as editable-array #f))
|
||||
(editable-array-method-9 (-> self current) (editable-command update-game) (the-as mouse-info #f))
|
||||
;; og:preserve-this
|
||||
;; automatically swap controller to pad1
|
||||
(pc-treat-pad0-as-pad1 #t)
|
||||
(go-virtual idle)
|
||||
(none)
|
||||
)
|
||||
@@ -2149,7 +2173,7 @@
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(when (and *editable* (-> *editable* 0 current region))
|
||||
(let ((s5-0 (-> *editable* 0 current region)))
|
||||
(set! (-> s5-0 tree) (the-as string arg0))
|
||||
(set! (-> s5-0 tree) arg0)
|
||||
(set! (-> s5-0 changed) #t)
|
||||
(set! (-> s5-0 filter) (editable-region-method-12 s5-0))
|
||||
)
|
||||
@@ -2164,7 +2188,11 @@
|
||||
(defun dm-editable-flag-pick-func ((arg0 editable-flag) (arg1 debug-menu-msg))
|
||||
(when *editable*
|
||||
(let ((gp-0 (/ (the-as int arg0) 8)))
|
||||
(editable-array-method-14 (-> *editable* 0 current) true-func #f)
|
||||
(editable-array-method-14
|
||||
(-> *editable* 0 current)
|
||||
(the-as (function editable editable-region symbol) true-func)
|
||||
(the-as editable-region #f)
|
||||
)
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(let* ((v1-10 (-> *editable* 0 current length))
|
||||
(a0-2 0)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 tree) (the-as string 'camera))
|
||||
(set! (-> gp-0 tree) 'camera)
|
||||
(set! (-> gp-0 on-enter) #f)
|
||||
(set! (-> gp-0 on-exit) #f)
|
||||
(set! (-> gp-0 on-inside) #f)
|
||||
@@ -1303,34 +1303,22 @@
|
||||
(transform-point-vector! gp-0 s2-0)
|
||||
(when (< 0.0 (-> gp-0 z))
|
||||
(reverse-transform-point! gp-0 s2-0 s5-0 arg0)
|
||||
(let ((s3-1 (the-as object (new 'stack-no-clear 'inline-array 'vector 6))))
|
||||
(let ((points (new 'stack-no-clear 'inline-array 'vector 6)))
|
||||
(dotimes (v1-5 6)
|
||||
(set! (-> (the-as (inline-array vector) s3-1) v1-5 quad) (the-as uint128 0))
|
||||
(set! (-> points v1-5 quad) (the-as uint128 0))
|
||||
)
|
||||
(let ((s4-1 (editable-face-method-30 obj (the-as (inline-array vector) s3-1)))
|
||||
(let ((s4-1 (editable-face-method-30 obj points))
|
||||
(s2-1 0)
|
||||
(s1-1 (vector-negate! (new 'stack-no-clear 'vector) s5-0))
|
||||
)
|
||||
(while (< (+ s2-1 2) s4-1)
|
||||
(if (or (point-in-triangle-cross
|
||||
gp-0
|
||||
s5-0
|
||||
(-> (the-as (inline-array vector) s3-1) 0)
|
||||
(-> (the-as (inline-array vector) s3-1) 1)
|
||||
(-> (the-as (inline-array vector) s3-1) 2)
|
||||
)
|
||||
(point-in-triangle-cross
|
||||
gp-0
|
||||
s1-1
|
||||
(-> (the-as (inline-array vector) s3-1) 0)
|
||||
(-> (the-as (inline-array vector) s3-1) 1)
|
||||
(-> (the-as (inline-array vector) s3-1) 2)
|
||||
)
|
||||
(if (or (point-in-triangle-cross gp-0 s5-0 (-> points 0) (-> points 1) (-> points 2))
|
||||
(point-in-triangle-cross gp-0 s1-1 (-> points 0) (-> points 1) (-> points 2))
|
||||
)
|
||||
(return (vector-vector-distance (camera-pos) gp-0))
|
||||
)
|
||||
(+! s2-1 1)
|
||||
(set! s3-1 (-> (the-as (inline-array vector) s3-1) 1))
|
||||
(set! points (the-as (inline-array vector) (-> points 1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1344,7 +1332,7 @@
|
||||
(local-vars
|
||||
(sv-208 (inline-array vector))
|
||||
(sv-216 int)
|
||||
(sv-288 (array editable-point))
|
||||
(sv-288 array)
|
||||
(sv-292 int)
|
||||
(sv-296 int)
|
||||
(sv-368 matrix)
|
||||
@@ -1353,14 +1341,17 @@
|
||||
(sv-380 symbol)
|
||||
(sv-400 float)
|
||||
)
|
||||
(format 0 "ugh 1~%")
|
||||
(if (or (logtest? arg0 (editable-filter water-command)) (logtest? (-> obj flags) (editable-flag mark)))
|
||||
(return (the-as symbol #f))
|
||||
)
|
||||
(logior! (-> obj flags) (editable-flag mark))
|
||||
(format 0 "ugh 2~%")
|
||||
(let ((s5-0 (new 'stack-no-clear 'inline-array 'vector 6)))
|
||||
(dotimes (v1-7 6)
|
||||
(set! (-> s5-0 v1-7 quad) (the-as uint128 0))
|
||||
)
|
||||
(format 0 "ugh 21~%")
|
||||
(let ((s4-0 (editable-face-method-30 obj s5-0)))
|
||||
(when (and (>= s4-0 4) (>= (-> obj length) 3))
|
||||
(let ((v1-14 0))
|
||||
@@ -1398,6 +1389,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(format 0 "ugh 22~%")
|
||||
(when (not (logtest? arg0 (editable-filter load)))
|
||||
(when (= (-> obj normal w) 0.0)
|
||||
(editable-face-method-31 obj (-> obj normal))
|
||||
@@ -1423,27 +1415,30 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(format 0 "ugh 23~%")
|
||||
(set! sv-288
|
||||
(the-as
|
||||
(array editable-point)
|
||||
((method-of-type array new)
|
||||
(the-as symbol (new 'stack-no-clear 'array 'editable-point 6))
|
||||
array
|
||||
editable-point
|
||||
6
|
||||
)
|
||||
)
|
||||
((method-of-type array new)
|
||||
(the-as symbol (new 'stack-no-clear 'array 'editable-point 6))
|
||||
array
|
||||
editable-point
|
||||
6
|
||||
)
|
||||
)
|
||||
(set! sv-292 (+ (-> obj length) -1))
|
||||
(set! sv-296 1)
|
||||
(format 0 "ugh 231~%")
|
||||
(editable-face-method-31 obj (-> obj normal))
|
||||
(format 0 "ugh 232~%")
|
||||
(dotimes (v1-85 sv-292)
|
||||
(set! (-> sv-288 v1-85) (-> obj vertex (+ v1-85 1)))
|
||||
(set! (-> (the-as (array editable-point) sv-288) v1-85) (-> obj vertex (+ v1-85 1)))
|
||||
)
|
||||
(format 0 "ugh 233~%")
|
||||
(set! sv-368 (new-stack-matrix0))
|
||||
(format 0 "ugh 234~%")
|
||||
(set! sv-372 (the-as editable-point #f))
|
||||
(set! sv-376 (the-as float 0.0))
|
||||
(set! sv-380 #t)
|
||||
(format 0 "ugh 24~%")
|
||||
(vector-normalize!
|
||||
(vector-! (-> sv-368 vector 2) (edit-get-trans obj) (edit-get-trans (-> obj vertex 0)))
|
||||
1.0
|
||||
@@ -1459,8 +1454,8 @@
|
||||
(while (< sv-296 (-> obj length))
|
||||
(set! sv-372 (the-as editable-point #f))
|
||||
(dotimes (s5-4 sv-292)
|
||||
(when (-> sv-288 s5-4)
|
||||
(let* ((a1-27 (edit-get-trans (-> sv-288 s5-4)))
|
||||
(when (-> (the-as (array editable-point) sv-288) s5-4)
|
||||
(let* ((a1-27 (edit-get-trans (-> (the-as (array editable-point) sv-288) s5-4)))
|
||||
(a0-48 (vector-matrix*! (new 'stack-no-clear 'vector) a1-27 sv-368))
|
||||
)
|
||||
(set! sv-400 (vector-y-angle a0-48))
|
||||
@@ -1468,13 +1463,13 @@
|
||||
(cond
|
||||
(sv-380
|
||||
(when (or (not sv-372) (< sv-376 sv-400))
|
||||
(set! sv-372 (-> sv-288 s5-4))
|
||||
(set! sv-372 (-> (the-as (array editable-point) sv-288) s5-4))
|
||||
(set! sv-376 sv-400)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(when (or (not sv-372) (< sv-400 sv-376))
|
||||
(set! sv-372 (-> sv-288 s5-4))
|
||||
(set! sv-372 (-> (the-as (array editable-point) sv-288) s5-4))
|
||||
(set! sv-376 sv-400)
|
||||
)
|
||||
)
|
||||
@@ -1483,8 +1478,8 @@
|
||||
)
|
||||
(set! (-> obj vertex sv-296) sv-372)
|
||||
(dotimes (v1-137 sv-292)
|
||||
(if (= sv-372 (-> sv-288 v1-137))
|
||||
(set! (-> sv-288 v1-137) #f)
|
||||
(if (= sv-372 (-> (the-as (array editable-point) sv-288) v1-137))
|
||||
(set! (-> (the-as (array editable-point) sv-288) v1-137) #f)
|
||||
)
|
||||
)
|
||||
(set! sv-296 (+ sv-296 1))
|
||||
@@ -1496,69 +1491,105 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(format 0 "ugh 3~%")
|
||||
(editable-face-method-31 obj (-> obj normal))
|
||||
(set! (-> obj center quad) (-> (edit-get-trans obj) quad))
|
||||
(format 0 "ugh 4~%")
|
||||
;; TODO - we set the center
|
||||
;; (set! (-> obj center quad) (-> (edit-get-trans obj) quad))
|
||||
(the-as symbol 0)
|
||||
)
|
||||
|
||||
(defmethod editable-method-10 editable-face ((obj editable-face))
|
||||
(local-vars (sv-112 int))
|
||||
(let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 6)))
|
||||
(dotimes (v1-0 6)
|
||||
(set! (-> gp-0 v1-0 quad) (the-as uint128 0))
|
||||
;; Greatly simplify the code here
|
||||
(let ((points (new 'stack-no-clear 'inline-array 'vector 4)))
|
||||
(dotimes (point-idx 4)
|
||||
;; (inspect obj)
|
||||
(set! (-> points point-idx quad) (-> obj vertex point-idx trans quad))
|
||||
)
|
||||
(set! sv-112 (editable-face-method-30 obj gp-0))
|
||||
(when (>= sv-112 3)
|
||||
(let ((s1-0 (editable-face-method-31 obj (new 'stack-no-clear 'vector))))
|
||||
(add-debug-vector
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(edit-get-trans obj)
|
||||
s1-0
|
||||
(meters 2)
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x80)
|
||||
;; Draw the normal
|
||||
(add-debug-x #t (bucket-id debug-no-zbuf1) (-> obj center) (new 'static 'rgba :r #xff :g #xff :a #x80))
|
||||
(add-debug-vector
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> obj center)
|
||||
(-> obj normal)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x30)
|
||||
)
|
||||
;; Draw the plane
|
||||
(add-debug-bound
|
||||
(bucket-id debug2)
|
||||
points
|
||||
4 ;; 4 points
|
||||
;; tone down the opacity of the boundary so you aren't blinded / can actually stand a chance at reading the text
|
||||
(if (logtest? (-> obj flags) (editable-flag orient))
|
||||
(new 'static 'rgba :r #xff :a #x30)
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x30)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> obj flags) (editable-flag selected))
|
||||
(dotimes (s4-1 sv-112)
|
||||
(let ((s3-1 add-debug-text-3d)
|
||||
(s2-1 #t)
|
||||
(s1-1 318)
|
||||
)
|
||||
(format (clear *temp-string*) "~D" s4-1)
|
||||
(s3-1
|
||||
s2-1
|
||||
(the-as bucket-id s1-1)
|
||||
*temp-string*
|
||||
(-> gp-0 s4-1)
|
||||
(if (logtest? (-> obj flags) (editable-flag orient))
|
||||
(font-color yellow)
|
||||
(font-color white)
|
||||
)
|
||||
(the-as vector2h #f)
|
||||
)
|
||||
)
|
||||
(if (not (logtest? (-> obj flags) (editable-flag orient)))
|
||||
(new 'static 'rgba :r #xff :a #x30)
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x30)
|
||||
)
|
||||
)
|
||||
(add-debug-bound
|
||||
(bucket-id debug2)
|
||||
gp-0
|
||||
sv-112
|
||||
(if (logtest? (-> obj flags) (editable-flag orient))
|
||||
(new 'static 'rgba :r #xff :a #x80)
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x80)
|
||||
)
|
||||
(if (not (logtest? (-> obj flags) (editable-flag orient)))
|
||||
(new 'static 'rgba :r #xff :a #x80)
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x80)
|
||||
)
|
||||
(if (logtest? (-> obj flags) (editable-flag selected))
|
||||
1
|
||||
0
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> obj flags) (editable-flag selected)) 1 0)
|
||||
)
|
||||
)
|
||||
;; (local-vars (sv-112 int))
|
||||
;; (let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 6)))
|
||||
;; (dotimes (v1-0 6)
|
||||
;; (set! (-> gp-0 v1-0 quad) (the-as uint128 0))
|
||||
;; )
|
||||
;; (set! sv-112 (editable-face-method-30 obj gp-0))
|
||||
;; (when (>= sv-112 3)
|
||||
;; (let ((s1-0 (editable-face-method-31 obj (new 'stack-no-clear 'vector))))
|
||||
;; (add-debug-vector
|
||||
;; #t
|
||||
;; (bucket-id debug-no-zbuf1)
|
||||
;; (edit-get-trans obj)
|
||||
;; s1-0
|
||||
;; (meters 2)
|
||||
;; (new 'static 'rgba :r #xff :g #xff :a #x80)
|
||||
;; )
|
||||
;; )
|
||||
;; (when (logtest? (-> obj flags) (editable-flag selected))
|
||||
;; (dotimes (s4-1 sv-112)
|
||||
;; (let ((s3-1 add-debug-text-3d)
|
||||
;; (s2-1 #t)
|
||||
;; (s1-1 318)
|
||||
;; )
|
||||
;; (format (clear *temp-string*) "~D" s4-1)
|
||||
;; (s3-1
|
||||
;; s2-1
|
||||
;; (the-as bucket-id s1-1)
|
||||
;; *temp-string*
|
||||
;; (-> gp-0 s4-1)
|
||||
;; (if (logtest? (-> obj flags) (editable-flag orient))
|
||||
;; (font-color yellow)
|
||||
;; (font-color white)
|
||||
;; )
|
||||
;; (the-as vector2h #f)
|
||||
;; )
|
||||
;; )
|
||||
;; )
|
||||
;; )
|
||||
;; (add-debug-bound
|
||||
;; (bucket-id debug2)
|
||||
;; gp-0
|
||||
;; sv-112
|
||||
;; (if (logtest? (-> obj flags) (editable-flag orient))
|
||||
;; (new 'static 'rgba :r #xff :a #x80)
|
||||
;; (new 'static 'rgba :r #xff :g #xff :a #x80)
|
||||
;; )
|
||||
;; (if (not (logtest? (-> obj flags) (editable-flag orient)))
|
||||
;; (new 'static 'rgba :r #xff :a #x80)
|
||||
;; (new 'static 'rgba :r #xff :g #xff :a #x80)
|
||||
;; )
|
||||
;; (if (logtest? (-> obj flags) (editable-flag selected))
|
||||
;; 1
|
||||
;; 0
|
||||
;; )
|
||||
;; )
|
||||
;; )
|
||||
;; )
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -1572,23 +1603,24 @@
|
||||
)
|
||||
|
||||
(defmethod editable-method-22 editable-plane ((obj editable-plane) (arg0 editable-array) (arg1 int) (arg2 int))
|
||||
(let ((s4-0 (clear *temp-string*)))
|
||||
(format
|
||||
s4-0
|
||||
"insert into region_face set kind='plane',region_id=~D,radius=~f"
|
||||
(-> obj region id)
|
||||
(-> obj radius)
|
||||
)
|
||||
(let ((a0-4 (sql-query s4-0)))
|
||||
(if (!= (-> a0-4 error) 'modify)
|
||||
(return #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (s4-1 (-> obj length))
|
||||
(editable-method-22 (-> obj vertex s4-1) arg0 2 s4-1)
|
||||
)
|
||||
(logclear! (-> obj flags) (editable-flag changed))
|
||||
(format 0 "TODO - UPDATE THIS")
|
||||
;; (let ((s4-0 (clear *temp-string*)))
|
||||
;; (format
|
||||
;; s4-0
|
||||
;; "insert into region_face set kind='plane',region_id=~D,radius=~f"
|
||||
;; (-> obj region id)
|
||||
;; (-> obj radius)
|
||||
;; )
|
||||
;; (let ((a0-4 (sql-query s4-0)))
|
||||
;; (if (!= (-> a0-4 error) 'modify)
|
||||
;; (return #f)
|
||||
;; )
|
||||
;; )
|
||||
;; )
|
||||
;; (dotimes (s4-1 (-> obj length))
|
||||
;; (editable-method-22 (-> obj vertex s4-1) arg0 2 s4-1)
|
||||
;; )
|
||||
;; (logclear! (-> obj flags) (editable-flag changed))
|
||||
#t
|
||||
)
|
||||
|
||||
@@ -1638,39 +1670,43 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod editable-plane-method-30 editable-plane ((obj editable-plane) (arg0 matrix))
|
||||
(case (-> obj length)
|
||||
((2)
|
||||
(let* ((v1-2 (editable-plane-method-31 obj (new 'stack-no-clear 'vector)))
|
||||
(s5-1 (vector-cross!
|
||||
(new 'stack-no-clear 'vector)
|
||||
v1-2
|
||||
(if (< 0.7 (fabs (vector-dot v1-2 (new 'static 'vector :z 1.0 :w 1.0))))
|
||||
(new 'static 'vector :x 1.0 :w 1.0)
|
||||
(new 'static 'vector :z 1.0 :w 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(s4-1 (vector-cross! (new 'stack-no-clear 'vector) s5-1 v1-2))
|
||||
(f30-0 (-> obj radius))
|
||||
)
|
||||
(let ((v1-4 (edit-get-trans (-> obj vertex 0))))
|
||||
(vector+float*! (the-as vector (-> arg0 vector)) v1-4 s5-1 f30-0)
|
||||
(vector+float*! (the-as vector (-> arg0 vector)) (the-as vector (-> arg0 vector)) s4-1 (- f30-0))
|
||||
(vector+float*! (-> arg0 vector 1) v1-4 s5-1 (- f30-0))
|
||||
(vector+float*! (-> arg0 vector 1) (-> arg0 vector 1) s4-1 (- f30-0))
|
||||
(vector+float*! (-> arg0 vector 2) v1-4 s5-1 f30-0)
|
||||
(vector+float*! (-> arg0 vector 2) (-> arg0 vector 2) s4-1 f30-0)
|
||||
(vector+float*! (-> arg0 trans) v1-4 s5-1 (- f30-0))
|
||||
)
|
||||
(vector+float*! (-> arg0 trans) (-> arg0 trans) s4-1 f30-0)
|
||||
)
|
||||
4
|
||||
)
|
||||
(else
|
||||
0
|
||||
)
|
||||
)
|
||||
(defmethod editable-plane-method-30 editable-plane ((obj editable-plane) (arg0 (inline-array vector)))
|
||||
;; og:preserve-this
|
||||
;; This function converts 2 points (defining the normal) along with the radius into the 4 points that describe the plane
|
||||
;; this means that they can only generate square planes, so this code is no longer used
|
||||
;; (case (-> obj length)
|
||||
;; ((2)
|
||||
;; (let* ((v1-2 (editable-plane-method-31 obj (new 'stack-no-clear 'vector)))
|
||||
;; (s5-1 (vector-cross!
|
||||
;; (new 'stack-no-clear 'vector)
|
||||
;; v1-2
|
||||
;; (if (< 0.7 (fabs (vector-dot v1-2 (new 'static 'vector :z 1.0 :w 1.0))))
|
||||
;; (new 'static 'vector :x 1.0 :w 1.0)
|
||||
;; (new 'static 'vector :z 1.0 :w 1.0)
|
||||
;; )
|
||||
;; )
|
||||
;; )
|
||||
;; (s4-1 (vector-cross! (new 'stack-no-clear 'vector) s5-1 v1-2))
|
||||
;; (f30-0 (-> obj radius))
|
||||
;; )
|
||||
;; (let ((v1-4 (edit-get-trans (-> obj vertex 0))))
|
||||
;; (vector+float*! (-> arg0 0) v1-4 s5-1 f30-0)
|
||||
;; (vector+float*! (-> arg0 0) (-> arg0 0) s4-1 (- f30-0))
|
||||
;; (vector+float*! (-> arg0 1) v1-4 s5-1 (- f30-0))
|
||||
;; (vector+float*! (-> arg0 1) (-> arg0 1) s4-1 (- f30-0))
|
||||
;; (vector+float*! (-> arg0 2) v1-4 s5-1 f30-0)
|
||||
;; (vector+float*! (-> arg0 2) (-> arg0 2) s4-1 f30-0)
|
||||
;; (vector+float*! (-> arg0 3) v1-4 s5-1 (- f30-0))
|
||||
;; )
|
||||
;; (vector+float*! (-> arg0 3) (-> arg0 3) s4-1 f30-0)
|
||||
;; )
|
||||
;; 4
|
||||
;; )
|
||||
;; (else
|
||||
;; 0
|
||||
;; )
|
||||
;; )
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod editable-plane-method-31 editable-plane ((obj editable-plane) (arg0 vector))
|
||||
@@ -1698,34 +1734,22 @@
|
||||
)
|
||||
(when (< 0.0 (-> gp-0 z))
|
||||
(reverse-transform-point! gp-0 (edit-get-trans (-> obj vertex 0)) s5-0 arg0)
|
||||
(let ((s3-1 (the-as object (new 'stack-no-clear 'matrix))))
|
||||
(let ((points (new 'stack-no-clear 'inline-array 'vector 4)))
|
||||
(dotimes (v1-6 4)
|
||||
(set! (-> (the-as (inline-array vector) s3-1) v1-6 quad) (the-as uint128 0))
|
||||
(set! (-> points v1-6 quad) (the-as uint128 0))
|
||||
)
|
||||
(let ((s4-1 (editable-plane-method-30 obj (the-as matrix s3-1)))
|
||||
(let ((s4-1 (editable-plane-method-30 obj points))
|
||||
(s2-2 0)
|
||||
(s1-2 (vector-negate! (new 'stack-no-clear 'vector) s5-0))
|
||||
)
|
||||
(while (< (+ s2-2 2) s4-1)
|
||||
(if (or (point-in-triangle-cross
|
||||
gp-0
|
||||
s5-0
|
||||
(-> (the-as (inline-array vector) s3-1) 0)
|
||||
(-> (the-as (inline-array vector) s3-1) 1)
|
||||
(-> (the-as (inline-array vector) s3-1) 2)
|
||||
)
|
||||
(point-in-triangle-cross
|
||||
gp-0
|
||||
s1-2
|
||||
(-> (the-as (inline-array vector) s3-1) 0)
|
||||
(-> (the-as (inline-array vector) s3-1) 1)
|
||||
(-> (the-as (inline-array vector) s3-1) 2)
|
||||
)
|
||||
(if (or (point-in-triangle-cross gp-0 s5-0 (-> points 0) (-> points 1) (-> points 2))
|
||||
(point-in-triangle-cross gp-0 s1-2 (-> points 0) (-> points 1) (-> points 2))
|
||||
)
|
||||
(return (vector-vector-distance (camera-pos) gp-0))
|
||||
)
|
||||
(+! s2-2 1)
|
||||
(set! s3-1 (-> (the-as (inline-array vector) s3-1) 1))
|
||||
(set! points (the-as (inline-array vector) (-> points 1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1735,39 +1759,30 @@
|
||||
)
|
||||
|
||||
(defmethod editable-method-10 editable-plane ((obj editable-plane))
|
||||
(let ((gp-0 (new 'stack-no-clear 'matrix)))
|
||||
(dotimes (v1-0 4)
|
||||
(set! (-> gp-0 quad v1-0) (the-as uint128 0))
|
||||
(let ((points (new 'stack-no-clear 'inline-array 'vector 4)))
|
||||
(dotimes (point-idx 4)
|
||||
;; (inspect obj)
|
||||
(set! (-> points point-idx quad) (-> obj vertex point-idx trans quad))
|
||||
)
|
||||
(let ((s4-0 (editable-plane-method-30 obj gp-0)))
|
||||
(when (>= s4-0 3)
|
||||
(add-debug-line
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(edit-get-trans (-> obj vertex 0))
|
||||
(edit-get-trans (-> obj vertex 1))
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x80)
|
||||
#f
|
||||
(the-as rgba -1)
|
||||
)
|
||||
(add-debug-bound
|
||||
(bucket-id debug2)
|
||||
(the-as (inline-array vector) gp-0)
|
||||
s4-0
|
||||
(if (logtest? (-> obj flags) (editable-flag orient))
|
||||
(new 'static 'rgba :r #xff :a #x80)
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x80)
|
||||
)
|
||||
(if (not (logtest? (-> obj flags) (editable-flag orient)))
|
||||
(new 'static 'rgba :r #xff :a #x80)
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x80)
|
||||
)
|
||||
(if (logtest? (-> obj flags) (editable-flag selected))
|
||||
1
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
;; Draw the normal
|
||||
(add-debug-x #t (bucket-id debug-no-zbuf1) (-> obj position) (new 'static 'rgba :r #xff :g #xff :a #x80))
|
||||
(add-debug-vector
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> obj position)
|
||||
(-> obj normal)
|
||||
(meters 2)
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x30)
|
||||
)
|
||||
;; Draw the plane
|
||||
(add-debug-bound
|
||||
(bucket-id debug2)
|
||||
points
|
||||
4 ;; 4 points
|
||||
;; tone down the opacity of the boundary so you aren't blinded / can actually stand a chance at reading the text
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x30)
|
||||
(new 'static 'rgba :r #xff :a #x30)
|
||||
(if (logtest? (-> obj flags) (editable-flag selected)) 1 0)
|
||||
)
|
||||
)
|
||||
0
|
||||
@@ -1775,21 +1790,22 @@
|
||||
)
|
||||
|
||||
(defmethod editable-method-17 editable-plane ((obj editable-plane) (arg0 vector))
|
||||
(let ((v1-0 (-> obj region)))
|
||||
(if v1-0
|
||||
(set! (-> v1-0 changed) #t)
|
||||
)
|
||||
)
|
||||
(logior! (-> obj flags) (editable-flag changed))
|
||||
(if (= (-> arg0 y) 0.0)
|
||||
(+! (-> obj radius) (-> arg0 x))
|
||||
(set! (-> obj radius) (-> arg0 y))
|
||||
)
|
||||
(if (< (-> obj radius) 0.0)
|
||||
(set! (-> obj radius) 0.0)
|
||||
)
|
||||
(editable-method-28 obj (editable-filter load))
|
||||
0
|
||||
(format 0 "TODO - UPDATE THIS")
|
||||
;; (let ((v1-0 (-> obj region)))
|
||||
;; (if v1-0
|
||||
;; (set! (-> v1-0 changed) #t)
|
||||
;; )
|
||||
;; )
|
||||
;; (logior! (-> obj flags) (editable-flag changed))
|
||||
;; (if (= (-> arg0 y) 0.0)
|
||||
;; (+! (-> obj radius) (-> arg0 x))
|
||||
;; (set! (-> obj radius) (-> arg0 y))
|
||||
;; )
|
||||
;; (if (< (-> obj radius) 0.0)
|
||||
;; (set! (-> obj radius) 0.0)
|
||||
;; )
|
||||
;; (editable-method-28 obj (editable-filter load))
|
||||
;; 0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -1897,8 +1913,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch (array editable) vs none.
|
||||
(defmethod editable-array-method-14 editable-array ((obj editable-array) (arg0 (function symbol)) (arg1 symbol))
|
||||
(defmethod editable-array-method-14 editable-array ((obj editable-array) (arg0 (function editable editable-region symbol)) (arg1 editable-region))
|
||||
(let ((gp-0 (-> obj selection)))
|
||||
(set! (-> gp-0 length) 0)
|
||||
(let* ((s2-0 (-> obj length))
|
||||
@@ -1907,7 +1922,7 @@
|
||||
)
|
||||
(while (< s1-0 s2-0)
|
||||
(when (and s0-0 (logtest? (-> s0-0 flags) (editable-flag selected)))
|
||||
(when (arg0)
|
||||
(when (arg0 s0-0 arg1)
|
||||
(set! (-> gp-0 (-> gp-0 length)) s0-0)
|
||||
(+! (-> gp-0 length) 1)
|
||||
)
|
||||
@@ -1916,8 +1931,8 @@
|
||||
(set! s0-0 (-> obj data s1-0))
|
||||
)
|
||||
)
|
||||
gp-0
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod editable-array-method-15 editable-array ((obj editable-array) (arg0 editable))
|
||||
@@ -2028,7 +2043,7 @@
|
||||
(let ((s4-3 sql-query))
|
||||
(format
|
||||
(clear *temp-string*)
|
||||
"select region_face.region_id,region_face_id,kind,flags,radius from region,region_face where level_name='~S' and region.region_id=region_face.region_id"
|
||||
"select region_face.region_id,region_face_id,kind,flags,normal_x,normal_y,normal_z,normal_w,pos_x,pos_y,pos_z,pos_w from region,region_face where level_name='~S' and region.region_id=region_face.region_id"
|
||||
arg0
|
||||
)
|
||||
(set! sv-24 (s4-3 *temp-string*))
|
||||
@@ -2036,11 +2051,11 @@
|
||||
(if (!= (-> sv-24 error) 'select)
|
||||
(return #f)
|
||||
)
|
||||
(format #t "sql: read face ~D~%" (/ (-> sv-24 len) 5))
|
||||
(format #t "sql: read face ~D~%" (/ (-> sv-24 len) 12))
|
||||
(let ((s4-4 sql-query))
|
||||
(format
|
||||
(clear *temp-string*)
|
||||
"select region_face.region_face_id,idx,x,y,z from region,region_face,region_point where level_name='~S' and region.region_id=region_face.region_id and region_face.region_face_id=region_point.region_face_id"
|
||||
"select region_face.region_face_id,idx,x,y,z,w from region,region_face,region_point where level_name='~S' and region.region_id=region_face.region_id and region_face.region_face_id=region_point.region_face_id"
|
||||
arg0
|
||||
)
|
||||
(set! sv-28 (s4-4 *temp-string*))
|
||||
@@ -2048,7 +2063,7 @@
|
||||
(if (!= (-> sv-28 error) 'select)
|
||||
(return #f)
|
||||
)
|
||||
(format #t "sql: read point ~D~%" (/ (-> sv-28 len) 5))
|
||||
(format #t "sql: read point ~D~%" (/ (-> sv-28 len) 6))
|
||||
(let ((s4-5 sql-query))
|
||||
(format
|
||||
(clear *temp-string*)
|
||||
@@ -2068,7 +2083,7 @@
|
||||
(set! sv-44 (the-as float -4095996000.0))
|
||||
(set! (-> sv-36 id) (the-as uint (string->int (-> sv-20 data s5-1))))
|
||||
(set! (-> sv-36 level) (the-as string (string->symbol (-> sv-20 data (+ s5-1 1)))))
|
||||
(set! (-> sv-36 tree) (the-as string (string->symbol (-> sv-20 data (+ s5-1 2)))))
|
||||
(set! (-> sv-36 tree) (string->symbol (-> sv-20 data (+ s5-1 2))))
|
||||
(set! (-> sv-36 on-enter) (if (string= (-> sv-20 data (+ s5-1 3)) "")
|
||||
(the-as string #f)
|
||||
(-> sv-20 data (+ s5-1 3))
|
||||
@@ -2128,21 +2143,28 @@
|
||||
(set! sv-84 (-> sv-24 data (+ sv-64 1)))
|
||||
(when (>= sv-72 0)
|
||||
(set! (-> obj data sv-72) sv-80)
|
||||
(set! (-> sv-80 radius) (string->float (-> sv-24 data (+ sv-64 4))))
|
||||
(countdown (s4-7 (/ (-> sv-28 len) 5))
|
||||
(when (string= (-> (the-as sql-result (+ (* 20 s4-7) (the-as int sv-28))) data 0) sv-84)
|
||||
(set! (-> sv-80 normal x) (string->float (-> sv-24 data (+ sv-64 4))))
|
||||
(set! (-> sv-80 normal y) (string->float (-> sv-24 data (+ sv-64 5))))
|
||||
(set! (-> sv-80 normal z) (string->float (-> sv-24 data (+ sv-64 6))))
|
||||
(set! (-> sv-80 normal w) (string->float (-> sv-24 data (+ sv-64 7))))
|
||||
(set! (-> sv-80 position x) (string->float (-> sv-24 data (+ sv-64 8))))
|
||||
(set! (-> sv-80 position y) (string->float (-> sv-24 data (+ sv-64 9))))
|
||||
(set! (-> sv-80 position z) (string->float (-> sv-24 data (+ sv-64 10))))
|
||||
(set! (-> sv-80 position w) (string->float (-> sv-24 data (+ sv-64 11))))
|
||||
(countdown (s4-7 (/ (-> sv-28 len) 6))
|
||||
(when (string= (-> sv-28 data (+ (* 6 s4-7) 0)) sv-84)
|
||||
(let ((s3-6 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s3-6 x) (string->float (-> sv-28 data (+ (* 5 s4-7) 2))))
|
||||
(set! (-> s3-6 y) (string->float (-> sv-28 data (+ (* 5 s4-7) 3))))
|
||||
(set! (-> s3-6 z) (string->float (-> sv-28 data (+ (* 5 s4-7) 4))))
|
||||
(set! (-> s3-6 w) 1.0)
|
||||
(set! (-> s3-6 x) (string->float (-> sv-28 data (+ (* 6 s4-7) 2))))
|
||||
(set! (-> s3-6 y) (string->float (-> sv-28 data (+ (* 6 s4-7) 3))))
|
||||
(set! (-> s3-6 z) (string->float (-> sv-28 data (+ (* 6 s4-7) 4))))
|
||||
(set! (-> s3-6 w) (string->float (-> sv-28 data (+ (* 6 s4-7) 5))))
|
||||
(set! sv-112 s3-6)
|
||||
)
|
||||
(vector+! sv-112 sv-112 (-> obj level-offset))
|
||||
(set! sv-120 (editable-array-method-11 obj))
|
||||
(when (>= sv-120 0)
|
||||
(set! sv-128 (new 'debug 'editable-point sv-112 sv-36))
|
||||
(set! sv-136 (string->int (-> sv-28 data (+ (* 5 s4-7) 1))))
|
||||
(set! sv-136 (string->int (-> sv-28 data (+ (* 6 s4-7) 1))))
|
||||
(set! (-> obj data sv-120) sv-128)
|
||||
(set! (-> sv-80 vertex sv-136) sv-128)
|
||||
(set! (-> sv-80 length) (max (-> sv-80 length) (+ sv-136 1)))
|
||||
@@ -2163,62 +2185,67 @@
|
||||
(if (string= (-> sv-24 data (+ sv-64 3)) "orient")
|
||||
(logior! (-> sv-152 flags) (editable-flag orient))
|
||||
)
|
||||
(let ((s4-8 (/ (-> sv-28 len) 5)))
|
||||
(while (begin (label cfg-78) (nonzero? s4-8))
|
||||
(+! s4-8 -1)
|
||||
(when (string= (-> (the-as sql-result (+ (* 20 s4-8) (the-as int sv-28))) data 0) sv-156)
|
||||
(let ((s3-7 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s3-7 x) (string->float (-> sv-28 data (+ (* 5 s4-8) 2))))
|
||||
(set! (-> s3-7 y) (string->float (-> sv-28 data (+ (* 5 s4-8) 3))))
|
||||
(set! (-> s3-7 z) (string->float (-> sv-28 data (+ (* 5 s4-8) 4))))
|
||||
(set! (-> s3-7 w) 1.0)
|
||||
(set! sv-176 s3-7)
|
||||
)
|
||||
(vector+! sv-176 sv-176 (-> obj level-offset))
|
||||
(let* ((s3-8 (-> obj length))
|
||||
(s2-3 0)
|
||||
(s1-0 (-> obj data s2-3))
|
||||
)
|
||||
(while (< s2-3 s3-8)
|
||||
(when (and s1-0 (= (-> s1-0 region) sv-36) (type? s1-0 editable-point))
|
||||
(when (vector= (-> (the-as editable-point s1-0) trans) sv-176)
|
||||
(set! sv-180 s1-0)
|
||||
(set! sv-184 (string->int (-> sv-28 data (+ (* 5 s4-8) 1))))
|
||||
(set! (-> sv-152 vertex sv-184) (the-as editable-point sv-180))
|
||||
(set! (-> sv-152 length) (max (-> sv-152 length) (+ sv-184 1)))
|
||||
(set! (-> sv-180 owner) (cons sv-152 (-> sv-180 owner)))
|
||||
(goto cfg-78)
|
||||
)
|
||||
)
|
||||
(+! s2-3 1)
|
||||
(set! s1-0 (-> obj data s2-3))
|
||||
)
|
||||
)
|
||||
(if (< (-> sv-176 y) sv-40)
|
||||
(set! sv-40 (-> sv-176 y))
|
||||
)
|
||||
(if (< sv-44 (-> sv-176 y))
|
||||
(set! sv-44 (the-as float (-> sv-176 y)))
|
||||
)
|
||||
(set! sv-192 (editable-array-method-11 obj))
|
||||
(when (>= sv-192 0)
|
||||
(set! sv-200 (new 'debug 'editable-point sv-176 sv-36))
|
||||
(set! sv-208 (string->int (-> sv-28 data (+ (* 5 s4-8) 1))))
|
||||
(set! (-> obj data sv-192) sv-200)
|
||||
(set! (-> sv-152 vertex sv-208) sv-200)
|
||||
(set! (-> sv-152 length) (max (-> sv-152 length) (+ sv-208 1)))
|
||||
(set! (-> sv-200 owner) (cons sv-152 (-> sv-200 owner)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> sv-152 normal x) (string->float (-> sv-24 data (+ sv-64 4))))
|
||||
(set! (-> sv-152 normal y) (string->float (-> sv-24 data (+ sv-64 5))))
|
||||
(set! (-> sv-152 normal z) (string->float (-> sv-24 data (+ sv-64 6))))
|
||||
(set! (-> sv-152 normal w) (string->float (-> sv-24 data (+ sv-64 7))))
|
||||
(set! (-> sv-152 center x) (string->float (-> sv-24 data (+ sv-64 8))))
|
||||
(set! (-> sv-152 center y) (string->float (-> sv-24 data (+ sv-64 9))))
|
||||
(set! (-> sv-152 center z) (string->float (-> sv-24 data (+ sv-64 10))))
|
||||
(set! (-> sv-152 center w) (string->float (-> sv-24 data (+ sv-64 11))))
|
||||
(countdown (s4-8 (/ (-> sv-28 len) 6))
|
||||
(when (string= (-> sv-28 data (+ (* 6 s4-8) 0)) sv-156)
|
||||
(let ((s3-7 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s3-7 x) (string->float (-> sv-28 data (+ (* 6 s4-8) 2))))
|
||||
(set! (-> s3-7 y) (string->float (-> sv-28 data (+ (* 6 s4-8) 3))))
|
||||
(set! (-> s3-7 z) (string->float (-> sv-28 data (+ (* 6 s4-8) 4))))
|
||||
(set! (-> s3-7 w) (string->float (-> sv-28 data (+ (* 6 s4-8) 5))))
|
||||
(set! sv-176 s3-7)
|
||||
)
|
||||
(vector+! sv-176 sv-176 (-> obj level-offset))
|
||||
(let* ((s3-8 (-> obj length))
|
||||
(s2-3 0)
|
||||
(s1-0 (-> obj data s2-3))
|
||||
)
|
||||
(while (< s2-3 s3-8)
|
||||
(when (and s1-0 (= (-> s1-0 region) sv-36) (type? s1-0 editable-point))
|
||||
(when (vector= (-> (the-as editable-point s1-0) trans) sv-176)
|
||||
(set! sv-180 s1-0)
|
||||
(set! sv-184 (string->int (-> sv-28 data (+ (* 6 s4-8) 1))))
|
||||
(set! (-> sv-152 vertex sv-184) (the-as editable-point sv-180))
|
||||
(set! (-> sv-152 length) (max (-> sv-152 length) (+ sv-184 1)))
|
||||
(set! (-> sv-180 owner) (cons sv-152 (-> sv-180 owner)))
|
||||
)
|
||||
)
|
||||
(+! s2-3 1)
|
||||
(set! s1-0 (-> obj data s2-3))
|
||||
)
|
||||
)
|
||||
(if (< (-> sv-176 y) sv-40)
|
||||
(set! sv-40 (-> sv-176 y))
|
||||
)
|
||||
(if (< sv-44 (-> sv-176 y))
|
||||
(set! sv-44 (the-as float (-> sv-176 y)))
|
||||
)
|
||||
(set! sv-192 (editable-array-method-11 obj))
|
||||
(when (>= sv-192 0)
|
||||
(set! sv-200 (new 'debug 'editable-point sv-176 sv-36))
|
||||
(set! sv-208 (string->int (-> sv-28 data (+ (* 6 s4-8) 1))))
|
||||
(set! (-> obj data sv-192) sv-200)
|
||||
(set! (-> sv-152 vertex sv-208) sv-200)
|
||||
(set! (-> sv-152 length) (max (-> sv-152 length) (+ sv-208 1)))
|
||||
(set! (-> sv-200 owner) (cons sv-152 (-> sv-200 owner)))
|
||||
)
|
||||
))
|
||||
(editable-method-28 sv-152 (editable-filter load))
|
||||
(editable-method-29 sv-152 (editable-filter load))
|
||||
;; this seems to mostly derive fields that we have already included in the database
|
||||
;; I'll have to figure out later if it does more when i care about supporting modifications
|
||||
;; (editable-method-29 sv-152 (editable-filter load))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-64 (+ sv-64 5))
|
||||
(set! sv-64 (+ sv-64 12))
|
||||
)
|
||||
(let* ((v1-293 (-> obj length))
|
||||
(a0-158 0)
|
||||
@@ -2327,12 +2354,12 @@
|
||||
)
|
||||
)
|
||||
(set! (-> *editable-light-region* changed) #f)
|
||||
(editable-array-method-9 obj (editable-command refresh-filter) (the-as editable-array #f))
|
||||
(editable-array-method-9 obj (editable-command refresh-filter) (the-as mouse-info #f))
|
||||
#t
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod editable-array-method-13 editable-array ((obj editable-array) (arg0 uint) (arg1 basic) (arg2 string))
|
||||
(defmethod editable-array-method-13 editable-array ((obj editable-array) (arg0 editable-command) (arg1 editable-command) (arg2 string))
|
||||
(set! (-> obj target) #f)
|
||||
(set! (-> obj target-mode) arg0)
|
||||
(set! (-> obj target-command) arg1)
|
||||
@@ -2378,21 +2405,21 @@
|
||||
(let ((v1-4 (new 'debug 'editable-region)))
|
||||
(set! (-> v1-4 locked) #t)
|
||||
(set! (-> v1-4 changed) #f)
|
||||
(set! (-> v1-4 tree) (the-as string 'sample))
|
||||
(set! (-> v1-4 tree) 'sample)
|
||||
(set! (-> v1-4 filter) (editable-filter sample))
|
||||
(set! *editable-sample-region* v1-4)
|
||||
)
|
||||
(let ((v1-6 (new 'debug 'editable-region)))
|
||||
(set! (-> v1-6 locked) #t)
|
||||
(set! (-> v1-6 changed) #f)
|
||||
(set! (-> v1-6 tree) (the-as string 'light))
|
||||
(set! (-> v1-6 tree) 'light)
|
||||
(set! (-> v1-6 filter) (editable-filter light))
|
||||
(set! *editable-light-region* v1-6)
|
||||
)
|
||||
(let ((v0-84 (new 'debug 'editable-region)))
|
||||
(set! (-> v0-84 locked) #t)
|
||||
(set! (-> v0-84 changed) #f)
|
||||
(set! (-> v0-84 tree) (the-as string 'entity))
|
||||
(set! (-> v0-84 tree) 'entity)
|
||||
(set! (-> v0-84 filter) (editable-filter entity))
|
||||
(set! *editable-entity-region* v0-84)
|
||||
)
|
||||
|
||||
@@ -999,6 +999,10 @@
|
||||
|
||||
;; debug drawing
|
||||
(end-display arg0)
|
||||
;; og:preserve-this
|
||||
;; Added to push text below the imgui bar if it's currently open
|
||||
(when (pc-is-imgui-visible?)
|
||||
(format *stdcon* "~%~%"))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; display the frame, and start a new one!
|
||||
|
||||
@@ -288,8 +288,8 @@
|
||||
:size-assert #x30c
|
||||
:flag-assert #xb0000030c
|
||||
(:methods
|
||||
(cam-setting-data-method-9 (_type_ engine engine-pers engine) cam-setting-data 9)
|
||||
(cam-setting-data-method-10 (_type_ object (pointer process) float int) none 10)
|
||||
(cam-setting-data-method-9 (_type_ engine engine-pers engine) _type_ 9)
|
||||
(cam-setting-data-method-10 (_type_ object (pointer process) object int) _type_ 10)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -489,7 +489,7 @@
|
||||
obj
|
||||
(-> s3-0 param 0)
|
||||
(the-as (pointer process) (-> s3-0 param 1))
|
||||
(the-as float (-> s3-0 param 2))
|
||||
(-> s3-0 param 2)
|
||||
(the-as int (-> s3-0 param 3))
|
||||
)
|
||||
(set! s3-0 (-> s3-0 next))
|
||||
@@ -509,7 +509,7 @@
|
||||
obj
|
||||
s1-0
|
||||
(the-as (pointer process) (-> (the-as connection s3-1) param1))
|
||||
(the-as float (-> (the-as connection s3-1) param2))
|
||||
(-> (the-as connection s3-1) param2)
|
||||
(-> (the-as connection s3-1) param3)
|
||||
)
|
||||
)
|
||||
@@ -519,7 +519,7 @@
|
||||
obj
|
||||
s1-0
|
||||
(the-as (pointer process) (-> (the-as connection s3-1) param1))
|
||||
(the-as float (-> (the-as connection s3-1) param2))
|
||||
(-> (the-as connection s3-1) param2)
|
||||
(-> (the-as connection s3-1) param3)
|
||||
)
|
||||
)
|
||||
@@ -537,7 +537,7 @@
|
||||
obj
|
||||
(-> (the-as connection v1-21) param0)
|
||||
(the-as (pointer process) (-> (the-as connection v1-21) param1))
|
||||
(the-as float (-> (the-as connection v1-21) param2))
|
||||
(-> (the-as connection v1-21) param2)
|
||||
(-> (the-as connection v1-21) param3)
|
||||
)
|
||||
(set! v1-21 s4-1)
|
||||
@@ -547,13 +547,12 @@
|
||||
obj
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch cam-setting-data vs none.
|
||||
(defmethod cam-setting-data-method-10 cam-setting-data ((obj cam-setting-data) (arg0 object) (arg1 (pointer process)) (arg2 float) (arg3 int))
|
||||
(defmethod cam-setting-data-method-10 cam-setting-data ((obj cam-setting-data) (arg0 object) (arg1 (pointer process)) (arg2 object) (arg3 int))
|
||||
(case arg0
|
||||
(('fov)
|
||||
(if (= arg1 'rel)
|
||||
(set! (-> obj fov) (* (-> obj fov) arg2))
|
||||
(set! (-> obj fov) arg2)
|
||||
(set! (-> obj fov) (* (-> obj fov) (the-as float arg2)))
|
||||
(set! (-> obj fov) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(('pov-handle)
|
||||
@@ -571,14 +570,14 @@
|
||||
(case arg1
|
||||
(('low)
|
||||
(if (-> obj string-max-length-default)
|
||||
(set! (-> obj string-max-length) arg2)
|
||||
(set! (-> obj string-max-length) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(('rel)
|
||||
(set! (-> obj string-max-length) (* (-> obj string-max-length) arg2))
|
||||
(set! (-> obj string-max-length) (* (-> obj string-max-length) (the-as float arg2)))
|
||||
)
|
||||
(else
|
||||
(set! (-> obj string-max-length) arg2)
|
||||
(set! (-> obj string-max-length) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(set! (-> obj string-default) #f)
|
||||
@@ -588,14 +587,14 @@
|
||||
(case arg1
|
||||
(('low)
|
||||
(if (-> obj string-min-length-default)
|
||||
(set! (-> obj string-min-length) arg2)
|
||||
(set! (-> obj string-min-length) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(('rel)
|
||||
(set! (-> obj string-min-length) (* (-> obj string-min-length) arg2))
|
||||
(set! (-> obj string-min-length) (* (-> obj string-min-length) (the-as float arg2)))
|
||||
)
|
||||
(else
|
||||
(set! (-> obj string-min-length) arg2)
|
||||
(set! (-> obj string-min-length) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(set! (-> obj string-default) #f)
|
||||
@@ -605,14 +604,14 @@
|
||||
(case arg1
|
||||
(('low)
|
||||
(if (-> obj string-max-height-default)
|
||||
(set! (-> obj string-max-height) arg2)
|
||||
(set! (-> obj string-max-height) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(('rel)
|
||||
(set! (-> obj string-max-height) (* (-> obj string-max-height) arg2))
|
||||
(set! (-> obj string-max-height) (* (-> obj string-max-height) (the-as float arg2)))
|
||||
)
|
||||
(else
|
||||
(set! (-> obj string-max-height) arg2)
|
||||
(set! (-> obj string-max-height) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(set! (-> obj string-default) #f)
|
||||
@@ -622,32 +621,32 @@
|
||||
(case arg1
|
||||
(('low)
|
||||
(if (-> obj string-min-height-default)
|
||||
(set! (-> obj string-min-height) arg2)
|
||||
(set! (-> obj string-min-height) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(('rel)
|
||||
(set! (-> obj string-min-height) (* (-> obj string-min-height) arg2))
|
||||
(set! (-> obj string-min-height) (* (-> obj string-min-height) (the-as float arg2)))
|
||||
)
|
||||
(else
|
||||
(set! (-> obj string-min-height) arg2)
|
||||
(set! (-> obj string-min-height) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(set! (-> obj string-default) #f)
|
||||
(set! (-> obj string-min-height-default) #f)
|
||||
)
|
||||
(('string-cliff-height)
|
||||
(set! (-> obj string-cliff-height) arg2)
|
||||
(set! (-> obj string-cliff-height) (the-as float arg2))
|
||||
(set! (-> obj string-default) #f)
|
||||
)
|
||||
(('string-camera-ceiling)
|
||||
(set! (-> obj string-camera-ceiling) arg2)
|
||||
(set! (-> obj string-camera-ceiling) (the-as float arg2))
|
||||
(set! (-> obj string-default) #f)
|
||||
)
|
||||
(('gun-max-height)
|
||||
(set! (-> obj gun-max-height) arg2)
|
||||
(set! (-> obj gun-max-height) (the-as float arg2))
|
||||
)
|
||||
(('gun-min-height)
|
||||
(set! (-> obj gun-min-height) arg2)
|
||||
(set! (-> obj gun-min-height) (the-as float arg2))
|
||||
)
|
||||
(('string-local-down)
|
||||
(vector-normalize-copy! (-> obj string-local-down) (the-as vector arg2) 1.0)
|
||||
@@ -675,31 +674,31 @@
|
||||
(logior! (-> obj slave-options) (cam-slave-options VERTICAL_FOLLOW_MATCHES_CAMERA))
|
||||
)
|
||||
(('matrix-blend-max-angle)
|
||||
(set! (-> obj matrix-blend-max-angle) arg2)
|
||||
(set! (-> obj matrix-blend-max-angle) (the-as float arg2))
|
||||
)
|
||||
(('matrix-blend-max-partial)
|
||||
(set! (-> obj matrix-blend-max-partial) arg2)
|
||||
)
|
||||
(('string-spline-max-move) ;; original game had a copypasta bug here
|
||||
(set! (-> obj string-spline-max-move) arg2)
|
||||
)
|
||||
(('string-spline-accel)
|
||||
(set! (-> obj string-spline-accel) arg2)
|
||||
(set! (-> obj matrix-blend-max-partial) (the-as float arg2))
|
||||
)
|
||||
(('string-spline-max-move-player)
|
||||
(set! (-> obj string-spline-max-move-player) arg2)
|
||||
(set! (-> obj string-spline-max-move-player) (the-as float arg2))
|
||||
)
|
||||
(('string-spline-accel)
|
||||
(set! (-> obj string-spline-accel) (the-as float arg2))
|
||||
)
|
||||
(('string-spline-max-move-player)
|
||||
(set! (-> obj string-spline-max-move-player) (the-as float arg2))
|
||||
)
|
||||
(('string-spline-accel-player)
|
||||
(set! (-> obj string-spline-accel-player) arg2)
|
||||
(set! (-> obj string-spline-accel-player) (the-as float arg2))
|
||||
)
|
||||
(('target-height)
|
||||
(set! (-> obj target-height) arg2)
|
||||
(set! (-> obj target-height) (the-as float arg2))
|
||||
)
|
||||
(('head-offset)
|
||||
(set! (-> obj head-offset) arg2)
|
||||
(set! (-> obj head-offset) (the-as float arg2))
|
||||
)
|
||||
(('foot-offset)
|
||||
(set! (-> obj foot-offset) arg2)
|
||||
(set! (-> obj foot-offset) (the-as float arg2))
|
||||
)
|
||||
(('teleport-on-entity-change)
|
||||
(set! (-> obj teleport-on-entity-change) (the-as symbol arg2))
|
||||
@@ -793,15 +792,15 @@
|
||||
(let ((a0-122 (new 'static 'handle :process arg1 :pid arg3)))
|
||||
(when (handle->process a0-122)
|
||||
(set! (-> obj butt-handle) a0-122)
|
||||
(set! (-> obj butt-angle) arg2)
|
||||
(set! (-> obj butt-angle) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('extra-follow-height)
|
||||
(set! (-> obj extra-follow-height) arg2)
|
||||
(set! (-> obj extra-follow-height) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
obj
|
||||
)
|
||||
|
||||
(defmethod add-setting setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object))
|
||||
|
||||
@@ -170,3 +170,45 @@
|
||||
(def-mips2c light-hash-get-bucket-index (function light-hash vector int))
|
||||
|
||||
(def-mips2c add-light-sphere-to-light-group (function object object object object object))
|
||||
|
||||
;; (defun print-levels-lights ()
|
||||
;; (dotimes (level-idx (-> *level* length))
|
||||
;; (let* ((level (-> *level* level level-idx))
|
||||
;; (light-hash (-> level light-hash)))
|
||||
;; (when (and (= (-> level status) 'active)
|
||||
;; (nonzero? light-hash)
|
||||
;; (not (has-level-been-dumped-lights? (symbol->string (-> level info dbname)))))
|
||||
;; (let ((fixture (new 'stack 'file-stream "PICK\\A\\PATH\\fixture-lights.json" 'append)))
|
||||
;; (format fixture ",\"~S\":[~% " (-> level info dbname))
|
||||
;; ;; Print the lights
|
||||
;; (dotimes (i (-> light-hash num-lights))
|
||||
;; (let ((light-sphere (-> light-hash light-sphere-array i)))
|
||||
;; (format fixture
|
||||
;; "{\"name\":\"~S\",\"bsphere\":[~M,~M,~M,~M],"
|
||||
;; (-> light-sphere name)
|
||||
;; (-> light-sphere bsphere x)
|
||||
;; (-> light-sphere bsphere y)
|
||||
;; (-> light-sphere bsphere z)
|
||||
;; (-> light-sphere bsphere w))
|
||||
;; (format fixture
|
||||
;; "\"direction\":[~f,~f,~f],"
|
||||
;; (-> light-sphere direction x)
|
||||
;; (-> light-sphere direction y)
|
||||
;; (-> light-sphere direction z))
|
||||
;; (format fixture
|
||||
;; "\"color\":[~f,~f,~f,~d],"
|
||||
;; (-> light-sphere color x)
|
||||
;; (-> light-sphere color y)
|
||||
;; (-> light-sphere color z)
|
||||
;; ;; NOTE - w is actually the palette index, EVEN THOUGH it's stored in the DB as color0_a
|
||||
;; (-> light-sphere palette-index))
|
||||
;; (format fixture
|
||||
;; "\"decay_start\":~f,\"ambient-point-ratio\":~f,\"brightness\":~f}"
|
||||
;; (-> light-sphere decay-start)
|
||||
;; (-> light-sphere ambient-point-ratio)
|
||||
;; (-> light-sphere brightness)))
|
||||
;; (if (< i (dec (-> light-hash num-lights)))
|
||||
;; (format fixture ",~% ")
|
||||
;; (format fixture "~%")))
|
||||
;; (format fixture "]~%")
|
||||
;; (file-stream-close fixture))))))
|
||||
|
||||
@@ -323,10 +323,17 @@ otherwise, add the [[drawable-region-sphere]] to `region-start-prim-list` and in
|
||||
(bucket-id debug2)
|
||||
(-> obj data points)
|
||||
(the-as int (-> obj data num-points))
|
||||
(#if PC_PORT (if *debug-region-color-alt* (static-rgba #x00 #xff #x00 #x80) (new 'static 'rgba :r #xff :g #xff :a #x80))
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x80))
|
||||
(#if PC_PORT (if *debug-region-color-alt* (static-rgba #xff #x00 #xff #x80) (new 'static 'rgba :r #xff :a #x80))
|
||||
(new 'static 'rgba :r #xff :a #x80))
|
||||
;; tone down the opacity of the boundary so you aren't blinded / can actually stand a chance at reading the text
|
||||
(#if PC_PORT
|
||||
(if *debug-region-color-alt*
|
||||
(static-rgba #x00 #xff #x00 #x30)
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x30))
|
||||
(new 'static 'rgba :r #xff :g #xff :a #x30))
|
||||
(#if PC_PORT
|
||||
(if *debug-region-color-alt*
|
||||
(static-rgba #xff #x00 #xff #x30)
|
||||
(new 'static 'rgba :r #xff :a #x30))
|
||||
(new 'static 'rgba :r #xff :a #x30))
|
||||
0
|
||||
)
|
||||
0
|
||||
@@ -652,7 +659,7 @@ otherwise, add the [[drawable-region-sphere]] to `region-start-prim-list` and in
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs drawable-region-prim.
|
||||
(defun region-prim-lookup-by-id ((arg0 int) (arg1 symbol) (arg2 symbol))
|
||||
(defun region-prim-lookup-by-id ((arg0 int) (arg1 symbol) (arg2 int))
|
||||
(let ((v1-0 -1))
|
||||
(dotimes (a3-0 (-> *level* length))
|
||||
(let ((t0-3 (-> *level* level a3-0)))
|
||||
@@ -715,3 +722,109 @@ otherwise, add the [[drawable-region-sphere]] to `region-start-prim-list` and in
|
||||
)
|
||||
(the-as region #f)
|
||||
)
|
||||
|
||||
(defun get-tree-for-region ((region-trees (array drawable-tree-region-prim)) (region-id uint))
|
||||
(when (nonzero? region-trees)
|
||||
(let* ((s3-5 (-> region-trees length))
|
||||
(tree-i 0)
|
||||
(region-tree (-> region-trees tree-i)))
|
||||
(while (< tree-i s3-5)
|
||||
(let* ((s0-4 (-> region-tree data2 (+ (-> region-tree length) -1) length))
|
||||
(i 0)
|
||||
(region (-> (the-as drawable-inline-array-region-prim (-> region-tree data2 (+ (-> region-tree length) -1))) data i))
|
||||
)
|
||||
(while (< i s0-4)
|
||||
(when (= (-> region id) region-id)
|
||||
(return (-> region-tree name)))
|
||||
(set! i (+ i 1))
|
||||
(set! region (-> (the-as drawable-inline-array-region-prim (-> region-tree data2 (+ (-> region-tree length) -1))) data i))
|
||||
)
|
||||
)
|
||||
(+! tree-i 1)
|
||||
(set! region-tree (-> region-trees tree-i))
|
||||
)
|
||||
)
|
||||
)
|
||||
"unknown")
|
||||
|
||||
;; (defun print-levels-regions ((bypass-dedup symbol))
|
||||
;; (dotimes (level-idx (-> *level* length))
|
||||
;; (let ((level (-> *level* level level-idx)))
|
||||
;; (when (and (= (-> level status) 'active)
|
||||
;; (nonzero? (-> level bsp))
|
||||
;; (nonzero? (-> level bsp region-array))
|
||||
;; (or bypass-dedup (not (has-level-been-dumped-regions? (symbol->string (-> level info dbname))))))
|
||||
;; (let ((fixture (new 'stack 'file-stream "PICK\\A\\PATH\\fixture-regions.json" 'append)))
|
||||
;; (format fixture ",\"~S\":[~% " (-> level info dbname))
|
||||
;; ;; Print the regions
|
||||
;; (dotimes (i (-> level bsp region-array length))
|
||||
;; (let ((region (-> level bsp region-array data i)))
|
||||
;; ;; common region info:
|
||||
;; (format fixture "{\"id\": ~D, \"on-enter\": \"~S\", \"on-inside\": \"~S\", \"on-exit\": \"~S\""
|
||||
;; (-> region id)
|
||||
;; (-> region on-enter)
|
||||
;; (-> region on-inside)
|
||||
;; (-> region on-exit))
|
||||
;; ;; now print the primitive information, it's either a sphere or a volume
|
||||
;; (let ((region-prim (region-prim-lookup-by-id (the int (-> region id)) #f 0)))
|
||||
;; (when (nonzero? region-prim)
|
||||
;; (format fixture ", \"region-tree\": \"~S\"" (get-tree-for-region (-> level bsp region-trees) (-> region id)))
|
||||
;; (case (-> region-prim type)
|
||||
;; ((drawable-region-sphere)
|
||||
;; (format fixture ", \"sphere\": [~f, ~f, ~f, ~f]}"
|
||||
;; (-> (the-as drawable-region-sphere region-prim) bsphere x)
|
||||
;; (-> (the-as drawable-region-sphere region-prim) bsphere y)
|
||||
;; (-> (the-as drawable-region-sphere region-prim) bsphere z)
|
||||
;; (-> (the-as drawable-region-sphere region-prim) bsphere w)))
|
||||
;; ((drawable-region-face)
|
||||
;; ;; plane
|
||||
;; (let ((plane (the-as drawable-region-face region-prim)))
|
||||
;; (format fixture ", \"kind\": \"plane\"")
|
||||
;; (format fixture ", \"normal\": [~f, ~f, ~f, ~f]" (-> plane data normal x) (-> plane data normal y) (-> plane data normal z) (-> plane data normal w))
|
||||
;; (format fixture ", \"position\": [~f, ~f, ~f, ~f]" (-> plane bsphere x) (-> plane bsphere y) (-> plane bsphere z) (-> plane bsphere w))
|
||||
;; (if (nonzero? (-> plane data num-points))
|
||||
;; (begin
|
||||
;; (format fixture ", \"points\":[~% ")
|
||||
;; (dotimes (point-idx (-> plane data num-points))
|
||||
;; (format fixture "[~f, ~f, ~f, ~f]" (-> plane data points point-idx x) (-> plane data points point-idx y) (-> plane data points point-idx z) (-> plane data points point-idx w))
|
||||
;; (if (< point-idx (dec (-> plane data num-points)))
|
||||
;; (format fixture ",~% ")
|
||||
;; (format fixture "~%")))
|
||||
;; (format fixture "]"))
|
||||
;; (format fixture ", \"points\":[]"))
|
||||
;; (format fixture "}")))
|
||||
;; ((drawable-region-volume)
|
||||
;; ;; volume
|
||||
;; (let ((volume (the-as drawable-region-volume region-prim)))
|
||||
;; (format fixture ", \"kind\": \"face\", \"faces\": [~% ")
|
||||
;; ;; volumes are composed of multiple planes or "faces" as the editor calls them
|
||||
;; (dotimes (face-idx (-> volume faces length))
|
||||
;; (let* ((plane-base-ptr (the-as int (-> volume faces)))
|
||||
;; (plane (the-as drawable-region-face (+ plane-base-ptr (* face-idx 32) 16))))
|
||||
;; (format fixture "{\"normal\": [~f, ~f, ~f, ~f]" (-> plane data normal x) (-> plane data normal y) (-> plane data normal z) (-> plane data normal w))
|
||||
;; (format fixture ", \"position\": [~f, ~f, ~f, ~f]" (-> plane bsphere x) (-> plane bsphere y) (-> plane bsphere z) (-> plane bsphere w))
|
||||
;; (if (nonzero? (-> plane data num-points))
|
||||
;; (begin
|
||||
;; (format fixture ", \"points\":[~% ")
|
||||
;; (dotimes (point-idx (-> plane data num-points))
|
||||
;; (format fixture "[~f, ~f, ~f, ~f]" (-> plane data points point-idx x) (-> plane data points point-idx y) (-> plane data points point-idx z) (-> plane data points point-idx w))
|
||||
;; (if (< point-idx (dec (-> plane data num-points)))
|
||||
;; (format fixture ",~% ")
|
||||
;; (format fixture "~%")))
|
||||
;; (format fixture "]}"))
|
||||
;; (format fixture ", \"points\":[]"))
|
||||
;; )
|
||||
;; (if (< face-idx (dec (-> volume faces length)))
|
||||
;; (format fixture ",~% ")
|
||||
;; (format fixture "~%")))
|
||||
;; (format fixture "]}")))
|
||||
;; (else
|
||||
;; (format 0 "Unhandled region type - ~A | ID: ~D~%" (-> region-prim type) (-> region id))))
|
||||
;; )
|
||||
;; )
|
||||
;; )
|
||||
;; (if (< i (dec (-> level bsp region-array length)))
|
||||
;; (format fixture ",~% ")
|
||||
;; (format fixture "~%")))
|
||||
;; (format fixture "]~%")
|
||||
;; (file-stream-close fixture))))))
|
||||
|
||||
@@ -1952,7 +1952,7 @@
|
||||
(set! (-> v1-109 func)
|
||||
(lambda ((arg0 script-context))
|
||||
"lookup a region by number and return the region-prim."
|
||||
(region-prim-lookup-by-id (command-get-int (-> arg0 param 1) 0) #f (the-as symbol 0))
|
||||
(region-prim-lookup-by-id (command-get-int (-> arg0 param 1) 0) #f 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -216,8 +216,14 @@
|
||||
(define-extern pc-set-gfx-hack (function pc-gfx-hack symbol none))
|
||||
(define-extern pc-get-unix-timestamp (function int))
|
||||
(define-extern pc-filter-debug-string? (function string float symbol))
|
||||
(define-extern pc-treat-pad0-as-pad1 (function symbol none))
|
||||
(define-extern pc-is-imgui-visible? (function symbol))
|
||||
(define-extern pc-rand (function int))
|
||||
|
||||
;; Used to dump fixture data for the editor, re-enable end-to-end if you need it
|
||||
;; (define-extern has-level-been-dumped-lights? (function string symbol))
|
||||
;; (define-extern has-level-been-dumped-regions? (function string symbol))
|
||||
|
||||
(define-extern file-stream-open (function file-stream string symbol file-stream))
|
||||
(define-extern file-stream-close (function file-stream file-stream))
|
||||
(define-extern file-stream-length (function file-stream int))
|
||||
|
||||
@@ -669,7 +669,7 @@
|
||||
)
|
||||
|
||||
(defun string->float ((arg0 string))
|
||||
"They implemented it!"
|
||||
"They implemented it! This even supports exponential notation"
|
||||
(let ((a0-1 (-> arg0 data))
|
||||
(f0-0 0.0)
|
||||
(v1-0 #f)
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
|
||||
|
||||
(define *hires-sky* #t)
|
||||
(define *debug-region-color-alt* #f)
|
||||
(define *debug-region-color-alt* #t)
|
||||
(define *debug-region-show-bsphere* #f)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
import json
|
||||
|
||||
levels_added = set()
|
||||
level_info_sql_lines = []
|
||||
|
||||
|
||||
def convert_lights_to_sql():
|
||||
sql_lines = []
|
||||
with open("fixture-lights.json", "r", encoding="utf-8") as f:
|
||||
fixtures = json.load(f)
|
||||
for level_name, lights in fixtures.items():
|
||||
if level_name not in levels_added:
|
||||
levels_added.add(level_name)
|
||||
# since we get all the levels from the final game, the translate offset can always be 0
|
||||
level_info_sql_lines.append(
|
||||
f"INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('{level_name}', 0, 0, 0, NULL, NULL);\n"
|
||||
)
|
||||
for light in lights:
|
||||
sql_lines.append(
|
||||
f"INSERT INTO light (name, level_name, pos_x, pos_y, pos_z, r, dir_x, dir_y, dir_z, color0_r, color0_g, color0_b, color0_a, decay_start, ambient_point_ratio, brightness) VALUES ('{light['name']}', '{level_name}', {light['bsphere'][0]}, {light['bsphere'][1]}, {light['bsphere'][2]}, {light['bsphere'][3]}, {light['direction'][0]}, {light['direction'][1]}, {light['direction'][2]}, {light['color'][0]}, {light['color'][1]}, {light['color'][2]}, {light['color'][3]}, {light['decay_start']}, {light['ambient-point-ratio']}, {light['brightness']});\n"
|
||||
)
|
||||
return sql_lines
|
||||
|
||||
|
||||
lights_sql_lines = convert_lights_to_sql()
|
||||
|
||||
# write out the SQL files
|
||||
# with open("fixture-level_info.sql", "w", encoding="utf-8") as f:
|
||||
# f.writelines(level_info_sql_lines)
|
||||
|
||||
# with open("fixture-light.sql", "w", encoding="utf-8") as f:
|
||||
# f.writelines(lights_sql_lines)
|
||||
|
||||
def convert_regions_to_sql():
|
||||
sql_lines = []
|
||||
with open("fixture-regions.json", "r", encoding="utf-8") as f:
|
||||
fixtures = json.load(f)
|
||||
region_face_id = 0
|
||||
for level_name, regions in fixtures.items():
|
||||
if level_name not in levels_added:
|
||||
levels_added.add(level_name)
|
||||
# since we get all the levels from the final game, the translate offset can always be 0
|
||||
level_info_sql_lines.append(
|
||||
f"INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('{level_name}', 0, 0, 0, NULL, NULL);\n"
|
||||
)
|
||||
for region in regions:
|
||||
on_enter = region["on-enter"].replace("'", "''")
|
||||
if on_enter == "#f":
|
||||
on_enter = ""
|
||||
on_exit = region["on-exit"].replace("'", "''")
|
||||
if on_exit == "#f":
|
||||
on_exit = ""
|
||||
on_inside = region["on-inside"].replace("'", "''")
|
||||
if on_inside == "#f":
|
||||
on_inside = ""
|
||||
sql_lines.append(
|
||||
f"INSERT INTO `region` (`region_id`, `level_name`, `tree`, `on_enter`, `on_exit`, `on_inside`) values ({region['id']}, '{level_name}', '{region['region-tree']}', '{on_enter}', '{on_exit}', '{on_inside}');\n"
|
||||
)
|
||||
if "sphere" in region:
|
||||
sql_lines.append(f"INSERT INTO `region_sphere` (`region_id`, `x`, `y`, `z`, `r`) values ({region['id']}, {region['sphere'][0]}, {region['sphere'][1]}, {region['sphere'][2]}, {region['sphere'][3]});\n")
|
||||
elif region["kind"] == "face":
|
||||
for face in region["faces"]:
|
||||
sql_lines.append(
|
||||
f"INSERT INTO `region_face` (`region_face_id`, `region_id`, `kind`, `flags`, `normal_x`, `normal_y`, `normal_z`, `normal_w`, `pos_x`, `pos_y`, `pos_z`, `pos_w`) values ({region_face_id}, {region['id']}, 'face', '', {face['normal'][0]}, {face['normal'][1]}, {face['normal'][2]}, {face['normal'][3]}, {face['position'][0]}, {face['position'][1]}, {face['position'][2]}, {face['position'][3]});\n"
|
||||
)
|
||||
point_idx = 0
|
||||
for point in face['points']:
|
||||
sql_lines.append(
|
||||
f"INSERT INTO `region_point` (`region_face_id`, `idx`, `x`, `y`, `z`, `w`) values ({region_face_id}, {point_idx}, {point[0]}, {point[1]}, {point[2]}, {point[3]});\n"
|
||||
)
|
||||
point_idx += 1
|
||||
region_face_id += 1
|
||||
elif region["kind"] == "plane":
|
||||
sql_lines.append(
|
||||
f"INSERT INTO `region_face` (`region_face_id`, `region_id`, `kind`, `flags`, `normal_x`, `normal_y`, `normal_z`, `normal_w`, `pos_x`, `pos_y`, `pos_z`, `pos_w`) values ({region_face_id}, {region['id']}, 'plane', '', {region['normal'][0]}, {region['normal'][1]}, {region['normal'][2]}, {region['normal'][3]}, {region['position'][0]}, {region['position'][1]}, {region['position'][2]}, {region['position'][3]});\n"
|
||||
)
|
||||
point_idx = 0
|
||||
for point in region['points']:
|
||||
sql_lines.append(
|
||||
f"INSERT INTO `region_point` (`region_face_id`, `idx`, `x`, `y`, `z`, `w`) values ({region_face_id}, {point_idx}, {point[0]}, {point[1]}, {point[2]}, {point[3]});\n"
|
||||
)
|
||||
point_idx += 1
|
||||
region_face_id += 1
|
||||
return sql_lines
|
||||
|
||||
with open("fixture-region.sql", "w", encoding="utf-8") as f:
|
||||
f.writelines(convert_regions_to_sql())
|
||||
@@ -0,0 +1,8 @@
|
||||
const fs = require('fs');
|
||||
let data = fs.readFileSync('./fixture-regions.json', 'utf8');
|
||||
|
||||
data = data.replace(/"((?:"[^"]*"|[^"])*?)"(?=[:},])(?=(?:"[^"]*"|[^"])*$)/gm, function (m, group) {
|
||||
return '"' + group.replace(/"/g, '\\"') + '"'
|
||||
})
|
||||
|
||||
fs.writeFileSync('./fixture-regions-clean.json', data, 'utf8');
|
||||
@@ -0,0 +1,69 @@
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('prison', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('vinroom', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('ctyinda', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('ctygena', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('ctygenb', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('ctygenc', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('ctypal', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('ctysluma', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('ctyindb', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('ctyslumb', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('ctyslumc', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('ctyport', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('hiphog', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('ctyfarma', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('ctyfarmb', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('ctymarka', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('kiosk', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('ctymarkb', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('onintent', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('oracle', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('hideout', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('forexitb', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('forresca', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('forrescb', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('fordumpa', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('fordumpb', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('fordumpc', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('stadium', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('stadiumb', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('stadiumc', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('stadiumd', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('skatea', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('garage', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('palcab', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('palroof', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('palshaft', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('palent', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('throne', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('caspad', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('castle', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('casboss', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('ruins', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('atollext', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('atoll', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('sewerb', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('sewescb', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('strip', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('mountain', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('mincan', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('forest', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('drillmid', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('drill', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('drillmtn', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('drillb', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('tomba', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('tombb', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('tombc', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('tombe', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('tombd', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('tombboss', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('dig1', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('dig3a', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('consite', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('consiteb', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('underb', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('nest', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('nestb', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('halfpipe', 0, 0, 0, NULL, NULL);
|
||||
INSERT INTO level_info (name, translate_x, translate_y, translate_z, last_update, sample_point_update) VALUES ('village1', 0, 0, 0, NULL, NULL);
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -50,19 +50,16 @@
|
||||
-- delete from nav_node where
|
||||
-- delete from race_path where race='~s' and path=~d~%
|
||||
|
||||
-- TODO - some of the above are partial and the following DDL queries don't take into account the extra info the full code
|
||||
-- in context might provide. Re-evaluate when that code is fully and nicely decompiled
|
||||
|
||||
-- NOTE this is SQLite3, NOT MySQL
|
||||
|
||||
CREATE TABLE IF NOT EXISTS 'level_info' (
|
||||
'level_info_id' INTEGER,
|
||||
'name' TEXT,
|
||||
'name' TEXT UNIQUE,
|
||||
'translate_x' REAL,
|
||||
'translate_y' REAL,
|
||||
'translate_z' REAL,
|
||||
'last_update' TEXT,
|
||||
'sample_point_update' TEXT,
|
||||
'last_update' TEXT, -- never changed by the ingame editor
|
||||
'sample_point_update' TEXT, -- always set to NULL by the ingame editor
|
||||
PRIMARY KEY('level_info_id' AUTOINCREMENT)
|
||||
);
|
||||
|
||||
@@ -70,9 +67,9 @@ CREATE TABLE IF NOT EXISTS 'light' (
|
||||
'light_id' INTEGER,
|
||||
'name' TEXT,
|
||||
'level_name' TEXT,
|
||||
'pos_x' REAL,
|
||||
'pos_y' REAL,
|
||||
'pos_z' REAL,
|
||||
'pos_x' REAL, -- stored as meters
|
||||
'pos_y' REAL, -- stored as meters
|
||||
'pos_z' REAL, -- stored as meters
|
||||
'r' REAL,
|
||||
'dir_x' REAL,
|
||||
'dir_y' REAL,
|
||||
@@ -84,7 +81,85 @@ CREATE TABLE IF NOT EXISTS 'light' (
|
||||
'decay_start' REAL,
|
||||
'ambient_point_ratio' REAL,
|
||||
'brightness' REAL,
|
||||
PRIMARY KEY('light_id' AUTOINCREMENT)
|
||||
PRIMARY KEY('light_id' AUTOINCREMENT),
|
||||
FOREIGN KEY('level_name') REFERENCES 'level_info'('name')
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS 'region' (
|
||||
'region_id' INTEGER NOT NULL,
|
||||
'level_name' TEXT,
|
||||
-- Can be:
|
||||
-- target
|
||||
-- camera
|
||||
-- data
|
||||
-- water
|
||||
-- city_vis
|
||||
-- sample
|
||||
-- light
|
||||
-- entity
|
||||
'tree' TEXT,
|
||||
'on_enter' TEXT,
|
||||
'on_exit' TEXT,
|
||||
'on_inside' TEXT,
|
||||
PRIMARY KEY('region_id' AUTOINCREMENT),
|
||||
FOREIGN KEY('level_name') REFERENCES 'level_info'('name')
|
||||
);
|
||||
|
||||
-- TODO - don't know how to properly derive radius yet but it controls as you'd expect the width of the plane
|
||||
-- TODO in the game, planes are defined with 4 points but in the editor
|
||||
-- it only uses 2.
|
||||
-- Either there is a bug or the editor is wrong, as these two points define the proper plane
|
||||
-- but when it's filled in, it gets drawn on the first point, perpendicular.
|
||||
--
|
||||
-- There is a bunch of complicated vector math that converts from 2 points to 4 points, and this
|
||||
-- is probably the source of the problem.
|
||||
CREATE TABLE IF NOT EXISTS 'region_face' (
|
||||
'region_face_id' INTEGER NOT NULL,
|
||||
'region_id' INTEGER NOT NULL,
|
||||
-- Can be:
|
||||
-- plane
|
||||
-- face
|
||||
'kind' TEXT,
|
||||
-- Can be:
|
||||
-- orient (face the opposite direction of the normal)
|
||||
'flags' TEXT,
|
||||
-- 'radius' REAL, removed, radius only allows for square planes, not good enough.
|
||||
-- Added by us so that the regions can actually be displayed as they are
|
||||
-- in the final game
|
||||
'normal_x' REAL,
|
||||
'normal_y' REAL,
|
||||
'normal_z' REAL,
|
||||
'normal_w' REAL,
|
||||
'pos_x' REAL,
|
||||
'pos_y' REAL,
|
||||
'pos_z' REAL,
|
||||
'pos_w' REAL,
|
||||
FOREIGN KEY('region_id') REFERENCES 'region'('region_id'),
|
||||
PRIMARY KEY('region_face_id' AUTOINCREMENT)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS 'region_point' (
|
||||
'region_point_id' INTEGER,
|
||||
'region_face_id' INTEGER NOT NULL,
|
||||
'idx' INTEGER,
|
||||
'x' REAL,
|
||||
'y' REAL,
|
||||
'z' REAL,
|
||||
-- also added, doesn't hurt
|
||||
'w' REAL,
|
||||
FOREIGN KEY('region_face_id') REFERENCES 'region_face'('region_face_id'),
|
||||
PRIMARY KEY('region_point_id' AUTOINCREMENT)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS 'region_sphere' (
|
||||
'region_sphere_id' INTEGER,
|
||||
'region_id' INTEGER,
|
||||
'x' REAL,
|
||||
'y' REAL,
|
||||
'z' REAL,
|
||||
'r' REAL,
|
||||
FOREIGN KEY('region_id') REFERENCES 'region'('region_id'),
|
||||
PRIMARY KEY('region_sphere_id' AUTOINCREMENT)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS 'nav_edge' (
|
||||
@@ -149,49 +224,9 @@ CREATE TABLE IF NOT EXISTS 'race_path' (
|
||||
PRIMARY KEY('race_path_id' AUTOINCREMENT)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS 'region' (
|
||||
'region_id' INTEGER NOT NULL,
|
||||
'level_name' TEXT,
|
||||
'flags' NUMERIC,
|
||||
'tree' TEXT,
|
||||
'on_enter' TEXT,
|
||||
'on_exit' TEXT,
|
||||
'on_inside' TEXT,
|
||||
PRIMARY KEY('region_id' AUTOINCREMENT)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS 'region_face' (
|
||||
'region_face_id' INTEGER NOT NULL,
|
||||
'region_id' INTEGER NOT NULL,
|
||||
'idx' INTEGER,
|
||||
'kind' TEXT,
|
||||
'radius' REAL,
|
||||
FOREIGN KEY('region_id') REFERENCES 'region'('region_id'),
|
||||
PRIMARY KEY('region_face_id' AUTOINCREMENT)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS 'region_point' (
|
||||
'region_point_id' INTEGER,
|
||||
'region_face_id' INTEGER NOT NULL,
|
||||
'idx' INTEGER,
|
||||
'x' REAL,
|
||||
'y' REAL,
|
||||
'z' REAL,
|
||||
FOREIGN KEY('region_face_id') REFERENCES 'region_face'('region_face_id'),
|
||||
PRIMARY KEY('region_point_id' AUTOINCREMENT)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS 'region_sphere' (
|
||||
'region_sphere_id' INTEGER,
|
||||
'region_id' INTEGER,
|
||||
'x' REAL,
|
||||
'y' REAL,
|
||||
'z' REAL,
|
||||
'r' REAL,
|
||||
FOREIGN KEY('region_id') REFERENCES 'region'('region_id'),
|
||||
PRIMARY KEY('region_sphere_id' AUTOINCREMENT)
|
||||
);
|
||||
|
||||
-- I believe these are related to the camera tracking-spline sample points
|
||||
-- but these were all "manual" and i don't think they are stored in the level files at all
|
||||
-- though who knows, the bsp-header is not 100% filled out
|
||||
CREATE TABLE IF NOT EXISTS 'sample_point' (
|
||||
'sample_point_id' INTEGER,
|
||||
'level_info_id' INTEGER NOT NULL,
|
||||
|
||||
+17
-17
@@ -250,7 +250,7 @@
|
||||
(locked symbol :offset-assert 8)
|
||||
(id uint64 :offset-assert 16)
|
||||
(filter editable-filter :offset-assert 24)
|
||||
(tree string :offset-assert 28)
|
||||
(tree symbol :offset-assert 28)
|
||||
(level string :offset-assert 32)
|
||||
(on-enter string :offset-assert 36)
|
||||
(on-inside string :offset-assert 40)
|
||||
@@ -391,8 +391,8 @@
|
||||
(selection (array editable) :offset-assert 32)
|
||||
(filter editable-filter 2 :offset-assert 36)
|
||||
(target editable :offset-assert 44)
|
||||
(target-mode uint32 :offset-assert 48)
|
||||
(target-command basic :offset-assert 52)
|
||||
(target-mode editable-command :offset-assert 48)
|
||||
(target-command editable-command :offset-assert 52)
|
||||
(target-message string :offset-assert 56)
|
||||
(edit-plane editable-plane :offset-assert 60)
|
||||
(edit-plane-center vector :inline :offset-assert 64)
|
||||
@@ -408,12 +408,12 @@
|
||||
:flag-assert #x120000007c
|
||||
(:methods
|
||||
(new (symbol type int) _type_ 0)
|
||||
(editable-array-method-9 (_type_ editable-command editable-array) symbol :behavior editable-player 9)
|
||||
(editable-array-method-9 (_type_ editable-command mouse-info) symbol :behavior editable-player 9)
|
||||
(editable-array-method-10 (_type_ vector int) editable 10)
|
||||
(editable-array-method-11 (_type_) int 11)
|
||||
(editable-array-method-12 (_type_ editable-array) none 12)
|
||||
(editable-array-method-13 (_type_ uint basic string) none 13)
|
||||
(editable-array-method-14 (_type_ (function symbol) symbol) none 14)
|
||||
(editable-array-method-13 (_type_ editable-command editable-command string) none 13)
|
||||
(editable-array-method-14 (_type_ (function editable editable-region symbol) editable-region) (array editable) 14)
|
||||
(editable-array-method-15 (_type_ editable) none 15)
|
||||
(editable-array-method-16 (_type_) none 16)
|
||||
(editable-array-method-17 (_type_ vector vector) vector 17)
|
||||
@@ -465,7 +465,7 @@
|
||||
(set! (-> s5-0 region-lock?) #f)
|
||||
(set! (-> s5-0 move-lock?) #f)
|
||||
(set! (-> s5-0 target) #f)
|
||||
(set! (-> s5-0 target-command) (the-as basic 0))
|
||||
(set! (-> s5-0 target-command) (editable-command none))
|
||||
(set! (-> s5-0 target-message) #f)
|
||||
(set! (-> s5-0 selection)
|
||||
(the-as (array editable) ((method-of-type array new) allocation array editable arg0))
|
||||
@@ -1029,7 +1029,7 @@
|
||||
:flag-assert #x2000000028
|
||||
(:methods
|
||||
(new (symbol type editable-region) _type_ 0)
|
||||
(editable-plane-method-30 (_type_ matrix) int 30)
|
||||
(editable-plane-method-30 (_type_ (inline-array vector)) int 30)
|
||||
(editable-plane-method-31 (_type_ vector) vector 31)
|
||||
)
|
||||
)
|
||||
@@ -1118,15 +1118,15 @@
|
||||
|
||||
;; definition of type editable-player
|
||||
(deftype editable-player (process-drawable)
|
||||
((current editable-array :offset-assert 200)
|
||||
(select-command function :offset-assert 204)
|
||||
(move-command function :offset-assert 208)
|
||||
(extra-command function :offset-assert 212)
|
||||
(left-handed basic :offset-assert 216)
|
||||
(light-names basic :offset-assert 220)
|
||||
(external-cam-mode symbol :offset-assert 224)
|
||||
(command function 6 :offset-assert 228)
|
||||
(close-menu-time time-frame :offset-assert 256)
|
||||
((current editable-array :offset-assert 200)
|
||||
(select-command function :offset-assert 204)
|
||||
(move-command function :offset-assert 208)
|
||||
(extra-command function :offset-assert 212)
|
||||
(left-handed basic :offset-assert 216)
|
||||
(light-names basic :offset-assert 220)
|
||||
(external-cam-mode symbol :offset-assert 224)
|
||||
(command editable-command 6 :offset-assert 228)
|
||||
(close-menu-time time-frame :offset-assert 256)
|
||||
)
|
||||
:heap-base #x90
|
||||
:method-count-assert 22
|
||||
|
||||
+218
-199
@@ -103,65 +103,65 @@
|
||||
(+! (-> s3-0 x) f30-0)
|
||||
(+! (-> s3-0 z) f30-0)
|
||||
(set! (-> arg0 data (-> s5-0 7)) (new 'debug 'editable-point s3-0 s4-0))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as mouse-info #f))
|
||||
(select-editable! (-> arg0 data (-> s5-0 0)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 1)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 2)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 3)) #t)
|
||||
(set! (-> arg0 region) s4-0)
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as mouse-info #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as mouse-info #f))
|
||||
(select-editable! (-> arg0 data (-> s5-0 4)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 5)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 6)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 7)) #t)
|
||||
(set! (-> arg0 region) s4-0)
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command flip-side) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as mouse-info #f))
|
||||
(editable-array-method-9 arg0 (editable-command flip-side) (the-as mouse-info #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as mouse-info #f))
|
||||
(select-editable! (-> arg0 data (-> s5-0 0)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 2)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 4)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 6)) #t)
|
||||
(set! (-> arg0 region) s4-0)
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as mouse-info #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as mouse-info #f))
|
||||
(select-editable! (-> arg0 data (-> s5-0 1)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 3)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 5)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 7)) #t)
|
||||
(set! (-> arg0 region) s4-0)
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command flip-side) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as mouse-info #f))
|
||||
(editable-array-method-9 arg0 (editable-command flip-side) (the-as mouse-info #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as mouse-info #f))
|
||||
(select-editable! (-> arg0 data (-> s5-0 0)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 1)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 4)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 5)) #t)
|
||||
(set! (-> arg0 region) s4-0)
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command flip-side) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as mouse-info #f))
|
||||
(editable-array-method-9 arg0 (editable-command flip-side) (the-as mouse-info #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as mouse-info #f))
|
||||
(select-editable! (-> arg0 data (-> s5-0 2)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 3)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 6)) #t)
|
||||
(select-editable! (-> arg0 data (-> s5-0 7)) #t)
|
||||
(set! (-> arg0 region) s4-0)
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command insert-face) (the-as mouse-info #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-none) (the-as mouse-info #f))
|
||||
(set! (-> arg0 region) s4-0)
|
||||
)
|
||||
(dotimes (s4-1 8)
|
||||
(select-editable! (-> arg0 data (-> s5-0 s4-1)) #t)
|
||||
)
|
||||
)
|
||||
(editable-array-method-9 arg0 (editable-command select-current-owner) (the-as editable-array #f))
|
||||
(editable-array-method-9 arg0 (editable-command select-current-owner) (the-as mouse-info #f))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function execute-select
|
||||
(defun execute-select ((arg0 editable-array) (arg1 editable-command) (arg2 editable-array))
|
||||
(defun execute-select ((arg0 editable-array) (arg1 editable-command) (arg2 mouse-info))
|
||||
(case arg1
|
||||
(((editable-command select-none))
|
||||
(let* ((s5-1 (-> arg0 length))
|
||||
@@ -205,8 +205,8 @@
|
||||
(t9-4 (method-of-object a0-7 editable-array-method-10))
|
||||
(a1-12 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-12 x) (-> arg2 edit-plane-normal x))
|
||||
(set! (-> a1-12 y) (-> arg2 edit-plane-normal y))
|
||||
(set! (-> a1-12 x) (-> arg2 posx))
|
||||
(set! (-> a1-12 y) (-> arg2 posy))
|
||||
(set! (-> a1-12 z) 0.0)
|
||||
(set! (-> a1-12 w) 1.0)
|
||||
(let ((s4-3 (t9-4 a0-7 a1-12 0)))
|
||||
@@ -226,8 +226,8 @@
|
||||
(t9-9 (method-of-object a0-12 editable-array-method-10))
|
||||
(a1-16 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-16 x) (-> arg2 edit-plane-normal x))
|
||||
(set! (-> a1-16 y) (-> arg2 edit-plane-normal y))
|
||||
(set! (-> a1-16 x) (-> arg2 posx))
|
||||
(set! (-> a1-16 y) (-> arg2 posy))
|
||||
(set! (-> a1-16 z) 0.0)
|
||||
(set! (-> a1-16 w) 1.0)
|
||||
(let ((s5-3 (t9-9 a0-12 a1-16 1)))
|
||||
@@ -246,8 +246,8 @@
|
||||
(t9-13 (method-of-object a0-16 editable-array-method-10))
|
||||
(a1-19 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-19 x) (-> arg2 edit-plane-normal x))
|
||||
(set! (-> a1-19 y) (-> arg2 edit-plane-normal y))
|
||||
(set! (-> a1-19 x) (-> arg2 posx))
|
||||
(set! (-> a1-19 y) (-> arg2 posy))
|
||||
(set! (-> a1-19 z) 0.0)
|
||||
(set! (-> a1-19 w) 1.0)
|
||||
(let ((s4-6 (t9-13 a0-16 a1-19 0)))
|
||||
@@ -270,8 +270,8 @@
|
||||
(t9-19 (method-of-object a0-22 editable-array-method-10))
|
||||
(a1-24 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-24 x) (-> arg2 edit-plane-normal x))
|
||||
(set! (-> a1-24 y) (-> arg2 edit-plane-normal y))
|
||||
(set! (-> a1-24 x) (-> arg2 posx))
|
||||
(set! (-> a1-24 y) (-> arg2 posy))
|
||||
(set! (-> a1-24 z) 0.0)
|
||||
(set! (-> a1-24 w) 1.0)
|
||||
(let ((s4-8 (t9-19 a0-22 a1-24 0)))
|
||||
@@ -294,8 +294,8 @@
|
||||
(t9-25 (method-of-object a0-28 editable-array-method-10))
|
||||
(a1-29 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-29 x) (-> arg2 edit-plane-normal x))
|
||||
(set! (-> a1-29 y) (-> arg2 edit-plane-normal y))
|
||||
(set! (-> a1-29 x) (-> arg2 posx))
|
||||
(set! (-> a1-29 y) (-> arg2 posy))
|
||||
(set! (-> a1-29 z) 0.0)
|
||||
(set! (-> a1-29 w) 1.0)
|
||||
(let ((s4-10 (t9-25 a0-28 a1-29 0)))
|
||||
@@ -463,7 +463,7 @@
|
||||
)
|
||||
)
|
||||
(((editable-command cancel))
|
||||
(editable-array-method-13 arg0 (the-as uint 0) (the-as basic 0) (the-as string #f))
|
||||
(editable-array-method-13 arg0 (editable-command none) (editable-command none) (the-as string #f))
|
||||
)
|
||||
(((editable-command pick-target))
|
||||
(sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t))
|
||||
@@ -471,23 +471,23 @@
|
||||
(t9-41 (method-of-object a0-71 editable-array-method-10))
|
||||
(a1-58 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> a1-58 x) (-> arg2 edit-plane-normal x))
|
||||
(set! (-> a1-58 y) (-> arg2 edit-plane-normal y))
|
||||
(set! (-> a1-58 x) (-> arg2 posx))
|
||||
(set! (-> a1-58 y) (-> arg2 posy))
|
||||
(set! (-> a1-58 z) 0.0)
|
||||
(set! (-> a1-58 w) 1.0)
|
||||
(let ((v1-208 (t9-41 a0-71 a1-58 0)))
|
||||
(when v1-208
|
||||
(set! (-> arg0 target) v1-208)
|
||||
(editable-array-method-9 arg0 (the-as editable-command (-> arg0 target-command)) arg2)
|
||||
(editable-array-method-9 arg0 (-> arg0 target-command) arg2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(editable-array-method-13 arg0 (the-as uint 0) (the-as basic 0) (the-as string #f))
|
||||
(editable-array-method-13 arg0 (editable-command none) (editable-command none) (the-as string #f))
|
||||
)
|
||||
(((editable-command pick-loc) (editable-command pick-yes-no))
|
||||
(sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t))
|
||||
(editable-array-method-9 arg0 (the-as editable-command (-> arg0 target-command)) arg2)
|
||||
(editable-array-method-13 arg0 (the-as uint 0) (the-as basic 0) (the-as string #f))
|
||||
(editable-array-method-9 arg0 (-> arg0 target-command) arg2)
|
||||
(editable-array-method-13 arg0 (editable-command none) (editable-command none) (the-as string #f))
|
||||
)
|
||||
(((editable-command edit-plane-clear))
|
||||
(sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t))
|
||||
@@ -510,8 +510,8 @@
|
||||
(else
|
||||
(editable-array-method-14
|
||||
arg0
|
||||
(the-as (function symbol) (lambda ((arg0 editable)) (type? arg0 editable-plane)))
|
||||
#f
|
||||
(the-as (function editable editable-region symbol) (lambda ((arg0 editable)) (type? arg0 editable-plane)))
|
||||
(the-as editable-region #f)
|
||||
)
|
||||
(cond
|
||||
((>= (-> arg0 selection length) 1)
|
||||
@@ -519,7 +519,12 @@
|
||||
(editable-array-method-16 arg0)
|
||||
)
|
||||
(else
|
||||
(editable-array-method-13 arg0 (the-as uint 14) (the-as basic 45) "pick the plane to edit-from")
|
||||
(editable-array-method-13
|
||||
arg0
|
||||
(editable-command pick-target)
|
||||
(editable-command edit-plane-set)
|
||||
"pick the plane to edit-from"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -571,7 +576,7 @@
|
||||
|
||||
;; definition for function execute-mouse-move
|
||||
;; INFO: Used lq/sq
|
||||
(defun execute-mouse-move ((arg0 editable-array) (arg1 editable-command) (arg2 editable-array))
|
||||
(defun execute-mouse-move ((arg0 editable-array) (arg1 editable-command) (arg2 mouse-info))
|
||||
(local-vars (f0-6 float) (f0-18 float) (f0-29 float))
|
||||
(case arg1
|
||||
(((editable-command camera-tumble))
|
||||
@@ -610,14 +615,14 @@
|
||||
(set-setting! 'mouse-input 'abs #t 0)
|
||||
)
|
||||
(((editable-command drag-move-x))
|
||||
(let ((v1-25 (-> arg2 level-offset))
|
||||
(a0-12 (-> arg2 edit-plane-normal))
|
||||
(let ((v1-25 (-> arg2 pos 1))
|
||||
(a0-12 (-> arg2 pos))
|
||||
(s5-1 (new-stack-vector0))
|
||||
(s4-1 (-> *math-camera* trans))
|
||||
)
|
||||
0.0
|
||||
(let* ((f0-4 (- (-> v1-25 x) (-> a0-12 x)))
|
||||
(f1-2 (- (-> v1-25 y) (-> a0-12 y)))
|
||||
(let* ((f0-4 (- (-> v1-25 x) (-> a0-12 0 x)))
|
||||
(f1-2 (- (-> v1-25 y) (-> a0-12 0 y)))
|
||||
(f30-1 (if (< (fabs f1-2) (fabs f0-4))
|
||||
f0-4
|
||||
f1-2
|
||||
@@ -660,14 +665,14 @@
|
||||
(cleanup-selection arg0)
|
||||
)
|
||||
(((editable-command drag-move-y))
|
||||
(let ((v1-54 (-> arg2 level-offset))
|
||||
(a0-20 (-> arg2 edit-plane-normal))
|
||||
(let ((v1-54 (-> arg2 pos 1))
|
||||
(a0-20 (-> arg2 pos))
|
||||
(s5-2 (new-stack-vector0))
|
||||
(s4-2 (-> *math-camera* trans))
|
||||
)
|
||||
0.0
|
||||
(let* ((f0-16 (- (-> v1-54 x) (-> a0-20 x)))
|
||||
(f1-8 (- (-> v1-54 y) (-> a0-20 y)))
|
||||
(let* ((f0-16 (- (-> v1-54 x) (-> a0-20 0 x)))
|
||||
(f1-8 (- (-> v1-54 y) (-> a0-20 0 y)))
|
||||
(f30-2 (if (< (fabs f1-8) (fabs f0-16))
|
||||
f0-16
|
||||
f1-8
|
||||
@@ -710,14 +715,14 @@
|
||||
(cleanup-selection arg0)
|
||||
)
|
||||
(((editable-command drag-move-z))
|
||||
(let ((v1-83 (-> arg2 level-offset))
|
||||
(a0-28 (-> arg2 edit-plane-normal))
|
||||
(let ((v1-83 (-> arg2 pos 1))
|
||||
(a0-28 (-> arg2 pos))
|
||||
(s5-3 (new-stack-vector0))
|
||||
(s4-3 (-> *math-camera* trans))
|
||||
)
|
||||
0.0
|
||||
(let* ((f0-27 (- (-> v1-83 x) (-> a0-28 x)))
|
||||
(f1-15 (- (-> v1-83 y) (-> a0-28 y)))
|
||||
(let* ((f0-27 (- (-> v1-83 x) (-> a0-28 0 x)))
|
||||
(f1-15 (- (-> v1-83 y) (-> a0-28 0 y)))
|
||||
(f30-3 (if (< (fabs f1-15) (fabs f0-27))
|
||||
f0-27
|
||||
f1-15
|
||||
@@ -760,8 +765,8 @@
|
||||
(cleanup-selection arg0)
|
||||
)
|
||||
(((editable-command drag-move-xz))
|
||||
(let ((s5-4 (-> arg2 level-offset))
|
||||
(s4-4 (-> arg2 edit-plane-normal))
|
||||
(let ((s5-4 (-> arg2 pos 1))
|
||||
(s4-4 (-> arg2 pos))
|
||||
(s3-4 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s3-4 x) 0.0)
|
||||
@@ -776,7 +781,7 @@
|
||||
(while (< s0-6 s1-5)
|
||||
(when (and a0-36 (logtest? (-> a0-36 flags) (editable-flag selected)))
|
||||
(if (= (-> s2-4 w) 0.0)
|
||||
(editable-method-20 a0-36 s5-4 s4-4 s3-4 s2-4)
|
||||
(editable-method-20 a0-36 s5-4 (the-as vector s4-4) s3-4 s2-4)
|
||||
(editable-method-15 a0-36 s2-4 56)
|
||||
)
|
||||
)
|
||||
@@ -788,8 +793,8 @@
|
||||
(cleanup-selection arg0)
|
||||
)
|
||||
(((editable-command drag-move-xy))
|
||||
(let ((s5-5 (-> arg2 level-offset))
|
||||
(s4-5 (-> arg2 edit-plane-normal))
|
||||
(let ((s5-5 (-> arg2 pos 1))
|
||||
(s4-5 (-> arg2 pos))
|
||||
(s3-5 (-> *math-camera* inv-camera-rot vector 2))
|
||||
(s2-5 (new-stack-vector0))
|
||||
)
|
||||
@@ -802,7 +807,7 @@
|
||||
(while (< s0-7 s1-6)
|
||||
(when (and a0-40 (logtest? (-> a0-40 flags) (editable-flag selected)))
|
||||
(if (= (-> s2-5 w) 0.0)
|
||||
(editable-method-20 a0-40 s5-5 s4-5 s3-5 s2-5)
|
||||
(editable-method-20 a0-40 s5-5 (the-as vector s4-5) s3-5 s2-5)
|
||||
(editable-method-15 a0-40 s2-5 56)
|
||||
)
|
||||
)
|
||||
@@ -821,11 +826,11 @@
|
||||
)
|
||||
|
||||
;; definition for function execute-move
|
||||
(defun execute-move ((arg0 editable-array) (arg1 editable-command) (arg2 editable-array))
|
||||
(defun execute-move ((arg0 editable-array) (arg1 editable-command) (arg2 mouse-info))
|
||||
(case arg1
|
||||
(((editable-command drag-resize))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s4-0 x) (* 100.0 (- (-> arg2 edit-plane-normal x) (-> arg2 level-offset x))))
|
||||
(set! (-> s4-0 x) (* 100.0 (- (-> arg2 posx) (-> arg2 pos 1 x))))
|
||||
(set! (-> s4-0 y) 0.0)
|
||||
(set! (-> s4-0 z) 0.0)
|
||||
(set! (-> s4-0 w) 1.0)
|
||||
@@ -884,7 +889,7 @@
|
||||
(set! (-> arg0 region) (new 'debug 'editable-region))
|
||||
)
|
||||
(sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t))
|
||||
(let* ((a2-3 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (-> arg2 edit-plane-normal)))
|
||||
(let* ((a2-3 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (the-as vector (-> arg2 pos))))
|
||||
(s3-4 (new 'debug 'editable-sphere a2-3 2048.0 (-> arg0 region)))
|
||||
)
|
||||
(set! (-> arg0 data s4-3) s3-4)
|
||||
@@ -901,7 +906,7 @@
|
||||
(set! (-> arg0 region) (new 'debug 'editable-region))
|
||||
)
|
||||
(sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t))
|
||||
(let* ((a2-7 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (-> arg2 edit-plane-normal)))
|
||||
(let* ((a2-7 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (the-as vector (-> arg2 pos))))
|
||||
(s3-6 (new 'debug 'editable-point a2-7 (-> arg0 region)))
|
||||
)
|
||||
(set! (-> arg0 data s4-4) s3-6)
|
||||
@@ -915,7 +920,7 @@
|
||||
(let ((s4-5 (editable-array-method-11 arg0)))
|
||||
(when (>= s4-5 0)
|
||||
(sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t))
|
||||
(let* ((a2-11 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (-> arg2 edit-plane-normal)))
|
||||
(let* ((a2-11 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (the-as vector (-> arg2 pos))))
|
||||
(s3-8 (new 'debug 'editable-sample a2-11 *editable-sample-region*))
|
||||
)
|
||||
(set! (-> arg0 data s4-5) s3-8)
|
||||
@@ -941,7 +946,7 @@
|
||||
(let ((s4-7 (editable-array-method-11 arg0)))
|
||||
(when (>= s4-7 0)
|
||||
(sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t))
|
||||
(let* ((a2-18 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (-> arg2 edit-plane-normal)))
|
||||
(let* ((a2-18 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (the-as vector (-> arg2 pos))))
|
||||
(s3-13 (new 'debug 'editable-light a2-18 2048.0 *editable-light-region*))
|
||||
)
|
||||
(set! (-> arg0 data s4-7) s3-13)
|
||||
@@ -957,7 +962,7 @@
|
||||
(let ((s4-8 (editable-array-method-11 arg0)))
|
||||
(when (>= s4-8 0)
|
||||
(sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t))
|
||||
(let* ((a2-22 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (-> arg2 edit-plane-normal)))
|
||||
(let* ((a2-22 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (the-as vector (-> arg2 pos))))
|
||||
(s3-15 (new 'debug 'editable-entity a2-22 *editable-entity-region*))
|
||||
)
|
||||
(set! (-> arg0 data s4-8) s3-15)
|
||||
@@ -972,7 +977,7 @@
|
||||
(if (and (-> arg0 region) (-> arg0 region locked))
|
||||
(set! (-> arg0 region) (new 'debug 'editable-region))
|
||||
)
|
||||
(let ((a1-42 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (-> arg2 edit-plane-normal))))
|
||||
(let ((a1-42 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (the-as vector (-> arg2 pos)))))
|
||||
(insert-box arg0 a1-42)
|
||||
)
|
||||
)
|
||||
@@ -986,10 +991,10 @@
|
||||
(editable-array-method-14
|
||||
arg0
|
||||
(the-as
|
||||
(function symbol)
|
||||
(function editable editable-region symbol)
|
||||
(lambda ((arg0 editable) (arg1 symbol)) (and (type? arg0 editable-point) (= (-> arg0 region) arg1)))
|
||||
)
|
||||
(the-as symbol (-> arg0 region))
|
||||
(-> arg0 region)
|
||||
)
|
||||
(let ((s5-5 (-> arg0 selection length)))
|
||||
(cond
|
||||
@@ -1001,7 +1006,12 @@
|
||||
(+! s5-5 1)
|
||||
)
|
||||
(else
|
||||
(editable-array-method-13 arg0 (the-as uint 14) (the-as basic 33) "pick the point to complete the face")
|
||||
(editable-array-method-13
|
||||
arg0
|
||||
(editable-command pick-target)
|
||||
(editable-command insert-face)
|
||||
"pick the point to complete the face"
|
||||
)
|
||||
(return #f)
|
||||
)
|
||||
)
|
||||
@@ -1042,11 +1052,8 @@
|
||||
0
|
||||
(editable-array-method-14
|
||||
arg0
|
||||
(the-as
|
||||
(function symbol)
|
||||
(lambda ((arg0 editable) (arg1 symbol)) (and (type? arg0 editable-point) (= (-> arg0 region) arg1)))
|
||||
)
|
||||
(the-as symbol (-> arg0 region))
|
||||
(lambda ((arg0 editable) (arg1 editable-region)) (and (type? arg0 editable-point) (= (-> arg0 region) arg1)))
|
||||
(-> arg0 region)
|
||||
)
|
||||
(let ((s5-7 (-> arg0 selection length)))
|
||||
(cond
|
||||
@@ -1058,7 +1065,12 @@
|
||||
(+! s5-7 1)
|
||||
)
|
||||
(else
|
||||
(editable-array-method-13 arg0 (the-as uint 14) (the-as basic 34) "pick the point to complete the plane")
|
||||
(editable-array-method-13
|
||||
arg0
|
||||
(editable-command pick-target)
|
||||
(editable-command insert-plane)
|
||||
"pick the point to complete the plane"
|
||||
)
|
||||
(return #f)
|
||||
)
|
||||
)
|
||||
@@ -1098,7 +1110,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 9 of type editable-array
|
||||
(defmethod editable-array-method-9 editable-array ((obj editable-array) (arg0 editable-command) (arg1 editable-array))
|
||||
(defmethod editable-array-method-9 editable-array ((obj editable-array) (arg0 editable-command) (arg1 mouse-info))
|
||||
(if (execute-select obj arg0 arg1)
|
||||
(return #f)
|
||||
)
|
||||
@@ -1224,7 +1236,12 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(editable-array-method-13 obj (the-as uint 14) (the-as basic 41) "pick the editable to use the y from")
|
||||
(editable-array-method-13
|
||||
obj
|
||||
(editable-command pick-target)
|
||||
(editable-command snap-y)
|
||||
"pick the editable to use the y from"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1247,7 +1264,12 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(editable-array-method-13 obj (the-as uint 14) (the-as basic 40) "pick the editable to use the xz from")
|
||||
(editable-array-method-13
|
||||
obj
|
||||
(editable-command pick-target)
|
||||
(editable-command snap-xz)
|
||||
"pick the editable to use the xz from"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1273,7 +1295,12 @@
|
||||
(sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t))
|
||||
(if (-> obj target)
|
||||
(editable-method-21 (-> obj target) (-> obj region))
|
||||
(editable-array-method-13 obj (the-as uint 14) (the-as basic 49) "pick the editable to add to current region")
|
||||
(editable-array-method-13
|
||||
obj
|
||||
(editable-command pick-target)
|
||||
(editable-command region-add)
|
||||
"pick the editable to add to current region"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1371,7 +1398,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(editable-array-method-9 obj (editable-command update-game) (the-as editable-array #f))
|
||||
(editable-array-method-9 obj (editable-command update-game) (the-as mouse-info #f))
|
||||
)
|
||||
((= arg0 (editable-command update-game))
|
||||
(reset-light-hash *light-hash*)
|
||||
@@ -1460,21 +1487,21 @@
|
||||
*stdcon*
|
||||
"~16S~16S~16S~%"
|
||||
(editable-command->string
|
||||
(if (and (nonzero? (-> obj command 1)) (or (zero? (-> obj command 0)) (mouse-hold? left)))
|
||||
(the-as editable-command (-> obj command 1))
|
||||
(the-as editable-command (-> obj command 0))
|
||||
(if (and (nonzero? (-> obj command 1)) (or (= (-> obj command 0) (editable-command none)) (mouse-hold? left)))
|
||||
(-> obj command 1)
|
||||
(-> obj command 0)
|
||||
)
|
||||
)
|
||||
(editable-command->string
|
||||
(if (and (nonzero? (-> obj command 5)) (or (zero? (-> obj command 4)) (mouse-hold? middle)))
|
||||
(the-as editable-command (-> obj command 5))
|
||||
(the-as editable-command (-> obj command 4))
|
||||
(if (and (nonzero? (-> obj command 5)) (or (= (-> obj command 4) (editable-command none)) (mouse-hold? middle)))
|
||||
(-> obj command 5)
|
||||
(-> obj command 4)
|
||||
)
|
||||
)
|
||||
(editable-command->string
|
||||
(if (and (nonzero? (-> obj command 3)) (or (zero? (-> obj command 2)) (mouse-hold? right)))
|
||||
(the-as editable-command (-> obj command 3))
|
||||
(the-as editable-command (-> obj command 2))
|
||||
(if (and (nonzero? (-> obj command 3)) (or (= (-> obj command 2) (editable-command none)) (mouse-hold? right)))
|
||||
(-> obj command 3)
|
||||
(-> obj command 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1588,8 +1615,8 @@
|
||||
((28 27 35 29 31 32)
|
||||
(the-as object (editable-array-method-13
|
||||
(-> self current)
|
||||
(the-as uint 15)
|
||||
(the-as basic a2-1)
|
||||
(editable-command pick-loc)
|
||||
(the-as editable-command a2-1)
|
||||
"click on the point to insert at (up target, down camera)"
|
||||
)
|
||||
)
|
||||
@@ -1598,22 +1625,22 @@
|
||||
(if (not (-> self left-handed))
|
||||
(the-as object (editable-array-method-13
|
||||
(-> self current)
|
||||
(the-as uint 16)
|
||||
(the-as basic a2-1)
|
||||
(editable-command pick-yes-no)
|
||||
(the-as editable-command a2-1)
|
||||
"press x to confirm, square to cancel"
|
||||
)
|
||||
)
|
||||
(the-as object (editable-array-method-13
|
||||
(-> self current)
|
||||
(the-as uint 16)
|
||||
(the-as basic a2-1)
|
||||
(editable-command pick-yes-no)
|
||||
(the-as editable-command a2-1)
|
||||
"press down to confirm, left to cancel"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(editable-array-method-9 (-> self current) (the-as editable-command a2-1) (the-as editable-array *mouse*))
|
||||
(editable-array-method-9 (-> self current) (the-as editable-command a2-1) *mouse*)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1655,7 +1682,7 @@
|
||||
)
|
||||
(('select)
|
||||
(let ((gp-2 (-> event param 0)))
|
||||
(editable-array-method-9 (-> self current) (editable-command select-none) (the-as editable-array #f))
|
||||
(editable-array-method-9 (-> self current) (editable-command select-none) (the-as mouse-info #f))
|
||||
(let* ((s5-1 (-> self current length))
|
||||
(s4-1 0)
|
||||
(a0-36 (-> self current data s4-1))
|
||||
@@ -1874,116 +1901,116 @@
|
||||
((and (or (cpad-hold? 1 l2) (cpad-hold? 1 r2))
|
||||
(or (and (cpad-hold? 1 left) (not (-> self left-handed))) (and (cpad-hold? 1 square) (-> self left-handed)))
|
||||
)
|
||||
(set! (-> self command 0) (the-as function 48))
|
||||
(set! (-> self command 1) (the-as function 0))
|
||||
(set! (-> self command 2) (the-as function 47))
|
||||
(set! (-> self command 3) (the-as function 0))
|
||||
(set! (-> self command 4) (the-as function 49))
|
||||
(set! (-> self command 5) (the-as function 0))
|
||||
(set! (-> self command 0) (editable-command copy-region))
|
||||
(set! (-> self command 1) (editable-command none))
|
||||
(set! (-> self command 2) (editable-command delete-region))
|
||||
(set! (-> self command 3) (editable-command none))
|
||||
(set! (-> self command 4) (editable-command region-add))
|
||||
(set! (-> self command 5) (editable-command none))
|
||||
0
|
||||
)
|
||||
((and (or (cpad-hold? 1 l2) (cpad-hold? 1 r2))
|
||||
(or (and (cpad-hold? 1 right) (not (-> self left-handed))) (and (cpad-hold? 1 circle) (-> self left-handed)))
|
||||
)
|
||||
(set! (-> self command 0) (the-as function 52))
|
||||
(set! (-> self command 1) (the-as function 0))
|
||||
(set! (-> self command 2) (the-as function 36))
|
||||
(set! (-> self command 3) (the-as function 0))
|
||||
(set! (-> self command 4) (the-as function 37))
|
||||
(set! (-> self command 5) (the-as function 0))
|
||||
(set! (-> self command 0) (editable-command update-game))
|
||||
(set! (-> self command 1) (editable-command none))
|
||||
(set! (-> self command 2) (editable-command delete))
|
||||
(set! (-> self command 3) (editable-command none))
|
||||
(set! (-> self command 4) (editable-command copy))
|
||||
(set! (-> self command 5) (editable-command none))
|
||||
0
|
||||
)
|
||||
((and (or (cpad-hold? 1 l2) (cpad-hold? 1 r2))
|
||||
(or (and (cpad-hold? 1 up) (not (-> self left-handed))) (and (cpad-hold? 1 triangle) (-> self left-handed)))
|
||||
)
|
||||
(set! (-> self command 0) (the-as function 6))
|
||||
(set! (-> self command 1) (the-as function 0))
|
||||
(set! (-> self command 2) (the-as function 53))
|
||||
(set! (-> self command 3) (the-as function 0))
|
||||
(set! (-> self command 4) (the-as function 42))
|
||||
(set! (-> self command 5) (the-as function 0))
|
||||
(set! (-> self command 0) (editable-command select-none))
|
||||
(set! (-> self command 1) (editable-command none))
|
||||
(set! (-> self command 2) (editable-command print-region-info))
|
||||
(set! (-> self command 3) (editable-command none))
|
||||
(set! (-> self command 4) (editable-command flip-side))
|
||||
(set! (-> self command 5) (editable-command none))
|
||||
0
|
||||
)
|
||||
((and (or (cpad-hold? 1 l2) (cpad-hold? 1 r2))
|
||||
(or (and (cpad-hold? 1 down) (not (-> self left-handed))) (and (cpad-hold? 1 x) (-> self left-handed)))
|
||||
)
|
||||
(set! (-> self command 0) (the-as function 29))
|
||||
(set! (-> self command 1) (the-as function 0))
|
||||
(set! (-> self command 2) (the-as function 30))
|
||||
(set! (-> self command 3) (the-as function 0))
|
||||
(set! (-> self command 4) (the-as function 32))
|
||||
(set! (-> self command 5) (the-as function 0))
|
||||
(set! (-> self command 0) (editable-command insert-sample))
|
||||
(set! (-> self command 1) (editable-command none))
|
||||
(set! (-> self command 2) (editable-command insert-sample-camera))
|
||||
(set! (-> self command 3) (editable-command none))
|
||||
(set! (-> self command 4) (editable-command insert-entity))
|
||||
(set! (-> self command 5) (editable-command none))
|
||||
0
|
||||
)
|
||||
((or (cpad-hold? 1 l2) (cpad-hold? 1 r2))
|
||||
(set! (-> self command 0) (the-as function 0))
|
||||
(set! (-> self command 1) (the-as function 24))
|
||||
(set! (-> self command 2) (the-as function 0))
|
||||
(set! (-> self command 3) (the-as function 26))
|
||||
(set! (-> self command 4) (the-as function 0))
|
||||
(set! (-> self command 5) (the-as function 25))
|
||||
(set! (-> self command 0) (editable-command none))
|
||||
(set! (-> self command 1) (editable-command camera-tumble))
|
||||
(set! (-> self command 2) (editable-command none))
|
||||
(set! (-> self command 3) (editable-command camera-xz))
|
||||
(set! (-> self command 4) (editable-command none))
|
||||
(set! (-> self command 5) (editable-command camera-xy))
|
||||
)
|
||||
((and (cpad-hold? 1 up)
|
||||
(cpad-hold? 1 left)
|
||||
(or (and (cpad-hold? 1 up) (not (-> self left-handed))) (and (cpad-hold? 1 triangle) (-> self left-handed)))
|
||||
)
|
||||
(set! (-> self command 0) (the-as function 3))
|
||||
(set! (-> self command 1) (the-as function 0))
|
||||
(set! (-> self command 2) (the-as function 9))
|
||||
(set! (-> self command 3) (the-as function 0))
|
||||
(set! (-> self command 4) (the-as function 8))
|
||||
(set! (-> self command 5) (the-as function 0))
|
||||
(set! (-> self command 0) (editable-command select-one))
|
||||
(set! (-> self command 1) (editable-command none))
|
||||
(set! (-> self command 2) (editable-command select-prim))
|
||||
(set! (-> self command 3) (editable-command none))
|
||||
(set! (-> self command 4) (editable-command select-face))
|
||||
(set! (-> self command 5) (editable-command none))
|
||||
0
|
||||
)
|
||||
((or (and (cpad-hold? 1 left) (not (-> self left-handed))) (and (cpad-hold? 1 square) (-> self left-handed)))
|
||||
(set! (-> self command 0) (the-as function 0))
|
||||
(set! (-> self command 1) (the-as function 20))
|
||||
(set! (-> self command 2) (the-as function 0))
|
||||
(set! (-> self command 3) (the-as function 22))
|
||||
(set! (-> self command 4) (the-as function 0))
|
||||
(set! (-> self command 5) (the-as function 21))
|
||||
(set! (-> self command 0) (editable-command none))
|
||||
(set! (-> self command 1) (editable-command drag-move-x))
|
||||
(set! (-> self command 2) (editable-command none))
|
||||
(set! (-> self command 3) (editable-command drag-move-z))
|
||||
(set! (-> self command 4) (editable-command none))
|
||||
(set! (-> self command 5) (editable-command drag-move-y))
|
||||
)
|
||||
((or (and (cpad-hold? 1 right) (not (-> self left-handed))) (and (cpad-hold? 1 circle) (-> self left-handed)))
|
||||
(set! (-> self command 0) (the-as function 31))
|
||||
(set! (-> self command 1) (the-as function 0))
|
||||
(set! (-> self command 2) (the-as function 27))
|
||||
(set! (-> self command 3) (the-as function 0))
|
||||
(set! (-> self command 4) (the-as function 28))
|
||||
(set! (-> self command 5) (the-as function 0))
|
||||
(set! (-> self command 0) (editable-command insert-light))
|
||||
(set! (-> self command 1) (editable-command none))
|
||||
(set! (-> self command 2) (editable-command insert-sphere))
|
||||
(set! (-> self command 3) (editable-command none))
|
||||
(set! (-> self command 4) (editable-command insert-point))
|
||||
(set! (-> self command 5) (editable-command none))
|
||||
0
|
||||
)
|
||||
((or (and (cpad-hold? 1 up) (not (-> self left-handed))) (and (cpad-hold? 1 triangle) (-> self left-handed)))
|
||||
(set! (-> self command 0) (the-as function 3))
|
||||
(set! (-> self command 1) (the-as function 0))
|
||||
(set! (-> self command 2) (the-as function 4))
|
||||
(set! (-> self command 3) (the-as function 0))
|
||||
(set! (-> self command 4) (the-as function 7))
|
||||
(set! (-> self command 5) (the-as function 0))
|
||||
(set! (-> self command 0) (editable-command select-one))
|
||||
(set! (-> self command 1) (editable-command none))
|
||||
(set! (-> self command 2) (editable-command select-toggle))
|
||||
(set! (-> self command 3) (editable-command none))
|
||||
(set! (-> self command 4) (editable-command select-region))
|
||||
(set! (-> self command 5) (editable-command none))
|
||||
0
|
||||
)
|
||||
((or (and (cpad-hold? 1 down) (not (-> self left-handed))) (and (cpad-hold? 1 x) (-> self left-handed)))
|
||||
(set! (-> self command 0) (the-as function 33))
|
||||
(set! (-> self command 1) (the-as function 0))
|
||||
(set! (-> self command 2) (the-as function 35))
|
||||
(set! (-> self command 3) (the-as function 0))
|
||||
(set! (-> self command 4) (the-as function 34))
|
||||
(set! (-> self command 5) (the-as function 0))
|
||||
(set! (-> self command 0) (editable-command insert-face))
|
||||
(set! (-> self command 1) (editable-command none))
|
||||
(set! (-> self command 2) (editable-command insert-box))
|
||||
(set! (-> self command 3) (editable-command none))
|
||||
(set! (-> self command 4) (editable-command insert-plane))
|
||||
(set! (-> self command 5) (editable-command none))
|
||||
0
|
||||
)
|
||||
(else
|
||||
(set! (-> self command 0) (the-as function 0))
|
||||
(set! (-> self command 1) (the-as function 18))
|
||||
(set! (-> self command 2) (the-as function 0))
|
||||
(set! (-> self command 3) (the-as function 23))
|
||||
(set! (-> self command 4) (the-as function 0))
|
||||
(set! (-> self command 5) (the-as function 19))
|
||||
(set! (-> self command 0) (editable-command none))
|
||||
(set! (-> self command 1) (editable-command drag-move-xy))
|
||||
(set! (-> self command 2) (editable-command none))
|
||||
(set! (-> self command 3) (editable-command drag-resize))
|
||||
(set! (-> self command 4) (editable-command none))
|
||||
(set! (-> self command 5) (editable-command drag-move-xz))
|
||||
)
|
||||
)
|
||||
(case (-> self current target-mode)
|
||||
((14 15)
|
||||
(set! (-> self command 0) (the-as function (-> self current target-mode)))
|
||||
(((editable-command pick-target) (editable-command pick-loc))
|
||||
(set! (-> self command 0) (-> self current target-mode))
|
||||
)
|
||||
((16)
|
||||
(((editable-command pick-yes-no))
|
||||
(when (!= *master-mode* 'menu)
|
||||
(cond
|
||||
((not (-> self left-handed))
|
||||
@@ -1991,16 +2018,12 @@
|
||||
((cpad-hold? 1 x)
|
||||
(logclear! (-> *cpad-list* cpads 1 button0-abs 0) (pad-buttons x))
|
||||
(logclear! (-> *cpad-list* cpads 1 button0-rel 0) (pad-buttons x))
|
||||
(editable-array-method-9
|
||||
gp-0
|
||||
(the-as editable-command (-> self current target-mode))
|
||||
(the-as editable-array *mouse*)
|
||||
)
|
||||
(editable-array-method-9 gp-0 (-> self current target-mode) *mouse*)
|
||||
)
|
||||
((cpad-pressed? 1 square)
|
||||
(logclear! (-> *cpad-list* cpads 1 button0-abs 0) (pad-buttons square))
|
||||
(logclear! (-> *cpad-list* cpads 1 button0-rel 0) (pad-buttons square))
|
||||
(editable-array-method-9 gp-0 (editable-command cancel) (the-as editable-array *mouse*))
|
||||
(editable-array-method-9 gp-0 (editable-command cancel) *mouse*)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2009,16 +2032,12 @@
|
||||
((cpad-hold? 1 down)
|
||||
(logclear! (-> *cpad-list* cpads 1 button0-abs 0) (pad-buttons down))
|
||||
(logclear! (-> *cpad-list* cpads 1 button0-rel 0) (pad-buttons down))
|
||||
(editable-array-method-9
|
||||
gp-0
|
||||
(the-as editable-command (-> self current target-mode))
|
||||
(the-as editable-array *mouse*)
|
||||
)
|
||||
(editable-array-method-9 gp-0 (-> self current target-mode) *mouse*)
|
||||
)
|
||||
((cpad-pressed? 1 left)
|
||||
(logclear! (-> *cpad-list* cpads 1 button0-abs 0) (pad-buttons left))
|
||||
(logclear! (-> *cpad-list* cpads 1 button0-rel 0) (pad-buttons left))
|
||||
(editable-array-method-9 gp-0 (editable-command cancel) (the-as editable-array *mouse*))
|
||||
(editable-array-method-9 gp-0 (editable-command cancel) *mouse*)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2027,34 +2046,34 @@
|
||||
)
|
||||
)
|
||||
(if (mouse-pressed? left)
|
||||
(editable-array-method-9 gp-0 (the-as editable-command (-> self command 0)) (the-as editable-array *mouse*))
|
||||
(editable-array-method-9 gp-0 (-> self command 0) *mouse*)
|
||||
)
|
||||
(if (mouse-hold? left)
|
||||
(editable-array-method-9 gp-0 (the-as editable-command (-> self command 1)) (the-as editable-array *mouse*))
|
||||
(editable-array-method-9 gp-0 (-> self command 1) *mouse*)
|
||||
)
|
||||
(if (mouse-pressed? right)
|
||||
(editable-array-method-9 gp-0 (the-as editable-command (-> self command 2)) (the-as editable-array *mouse*))
|
||||
(editable-array-method-9 gp-0 (-> self command 2) *mouse*)
|
||||
)
|
||||
(if (mouse-hold? right)
|
||||
(editable-array-method-9 gp-0 (the-as editable-command (-> self command 3)) (the-as editable-array *mouse*))
|
||||
(editable-array-method-9 gp-0 (-> self command 3) *mouse*)
|
||||
)
|
||||
(when (mouse-pressed? middle)
|
||||
(let ((a2-11 (-> self command 4)))
|
||||
(case a2-11
|
||||
((36)
|
||||
(((editable-command delete))
|
||||
(if (not (-> self left-handed))
|
||||
(editable-array-method-13 gp-0 (the-as uint 16) a2-11 "press x to confirm, square to cancel")
|
||||
(editable-array-method-13 gp-0 (the-as uint 16) a2-11 "press down to confirm, left to cancel")
|
||||
(editable-array-method-13 gp-0 (editable-command pick-yes-no) a2-11 "press x to confirm, square to cancel")
|
||||
(editable-array-method-13 gp-0 (editable-command pick-yes-no) a2-11 "press down to confirm, left to cancel")
|
||||
)
|
||||
)
|
||||
(else
|
||||
(editable-array-method-9 gp-0 (the-as editable-command a2-11) (the-as editable-array *mouse*))
|
||||
(editable-array-method-9 gp-0 a2-11 *mouse*)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (mouse-hold? middle)
|
||||
(editable-array-method-9 gp-0 (the-as editable-command (-> self command 5)) (the-as editable-array *mouse*))
|
||||
(editable-array-method-9 gp-0 (-> self command 5) *mouse*)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2090,12 +2109,12 @@
|
||||
(set! (-> self extra-command) (the-as function 23))
|
||||
(set! (-> self left-handed) #f)
|
||||
(set! (-> self light-names) #f)
|
||||
(set! (-> self command 0) (-> self select-command))
|
||||
(set! (-> self command 1) (the-as function 0))
|
||||
(set! (-> self command 2) (the-as function 0))
|
||||
(set! (-> self command 3) (-> self extra-command))
|
||||
(set! (-> self command 4) (the-as function 0))
|
||||
(set! (-> self command 5) (-> self move-command))
|
||||
(set! (-> self command 0) (the-as editable-command (-> self select-command)))
|
||||
(set! (-> self command 1) (editable-command none))
|
||||
(set! (-> self command 2) (editable-command none))
|
||||
(set! (-> self command 3) (the-as editable-command (-> self extra-command)))
|
||||
(set! (-> self command 4) (editable-command none))
|
||||
(set! (-> self command 5) (the-as editable-command (-> self move-command)))
|
||||
(let* ((s5-0 (-> self current))
|
||||
(s4-0 (method-of-object s5-0 editable-array-method-12))
|
||||
(s3-0 (if arg0
|
||||
@@ -2131,7 +2150,7 @@
|
||||
(set! (-> self event-hook) (-> (method-of-object self idle) event))
|
||||
(set! (-> self external-cam-mode) *external-cam-mode*)
|
||||
(set! *external-cam-mode* 'pad-1)
|
||||
(editable-array-method-9 (-> self current) (editable-command update-game) (the-as editable-array #f))
|
||||
(editable-array-method-9 (-> self current) (editable-command update-game) (the-as mouse-info #f))
|
||||
(go-virtual idle)
|
||||
(none)
|
||||
)
|
||||
@@ -2163,7 +2182,7 @@
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(when (and *editable* (-> *editable* 0 current region))
|
||||
(let ((s5-0 (-> *editable* 0 current region)))
|
||||
(set! (-> s5-0 tree) (the-as string arg0))
|
||||
(set! (-> s5-0 tree) arg0)
|
||||
(set! (-> s5-0 changed) #t)
|
||||
(set! (-> s5-0 filter) (editable-region-method-12 s5-0))
|
||||
)
|
||||
@@ -2179,7 +2198,11 @@
|
||||
(defun dm-editable-flag-pick-func ((arg0 editable-flag) (arg1 debug-menu-msg))
|
||||
(when *editable*
|
||||
(let ((gp-0 (/ (the-as int arg0) 8)))
|
||||
(editable-array-method-14 (-> *editable* 0 current) true-func #f)
|
||||
(editable-array-method-14
|
||||
(-> *editable* 0 current)
|
||||
(the-as (function editable editable-region symbol) true-func)
|
||||
(the-as editable-region #f)
|
||||
)
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(let* ((v1-10 (-> *editable* 0 current length))
|
||||
(a0-2 0)
|
||||
@@ -2619,7 +2642,3 @@
|
||||
*debug-hook*
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+48
-76
@@ -16,7 +16,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 tree) (the-as string 'camera))
|
||||
(set! (-> gp-0 tree) 'camera)
|
||||
(set! (-> gp-0 on-enter) #f)
|
||||
(set! (-> gp-0 on-exit) #f)
|
||||
(set! (-> gp-0 on-inside) #f)
|
||||
@@ -1388,34 +1388,22 @@
|
||||
(transform-point-vector! gp-0 s2-0)
|
||||
(when (< 0.0 (-> gp-0 z))
|
||||
(reverse-transform-point! gp-0 s2-0 s5-0 arg0)
|
||||
(let ((s3-1 (the-as object (new 'stack-no-clear 'inline-array 'vector 6))))
|
||||
(let ((points (new 'stack-no-clear 'inline-array 'vector 6)))
|
||||
(dotimes (v1-5 6)
|
||||
(set! (-> (the-as (inline-array vector) s3-1) v1-5 quad) (the-as uint128 0))
|
||||
(set! (-> points v1-5 quad) (the-as uint128 0))
|
||||
)
|
||||
(let ((s4-1 (editable-face-method-30 obj (the-as (inline-array vector) s3-1)))
|
||||
(let ((s4-1 (editable-face-method-30 obj points))
|
||||
(s2-1 0)
|
||||
(s1-1 (vector-negate! (new 'stack-no-clear 'vector) s5-0))
|
||||
)
|
||||
(while (< (+ s2-1 2) s4-1)
|
||||
(if (or (point-in-triangle-cross
|
||||
gp-0
|
||||
s5-0
|
||||
(-> (the-as (inline-array vector) s3-1) 0)
|
||||
(-> (the-as (inline-array vector) s3-1) 1)
|
||||
(-> (the-as (inline-array vector) s3-1) 2)
|
||||
)
|
||||
(point-in-triangle-cross
|
||||
gp-0
|
||||
s1-1
|
||||
(-> (the-as (inline-array vector) s3-1) 0)
|
||||
(-> (the-as (inline-array vector) s3-1) 1)
|
||||
(-> (the-as (inline-array vector) s3-1) 2)
|
||||
)
|
||||
(if (or (point-in-triangle-cross gp-0 s5-0 (-> points 0) (-> points 1) (-> points 2))
|
||||
(point-in-triangle-cross gp-0 s1-1 (-> points 0) (-> points 1) (-> points 2))
|
||||
)
|
||||
(return (vector-vector-distance (camera-pos) gp-0))
|
||||
)
|
||||
(+! s2-1 1)
|
||||
(set! s3-1 (-> (the-as (inline-array vector) s3-1) 1))
|
||||
(set! points (the-as (inline-array vector) (-> points 1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1487,7 +1475,7 @@
|
||||
(local-vars
|
||||
(sv-208 (inline-array vector))
|
||||
(sv-216 int)
|
||||
(sv-288 (array editable-point))
|
||||
(sv-288 array)
|
||||
(sv-292 int)
|
||||
(sv-296 int)
|
||||
(sv-368 matrix)
|
||||
@@ -1567,21 +1555,18 @@
|
||||
)
|
||||
)
|
||||
(set! sv-288
|
||||
(the-as
|
||||
(array editable-point)
|
||||
((method-of-type array new)
|
||||
(the-as symbol (new 'stack-no-clear 'array 'editable-point 6))
|
||||
array
|
||||
editable-point
|
||||
6
|
||||
)
|
||||
)
|
||||
((method-of-type array new)
|
||||
(the-as symbol (new 'stack-no-clear 'array 'editable-point 6))
|
||||
array
|
||||
editable-point
|
||||
6
|
||||
)
|
||||
)
|
||||
(set! sv-292 (+ (-> obj length) -1))
|
||||
(set! sv-296 1)
|
||||
(editable-face-method-31 obj (-> obj normal))
|
||||
(dotimes (v1-85 sv-292)
|
||||
(set! (-> sv-288 v1-85) (-> obj vertex (+ v1-85 1)))
|
||||
(set! (-> (the-as (array editable-point) sv-288) v1-85) (-> obj vertex (+ v1-85 1)))
|
||||
)
|
||||
(set! sv-368 (new-stack-matrix0))
|
||||
(set! sv-372 (the-as editable-point #f))
|
||||
@@ -1602,8 +1587,8 @@
|
||||
(while (< sv-296 (-> obj length))
|
||||
(set! sv-372 (the-as editable-point #f))
|
||||
(dotimes (s5-4 sv-292)
|
||||
(when (-> sv-288 s5-4)
|
||||
(let* ((a1-27 (edit-get-trans (-> sv-288 s5-4)))
|
||||
(when (-> (the-as (array editable-point) sv-288) s5-4)
|
||||
(let* ((a1-27 (edit-get-trans (-> (the-as (array editable-point) sv-288) s5-4)))
|
||||
(a0-48 (vector-matrix*! (new 'stack-no-clear 'vector) a1-27 sv-368))
|
||||
)
|
||||
(set! sv-400 (vector-y-angle a0-48))
|
||||
@@ -1611,13 +1596,13 @@
|
||||
(cond
|
||||
(sv-380
|
||||
(when (or (not sv-372) (< sv-376 sv-400))
|
||||
(set! sv-372 (-> sv-288 s5-4))
|
||||
(set! sv-372 (-> (the-as (array editable-point) sv-288) s5-4))
|
||||
(set! sv-376 sv-400)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(when (or (not sv-372) (< sv-400 sv-376))
|
||||
(set! sv-372 (-> sv-288 s5-4))
|
||||
(set! sv-372 (-> (the-as (array editable-point) sv-288) s5-4))
|
||||
(set! sv-376 sv-400)
|
||||
)
|
||||
)
|
||||
@@ -1626,8 +1611,8 @@
|
||||
)
|
||||
(set! (-> obj vertex sv-296) sv-372)
|
||||
(dotimes (v1-137 sv-292)
|
||||
(if (= sv-372 (-> sv-288 v1-137))
|
||||
(set! (-> sv-288 v1-137) #f)
|
||||
(if (= sv-372 (-> (the-as (array editable-point) sv-288) v1-137))
|
||||
(set! (-> (the-as (array editable-point) sv-288) v1-137) #f)
|
||||
)
|
||||
)
|
||||
(set! sv-296 (+ sv-296 1))
|
||||
@@ -1792,7 +1777,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 30 of type editable-plane
|
||||
(defmethod editable-plane-method-30 editable-plane ((obj editable-plane) (arg0 matrix))
|
||||
(defmethod editable-plane-method-30 editable-plane ((obj editable-plane) (arg0 (inline-array vector)))
|
||||
(case (-> obj length)
|
||||
((2)
|
||||
(let* ((v1-2 (editable-plane-method-31 obj (new 'stack-no-clear 'vector)))
|
||||
@@ -1809,15 +1794,15 @@
|
||||
(f30-0 (-> obj radius))
|
||||
)
|
||||
(let ((v1-4 (edit-get-trans (-> obj vertex 0))))
|
||||
(vector+float*! (the-as vector (-> arg0 vector)) v1-4 s5-1 f30-0)
|
||||
(vector+float*! (the-as vector (-> arg0 vector)) (the-as vector (-> arg0 vector)) s4-1 (- f30-0))
|
||||
(vector+float*! (-> arg0 vector 1) v1-4 s5-1 (- f30-0))
|
||||
(vector+float*! (-> arg0 vector 1) (-> arg0 vector 1) s4-1 (- f30-0))
|
||||
(vector+float*! (-> arg0 vector 2) v1-4 s5-1 f30-0)
|
||||
(vector+float*! (-> arg0 vector 2) (-> arg0 vector 2) s4-1 f30-0)
|
||||
(vector+float*! (-> arg0 trans) v1-4 s5-1 (- f30-0))
|
||||
(vector+float*! (-> arg0 0) v1-4 s5-1 f30-0)
|
||||
(vector+float*! (-> arg0 0) (-> arg0 0) s4-1 (- f30-0))
|
||||
(vector+float*! (-> arg0 1) v1-4 s5-1 (- f30-0))
|
||||
(vector+float*! (-> arg0 1) (-> arg0 1) s4-1 (- f30-0))
|
||||
(vector+float*! (-> arg0 2) v1-4 s5-1 f30-0)
|
||||
(vector+float*! (-> arg0 2) (-> arg0 2) s4-1 f30-0)
|
||||
(vector+float*! (-> arg0 3) v1-4 s5-1 (- f30-0))
|
||||
)
|
||||
(vector+float*! (-> arg0 trans) (-> arg0 trans) s4-1 f30-0)
|
||||
(vector+float*! (-> arg0 3) (-> arg0 3) s4-1 f30-0)
|
||||
)
|
||||
4
|
||||
)
|
||||
@@ -1855,34 +1840,22 @@
|
||||
)
|
||||
(when (< 0.0 (-> gp-0 z))
|
||||
(reverse-transform-point! gp-0 (edit-get-trans (-> obj vertex 0)) s5-0 arg0)
|
||||
(let ((s3-1 (the-as object (new 'stack-no-clear 'matrix))))
|
||||
(let ((points (new 'stack-no-clear 'inline-array 'vector 4)))
|
||||
(dotimes (v1-6 4)
|
||||
(set! (-> (the-as (inline-array vector) s3-1) v1-6 quad) (the-as uint128 0))
|
||||
(set! (-> points v1-6 quad) (the-as uint128 0))
|
||||
)
|
||||
(let ((s4-1 (editable-plane-method-30 obj (the-as matrix s3-1)))
|
||||
(let ((s4-1 (editable-plane-method-30 obj points))
|
||||
(s2-2 0)
|
||||
(s1-2 (vector-negate! (new 'stack-no-clear 'vector) s5-0))
|
||||
)
|
||||
(while (< (+ s2-2 2) s4-1)
|
||||
(if (or (point-in-triangle-cross
|
||||
gp-0
|
||||
s5-0
|
||||
(-> (the-as (inline-array vector) s3-1) 0)
|
||||
(-> (the-as (inline-array vector) s3-1) 1)
|
||||
(-> (the-as (inline-array vector) s3-1) 2)
|
||||
)
|
||||
(point-in-triangle-cross
|
||||
gp-0
|
||||
s1-2
|
||||
(-> (the-as (inline-array vector) s3-1) 0)
|
||||
(-> (the-as (inline-array vector) s3-1) 1)
|
||||
(-> (the-as (inline-array vector) s3-1) 2)
|
||||
)
|
||||
(if (or (point-in-triangle-cross gp-0 s5-0 (-> points 0) (-> points 1) (-> points 2))
|
||||
(point-in-triangle-cross gp-0 s1-2 (-> points 0) (-> points 1) (-> points 2))
|
||||
)
|
||||
(return (vector-vector-distance (camera-pos) gp-0))
|
||||
)
|
||||
(+! s2-2 1)
|
||||
(set! s3-1 (-> (the-as (inline-array vector) s3-1) 1))
|
||||
(set! points (the-as (inline-array vector) (-> points 1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1895,9 +1868,9 @@
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-method-10 editable-plane ((obj editable-plane))
|
||||
(let ((gp-0 (new 'stack-no-clear 'matrix)))
|
||||
(let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 4)))
|
||||
(dotimes (v1-0 4)
|
||||
(set! (-> gp-0 quad v1-0) (the-as uint128 0))
|
||||
(set! (-> gp-0 v1-0 quad) (the-as uint128 0))
|
||||
)
|
||||
(let ((s4-0 (editable-plane-method-30 obj gp-0)))
|
||||
(when (>= s4-0 3)
|
||||
@@ -1912,7 +1885,7 @@
|
||||
)
|
||||
(add-debug-bound
|
||||
(bucket-id debug2)
|
||||
(the-as (inline-array vector) gp-0)
|
||||
gp-0
|
||||
s4-0
|
||||
(if (logtest? (-> obj flags) (editable-flag orient))
|
||||
(new 'static 'rgba :r #xff :a #x80)
|
||||
@@ -2065,8 +2038,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 14 of type editable-array
|
||||
;; WARN: Return type mismatch (array editable) vs none.
|
||||
(defmethod editable-array-method-14 editable-array ((obj editable-array) (arg0 (function symbol)) (arg1 symbol))
|
||||
(defmethod editable-array-method-14 editable-array ((obj editable-array) (arg0 (function editable editable-region symbol)) (arg1 editable-region))
|
||||
(let ((gp-0 (-> obj selection)))
|
||||
(set! (-> gp-0 length) 0)
|
||||
(let* ((s2-0 (-> obj length))
|
||||
@@ -2075,7 +2047,7 @@
|
||||
)
|
||||
(while (< s1-0 s2-0)
|
||||
(when (and s0-0 (logtest? (-> s0-0 flags) (editable-flag selected)))
|
||||
(when (arg0)
|
||||
(when (arg0 s0-0 arg1)
|
||||
(set! (-> gp-0 (-> gp-0 length)) s0-0)
|
||||
(+! (-> gp-0 length) 1)
|
||||
)
|
||||
@@ -2084,8 +2056,8 @@
|
||||
(set! s0-0 (-> obj data s1-0))
|
||||
)
|
||||
)
|
||||
gp-0
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 15 of type editable-array
|
||||
@@ -2263,7 +2235,7 @@
|
||||
(set! sv-44 (the-as float -4095996000.0))
|
||||
(set! (-> sv-36 id) (the-as uint (string->int (-> sv-20 data s5-1))))
|
||||
(set! (-> sv-36 level) (the-as string (string->symbol (-> sv-20 data (+ s5-1 1)))))
|
||||
(set! (-> sv-36 tree) (the-as string (string->symbol (-> sv-20 data (+ s5-1 2)))))
|
||||
(set! (-> sv-36 tree) (string->symbol (-> sv-20 data (+ s5-1 2))))
|
||||
(set! (-> sv-36 on-enter) (if (string= (-> sv-20 data (+ s5-1 3)) "")
|
||||
(the-as string #f)
|
||||
(-> sv-20 data (+ s5-1 3))
|
||||
@@ -2522,14 +2494,14 @@
|
||||
)
|
||||
)
|
||||
(set! (-> *editable-light-region* changed) #f)
|
||||
(editable-array-method-9 obj (editable-command refresh-filter) (the-as editable-array #f))
|
||||
(editable-array-method-9 obj (editable-command refresh-filter) (the-as mouse-info #f))
|
||||
#t
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 13 of type editable-array
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod editable-array-method-13 editable-array ((obj editable-array) (arg0 uint) (arg1 basic) (arg2 string))
|
||||
(defmethod editable-array-method-13 editable-array ((obj editable-array) (arg0 editable-command) (arg1 editable-command) (arg2 string))
|
||||
(set! (-> obj target) #f)
|
||||
(set! (-> obj target-mode) arg0)
|
||||
(set! (-> obj target-command) arg1)
|
||||
@@ -2581,21 +2553,21 @@
|
||||
(let ((v1-4 (new 'debug 'editable-region)))
|
||||
(set! (-> v1-4 locked) #t)
|
||||
(set! (-> v1-4 changed) #f)
|
||||
(set! (-> v1-4 tree) (the-as string 'sample))
|
||||
(set! (-> v1-4 tree) 'sample)
|
||||
(set! (-> v1-4 filter) (editable-filter sample))
|
||||
(set! *editable-sample-region* v1-4)
|
||||
)
|
||||
(let ((v1-6 (new 'debug 'editable-region)))
|
||||
(set! (-> v1-6 locked) #t)
|
||||
(set! (-> v1-6 changed) #f)
|
||||
(set! (-> v1-6 tree) (the-as string 'light))
|
||||
(set! (-> v1-6 tree) 'light)
|
||||
(set! (-> v1-6 filter) (editable-filter light))
|
||||
(set! *editable-light-region* v1-6)
|
||||
)
|
||||
(let ((v0-84 (new 'debug 'editable-region)))
|
||||
(set! (-> v0-84 locked) #t)
|
||||
(set! (-> v0-84 changed) #f)
|
||||
(set! (-> v0-84 tree) (the-as string 'entity))
|
||||
(set! (-> v0-84 tree) 'entity)
|
||||
(set! (-> v0-84 filter) (editable-filter entity))
|
||||
(set! *editable-entity-region* v0-84)
|
||||
)
|
||||
|
||||
+2
-2
@@ -363,8 +363,8 @@
|
||||
:size-assert #x30c
|
||||
:flag-assert #xb0000030c
|
||||
(:methods
|
||||
(cam-setting-data-method-9 (_type_ engine engine-pers engine) cam-setting-data 9)
|
||||
(cam-setting-data-method-10 (_type_ object (pointer process) float int) none 10)
|
||||
(cam-setting-data-method-9 (_type_ engine engine-pers engine) _type_ 9)
|
||||
(cam-setting-data-method-10 (_type_ object (pointer process) object int) _type_ 10)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
+35
-36
@@ -484,7 +484,7 @@
|
||||
obj
|
||||
(-> s3-0 param 0)
|
||||
(the-as (pointer process) (-> s3-0 param 1))
|
||||
(the-as float (-> s3-0 param 2))
|
||||
(-> s3-0 param 2)
|
||||
(the-as int (-> s3-0 param 3))
|
||||
)
|
||||
(set! s3-0 (-> s3-0 next))
|
||||
@@ -504,7 +504,7 @@
|
||||
obj
|
||||
s1-0
|
||||
(the-as (pointer process) (-> (the-as connection s3-1) param1))
|
||||
(the-as float (-> (the-as connection s3-1) param2))
|
||||
(-> (the-as connection s3-1) param2)
|
||||
(-> (the-as connection s3-1) param3)
|
||||
)
|
||||
)
|
||||
@@ -514,7 +514,7 @@
|
||||
obj
|
||||
s1-0
|
||||
(the-as (pointer process) (-> (the-as connection s3-1) param1))
|
||||
(the-as float (-> (the-as connection s3-1) param2))
|
||||
(-> (the-as connection s3-1) param2)
|
||||
(-> (the-as connection s3-1) param3)
|
||||
)
|
||||
)
|
||||
@@ -532,7 +532,7 @@
|
||||
obj
|
||||
(-> (the-as connection v1-21) param0)
|
||||
(the-as (pointer process) (-> (the-as connection v1-21) param1))
|
||||
(the-as float (-> (the-as connection v1-21) param2))
|
||||
(-> (the-as connection v1-21) param2)
|
||||
(-> (the-as connection v1-21) param3)
|
||||
)
|
||||
(set! v1-21 s4-1)
|
||||
@@ -544,13 +544,12 @@
|
||||
|
||||
;; definition for method 10 of type cam-setting-data
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch cam-setting-data vs none.
|
||||
(defmethod cam-setting-data-method-10 cam-setting-data ((obj cam-setting-data) (arg0 object) (arg1 (pointer process)) (arg2 float) (arg3 int))
|
||||
(defmethod cam-setting-data-method-10 cam-setting-data ((obj cam-setting-data) (arg0 object) (arg1 (pointer process)) (arg2 object) (arg3 int))
|
||||
(case arg0
|
||||
(('fov)
|
||||
(if (= arg1 'rel)
|
||||
(set! (-> obj fov) (* (-> obj fov) arg2))
|
||||
(set! (-> obj fov) arg2)
|
||||
(set! (-> obj fov) (* (-> obj fov) (the-as float arg2)))
|
||||
(set! (-> obj fov) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(('pov-handle)
|
||||
@@ -568,14 +567,14 @@
|
||||
(case arg1
|
||||
(('low)
|
||||
(if (-> obj string-max-length-default)
|
||||
(set! (-> obj string-max-length) arg2)
|
||||
(set! (-> obj string-max-length) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(('rel)
|
||||
(set! (-> obj string-max-length) (* (-> obj string-max-length) arg2))
|
||||
(set! (-> obj string-max-length) (* (-> obj string-max-length) (the-as float arg2)))
|
||||
)
|
||||
(else
|
||||
(set! (-> obj string-max-length) arg2)
|
||||
(set! (-> obj string-max-length) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(set! (-> obj string-default) #f)
|
||||
@@ -585,14 +584,14 @@
|
||||
(case arg1
|
||||
(('low)
|
||||
(if (-> obj string-min-length-default)
|
||||
(set! (-> obj string-min-length) arg2)
|
||||
(set! (-> obj string-min-length) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(('rel)
|
||||
(set! (-> obj string-min-length) (* (-> obj string-min-length) arg2))
|
||||
(set! (-> obj string-min-length) (* (-> obj string-min-length) (the-as float arg2)))
|
||||
)
|
||||
(else
|
||||
(set! (-> obj string-min-length) arg2)
|
||||
(set! (-> obj string-min-length) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(set! (-> obj string-default) #f)
|
||||
@@ -602,14 +601,14 @@
|
||||
(case arg1
|
||||
(('low)
|
||||
(if (-> obj string-max-height-default)
|
||||
(set! (-> obj string-max-height) arg2)
|
||||
(set! (-> obj string-max-height) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(('rel)
|
||||
(set! (-> obj string-max-height) (* (-> obj string-max-height) arg2))
|
||||
(set! (-> obj string-max-height) (* (-> obj string-max-height) (the-as float arg2)))
|
||||
)
|
||||
(else
|
||||
(set! (-> obj string-max-height) arg2)
|
||||
(set! (-> obj string-max-height) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(set! (-> obj string-default) #f)
|
||||
@@ -619,32 +618,32 @@
|
||||
(case arg1
|
||||
(('low)
|
||||
(if (-> obj string-min-height-default)
|
||||
(set! (-> obj string-min-height) arg2)
|
||||
(set! (-> obj string-min-height) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(('rel)
|
||||
(set! (-> obj string-min-height) (* (-> obj string-min-height) arg2))
|
||||
(set! (-> obj string-min-height) (* (-> obj string-min-height) (the-as float arg2)))
|
||||
)
|
||||
(else
|
||||
(set! (-> obj string-min-height) arg2)
|
||||
(set! (-> obj string-min-height) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(set! (-> obj string-default) #f)
|
||||
(set! (-> obj string-min-height-default) #f)
|
||||
)
|
||||
(('string-cliff-height)
|
||||
(set! (-> obj string-cliff-height) arg2)
|
||||
(set! (-> obj string-cliff-height) (the-as float arg2))
|
||||
(set! (-> obj string-default) #f)
|
||||
)
|
||||
(('string-camera-ceiling)
|
||||
(set! (-> obj string-camera-ceiling) arg2)
|
||||
(set! (-> obj string-camera-ceiling) (the-as float arg2))
|
||||
(set! (-> obj string-default) #f)
|
||||
)
|
||||
(('gun-max-height)
|
||||
(set! (-> obj gun-max-height) arg2)
|
||||
(set! (-> obj gun-max-height) (the-as float arg2))
|
||||
)
|
||||
(('gun-min-height)
|
||||
(set! (-> obj gun-min-height) arg2)
|
||||
(set! (-> obj gun-min-height) (the-as float arg2))
|
||||
)
|
||||
(('string-local-down)
|
||||
(vector-normalize-copy! (-> obj string-local-down) (the-as vector arg2) 1.0)
|
||||
@@ -672,31 +671,31 @@
|
||||
(logior! (-> obj slave-options) (cam-slave-options VERTICAL_FOLLOW_MATCHES_CAMERA))
|
||||
)
|
||||
(('matrix-blend-max-angle)
|
||||
(set! (-> obj matrix-blend-max-angle) arg2)
|
||||
(set! (-> obj matrix-blend-max-angle) (the-as float arg2))
|
||||
)
|
||||
(('matrix-blend-max-partial)
|
||||
(set! (-> obj matrix-blend-max-partial) arg2)
|
||||
(set! (-> obj matrix-blend-max-partial) (the-as float arg2))
|
||||
)
|
||||
(('string-spline-max-move-player)
|
||||
(set! (-> obj string-spline-max-move-player) arg2)
|
||||
(set! (-> obj string-spline-max-move-player) (the-as float arg2))
|
||||
)
|
||||
(('string-spline-accel)
|
||||
(set! (-> obj string-spline-accel) arg2)
|
||||
(set! (-> obj string-spline-accel) (the-as float arg2))
|
||||
)
|
||||
(('string-spline-max-move-player)
|
||||
(set! (-> obj string-spline-max-move-player) arg2)
|
||||
(set! (-> obj string-spline-max-move-player) (the-as float arg2))
|
||||
)
|
||||
(('string-spline-accel-player)
|
||||
(set! (-> obj string-spline-accel-player) arg2)
|
||||
(set! (-> obj string-spline-accel-player) (the-as float arg2))
|
||||
)
|
||||
(('target-height)
|
||||
(set! (-> obj target-height) arg2)
|
||||
(set! (-> obj target-height) (the-as float arg2))
|
||||
)
|
||||
(('head-offset)
|
||||
(set! (-> obj head-offset) arg2)
|
||||
(set! (-> obj head-offset) (the-as float arg2))
|
||||
)
|
||||
(('foot-offset)
|
||||
(set! (-> obj foot-offset) arg2)
|
||||
(set! (-> obj foot-offset) (the-as float arg2))
|
||||
)
|
||||
(('teleport-on-entity-change)
|
||||
(set! (-> obj teleport-on-entity-change) (the-as symbol arg2))
|
||||
@@ -790,15 +789,15 @@
|
||||
(let ((a0-122 (new 'static 'handle :process arg1 :pid arg3)))
|
||||
(when (handle->process a0-122)
|
||||
(set! (-> obj butt-handle) a0-122)
|
||||
(set! (-> obj butt-angle) arg2)
|
||||
(set! (-> obj butt-angle) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('extra-follow-height)
|
||||
(set! (-> obj extra-follow-height) arg2)
|
||||
(set! (-> obj extra-follow-height) (the-as float arg2))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 9 of type setting-control
|
||||
|
||||
+1
-1
@@ -669,7 +669,7 @@ otherwise, add the [[drawable-region-sphere]] to `region-start-prim-list` and in
|
||||
|
||||
;; definition for function region-prim-lookup-by-id
|
||||
;; WARN: Return type mismatch int vs drawable-region-prim.
|
||||
(defun region-prim-lookup-by-id ((arg0 int) (arg1 symbol) (arg2 symbol))
|
||||
(defun region-prim-lookup-by-id ((arg0 int) (arg1 symbol) (arg2 int))
|
||||
(let ((v1-0 -1))
|
||||
(dotimes (a3-0 (-> *level* length))
|
||||
(let ((t0-3 (-> *level* level a3-0)))
|
||||
|
||||
@@ -13,6 +13,10 @@ void add_jak1_expected_type_mismatches(Compiler& c) {
|
||||
c.add_ignored_type_definition("game-option");
|
||||
}
|
||||
|
||||
void add_jak2_expected_type_mismatches(Compiler& c) {
|
||||
c.add_ignored_type_definition("editable-plane");
|
||||
}
|
||||
|
||||
// TODO - debatably delete these now that jak 1 is complete
|
||||
TEST(Jak1TypeConsistency, MANUAL_TEST_TypeConsistencyWithBuildFirst) {
|
||||
Compiler compiler(GameVersion::Jak1);
|
||||
@@ -37,6 +41,7 @@ TEST(Jak2TypeConsistency, TypeConsistency) {
|
||||
Compiler compiler(GameVersion::Jak2);
|
||||
compiler.enable_throw_on_redefines();
|
||||
add_common_expected_type_mismatches(compiler);
|
||||
add_jak2_expected_type_mismatches(compiler);
|
||||
compiler.run_test_no_load("decompiler/config/jak2/all-types.gc");
|
||||
compiler.run_test_no_load("test/goalc/source_templates/with_game/test-build-all-code.gc");
|
||||
}
|
||||
@@ -45,6 +50,7 @@ TEST(Jak2TypeConsistency, MANUAL_TEST_TypeConsistencyWithBuildFirst) {
|
||||
Compiler compiler(GameVersion::Jak2);
|
||||
compiler.enable_throw_on_redefines();
|
||||
add_common_expected_type_mismatches(compiler);
|
||||
add_jak2_expected_type_mismatches(compiler);
|
||||
compiler.run_test_no_load("test/goalc/source_templates/with_game/test-build-all-code.gc");
|
||||
compiler.run_test_no_load("decompiler/config/jak2/all-types.gc");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user