View Full Version : Fix for key binding annoyances.
I was fed up with the non working arrow keys and the premium menu key.
So ... i fixed it. :razz:
The arrow keys are mapped to WASD and the x,k keys are switched.
HOWTO:
Download & Unpack:
http://xcb.freedesktop.org/dist/libxcb-1.4.tar.gz
Apply diff:
Download the attachment to the src folder
patch -p0 < xcb_in.c.txt
Compile:
./configure
make
DO NOT make install !!!!!!!!
If you have problems, look here:
http://xcb.freedesktop.org/DevelopersGuide/
Run game with:
LD_PRELOAD=<folder you unpacked it in>/src/.libs/libxcb.so.1.1.0 ./rolauncher
Edit:
Maybe i will add a patch for not being able to select enemies later. DONE, see next post.
Edit:
DO NOT make install !!!!!!!!
It will mess up your linux.
Here it is, as you wished.
A fix for the "not sticking" bug when selecting Objects.
:dance:
Edit:
After some testing i found out 10 pixels is not perfect.
look for those lines
+ (ev->event_x < mouseX + 10 && ev->event_x > mouseX -10) &&
+ (ev->event_y < mouseY + 10 && ev->event_y > mouseY -10) ) {
and replace them with
+ (ev->event_x < mouseX + 20 && ev->event_x > mouseX -20) &&
+ (ev->event_y < mouseY + 20 && ev->event_y > mouseY -20) ) {
Fantastic :)
I use a slightly modified version of it to map keypad 0-9 to 0-9 on a french keyboard (since those require shift to be pressed on such keyboard).
I use ZQSD with QD = strafe, AE=rotate, but it was mandatory to use 0-9 on keypad for me, and since the left hand is on ZQSD, the right one on mouse, it's rather difficult in action.
I hope NGD will fix this in the game, here is my suggestions:
- allow to map any action to any key combo
- chat mode should be different from character control mode, allowing to map space bar to some spell.
- all mouse buttons should be useable (next/prev buttons on some mouses)
Thanks ;)
Zordak
08-31-2009, 02:53 PM
Hi,
Great work, I had a problem induced by own stupidity though:
Preloading the patched library when starting the launcher works fine - i noticed since my password contained an x...
However, when the games executable was started i got the following terminal output:
ERROR: ld.so: object './libxcb.so.1.1.0' from LD_PRELOAD cannot be preloaded: ignored.
Stupid relative paths...the game executable is in a different folder...
Z.
ps: each time i see someone talk about azerty keymaps it seems more awful to me - you have to press shift to access numbers???
ps: each time i see someone talk about azerty keymaps it seems more awful to me - you have to press shift to access numbers???
Yes. Because some often-used accentuated characters are on the same keys.
But for entering numbers there is the numpad too.
BTW, i add to drop the k/x swap since it affects chat dialog and other text entries (tekt and xeys ... ). And i configured only 1-3 (instead of 0-9) on top row, since 4 key is simple quote too .... so needed.
If NGD implement fully configurable controls, i would love to be able to use spacebar to cast a spell, in WASD mode you can hit the spacebar with thumb :)
V 0.2 is out, now with chat Mode :)
Arafails
09-01-2009, 03:46 AM
Heheh. Static variables should be declared for the function only. I promise, they'll still stay in the same place in memory if you move them there.
onemyndseye
09-01-2009, 09:53 AM
Very nice work my friend :)
With your permission and without further objection from the users here I will include a patched lib in the RO package (with the option to use it or not set in /etc/default/regnum-online).
Forgive perhaps a silly question.. what happens with you minimize RO? Do these key changes stick in other apps? If not then I think this would be a excellent option for people to have.
_dracus_
09-01-2009, 11:09 AM
Forgive perhaps a silly question.. what happens with you minimize RO? Do these key changes stick in other apps? If not then I think this would be a excellent option for people to have.
It should only work for RO according to the run command, but I may be wrong.
Those patches are obsolete, use the one here (http://www.regnumonline.com.ar/forum/showpost.php?p=797465&postcount=16) instead
V 0.2 is out, now with chat Mode :)
Nice.
But when chat mode is entered with mouse click... so when it occurs you may have k and x inverted, and Enter fails to revert to correct mode (since count is lost).
So here is my patch:
- it adds #define for each hack, each has to choose what he wants:
#define REMAP_KX 1 /* swap K and X */
#define REMAP_ARROW_KEYS 1 /* remap arrows to WSAD */
#define REMAP_AZERTY_NUMBERS 1 /* remap 0-9 on top row of keyboard to num pad (ie. french keyboard) */
#define REMAP_SPACEBAR 1 /* Allow to use space bar to cast spell 1 */
- it adds a way to revert to chat mode using the backspace, so if you have k/x inverted in chat mode, just press backspace to fix.
Additionnally, i had to patch configure.ac to be able to compile libxcb-1.4 on Ubuntu jaunty since it requires lib-proto 1.5 which is not available by default. I lowered the requirement to 1.4 and all seems to work (well, that's a hack in the hack...).
Enjoy.
Very nice solution!
I use nostromo speedpad for RO and bind all actions as i want, but it will be good if NGD realize free keys bind mapping and separate floating shotcuts pannels.
Arafails
09-01-2009, 02:23 PM
The LD_PRELOAD will only affect apps that launch it with that environment set.
Should also point out that if you do it like this (which is slightly wasteful IMO) you don't need to preload, simply set LD_LIBRARY_PATH to the .libs directory you compiled in.
Very nice solution!
I use nostromo speedpad for RO and bind all actions as i want, but it will be good if NGD realize free keys bind mapping and separate floating shotcuts pannels.
How did you configure the nostromo speedpad under Linux ?
... I will include a patched lib in the RO package ...
If you like to, do it, but i would only include the "not Sticking" patch.
The rest is based on user preference and should not be applied to all users. I will make a trimmed down version later if you need it.
_Nel_
09-03-2009, 09:18 PM
Hello Zas_
I have tried to apply your patch to my RO on Ubuntu Jaunty, but I got an error :
I have applied your patch : ro-keymap-hack-0.2-zas.patch.txt
Then I launched ./configure but have an error with xcb-proto
I have tried to applied your patch for Jaunty unsuccessfully, it still asks for xcb-proto 1.5
So I installed xcb- proto 1.5 (http://packages.ubuntu.com/karmic/xcb-proto) for Karmic
Now ./configure is ok, but it fails on make :
Failed to load the xcbgen Python package!
Make sure that xcb/proto installed it on your Python path.
If not, you will need to create a .pth file or define $PYTHONPATH
to extend the path.
Refer to the README file in xcb/proto for more info.
Traceback (most recent call last):
File "./c_client.py", line 1022, in <module>
from xcbgen.state import Module
ImportError: No module named xcbgen.state
make[1]: *** [xproto.c] Erreur 1
make[1]: quittant le répertoire « /home/regnum64/binding/libxcb-1.4/src »
make: *** [all-recursive] Erreur 1
I don't know what I have to do now. So, if you can help me, it would be nice. :beerchug:
Hello Zas_
I have tried to apply your patch to my RO on Ubuntu Jaunty, but I got an error :
I have applied your patch : ro-keymap-hack-0.2-zas.patch.txt
Then I launched ./configure but have an error with xcb-proto
I have tried to applied your patch for Jaunty unsuccessfully, it still asks for xcb-proto 1.5
If you have xcb-proto 1.4 installed, and the patch on configure.ac worked, then you have to regenerate configure script using ./autogen.sh (just run it, no option needed).
So I installed xcb- proto 1.5 (http://packages.ubuntu.com/karmic/xcb-proto) for Karmic
I didn't try.
Now ./configure is ok, but it fails on make :
Failed to load the xcbgen Python package!
Make sure that xcb/proto installed it on your Python path.
If not, you will need to create a .pth file or define $PYTHONPATH
to extend the path.
Refer to the README file in xcb/proto for more info.
Traceback (most recent call last):
File "./c_client.py", line 1022, in <module>
from xcbgen.state import Module
ImportError: No module named xcbgen.state
make[1]: *** [xproto.c] Erreur 1
make[1]: quittant le répertoire « /home/regnum64/binding/libxcb-1.4/src »
make: *** [all-recursive] Erreur 1
I don't know what I have to do now. So, if you can help me, it would be nice. :beerchug:
Try:
apt-get install python-xcbgen
After those steps it should work.
I'm using a small script to ease the launch (attached).
I improved the patch a bit (attached).
So to apply:
cd ~
wget http://xcb.freedesktop.org/dist/libxcb-1.4.tar.bz2
tar xjvf libxcb-1.4.tar.bz2
cd libxcb-1.4
patch -p1 < ~/regnum_hack_v0.5.zas.patch.txt
./autogen.sh
make
~/ro.sh
Important note: you need to modify src/hack.h to suit your needs.
2009-11-18 edit:
New version 0.5 of the hack, it adds the possibility to map
mouse buttons 8 and 9 (tested on Logitech G5) to keyboard keys.
By default, i mapped:
- spacebar to keypad 0 (same effect)
- button UP on mouse to keypad 8 (cast spell 8)
- button DOWN on mouse to keypad 9 (cast spell 9)
2009-11-23 edit:
Version 0.6 of the patch which is more clean and solve an issue
when you click on chat dialog entry instead of using enter.
You have to modify hack.h to suit your needs, especially HACK_RES_Y
and HACK_CHAT_WIDTH.
Thanks to Nel for tests and bug reports.
_Nel_
09-04-2009, 05:19 PM
Impeccable !!!
It works really fine. :thumb:
Impeccable !!!
It works really fine. :thumb:
Thanks to Eli2 :)
BTW, use Enter -> Backspace -> Enter sequence to re-activate the keyboard hack if you clicked on chat dialog, because entering in it by mouse is not counted.
I hope NGD will make this hack useless soon.
Controls should be fully configurable in-game.
onemyndseye
09-07-2009, 12:53 AM
If you like to, do it, but i would only include the "not Sticking" patch.
The rest is based on user preference and should not be applied to all users. I will make a trimmed down version later if you need it.
Sure, please do.
Just a trimmed down version of the patch would be fine.. I think is OK to include the arrow keys as well. They are dead in RO right now so even as a user preference it will not matter if you dont use them. I'll compile and test and get it included by the next update. Looking at Zas patch while it is certainly nice work is abit too much for a repo candidate...
I really must say this is excellent work from all of you - I've thought of doing this myself by havnt had the time. Not much time for RO in general lately lol, I just got a new laptop (YAAAYY!!!! No more crappy chroot hack) and have been spending my time getting it tweaked "just so"
I tried to build libxcb in debian lenny, but ./configure fails because xcb-proto is version 1.1 there and is rather old compared to 1.4, 1.5 version needed to build.
Can someone upload prebuild library if it will work or give me some hints how make this configure and build. I'm really not so good at linux stuff :)
Looking at Zas patch while it is certainly nice work is abit too much for a repo candidate...
My last patch is working well and is not that different from initial patch.
0-9 hack is specific to azerty keyboards (but really useful).
Others hacks should'nt conflict with anything.
But imho, such a hack should not be included in debian packages (imho, the thread title is wrong, this is not a true "fix").
A definitive fix should be provided by NGD for all those issues, ASAP.
onemyndseye
09-10-2009, 04:33 AM
certainy true...
However I was not clear... Im putting together a package of extra utils one of which being a script to manage the local RO data archive. .. and I am gathering other such usfull scripts/hacks/fixes to go into this package as it seems the correct place... In the main package itself? Yes I completely agree.
I did a comile after applying your patch. Works very nicely! :) The ones that concern me the most for using in this "extras" package is is things like swaping X/K since they apply to the login screen.. this will confuse some people hahaa.
However I am having seconds thoughts about including this as the part of it that is most usfull to the most number of players is the mouse fix and "should be fixed soon". And is all easy enough to apply.. what I may do instead is include a script to in Wizard form to build it and copy the needed lib to your RO directory.
Arafails
09-14-2009, 01:48 PM
Could check the contents of $_ to make sure you're running the game and not the launcher.
Angelwinged_Devil
09-28-2009, 09:11 AM
could you update main post with all the udates/upgrades?
Here is a new version of the hack, it adds the possibility to map
mouse buttons 8 and 9 (tested on Logitech G5) to keyboard keys.
By default, i mapped:
- spacebar to keypad 0 (same effect)
- button UP on mouse to keypad 8 (cast spell 8)
- button DOWN on mouse to keypad 9 (cast spell 9)
It fixes the mouse click vs enter issue.
Post with previous version was edited, the new patch is there (http://www.regnumonline.com.ar/forum/showpost.php?p=797465&postcount=16)
Plover
12-06-2009, 07:39 AM
If somebody's making a package with useful addons in the form of a preloaded library, I'd suggest adding a feature to limit fps... I wrote a small library which does this, via LD_PRELOAD, since RO would do painful things to my small laptop while playing (painful as in heat/ridiculous cpu usage).
I'd package this up nicely for others, but I"m no good at that, so I"ll just post the relevant code and a video of it working, and hopefully if someone else finds this useful they could consider adding it.
EDIT: This doesn't work with the new gfx engine. I think the problem is probably with my messing with OpenGL states
http://markhamlin.net//tempfiles/fpscontrol.ogv
#include <GL/gl.h>
#include <GL/glx.h>
#include <GL/glut.h>
#include <stdio.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xos.h>
typedef struct {
clock_t framerateClockLastTime;
unsigned int framerateClockTimeCount;
unsigned int targetFPS;
int frameSleepTime;
Display *display;
double lastIncreaseFramerateTime;
double lastDecreaseFramerateTime;
} PloverGraphics;
PloverGraphics *ploverGraphics_g;
void ploverGraphicsInit(void);
void print_string(GLuint base, char* s);
void init_font(Display *dpy,GLuint base, char* f);
void font_init(Display *dpy,char* f);
static void (*realglXSwapBuffers) (void *display,int type);
static int (*realXNextEvent) (Display *display,XEvent *event_return);
static GLuint font_base;
void ploverGraphicsInit(void) {
char path[1024];
sprintf(path,"%s/live/libs/libopengl_api.so",getenv("SCRIPT_DIR"));
void *lib;
lib = dlopen(path,RTLD_LAZY);
if (lib){
realglXSwapBuffers = dlsym(lib,"glXSwapBuffers");
dlclose(lib);
}
else {
realglXSwapBuffers = NULL;
}
lib = dlopen("/usr/lib/libX11.so",RTLD_LAZY);
if (lib){
printf("Lib opened\n");
realXNextEvent = dlsym(lib,"XNextEvent");
dlclose(lib);
}
else {
printf("/usr/lib/libX11.so failed to open!\n");
realXNextEvent = NULL;
}
ploverGraphics_g->display = NULL;
ploverGraphics_g->framerateClockLastTime = clock();
ploverGraphics_g->framerateClockTimeCount = 0;
ploverGraphics_g->frameSleepTime = 1;
ploverGraphics_g->targetFPS = 45;
ploverGraphics_g->lastIncreaseFramerateTime = 0;
ploverGraphics_g->lastDecreaseFramerateTime = 0;
}
void glXSwapBuffers( Display *dpy, GLXDrawable drawable ) {
int i;
if (!ploverGraphics_g->display){
//
// Handle some one-time initialization where you need display
//
ploverGraphics_g->display = dpy;
font_init(dpy,"-adobe-courier-bold-r-normal--24*");
}
if (!realglXSwapBuffers){
printf("libplover warning: This should not be called!\n");
return;
}
//
// Setup custom drawing
//
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glDisable(GL_LIGHTING);
glDisable(GL_TEXTURE_2D);
glShadeModel( GL_SMOOTH );
glEnable (GL_LINE_SMOOTH);
glHint (GL_LINE_SMOOTH_HINT, GL_NICEST);
glEnable (GL_BLEND);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glLoadIdentity();
glOrtho(0,1,0,1,0,1);
glTranslatef(0.0,0.0,0.0);
//
// Do custom drawing
//
double currentTime = getTime();
char swapString[256];
const GLfloat upArrow[] = {
-1.0,0.0,
1.0,0.0,
0.0,1.0,
};
char showFPS = 0;
//
// Show the up arrow...
//
if (currentTime-ploverGraphics_g->lastIncreaseFramerateTime < 1.0){
showFPS = 1;
glPushMatrix();
glTranslatef(0.5,0.8,0.0);
glScalef(0.04,0.08,1.0);
glColor4f(0.0,1.0,0.3,1.0-(currentTime-ploverGraphics_g->lastIncreaseFramerateTime));
glBegin(GL_TRIANGLES);
for (i = 0; i < 3; i++)
glVertex2f(upArrow[i*2],upArrow[i*2+1]);
glEnd();
glPopMatrix();
}
//
// Show the down arrow...
//
if (currentTime-ploverGraphics_g->lastDecreaseFramerateTime < 1.0){
showFPS = 1;
glPushMatrix();
glTranslatef(0.5,0.8,0.0);
glScalef(0.04,0.08,1.0);
glColor4f(1.0,0.0,0.3,1.0-(currentTime-ploverGraphics_g->lastDecreaseFramerateTime));
glBegin(GL_TRIANGLES);
for (i = 0; i < 3; i++)
glVertex2f(upArrow[i*2],-upArrow[i*2+1]);
glEnd();
glPopMatrix();
}
//
// Draw the target fps if it is needed
//
if (showFPS){
glPushMatrix();
glTranslatef(0.5,0.8,0.0);
glColor4f(0.0,0.0,1.0,1.0);
glRasterPos2f(0.05,0.0);
sprintf(swapString,"%d Target FPS",ploverGraphics_g->targetFPS);
print_string(font_base,swapString);
glPopMatrix();
}
//
// Done custom drawing
//
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
//
// Swap buffers; Done drawing this frame
//
realglXSwapBuffers(dpy,drawable);
//
// Put a 45FPS cap on framerate!
//
ploverGraphics_g->framerateClockTimeCount++;
if (ploverGraphics_g->framerateClockTimeCount > 10){
ploverGraphics_g->framerateClockTimeCount = 0;
clock_t now = clock();
double timePerFrame = (((double)(now-ploverGraphics_g->framerateClockLastTime))/(double)CLOCKS_PER_SEC)/(double)10.0;
ploverGraphics_g->frameSleepTime = (double)1000000.0*((double)(1.0/(double)ploverGraphics_g->targetFPS)-timePerFrame);
ploverGraphics_g->framerateClockLastTime = now;
}
if (ploverGraphics_g->frameSleepTime > 0)
usleep((unsigned int)ploverGraphics_g->frameSleepTime);
}
int XNextEvent(Display *display,XEvent *event_return) {
KeySym key;
char text[255];
int returnVal = realXNextEvent(display,event_return);
if (event_return->type == KeyPress && XLookupString(&event_return->xkey,text,255,&key,0)==1) {
if (text[0] == ']'){
ploverGraphics_g->targetFPS += 5;
ploverGraphics_g->lastIncreaseFramerateTime = getTime();
}
if (text[0] == '[' && ploverGraphics_g->targetFPS > 5){
ploverGraphics_g->targetFPS -= 5;
ploverGraphics_g->lastDecreaseFramerateTime = getTime();
}
//printf("You pressed the %c key!\n",text[0]);
}
if (event_return->type == ButtonPress) {
//printf("You pressed a button at (%i,%i)\n",event_return->xbutton.x,event_return->xbutton.y);
}
return returnVal;
}
void print_string(GLuint base, char* s)
{
if (!glIsList(font_base)) {
fprintf(stderr, "print_string(): Bad display list. - Exiting.\n");
exit (-1);
}
else if (s && strlen(s)) {
glPushAttrib(GL_LIST_BIT);
glListBase(base);
glCallLists(strlen(s), GL_UNSIGNED_BYTE, (GLubyte *)s);
glPopAttrib();
}
}
void init_font(Display *dpy,GLuint base, char* f)
{
XFontStruct* font_info;
int first;
int last;
/* Load the font. */
font_info = XLoadQueryFont(dpy, f);
if (!font_info) {
fprintf(stderr, "XLoadQueryFont() failed - Exiting.\n");
exit(-1);
}
else {
/* Tell GLX which font & glyphs to use. */
first = font_info->min_char_or_byte2;
last = font_info->max_char_or_byte2;
glXUseXFont(font_info->fid, first, last-first+1, base+first);
}
}
void font_init(Display *dpy,char* f)
{
font_base = glGenLists(256);
if (!glIsList(font_base)) {
fprintf(stderr, "my_init(): Out of display lists. - Exiting.\n");
exit (-1);
}
else {
init_font(dpy,font_base, f);
}
}
Plover
12-13-2009, 06:36 AM
I finally got the experimental client installed, and got my FPS fix working like a charm there. The change was that the OpenGL api is now located at /usr/lib/libGL.so, instead of in the ~r/regnum/live/libs/ directory. To use the above code snippet with the new client, replace the init function with the one below.
Hope this works for people! :D
void ploverGraphicsInit(void) {
void *lib;
lib = dlopen("/usr/lib/libGL.so",RTLD_LAZY);
if (lib){
realglXSwapBuffers = dlsym(lib,"glXSwapBuffers");
dlclose(lib);
}
else {
realglXSwapBuffers = NULL;
}
lib = dlopen("/usr/lib/libX11.so",RTLD_LAZY);
if (lib){
printf("Lib opened\n");
realXNextEvent = dlsym(lib,"XNextEvent");
dlclose(lib);
}
else {
printf("/usr/lib/libX11.so failed to open!\n");
realXNextEvent = NULL;
}
ploverGraphics_g->display = NULL;
ploverGraphics_g->framerateClockLastTime = clock();
ploverGraphics_g->framerateClockTimeCount = 0;
ploverGraphics_g->frameSleepTime = 1;
ploverGraphics_g->targetFPS = 45;
ploverGraphics_g->lastIncreaseFramerateTime = 0;
ploverGraphics_g->lastDecreaseFramerateTime = 0;
}
Hi Plover,
could you please give a minimal compilation and usage guide ?
Thanks :)
Plover
12-14-2009, 05:09 PM
Contained is a readme, and a launcher script. The version in this zip is for the original, client, so replace that function I previously posted to get it working on the new one.
I do realize the drawing code (and how I'm getting time, etc) ought to be made more efficient, but it's good enough for now.
http://markhamlin.net/tempfiles/libploverfps_1.zip
Usage: Launch RO using the "plauncher" (cleverly stands for ploverlauncher - i know, who would've guessed). Press ] to increase max-fps, and [ to decrease max-fps. You should see a graphic indicating what the current max(target) fps is.
linearguild
01-22-2010, 08:44 AM
Can we have this thread stickied, please?
Kianoni
01-30-2010, 01:06 AM
Contained is a readme, and a launcher script. The version in this zip is for the original, client, so replace that function I previously posted to get it working on the new one.
I do realize the drawing code (and how I'm getting time, etc) ought to be made more efficient, but it's good enough for now.
http://markhamlin.net/tempfiles/libploverfps_1.zip
Usage: Launch RO using the "plauncher" (cleverly stands for ploverlauncher - i know, who would've guessed). Press ] to increase max-fps, and [ to decrease max-fps. You should see a graphic indicating what the current max(target) fps is.
this is quite nice, just what I have been looking for - but it doesn't compile on my kubuntu 9.10
what gcc version are you using?
plover.c:1:2: warning: #import is a deprecated GCC extension
In file included from plover.c:1:
plover.h:7:2: warning: #import is a deprecated GCC extension
In file included from plover.h:7,
from plover.c:1:
plovergraphics.h:1:2: warning: #import is a deprecated GCC extension
plovergraphics.h:3:19: error: GL/gl.h: No such file or directory
plovergraphics.h:4:20: error: GL/glx.h: No such file or directory
plovergraphics.h:5:21: error: GL/glut.h: No such file or directory
plovergraphics.c:1:2: warning: #import is a deprecated GCC extension
In file included from plovergraphics.c:1:
plovergraphics.h:1:2: warning: #import is a deprecated GCC extension
In file included from plovergraphics.h:1,
from plovergraphics.c:1:
plover.h:7:2: warning: #import is a deprecated GCC extension
In file included from plovergraphics.c:1:
plovergraphics.h:3:19: error: GL/gl.h: No such file or directory
plovergraphics.h:4:20: error: GL/glx.h: No such file or directory
plovergraphics.h:5:21: error: GL/glut.h: No such file or directory
plovergraphics.c:3: error: expected ‘)’ before ‘base’
plovergraphics.c:4: error: expected declaration specifiers or ‘...’ before ‘GLuint’
plovergraphics.c:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘font_base’
plovergraphics.c:48: error: expected declaration specifiers or ‘...’ before ‘GLXDrawable’
plovergraphics.c: In function ‘glXSwapBuffers’:
plovergraphics.c:69: warning: implicit declaration of function ‘glMatrixMode’
plovergraphics.c:69: error: ‘GL_MODELVIEW’ undeclared (first use in this function)
plovergraphics.c:69: error: (Each undeclared identifier is reported only once
plovergraphics.c:69: error: for each function it appears in.)
plovergraphics.c:70: warning: implicit declaration of function ‘glPushMatrix’
plovergraphics.c:72: warning: implicit declaration of function ‘glDisable’
plovergraphics.c:72: error: ‘GL_LIGHTING’ undeclared (first use in this function)
plovergraphics.c:73: error: ‘GL_TEXTURE_2D’ undeclared (first use in this function)
plovergraphics.c:74: warning: implicit declaration of function ‘glShadeModel’
plovergraphics.c:74: error: ‘GL_SMOOTH’ undeclared (first use in this function)
plovergraphics.c:75: warning: implicit declaration of function ‘glEnable’
plovergraphics.c:75: error: ‘GL_LINE_SMOOTH’ undeclared (first use in this function)
plovergraphics.c:76: warning: implicit declaration of function ‘glHint’
plovergraphics.c:76: error: ‘GL_LINE_SMOOTH_HINT’ undeclared (first use in this function)
plovergraphics.c:76: error: ‘GL_NICEST’ undeclared (first use in this function)
plovergraphics.c:77: error: ‘GL_BLEND’ undeclared (first use in this function)
plovergraphics.c:78: warning: implicit declaration of function ‘glBlendFunc’
plovergraphics.c:78: error: ‘GL_SRC_ALPHA’ undeclared (first use in this function)
plovergraphics.c:78: error: ‘GL_ONE_MINUS_SRC_ALPHA’ undeclared (first use in this function)
plovergraphics.c:80: warning: implicit declaration of function ‘glLoadIdentity’
plovergraphics.c:81: warning: implicit declaration of function ‘glOrtho’
plovergraphics.c:82: warning: implicit declaration of function ‘glTranslatef’
plovergraphics.c:92: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘upArrow’
plovergraphics.c:92: error: ‘upArrow’ undeclared (first use in this function)
plovergraphics.c:92: error: expected expression before ‘]’ token
plovergraphics.c:110: warning: implicit declaration of function ‘glScalef’
plovergraphics.c:112: warning: implicit declaration of function ‘glColor4f’
plovergraphics.c:113: warning: implicit declaration of function ‘glBegin’
plovergraphics.c:113: error: ‘GL_TRIANGLES’ undeclared (first use in this function)
plovergraphics.c:115: warning: implicit declaration of function ‘glVertex2f’
plovergraphics.c:116: warning: implicit declaration of function ‘glEnd’
plovergraphics.c:118: warning: implicit declaration of function ‘glPopMatrix’
plovergraphics.c:150: warning: implicit declaration of function ‘glRasterPos2f’
plovergraphics.c:152: warning: implicit declaration of function ‘print_string’
plovergraphics.c:152: error: ‘font_base’ undeclared (first use in this function)
plovergraphics.c:166: error: ‘drawable’ undeclared (first use in this function)
plovergraphics.c: At top level:
plovergraphics.c:208: error: expected ‘)’ before ‘base’
plovergraphics.c:222: error: expected declaration specifiers or ‘...’ before ‘GLuint’
plovergraphics.c: In function ‘init_font’:
plovergraphics.c:238: warning: implicit declaration of function ‘glXUseXFont’
plovergraphics.c:238: error: ‘base’ undeclared (first use in this function)
plovergraphics.c: In function ‘font_init’:
plovergraphics.c:244: error: ‘font_base’ undeclared (first use in this function)
plovergraphics.c:244: warning: implicit declaration of function ‘glGenLists’
plovergraphics.c:245: warning: implicit declaration of function ‘glIsList’
plovergraphics.c:250: error: too many arguments to function ‘init_font’
I can do a makefile for this once I know all the requirements?
Znurre
02-01-2010, 11:04 AM
this is quite nice, just what I have been looking for - but it doesn't compile on my kubuntu 9.10
what gcc version are you using?
plover.c:1:2: warning: #import is a deprecated GCC extension
In file included from plover.c:1:
plover.h:7:2: warning: #import is a deprecated GCC extension
In file included from plover.h:7,
from plover.c:1:
plovergraphics.h:1:2: warning: #import is a deprecated GCC extension
plovergraphics.h:3:19: error: GL/gl.h: No such file or directory
plovergraphics.h:4:20: error: GL/glx.h: No such file or directory
plovergraphics.h:5:21: error: GL/glut.h: No such file or directory
plovergraphics.c:1:2: warning: #import is a deprecated GCC extension
In file included from plovergraphics.c:1:
plovergraphics.h:1:2: warning: #import is a deprecated GCC extension
In file included from plovergraphics.h:1,
from plovergraphics.c:1:
plover.h:7:2: warning: #import is a deprecated GCC extension
In file included from plovergraphics.c:1:
plovergraphics.h:3:19: error: GL/gl.h: No such file or directory
plovergraphics.h:4:20: error: GL/glx.h: No such file or directory
plovergraphics.h:5:21: error: GL/glut.h: No such file or directory
plovergraphics.c:3: error: expected ‘)’ before ‘base’
plovergraphics.c:4: error: expected declaration specifiers or ‘...’ before ‘GLuint’
plovergraphics.c:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘font_base’
plovergraphics.c:48: error: expected declaration specifiers or ‘...’ before ‘GLXDrawable’
plovergraphics.c: In function ‘glXSwapBuffers’:
plovergraphics.c:69: warning: implicit declaration of function ‘glMatrixMode’
plovergraphics.c:69: error: ‘GL_MODELVIEW’ undeclared (first use in this function)
plovergraphics.c:69: error: (Each undeclared identifier is reported only once
plovergraphics.c:69: error: for each function it appears in.)
plovergraphics.c:70: warning: implicit declaration of function ‘glPushMatrix’
plovergraphics.c:72: warning: implicit declaration of function ‘glDisable’
plovergraphics.c:72: error: ‘GL_LIGHTING’ undeclared (first use in this function)
plovergraphics.c:73: error: ‘GL_TEXTURE_2D’ undeclared (first use in this function)
plovergraphics.c:74: warning: implicit declaration of function ‘glShadeModel’
plovergraphics.c:74: error: ‘GL_SMOOTH’ undeclared (first use in this function)
plovergraphics.c:75: warning: implicit declaration of function ‘glEnable’
plovergraphics.c:75: error: ‘GL_LINE_SMOOTH’ undeclared (first use in this function)
plovergraphics.c:76: warning: implicit declaration of function ‘glHint’
plovergraphics.c:76: error: ‘GL_LINE_SMOOTH_HINT’ undeclared (first use in this function)
plovergraphics.c:76: error: ‘GL_NICEST’ undeclared (first use in this function)
plovergraphics.c:77: error: ‘GL_BLEND’ undeclared (first use in this function)
plovergraphics.c:78: warning: implicit declaration of function ‘glBlendFunc’
plovergraphics.c:78: error: ‘GL_SRC_ALPHA’ undeclared (first use in this function)
plovergraphics.c:78: error: ‘GL_ONE_MINUS_SRC_ALPHA’ undeclared (first use in this function)
plovergraphics.c:80: warning: implicit declaration of function ‘glLoadIdentity’
plovergraphics.c:81: warning: implicit declaration of function ‘glOrtho’
plovergraphics.c:82: warning: implicit declaration of function ‘glTranslatef’
plovergraphics.c:92: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘upArrow’
plovergraphics.c:92: error: ‘upArrow’ undeclared (first use in this function)
plovergraphics.c:92: error: expected expression before ‘]’ token
plovergraphics.c:110: warning: implicit declaration of function ‘glScalef’
plovergraphics.c:112: warning: implicit declaration of function ‘glColor4f’
plovergraphics.c:113: warning: implicit declaration of function ‘glBegin’
plovergraphics.c:113: error: ‘GL_TRIANGLES’ undeclared (first use in this function)
plovergraphics.c:115: warning: implicit declaration of function ‘glVertex2f’
plovergraphics.c:116: warning: implicit declaration of function ‘glEnd’
plovergraphics.c:118: warning: implicit declaration of function ‘glPopMatrix’
plovergraphics.c:150: warning: implicit declaration of function ‘glRasterPos2f’
plovergraphics.c:152: warning: implicit declaration of function ‘print_string’
plovergraphics.c:152: error: ‘font_base’ undeclared (first use in this function)
plovergraphics.c:166: error: ‘drawable’ undeclared (first use in this function)
plovergraphics.c: At top level:
plovergraphics.c:208: error: expected ‘)’ before ‘base’
plovergraphics.c:222: error: expected declaration specifiers or ‘...’ before ‘GLuint’
plovergraphics.c: In function ‘init_font’:
plovergraphics.c:238: warning: implicit declaration of function ‘glXUseXFont’
plovergraphics.c:238: error: ‘base’ undeclared (first use in this function)
plovergraphics.c: In function ‘font_init’:
plovergraphics.c:244: error: ‘font_base’ undeclared (first use in this function)
plovergraphics.c:244: warning: implicit declaration of function ‘glGenLists’
plovergraphics.c:245: warning: implicit declaration of function ‘glIsList’
plovergraphics.c:250: error: too many arguments to function ‘init_font’I can do a makefile for this once I know all the requirements?You seem to be lacking libgl(-devel), glut (freeglut)(-devel), possibly also mesa(-devel).
Then, start the game like this after you copied the lib into your game dir:
LD_PRELOAD=`pwd`/libploverfps.so ./rolauncherHis launcher does not work
Plover
02-01-2010, 11:38 AM
Yeah, my launcher apparently only works on Ubuntu/Debian.
Here's the link again. I just made the change which I previously mentioned, for it to work on the "experimental" client (which is the current client , obviously).
If anyone has something they want added to this just tell me, and I'll throw it in the zip. (Such as a fix to the launcher)
Also, I just changed 1 other line of the code to fix an oscillating fps issue (a non-issue really). It's untested because I don't play the game anymore, so I'd be interested in hearing if it works, so hit me up on irc.
http://markhamlin.net/tempfiles/libploverfps_1.zip
Plover
02-06-2010, 08:18 AM
Ok, I fixed my fix and tested it this time (the fix actually made it not work at all). The FPS floats a little high ( on my machine, it gets about 3fps more than it says it should... possibly a timing issue related to the client's multithreading).
I also switched to using includes instead of imports to get rid of the warnings.
Same link to zip as above.
Gideon_Slack
02-07-2010, 06:55 PM
The plauncher script doesn't seem to be in the latest zip file available. Could you post the script here if it is not too much trouble?
Plover
02-08-2010, 04:50 AM
Here's a version which might work on other distros... ?
#!/bin/sh
cd `dirname ${0}`
export LD_PRELOAD=`pwd`/libploverfps.so
./rolauncher
Basically, all it has to do is set the LD_PRELOAD env var to be libploverfps.so. Points where this could fail is if you use a relative path, since rolauncher changes the pwd when you press enter game world. I'm pretty noob at linuxy stuff, so if people write better launchers feel free to post them.
Gideon_Slack
02-08-2010, 12:29 PM
Here's a version which might work on other distros... ?
#!/bin/sh
cd `dirname ${0}`
export LD_PRELOAD=`pwd`/libploverfps.so
./rolauncher
Basically, all it has to do is set the LD_PRELOAD env var to be libploverfps.so. Points where this could fail is if you use a relative path, since rolauncher changes the pwd when you press enter game world. I'm pretty noob at linuxy stuff, so if people write better launchers feel free to post them.
OK, that is very straight forward.
When I can get on Linux, I will probably do something like this:
In .bashrc (in home directory):
export REGNUM_DIR=~/regnum
And then as a shell script:
#!/bin/sh
cd $REGNUM_DIR
export LD_PRELOAD=$REGNUM_DIR/libploverfps.so
./rolauncher
Znurre
02-08-2010, 12:39 PM
Why export LD_PRELOAD?
Better use:
#/bin/bash
cd $REGNUM_DIR
LD_PRELOAD=$REGNUM_DIR/libploverfps.so ./rolauncher
That works great for me in Arch Linux.
Plover
02-08-2010, 07:57 PM
Why export LD_PRELOAD?
Better use:
#/bin/bash
cd $REGNUM_DIR
LD_PRELOAD=$REGNUM_DIR/libploverfps.so ./rolauncher
That works great for me in Arch Linux.
I wasn't sure if the "game" process which rolauncher spawns would still have that var set. If you say it works, then great :)
Arafails
02-09-2010, 12:12 PM
I wasn't sure if the "game" process which rolauncher spawns would still have that var set. If you say it works, then great :)
The environment is inherited by all subprocesses, so unless something in rolauncher causes LD_PRELOAD to be unset (and using export won't do a damned thing about this), anything it launches will keep it.
Plover
02-10-2010, 12:47 AM
The environment is inherited by all subprocesses, so unless something in rolauncher causes LD_PRELOAD to be unset (and using export won't do a damned thing about this), anything it launches will keep it.
^ and thus you cure me from a slight bit of my unix noobness :D
Should we make a separate thread for this? Just realized we totally hijacked the original topic (and so I perpetuate the issue)
Any one know if the key binding would be fixed by ngd?
or at least full configurable ^^
use a hack to play corectly it's not great :s
Shwish
12-04-2010, 01:13 PM
I think its illegal to edit the code or something like that. I use two external programs, one to remap my keyboard and the other to redefine the two extra buttons on my mouse. I don't see anything wrong with that method and it makes the gameplay a lot simpler. They aren't very chat friendly tho so ill see if these patches still work. Thanks for bump
We asked for such feature since a long time, a small improvement was made, but we still need the linux hack to improve things.
As said, fully configurable controls is a must.
NGD seems to not care at all :(
_Enio_
12-04-2010, 01:44 PM
As said, fully configurable controls is a must.
NGD seems to not care at all :(
It sadly seems to be quite low on priority list.
A mechanics like shown here
http://img651.imageshack.us/img651/7714/0001hk.jpg
would probably be quite easy to implement and allowed full configuration of spells/items etc via linking bar slots with keybinds.
Maybe some day we can play without getting typist's cramps..
Awrath
12-04-2010, 01:57 PM
It sadly seems to be quite low on priority list.
An mechanics like shown here
http://img651.imageshack.us/img651/7714/0001hk.jpg
would probably be quite easy to implement and allowed full configuration of spells/items etc via linking bar slots with keybinds.
Maybe some day we can play without getting typist's cramps..
Something like that would be awesome.
*BUMP*
New linux users may find this hack quite useful.
_Enio_
10-31-2011, 05:40 PM
Slightly offtopic but it still kinda fits here
- When i press forward key [w] and add another key (i.e. [Shift]) i stop moving. If i press [w] and add [d] for strafing and then add [Shift] i just go forward (it removes the additional strafing).
Is this a known issue or anything i can do to fix this? On windows that doesnt happen.
It sadly seems to be quite low on priority list.
A mechanics like shown here
http://img651.imageshack.us/img651/7714/0001hk.jpg
would probably be quite easy to implement and allowed full configuration of spells/items etc via linking bar slots with keybinds.
Maybe some day we can play without getting typist's cramps..
/me hope this will come up with the new GUI
_Enio_
01-11-2012, 08:10 PM
/me hope this will come up with the new GUI
Santa: "Your wish was denied!"
Santa: "Your wish was denied!"
sadly *sob*
i know santa was not enough, next time: wish at falling stars with some four-leaf clover maby this would works xD
Shwish
01-13-2012, 10:00 PM
NGD seems to not care at all :(
unfortunately NGD doesn't seem to understand that its the small things like keyboard configurations and targeting keys that can make or break a game. What's the point of all these flashy graphics and animation if the basic fundamentals are simply ignored.
unknow0
08-09-2012, 11:35 AM
still not chaged ><
please ngd you loose player here, using dirty workaroud to make work normaly is totaly insane.
still not chaged ><
please ngd you loose player here, using dirty workaroud to make work normaly is totaly insane.
3 years since first post, and nothing changed.... even new UI didn't fix the issue we are trying to workaround using this "hack"...
:dumbofme:
Hellmut
03-08-2013, 08:15 PM
As someone who has played many mmo's the exclusion of ability keybinds is nothing short of hideous.
I only joined here today (came from alot of PvP in other mmo's) and initially i liked the look of the game.
Once i realised that i couldn't customise my ability keybinds i promptly logged out.
If they are included at some point i would certainly come back and have another look.
Hellmut (Warhammer online)
As someone who has played many mmo's the exclusion of ability keybinds is nothing short of hideous.
I only joined here today (came from alot of PvP in other mmo's) and initially i liked the look of the game.
Once i realised that i couldn't customise my ability keybinds i promptly logged out.
If they are included at some point i would certainly come back and have another look.
Hellmut (Warhammer online)
NGD: read ^^this^^ again .... and again.
Now please implement fully bindable keyboard/mouse + actions as requested since years now.
It is a must in any modern game, and especially mmorpgs.
If you still think it isn't (a must-have), please explain new and old players why.
Hellmut: at least we know you tried and why you left, i can't imagine how many players did the same in last years...
Let's hope you'll come back next (month|year|century) when NGD will fix this obvious mistake....
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.