mirror of
https://github.com/open-goal/jak-project
synced 2026-08-18 13:53:01 -04:00
(init-vf0-vector) to make vector code a bit more readable (#494)
* decomp: Use a macro for loading VF0 (maybe should be in goal-lib.gc?) * update references * lint: format * delete now unused file
This commit is contained in:
@@ -938,11 +938,7 @@ goos::Object RLetElement::to_form_internal(const Env& env) const {
|
||||
// NOTE - initialize any relevant registers in the body first
|
||||
for (auto& reg : sorted_regs) {
|
||||
if (reg.get_kind() == Reg::RegisterKind::VF && reg.to_string() == "vf0") {
|
||||
// TODO - a good idea to move this to a macro like initialize-constant-vector! or something.
|
||||
// There could be some clever way to do this initialization that's faster that a normal static
|
||||
// load.
|
||||
rletForm.push_back(
|
||||
pretty_print::to_symbol("(.lvf vf0 (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 1.0))"));
|
||||
rletForm.push_back(pretty_print::to_symbol("(init-vf0-vector)")); // Defined in vector-h.gc
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user