Jump to content

tebe

Members
  • Content Count

    815
  • Joined

  • Last visited

Community Reputation

551 Excellent

About tebe

Contact / Social Media

Profile Information

  • Gender
    Male
  • Location
    Poland
  • Interests
    http://atariage.com/forums/topic/34916-graph2fnt/

Recent Profile Visitors

13,181 profile views
  1. cart Veronica, Altirra Basic support that
  2. https://forum.lazarus.freepascal.org/index.php?topic=46349.0
  3. http://madteam.atari8.info/uzytki/foxmode.7z prototyping program, Fox Mode 12++ / 0++
  4. https://github.com/tebe6502/Mad-Pascal new unit EFAST (Written by DMSC, loosely based on HYP.COM by Doug Wokoun and John Harris) example SOLITARIO solitario.exe solitario.obx solitario.pas
  5. mads 2.0.9 http://mads.atari8.info https://github.com/tebe6502/Mad-Assembler
  6. Platform Game - Little Engine engine.obx engine.pas
  7. Rectangle Overlap, Which Side Was Hit use joy in port 0 uses crt, joystick, fastgraph; type TColision = (left=1, right, top, bottom); TTile = record width, height, centerX, centerY: byte; end; var A,B: TTile; Hero: record x,y, _x, _y: byte end; hit: byte; function CollisionTile(var B: TTile): byte; var w,h: byte; dx,dy,wy,hx: smallint; begin Result:=0; w := (A.width + B.width) shr 1; h := (A.height + B.height) shr 1; dx := A.centerX - B.centerX; dy := A.centerY - B.centerY; if (abs(dx) <= w) and (abs(dy) <= h) then begin (* collision! *) wy := w * dy; hx := h * dx; if (wy > hx) then begin if (wy > -hx) then (* collision at the bottom *) Result := ord(bottom) else (* on the left *) Result := ord(left); end else if (wy > -hx) then (* on the right *) Result := ord(right) else (* at the top *) Result := ord(top); end; end; procedure DrawTile(var a: TTile; color: Byte); var px,py,x,y,w,h: byte; begin w:=A.width; h:=A.height; x:=w shr 1; y:=h shr 1; px:=A.CenterX - x; py:=A.CenterY - y; SetColor(color); Rectangle(px,py,px+w,py+h); end; procedure HeroMovement; begin case joy_1 of joy_left: dec(Hero.X); joy_right: inc(Hero.X); joy_up: dec(Hero.Y); joy_down: inc(Hero.Y); end; if (Hero.x <> Hero._x) or (Hero.y <> Hero._y) then begin DrawTile(A, 0); A.CenterX := Hero.X; A.CenterY := Hero.Y; DrawTile(A, 1); Hero._x := Hero.x; Hero._y := Hero.y; DrawTile(B, 3); end; end; begin InitGraph(7); A.width:=8; A.height:=8; A.CenterX:=84; A.CenterY:=53; Hero.X:=A.CenterX; Hero.Y:=A.CenterY; B.width:=32; B.height:=16; B.CenterX:=93; B.CenterY:=45; repeat HeroMovement; hit:=CollisionTile(B); case hit of ord(left): writeln('left'); ord(right): writeln('right'); ord(top): writeln('top'); ord(bottom): writeln('bottom'); else writeln; end; until false; end. rect_overlap.pas
  8. fixed https://github.com/tebe6502/Mad-Pascal
  9. Mad Pascal Compiler version 1.6.1 [2019/08/07] for 6502 Compiling pacmad.pas d:\!Delphi\PAS6502\lib\graph.inc (672) Warning: lo/hi(dword/qword) returns the upper/lower word/dword d:\!Delphi\PAS6502\lib\graph.inc (673) Warning: lo/hi(dword/qword) returns the upper/lower word/dword interrupts.inc (1) Note: Use assembler block instead pascal interrupts.inc (13) Note: Use assembler block instead pascal interrupts.inc (26) Note: Use assembler block instead pascal interrupts.inc (43) Note: Use assembler block instead pascal interrupts.inc (64) Note: Use assembler block instead pascal interrupts.inc (76) Note: Use assembler block instead pascal interrupts.inc (89) Note: Use assembler block instead pascal interrupts.inc (111) Note: Use assembler block instead pascal dlist.inc (2) Note: Local const 'DL_NULL' not used 1599 lines compiled, 5.80 sec, 22861 tokens, 1667 idents, 374 blocks, 10 types 2 warning(s) issued 9 note(s) issued d:\!Delphi\PAS6502\test\games\PacMad>mads pacmad.a65 -x -i:..\..\..\base\ ZPFREE: $0000..$007F ; $00D8..$00FF $R RCDATA $C400..$C7FF 'assets/pacmad8solid.fnt' $R RCDATA $C800..$CBFF 'assets/NC5.FNT' $R RCASM $8000..$8437 'assets/pacmad.logo' LEVELS SIZE: $10A7 LEVELS: $8438..$94DF $R RCASM $8438..$94DE 'assets/levels.asm' STRINGS SIZE: $0120 STRINGS : $B000..$B120 $R RCASM $B000..$B11F 'assets/strings.asm' $R RMTPLAY $B1E0..$B817 'assets/rmt.feat' $R RMT $B900..$BFB5 'assets/pacmad_strip_mono.rmt' SYSTEM: $23E8..$2567 GRAPH: $2568..$2569 DATAMATRIX: $256A..$27DF MYPMG: $27E0..$28A5 RMT: $28A6..$2982 CODE: $2000..$6F05 DATA: $6F06..$746C Writing listing file... Writing object file... 26963 lines of source assembled in 12 pass 32616 bytes written to the object file
  10. i now please, custom handler D: working with disabled OS, SIO / CIO without OS
  11. pointers, typed pointers are allowed var cptr: ^char; mp_pointers.7z
  12. solution var PlayfieldDisplayList: array [0..2] of byte = ($41, 0,0 ); begin PlayfieldDisplayList[High(PlayfieldDisplayList)-1 ] := lo(word(@PlayfieldDisplayList)); PlayfieldDisplayList[High(PlayfieldDisplayList) ] := hi(word(@PlayfieldDisplayList));
×
×
  • Create New...