Skip to content

Commit

Permalink
Merge pull request #609 from Gh0stBlade/revert-550-EVENT_DoStackMathO…
Browse files Browse the repository at this point in the history
…peration

Revert "[EVENT]: Implement EVENT_DoStackMathOperation"
  • Loading branch information
Michael0933 authored Jan 30, 2024
2 parents f943ada + 86cda37 commit 4d8d4f7
Showing 1 changed file with 27 additions and 14 deletions.
41 changes: 27 additions & 14 deletions KAIN2/Game/EVENT.C
Original file line number Diff line number Diff line change
Expand Up @@ -2568,21 +2568,34 @@ long EVENT_CompareOperandsWithOperation(struct _PCodeStack *stack, struct StackT
}


void EVENT_DoStackMathOperation(struct _PCodeStack* stack, long operation) // Matching - 100%
{
struct StackType operand1;
struct StackType operand2;
struct StackType holdOperand;
// autogenerated function stub:
// void /*$ra*/ EVENT_DoStackMathOperation(struct _PCodeStack *stack /*$s0*/, long operation /*$a3*/)
void EVENT_DoStackMathOperation(struct _PCodeStack *stack, long operation)
{ // line 5713, offset 0x8006664c
/* begin block 1 */
// Start line: 5714
// Start offset: 0x8006664C
// Variables:
//struct StackType operand1; // stack offset -128
//struct StackType operand2; // stack offset -88

operand2 = stack->stack[--stack->topOfStack];
operand1 = stack->stack[--stack->topOfStack];
if (operand2.id == 18 || operand2.id == 22)
{
holdOperand = operand1;
operand1 = operand2;
operand2 = holdOperand;
}
EVENT_AddNumberToStack(stack, EVENT_CompareOperandsWithOperation(stack, &operand1, &operand2, operation), 0);
/* begin block 1.1 */
// Start line: 5732
// Start offset: 0x80066738
// Variables:
//struct StackType holdOperand; // stack offset -48
/* end block 1.1 */
// End offset: 0x80066804
// End Line: 5737
/* end block 1 */
// End offset: 0x80066804
// End Line: 5739

/* begin block 2 */
// Start line: 12207
/* end block 2 */
// End Line: 12208
UNIMPLEMENTED();
}

short* EVENT_ParseOpcode(struct _PCodeStack* stack, short* codeStream, long* operateOnStack) // Matching - 100%
Expand Down

0 comments on commit 4d8d4f7

Please sign in to comment.