Homebrew How do I export wii homebrew on devkitpro without a built in editor

GreyWolf

Well-Known Member
Member
Joined
Mar 2, 2015
Messages
5,399
Trophies
0
Age
54
XP
1,516
Country
United States
I just tried it with the shareware pak0.wad and it seems to work ok. The screen bounds are a bit off but it may have already been that way.
 
  • Like
Reactions: kaisersozeh

kaisersozeh

Well-Known Member
Member
Joined
Mar 21, 2018
Messages
260
Trophies
0
Location
Phobos
XP
1,054
Country
Antarctica
Ive been working on it a while, but only just able to compile it for myself. Big leap forward. As you have the code infront of you would it be cheeky to ask a question?
I'm trying to use the nunchuck Z as a modifier so I can extend an extra set of function under the wiimote buttoms.
Ive treid it using quake's command line in a config but it's not perfect. EDIT - The modifier key isn't working as at all

I was wondering if i used the input c to send a keyboard stroke instead of a joybutton from the wiimote, changing Z to an Lshiftkey press would modify a 'b' to a 'B', and i could then map those keystrokes as separate entities.
Could you describe how i could do that?
There's an onscreen keyboard in the input c too, so I was hoping i coild basically copy and paste the logic and edit it to the relvant keys...
Edit: forgot to say thank you. Thank you!
EDIT:
TO be a bit clearer - in input.c line from 510 on, there are these type of statements -
Code:
           if ((wpad_previous_keys & WPAD_BUTTON_RIGHT) != (wpad_keys & WPAD_BUTTON_RIGHT))
           {
               // Send a press event.
               Key_Event(K_RIGHTARROW, ((wpad_keys & WPAD_BUTTON_RIGHT) == WPAD_BUTTON_RIGHT));
           }

I'd like to be able to change "and the shift key is pressed, then send "K_DEL", else send "K_RIGHTARROW" " - but I have absolutely no idea of the syntax of such a thing
- i did try likely examples from the rest of the code - no joy!
bool keyboard_shifted = FALSE is defined line 60 and used in the on-screen-keyboard code - it was this variable I thought might be useful - can I use it?
If you could even just point me towards a relevant article about how I might construct the line that would be a big help
 
Last edited by kaisersozeh,

kaisersozeh

Well-Known Member
Member
Joined
Mar 21, 2018
Messages
260
Trophies
0
Location
Phobos
XP
1,054
Country
Antarctica
Yes - I've already tried that - It just says,thanks for the L_shift what do you want me to do with it?
EDIT - I think I have to work out which keypresses are active from within the code
EDIt#2 I can do it with K_ type keys - it's just that it needs to read the status of the shift key before it sends the keypress
 
Last edited by kaisersozeh,

kaisersozeh

Well-Known Member
Member
Joined
Mar 21, 2018
Messages
260
Trophies
0
Location
Phobos
XP
1,054
Country
Antarctica
How would the variable define which was sent?
WHat would that look like?
If key press and shift then A, else B - because each line is only initiated by the keypress - right?
To be clear the L_SHIFT shows up - but as an unassigned button in the interface
 
Last edited by kaisersozeh,

kaisersozeh

Well-Known Member
Member
Joined
Mar 21, 2018
Messages
260
Trophies
0
Location
Phobos
XP
1,054
Country
Antarctica
If I could send the keybaord event, rather than the character - i.e send a "d" press rather than the "d" character - would that use the shift press as a modifier key?
 

kaisersozeh

Well-Known Member
Member
Joined
Mar 21, 2018
Messages
260
Trophies
0
Location
Phobos
XP
1,054
Country
Antarctica
Im using code found here
Github oibaf66 quakegx
I think I want to change input.c:513, which sends the event if the button is pressed.
On line 394, as part of the on-screen-keyboard handling,
If (z is pressed)
osk_set=osk_shifted;
Else
Osk_set=osk_normal;
So i'd like the value of osk_set to define what keypress is sent when you hit a button.
So line 513
If keypressed and osk_set=shifted
key event altleft
If keypressed and osk_set=normal
Keyevent left
Would that be how to do it?
Tried copying the syntax from the rest of the code, &&, but just can't get it to work.
@GreyWolf
EDIT: _ i got this to compile, but didn't work as expected
replaced
Code:
       {
           if ((wpad_previous_keys & WPAD_BUTTON_LEFT) !=(wpad_keys & WPAD_BUTTON_LEFT)0
           {
               // Send a press event.
               Key_Event(K_LEFTARROW, ((wpad_keys & WPAD_BUTTON_LEFT) == WPAD_BUTTON_LEFT));
           }
with
Code:
       {
           if ((wpad_previous_keys & WPAD_BUTTON_LEFT) !=(wpad_keys & WPAD_BUTTON_LEFT) && (osk_set = osk_shifted ))
           {
               // Send a press event.
               Key_Event(K_F1, ((wpad_keys & WPAD_BUTTON_LEFT) == WPAD_BUTTON_LEFT));
           }
           if ((wpad_previous_keys & WPAD_BUTTON_LEFT) !=(wpad_keys & WPAD_BUTTON_LEFT) && (osk_set = osk_normal ))
           {
               // Send a press event.
               Key_Event(K_LEFTARROW, ((wpad_keys & WPAD_BUTTON_LEFT) == WPAD_BUTTON_LEFT));
           }
 
Last edited by kaisersozeh,

GreyWolf

Well-Known Member
Member
Joined
Mar 2, 2015
Messages
5,399
Trophies
0
Age
54
XP
1,516
Country
United States
So essentially you want the buttons to do something different when the Z button is held down? That might take a little more work like in the on-screen keyboard code.
 

kaisersozeh

Well-Known Member
Member
Joined
Mar 21, 2018
Messages
260
Trophies
0
Location
Phobos
XP
1,054
Country
Antarctica
Yes - it was a bit fingers crossed hoping the shift key would work!!
i got this to compile, but didn't work as expected
replaced
Code:
       {
           if ((wpad_previous_keys & WPAD_BUTTON_LEFT) !=(wpad_keys & WPAD_BUTTON_LEFT))
           {
               // Send a press event.
               Key_Event(K_LEFTARROW, ((wpad_keys & WPAD_BUTTON_LEFT) == WPAD_BUTTON_LEFT));
           }
with
Code:
       {
         if ((wpad_previous_keys & WPAD_BUTTON_LEFT) !=(wpad_keys & WPAD_BUTTON_LEFT) && (osk_set = osk_shifted ))
           {
               // Send a press event.
               Key_Event(K_F1, ((wpad_keys & WPAD_BUTTON_LEFT) == WPAD_BUTTON_LEFT));
           }
         if ((wpad_previous_keys & WPAD_BUTTON_LEFT) !=(wpad_keys & WPAD_BUTTON_LEFT) && (osk_set = osk_normal ))
           {
               // Send a press event.
               Key_Event(K_LEFTARROW, ((wpad_keys & WPAD_BUTTON_LEFT) == WPAD_BUTTON_LEFT));
           }
Which compiled but only showed the leftarrow press, not the F1

@fledge68 suggested this
Code:
if ((wpad_previous_keys & WPAD_BUTTON_LEFT) != (wpad_keys & WPAD_BUTTON_LEFT))
{
if(osk_set = osk_shifted )
Key_Event(K_F1, ((wpad_keys & WPAD_BUTTON_LEFT) == WPAD_BUTTON_LEFT));
else
Key_Event(K_LEFTARROW, ((wpad_keys & WPAD_BUTTON_LEFT) == WPAD_BUTTON_LEFT));
}
Which is only showing the F1, not the leftarrow
I copied and pasted across the relevant buttons and compiled
the compiler suggested
Code:
C:/sources/QuakeWiiFPS/source/src/wii/input.c:516:8: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
     if(osk_set = osk_shifted )


Any help realllly welcome
 
Last edited by kaisersozeh,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: @Xdqwerty, Its good if you have any important documents for say a business that you don't want... +1