domingo, 26 de diciembre de 2010

Desarrollo en Inform 6

Desgraciadamente, todavía no hay un modo sencillo de descargarse una simple aplicación, y empezar a desarrollar en Inform6

Por supuesto, hay opciones. Está JIF, que es multiplataforma, y Wide, que también lo es, pero hecho para C++. Desgraciadamente, configurar cualquiera de los dos sistemas no es sencillo. De hecho, es más sencillo bajarse Inferno, y empezar a trabajar.

Aunque Inferno puede ser una opción, yo en mi ordenador personal utilizo SciTE. Aunque no es especialmente sencillo de configurar, el resultado es muy satisfactorio.




La forma de configurar SciTE es añadir las siguientes líneas al archivo asm.properties:




# Inform

#Compile&Run section. General Prop. Especific project prop could be set in SciTE.properties file, in the same *.inf game file directory

#Glulx Machine
#custom Tool|command . 0-9 can be defined for CTRL+0 to Ctrl+9 (total of 0-99 is allowed, need to edit user.shortcuts prop)
#Need set apropiate path for inform, BRES, BLC and Glulx Interpreter
#options1: switches options | options2:libraries paths for correct compiling
options=+include_path=C:\Users\baltasarq\Documents\mydrop~1\prys\if\inferno\res\lib\I6Sp,C:\Users\baltasarq\Documents\mydrop~1\prys\if\inferno\res\lib\I6Gb,C:\Users\baltasarq\Documents\mydrop~1\prys\if\inferno\res\lib\contrib
command.name.0.$(file.patterns.inform)=Glulx | Crear Recursos
command.0.$(file.patterns.inform)=C:\Users\baltasarq\Documents\mydrop~1\prys\if\inferno\res\tools\tools_windows\bresc.exe --blionly "$(FileName).res"
command.name.1.$(file.patterns.inform)=Glulx | Compilar
command.1.$(file.patterns.inform)=C:\Users\baltasarq\Documents\mydrop~1\prys\if\inferno\res\inform\inform_windows\inform.exe -G $(options) "$(FilePath)"
command.name.2.$(file.patterns.inform)=Glulx | Crear BLB
command.2.$(file.patterns.inform)=C:\Users\baltasarq\Documents\mydrop~1\prys\if\inferno\res\tools\tools_windows\bresc.exe --nobli "$(FileName).blc"
command.name.3.$(file.patterns.inform)=Glulx | Ejecutar gBlorb
command.3.$(file.patterns.inform)=C:\Users\baltasarq\Documents\mydrop~1\prys\if\inferno\res\gargoyle\gargoyle_windows\gargoyle.exe "$(FileName).gblorb"
command.name.4.$(file.patterns.inform)=Glulx | Ejecutar ULX
command.4.$(file.patterns.inform)=C:\Users\baltasarq\Documents\mydrop~1\prys\if\inferno\res\gargoyle\gargoyle_windows\gargoyle.exe "$(FileName).ulx"
command.name.5.$(file.patterns.inform)=Glulx | Ejecutar zBlorb
command.5.$(file.patterns.inform)=C:\Users\baltasarq\Documents\mydrop~1\prys\if\inferno\res\gargoyle\gargoyle_windows\gargoyle.exe "$(FileName).zblorb"
command.name.6.$(file.patterns.inform)=Glulx | Ejecutar BLB
command.6.$(file.patterns.inform)=C:\Users\baltasarq\Documents\mydrop~1\prys\if\inferno\res\gargoyle\gargoyle_windows\gargoyle.exe "$(FileName).blb"
#Z Machine
command.compile.*.inf=C:\Users\baltasarq\Documents\mydrop~1\prys\if\inferno\res\inform\inform_windows\inform.exe $(options) "$(FilePath)"
#by default, z5 is the compiled game assumed
command.go.*.inf=c:\windows\system32\cmd.exe /c "start $(FileName).z5"


Por supuesto, es necesario cambiar los directorios para que apunten a la localización de Inform en tu sistema.

Si quieres coloreado de "sintaxis", necesitas añadir, además, las siguientes líneas:


file.patterns.asm=*.asm
file.patterns.inform=*.inf;*.h

filter.asm=Assembler (asm)|$(file.patterns.asm)|
filter.inform=Inform (inf h)|$(file.patterns.inform)|

lexer.$(file.patterns.asm)=asm
lexer.$(file.patterns.inform)=asm

# these keywords are taken from the masm book (v6.13)
# updated with Intel Pentium 4, MMX, SSE, SSE2 instructions from NASM
# (note that some are undocumented instructions)

cpu_instruction=box break continue default do else font for give goto if include constant inversion jump \
move new_line objectloop print print_ret quit read remove restore return rfalse \
rtrue save spaces string style switch to until while class object release statusline

# these are mostly non-MMX/SSE/SSE2 486+ instructions

cpu_instruction2=
# fpu instructions, updated for 486+

fpu_instruction=Abbreviate Array Attribute private Default \
Dictionary End Endif Extend Fake_action Global Ifdef \
Iffalse Ifndef Ifnot Iftrue Ifv3 Ifv5 Import Include \
Link Lowstring Message Nearby Object Property Release \
Replace Serial Switches Statusline Stub System_file Trace \
Verb Version has hasnt ofclass or in notin with && AMUSING_PROVIDED \
DEATH_MENTION_UNDO DEBUG Headline MANUAL_PRONOUNS MAX_CARRIED \
MAX_SCORE MAX_TIMERS NO_PLACES NUMBER_TASKS OBJECT_SCORE ROOM_SCORE \
SACK_OBJECT Story TASKS_PROVIDED USE_MODULES WITHOUT_DIRECTIONS

# these are MMX, SSE, SSE2 instructions

ext_instruction=abierta abierto abrible animado ausente banderaux cerrojo cerrojoechado comestible \
conmutable encendido entrable escenario estatico femenina femenino general hablable \
luz masculino movido neutro nombreplural nombreusado oculto prenda propio puerta \
puesto recipiente soporte transparente valepuntos visitado \
open openable animated absent lockable locked edible \
conmutable on enterable scenery static female general talkable \
light male moved neuter pluralname concealed clothing proper door \
worn container supporter transparent scored visited


register=abajo adentro adjetivos afuera al_e al_n al_ne al_no al_o al_s al_se al_so antes arriba articulo \
articulos cada_turno cantidad capacidad con_llave daemon describir descripcion descripcion_dentro \
despues direcc_puerta direcciones esta_en genero gramatica imperativo inicial irrelevante \
listar_juntos listarse no_puedes_ir nombre nombre_corto nombre_corto_indef nombre_f \
nombre_fp nombre_m nombre_mp ordenes parse_nombre plural puerta_a reaccionar_antes \
reaccionar_despues salidas si_abierto si_apagado si_cerrado si_encendido suma_al_alcance \
tiempo_agotado tiempo_restante vida \
d_to in_to out_to e_to n_to ne_to nw_to o_to s_to se_to sw_to before u_to article \
articles each_turn number capacity with_key describe description inside_description \
after door_dir found_in gramatica imperative initial \
list_together invent cant_go name short_name short_name_indef name_f \
name_fp name_m name_mp orders parse_name plural door_to react_before \
react_after when_open when_closed when_on when_off add_to_scope \
time_out time_left life


Como ves, de esta manera soporta Inform 6 e Inf6Sp.

Queda que autocomplete. Necesitas modificar la línea:


api.*.inf=C:\Program Files\wscite\inform.api


De nuevo, deberás cambiar los directorios. Y el archivo inform.api contiene las palabras reservadas de Inform más habituales, una en cada línea:


abierto
open
abrible
openable
animado
animated
ausente
absent
banderaux
cerrojo
lock
cerrojoechado
locked
comestible
edible
conmutable
encendido
switched
entrable
enterable
escenario
scenery
estatico
static
femenino
female
general
glk_cancel_char_event
glk_cancel_hyperlink_event
glk_cancel_line_event
glk_cancel_mouse_event
glk_char_to_lower
glk_char_to_upper
glk_exit
glk_fileref_create_by_name
glk_fileref_create_by_prompt
glk_fileref_create_from_fileref
glk_fileref_create_temp
glk_fileref_delete_file
glk_fileref_destroy
glk_fileref_does_file_exist
glk_fileref_get_rock
glk_fileref_iterate
glk_gestalt(glui32 sel, glui32 val); Test de capacidad del interprete
glk_gestalt_ext
glk_get_buffer_stream
glk_get_char_stream
glk_get_line_stream
glk_image_draw
glk_image_draw_scaled
glk_image_get_info
glk_put_buffer
glk_put_buffer_stream
glk_put_char
glk_put_char_stream
glk_put_string
glk_put_string_stream
glk_request_char_event
glk_request_hyperlink_event
glk_request_line_event
glk_request_mouse_event
glk_request_timer_events
glk_schannel_create
glk_schannel_destroy
glk_schannel_get_rock
glk_schannel_iterate
glk_schannel_play
glk_schannel_play_ext
glk_schannel_set_volume
glk_schannel_stop
glk_select event
glk_select_poll event
glk_set_hyperlink
glk_set_hyperlink_stream
glk_set_interrupt_handler
glk_set_style
glk_set_style_stream
glk_set_window
glk_sound_load_hint
glk_stream_close
glk_stream_get_current
glk_stream_get_position
glk_stream_get_rock
glk_stream_iterate
glk_stream_open_file
glk_stream_open_memory
glk_stream_set_current
glk_stream_set_position
glk_style_distinguish
glk_style_measure
glk_stylehint_clear
glk_stylehint_set
glk_tick
glk_window_clear
glk_window_close
glk_window_erase_rect
glk_window_fill_rect
glk_window_flow_break
glk_window_get_arrangement
glk_window_get_echo_stream
glk_window_get_parent
glk_window_get_rock
glk_window_get_root
glk_window_get_sibling
glk_window_get_size
glk_window_get_stream
glk_window_get_type
glk_window_iterate
glk_window_move_cursor
glk_window_open
glk_window_set_arrangement
glk_window_set_background_color
glk_window_set_echo_stream
hablable
talkable
HandleGlkEvent
IdentifyGlkObject
InitGlkWindow
luz
light
masculino
male
movido
moved
neutro
neutral
nombreplural
pluralname
nombreusado
oculto
concealed
prenda
clothing
propio
proper
puerta
door
puesto
worn
recipiente
recipient
soporte
support
transparente
transparent
valepuntos
visitado
visited

No hay comentarios: