"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "doc/manual/cache/KeyPgScreenptr.wakka" between
FreeBASIC-1.08.0-source.tar.xz and FreeBASIC-1.08.1-source.tar.xz

About: FreeBasic is a set of cross-platform development tools consisting of a compiler, GNU-based assembler, linker and archiver, and supporting runtime libraries, including a software-based graphics library.

KeyPgScreenptr.wakka  (FreeBASIC-1.08.0-source.tar.xz):KeyPgScreenptr.wakka  (FreeBASIC-1.08.1-source.tar.xz)
skipping to change at line 51 skipping to change at line 51
End If End If
'' Lock the screen to allow direct frame buffer access '' Lock the screen to allow direct frame buffer access
Screenlock() Screenlock()
'' Find the address of the pixel in the centre of the screen '' Find the address of the pixel in the centre of the screen
'' It's an 8-bit pixel, so use a UByte Ptr. '' It's an 8-bit pixel, so use a UByte Ptr.
Dim As Integer x = w \ 2, y = h \ 2 Dim As Integer x = w \ 2, y = h \ 2
Dim As Ubyte Ptr pixel = buffer + (y * pitch) + (x * bypp) Dim As Ubyte Ptr pixel = buffer + (y * pitch) + (x * bypp)
'' Set the pixel color to 10 (light green). '' Set the center pixel color to 10 (light green).
*pixel = 10 *pixel = 10
'' Unlock the screen. '' Unlock the screen.
Screenunlock() Screenunlock()
'' Wait for the user to press a key before closing the program '' Wait for the user to press a key before closing the program
Sleep Sleep
%% %%
{{fbdoc item="filename" value="examples/manual/gfx/screenptr2.bas"}}%%(freebasic ) {{fbdoc item="filename" value="examples/manual/gfx/screenptr2.bas"}}%%(freebasic )
Const SCREEN_WIDTH = 256, SCREEN_HEIGHT = 256 Const SCREEN_WIDTH = 256, SCREEN_HEIGHT = 256
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)