BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup

Join the forum, it's quick and easy

BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup
BullyWiiHacks
Would you like to react to this message? Create an account in a few clicks or log in to continue.
BullyWiiHacks

Gaming, Modding & Programming

Important reminders:

- Click *HERE* for advanced forum search or check out the text field below on the front page for Google before posting
- NO support via private message (use the forum)
- Write meaningful topic titles
Site Translation
Latest topics
» JMaster Duel Bot: A Yu-Gi-Oh! Master Duel Bot and Trainer for Steam
How Do I Make Else-If and Nested If Statements in Gecko? EmptyYesterday at 5:26 am by Bully@WiiPlaza

» Error Injecting Drool Links Saliva Mod Menu
How Do I Make Else-If and Nested If Statements in Gecko? EmptyYesterday at 5:24 am by Bully@WiiPlaza

» USB Gecko problems with some games
How Do I Make Else-If and Nested If Statements in Gecko? Empty10/16/2024, 1:59 pm by Reclaimer Shawn

» Metal Gear Solid V The Phantom Pain X Flashpoint Batman Gameplay unedited [Seth@WiiPlaza]
How Do I Make Else-If and Nested If Statements in Gecko? Empty9/23/2024, 12:48 pm by Seth@WiiPlaza

» Dropped Out of College to Pursue Web Dev and Life Pursuits in General
How Do I Make Else-If and Nested If Statements in Gecko? Empty8/9/2024, 7:09 am by SnB@BWH

» Lego Stars Wars: The Complete Saga [RLGE64]
How Do I Make Else-If and Nested If Statements in Gecko? Empty8/1/2024, 2:04 am by Whatever_1240

» ASM <> Gecko Code Converter
How Do I Make Else-If and Nested If Statements in Gecko? Empty7/29/2024, 11:15 am by Mac11ngAround

» German With a Jackhammer
How Do I Make Else-If and Nested If Statements in Gecko? Empty7/28/2024, 3:42 pm by SnB@BWH

» Wii RAM Hacking: Pointers and ASM
How Do I Make Else-If and Nested If Statements in Gecko? Empty7/23/2024, 1:54 pm by Mac11ngAround

» IBM AIX Assembler Programming Reference - Useful For PPC ASM
How Do I Make Else-If and Nested If Statements in Gecko? Empty7/21/2024, 5:00 pm by Mac11ngAround

Search
 
 

Display results as :
 


Rechercher Advanced Search

November 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
252627282930 

Calendar Calendar

Country Statistics
Free counters!

You are not connected. Please login or register

How Do I Make Else-If and Nested If Statements in Gecko?

2 posters

Go down  Message [Page 1 of 1]

Reclaimer Shawn

Reclaimer Shawn
Code Creator

I know Gecko Codetype 20 is a 32-bit if comparison and I know 28 is a 16-bit if comparison.

Let's say I wanted to have two if statements met before exeucting a code, and otherwise, execute other code. Here's what I'm wanting to do in pseudocode:

Let X, Y, and Z be memory adresses.

Code:

If X = 0x49 and Y = 0x49 then
 Z = 0x1A1
else
 Z = 0xF9
end

Another way to represent this would be:

Code:

If X = 0x49 then
 If Y = 0x49 then
  Z = 0x1A1
 else
  Z = 0xF9
 end
else
 Z = 0xF9
end

How do I represent that in Gecko Code? I have done this properly with a C0 code that works 100% of the time, but I might be able to shorten the code if done in Gecko instead of ASM.

Bully@WiiPlaza

Bully@WiiPlaza
 
 

Pretty good question, exactly what crossed my mind before with those "simple" codetypes, so I think you can't do that...
This is rare enough that you would need to resort to ASM.
The codetypes are not a "full" programming language but they cover most use cases. Wink


_________________
How Do I Make Else-If and Nested If Statements in Gecko? YBjg74I

Reclaimer Shawn

Reclaimer Shawn
Code Creator

Bully@WiiPlaza wrote:Pretty good question, exactly what crossed my mind before with those "simple" codetypes, so I think you can't do that...
This is rare enough that you would need to resort to ASM.
The codetypes are not a "full" programming language but they cover most use cases. Wink

Honestly, if the game doesn't freeze from it, it seems that using the C0 Codetype is actually preferably than using the other Gecko Codetypes in most cases. ASM is a lot more versatile. Guess I'll just leave the basic comparisons and basic operations to Gecko codetypes and then let the rest be in ASM. Thanks for telling me it wasn't possible.

I was wanting to do a nested If-statement for a Pokemon XD code, but I already did it with a C0 codetype and released it on the forum. It's as the C0 Codetype bugfix in my Shadow Pokemon code.

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum