[gnome-mud] for the Spanish mud-players(para los jugadores españoles de muds)



Hi you can modify the code of gnome-mud 10.2 for to run the mapper option with spanish directions like "Reinos de Leyenda" or "Iluminado", it's easy.

A ver versión en castellano aqui os adjunto la modificacion del código de gnome-mud 10.2 para poder usar la opción de mapper en español para juegos como "Reinos de leyenda" o "iluminado", es muy facil.

Suar.

first is modify in /src/init.c :359
lo primero es modificar en /src/init.c :359

static int text_entry_key_press_cb (GtkEntry *text_entry, GdkEventKey *event, gpointer data)
{
	KEYBIND_DATA	*scroll;
	CONNECTION_DATA *cd;
	gint   number;
	GList *li = NULL;

	number = gtk_notebook_get_current_page (GTK_NOTEBOOK (main_notebook));
	cd = connections[number];

	for (scroll = cd->profile->kd; scroll != NULL; scroll = scroll->next)
	{
if ((scroll->state) == ((event->state) & 12) && (scroll->keyv) == (gdk_keyval_to_upper(event->keyval)))
		{
			text_entry_send_command(cd, scroll->data, text_entry);
			return TRUE;
		}
	}

	if ( event->state & GDK_CONTROL_MASK ) { }
	else
	{
		if (!prefs.DisableKeys)
		{
			switch ( event->keyval )
			{

			//here i made a change for spanish muds
				case GDK_KP_1:
					text_entry_send_command(cd, "so", text_entry);
					return TRUE;
					break;

				case GDK_KP_2:
					text_entry_send_command(cd, "s", text_entry);
					return TRUE;
					break;

				case GDK_KP_3:
					text_entry_send_command(cd, "se", text_entry);
					return TRUE;
					break;

				case GDK_KP_4:
					text_entry_send_command(cd, "o", text_entry);
					return TRUE;
					break;

				case GDK_KP_5:
					text_entry_send_command(cd, "mirar", text_entry);
					return TRUE;
					break;

				case GDK_KP_6:
					text_entry_send_command(cd, "e", text_entry);
					return TRUE;
					break;

				case GDK_KP_7:
					text_entry_send_command(cd, "no", text_entry);
					return TRUE;
					break;

				case GDK_KP_8:
					text_entry_send_command(cd, "n", text_entry);
					return TRUE;
					break;

				case GDK_KP_9:
					text_entry_send_command(cd, "ne", text_entry);
					return TRUE;
					break;

				case GDK_KP_Add:
					text_entry_send_command(cd, "de", text_entry);
					return TRUE;
					break;

				case GDK_KP_Subtract:
					text_entry_send_command(cd, "ar", text_entry);
					return TRUE;
					break;
			}
		}
//(........)the file continues...


and second is modify /src/map.c:962
y segundo es modificar el código de /src/map.c:962

void user_command(AutoMap* automap, const gchar* command)
{
	GList* puck;
	int i = 0;
	int out = -1;

	//adapted to the spanish muds
char* exits[30] = {"north", "northeast", "east", "southeast", "south", "southwest", "west", "northwest", "up", "down", "n", "ne", "e", "se", "s", "sw", "w", "nw", "u", "d", "n", "ne", "e", "se", "s", "so", "o", "no", "ar", "ab"};

	command = g_ascii_strdown(command, -1);

   for (i = 0; i<10; i++)
	{
		if (!g_ascii_strcasecmp(command, exits[i]))
			out = i;
	}
	for (i = 10; i<20; i++)
	{
		if (!g_ascii_strcasecmp(command, exits[i]))
			out = i - 10;
	}

	//adapted for th spanish muds for translate to the english muds
	for (i = 20; i<30; i++)
	{
		if (!g_ascii_strcasecmp(command, exits[i]))
			out = i - 20;

	}
//(......)the file continues.....

and then ./configure, make, make install
y luego ./configure, make, make install

Suar jugador de reinos de leyenda
:)

_________________________________________________________________
Una mejor experiencia en Internet. Prueba gratis dos meses MSN 8. http://join.msn.com/?pgmarket=es-es&XAPID=1577&DI=1055




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]