MCPcopy Create free account
hub / github.com/N64Recomp/N64Recomp / emit_trigger_event

Method emit_trigger_event

LiveRecomp/live_generator.cpp:1936–1944  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1934}
1935
1936void N64Recomp::LiveGenerator::emit_trigger_event(uint32_t event_index) const {
1937 // Load rdram and ctx into R0 and R1.
1938 sljit_emit_op2(compiler, SLJIT_ADD, SLJIT_R0, 0, Registers::rdram, 0, SLJIT_IMM, rdram_offset);
1939 sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R1, 0, Registers::ctx, 0);
1940 // Load the global event index into R2.
1941 sljit_emit_op1(compiler, SLJIT_MOV32, SLJIT_R2, 0, SLJIT_IMM, event_index + inputs.base_event_index);
1942 // Call trigger_event.
1943 sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS3V(P,P,32), SLJIT_IMM, sljit_sw(inputs.trigger_event));
1944}
1945
1946void N64Recomp::LiveGenerator::emit_comment(const std::string& comment) const {
1947 (void)comment;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected