Leaderboard


Popular Content

Showing content with the highest reputation on 11/18/2021 in Posts

  1. 1 point
    Atris uses a full body model. Anyway, ported the files below to K1 (working texture name would be P_OndSoldM101.tga) p_ondsoldm1.mdl p_ondsoldm1.mdx
  2. 1 point
    The last few updates were light on samples, so let's address that. TSL's k_inc_treasure.nss: And the reverse compiler output: And the two overlapped for comparison, with the reverse compiled script labeled as "RCScript": In some cases, the number of RCScript statements matches that of the original NWScript statements, e.g. the assignment expression statement "str = pad + str;". [An earlier post referred to RCScript statements as proto-statements, and NWScript statements as complete statements. They're all terms I made up.] In others, multiple RCScripts statements combine to form the NWScript statement. The simplest example is a variable declaration with an initializer: the initializer is an expression statement that immediately follows the declaration. A more complicated example is the iteration statement, which is followed by a jump statement. Then, the body of the iteration statement (in the example, the assignment expression statement) is placed between them. The return statement is similar, however it has a slight quirk in that it starts off as regular expression statement that gets split in two. Then a jump statement is placed in between the two pieces, with the second being the original MOVSP. The first piece is modified with a new MOVSP that removes the result of the expression and all other values on the stack in order to clear the stack before exiting the subroutine. However, the ultimate is the switch statement. It's so complicated it needs its own post. It has optional parts... The final three RCScript statements are unprintable. The first clears all variables from the stack. However, this was already dealt with in the return statement. The jump statement inserted into the return statement jumps past this MOVSP and lands on the final MOVSP. Since the stack has already been cleared, this must be clearing arguments. And then the subroutine returns. To Do: Write code to generate expressions, e.g. ADDxx becomes <operand 1> + <operand 2> Regroup RCScript statements back into NWScript statements Integrate the value stack so variables can be referenced by unique names
  3. 0 points
    Very interesting. I will be looking forward to it.