Antes de intentar retomarlo, necesitaba completar la rutina de scroll multidireccional, y aunque en esta prueba no se aprecia porque solo hay scroll horizontal, está completa.
El engine en principio está preparado para funcionar en TurboR, pero refrescando la pantalla una vez cada dos frames (25 fps), creo que puede funcionar bien en un Z80.
Using the same Engine from "Losaben Akel", we did some tests on the idea that we started before "Losaben Akel".
We had to complete multidirectional scroll routine before to try this remake. This test only uses horizontal scrolling but the multidirectional routine is complete.
This Engine is ready for TurboR, but writing to the screen once every two frames, I think it will be possible to run in a Z80.
El prota solo se mueve hacia los lados y no detecta, todavía, las colisiones, pero es cuestión de incluir unas cuantas líneas de código.
Este es el trozo de código que "mueve" al prota:
The protagonist only moves sideways and still does not detect collisions, but a matter of including a few lines of code.
This is the piece of code that moves the protagonist:
obj_arthur_mov:
ld a,[buffer_teclado8]
;1000 Der Aba Arr Izq Del Ins Home Space
and 11110000b
cp 11110000b
jp z,.parado
bit 7,a
jr z,.derecha
bit 4,a
jr z,.izquierda
ret
.derecha:
ld a,[ix+obj_arthur_estado]
bit 3,a
jr nz,.cambio_dir_d
and 00000111b
cp 1 ;andando
jr z,.andando
.cambio_dir_d:
ld a,[ix+obj_arthur_estado]
and 11110000b
or 00000001b
ld [ix+obj_arthur_estado],a
ld [ix+obj_arthur_retardo_frame],1
ld [ix+obj_arthur_frame],0
res 5,[ix+obj_pat]
jr .andando
.izquierda:
ld a,[ix+obj_arthur_estado]
bit 3,a
jr z,.cambio_dir_i
and 00000111b
cp 1 ;andando
jr z,.andando
.cambio_dir_i:
ld a,[ix+obj_arthur_estado]
and 11111000b
or 00001001b
ld [ix+obj_arthur_estado],a
ld [ix+obj_arthur_retardo_frame],1
ld [ix+obj_arthur_frame],0
set 5,[ix+obj_pat]
.andando:
dec [ix+obj_arthur_retardo_frame]
jr nz,.nocambia_frame
ld [ix+obj_arthur_retardo_frame],8
ld a,[ix+obj_arthur_frame]
inc a
and 00000011b
ld [ix+obj_arthur_frame],a
ld hl,obj_arthur_frames
ADD_HL_A
ld a,[hl]
ld b,a
ld a,[ix+obj_pat]
and 11100000b
or b
ld [ix+obj_pat],a
.nocambia_frame:
bit 3,[ix+obj_arthur_estado]
jr z,.a_derechas
.a_izquierdas:
ld a,[ix+obj_x]
cp 106
jr nz,.no_limite_izquierda
ld de,0x00ff
ld [mov_scroll_a],de
ld [mov_scroll_b],de
ret
.no_limite_izquierda:
dec [ix+obj_x]
ret
.a_derechas:
ld a,[ix+obj_x]
cp 150
jr nz,.no_limite_derecha
ld de,0x0001
ld [mov_scroll_a],de
ld [mov_scroll_b],de
ret
.no_limite_derecha:
inc [ix+obj_x]
ret
.parado:
ld a,[ix+obj_arthur_estado]
and 11111000b
ld [ix+obj_arthur_estado],a
ld a,[ix+obj_pat]
and 11100000b
ld [ix+obj_pat],a
ret
No está optimizado ni muy limpio, pero ha sido una prueba rápida para poder hacer el video. :P
Me he quedado de piedra, menudo trabajo!! Quiero ver mas!! :-)
ResponderEliminarFantástico!!!! Genial tu trabajo
ResponderEliminarGracias!
ResponderEliminarAhora hay que sacar tiempo de donde no hay para ir sacándolo pa'lante
btw, i'm about to implement gfx9990 support on Boriel's ZX-Basic Compiler! :) (some progress on msx support on this can be seen at http://www.boriel.com/forum/wishlist/started-msx-version-help-needed-as-well-t811.html )
ResponderEliminar