Actually merge everything from trunk, not only the source folder.
git-svn-id: svn://pulkomandy.tk/GrafX2/branches/cpcmode5@1720 416bcca6-2ee7-4201-b75f-2eb2f807beb1
BIN
bin/libpng13.dll
BIN
bin/libpng14-14.dll
Normal file
@ -125,7 +125,7 @@ Zlib:
|
||||
Libpng
|
||||
Requires: Zlib
|
||||
http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/l/li/libpng/
|
||||
libpng-1.0.23.tar.gz
|
||||
libpng-1.4.2.tar.gz (Before June 2010, we were using libpng-1.0.23.tar.gz)
|
||||
Uncompress in temporary directory
|
||||
./configure
|
||||
make
|
||||
|
||||
21
doc/PF_fonts.txt
Normal file
@ -0,0 +1,21 @@
|
||||
Fonts by Yusuke Kamiyamane
|
||||
http://p.yusukekamiyamane.com/fonts/
|
||||
|
||||
License: "The fonts can be used free for any personal or commercial projects."
|
||||
|
||||
- Arma Five
|
||||
- Ronda Seven
|
||||
- Easta Seven
|
||||
- Westa Seven
|
||||
- Tempesta Seven
|
||||
- Tempesta Five
|
||||
|
||||
|
||||
|
||||
Converted to Sfont format by yrizoud
|
||||
Changed filenames for better sorting:
|
||||
for Compressed
|
||||
_ for Condensed
|
||||
__ for Normal
|
||||
___ for Extended
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
The following file:
|
||||
|
||||
SDL.dll
|
||||
|
||||
is the runtime environment for the SDL library.
|
||||
|
||||
The Simple DirectMedia Layer (SDL for short) is a cross-platfrom library
|
||||
designed to make it easy to write multi-media software, such as games and
|
||||
emulators.
|
||||
|
||||
The Simple DirectMedia Layer library source code is available from:
|
||||
http://www.libsdl.org/
|
||||
|
||||
This library is distributed under the terms of the GNU LGPL license:
|
||||
http://www.gnu.org/copyleft/lesser.html
|
||||
|
||||
The following file:
|
||||
|
||||
SDL.dll
|
||||
|
||||
is the runtime environment for the SDL library.
|
||||
|
||||
The Simple DirectMedia Layer (SDL for short) is a cross-platfrom library
|
||||
designed to make it easy to write multi-media software, such as games and
|
||||
emulators.
|
||||
|
||||
The Simple DirectMedia Layer library source code is available from:
|
||||
http://www.libsdl.org/
|
||||
|
||||
This library is distributed under the terms of the GNU LGPL license:
|
||||
http://www.gnu.org/copyleft/lesser.html
|
||||
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
The following file
|
||||
|
||||
SDL_image.dll
|
||||
|
||||
is the runtime environment for the library SDL_image 1.2.8 by Sam Lantiga and Mattias Engdegård.
|
||||
|
||||
This library is distributed under the terms of the GNU LGPL license:
|
||||
http://www.gnu.org/copyleft/lesser.html
|
||||
|
||||
The source is available from the libraries page at the SDL website:
|
||||
http://www.libsdl.org/
|
||||
|
||||
=========================
|
||||
|
||||
Compiled by yrizoud on 21/10/2009 with static builds of :
|
||||
libjpeg (JPEG library http://www.ijg.org/ release 6b of 27-Mar-1998 : jpegsr6.zip)
|
||||
libtiff (TIFF library ftp://ftp.sgi.com/graphics/tiff/ : tiff-v3.4-tar.gz)
|
||||
And dynamic version of :
|
||||
libpng (http://www.libpng.org/pub/png/libpng.html) --> libpng13.dll requirement
|
||||
The following file
|
||||
|
||||
SDL_image.dll
|
||||
|
||||
is the runtime environment for the library SDL_image 1.2.10 by Sam Lantiga and Mattias Engdegård.
|
||||
|
||||
This library is distributed under the terms of the GNU LGPL license:
|
||||
http://www.gnu.org/copyleft/lesser.html
|
||||
|
||||
The source is available from the libraries page at the SDL website:
|
||||
http://www.libsdl.org/
|
||||
|
||||
=========================
|
||||
|
||||
Compiled by yrizoud on 16/06/2010 with static builds of :
|
||||
libjpeg (JPEG library http://www.ijg.org/ release 6b of 27-Mar-1998 : jpegsr6.zip)
|
||||
libtiff (TIFF library ftp://ftp.sgi.com/graphics/tiff/ : tiff-v3.4-tar.gz)
|
||||
And dynamic version of :
|
||||
libpng (http://www.libpng.org/pub/png/libpng.html) v1.4.2 --> libpng14-14.dll requirement
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
The following files:
|
||||
|
||||
SDL_ttf.dll
|
||||
libfreetype-6.dll
|
||||
|
||||
are the runtime environment for the library SDL_ttf 2.0 by Sam Lantiga.
|
||||
|
||||
This library is distributed under the terms of the GNU LGPL license:
|
||||
http://www.gnu.org/copyleft/lesser.html
|
||||
|
||||
The source is available from the libraries page at the SDL website:
|
||||
http://www.libsdl.org/
|
||||
The following files:
|
||||
|
||||
SDL_ttf.dll
|
||||
libfreetype-6.dll
|
||||
|
||||
are the runtime environment for the library SDL_ttf 2.0 by Sam Lantiga.
|
||||
|
||||
This library is distributed under the terms of the GNU LGPL license:
|
||||
http://www.gnu.org/copyleft/lesser.html
|
||||
|
||||
The source is available from the libraries page at the SDL website:
|
||||
http://www.libsdl.org/
|
||||
|
||||
@ -1,24 +1,24 @@
|
||||
The Windows distribution of Grafx2 is compiled and statically linked with
|
||||
Lua v5.1.4
|
||||
|
||||
Lua is licensed with the MIT license:
|
||||
|
||||
Copyright © 1994-2008 Lua.org, PUC-Rio.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
The Windows distribution of Grafx2 is compiled and statically linked with
|
||||
Lua v5.1.4
|
||||
|
||||
Lua is licensed with the MIT license:
|
||||
|
||||
Copyright © 1994-2008 Lua.org, PUC-Rio.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
@ -1,53 +1,53 @@
|
||||
|
||||
What's here
|
||||
===========
|
||||
The official ZLIB1.DLL
|
||||
|
||||
|
||||
Source
|
||||
======
|
||||
zlib version 1.2.3
|
||||
available at http://www.gzip.org/zlib/
|
||||
|
||||
|
||||
Specification and rationale
|
||||
===========================
|
||||
See the accompanying DLL_FAQ.txt
|
||||
|
||||
|
||||
Usage
|
||||
=====
|
||||
See the accompanying USAGE.txt
|
||||
|
||||
|
||||
Build info
|
||||
==========
|
||||
Contributed by Gilles Vollant <info@winimage.com>
|
||||
|
||||
Compiler: Microsoft Visual C++ Toolkit 2003
|
||||
Library: Microsoft Visual C++ 6.0 (to link with MSVCRT.DLL)
|
||||
|
||||
|
||||
Copyright notice
|
||||
================
|
||||
(C) 1995-2005 Jean-loup Gailly and Mark Adler
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Jean-loup Gailly Mark Adler
|
||||
jloup@gzip.org madler@alumni.caltech.edu
|
||||
|
||||
|
||||
What's here
|
||||
===========
|
||||
The official ZLIB1.DLL
|
||||
|
||||
|
||||
Source
|
||||
======
|
||||
zlib version 1.2.3
|
||||
available at http://www.gzip.org/zlib/
|
||||
|
||||
|
||||
Specification and rationale
|
||||
===========================
|
||||
See the accompanying DLL_FAQ.txt
|
||||
|
||||
|
||||
Usage
|
||||
=====
|
||||
See the accompanying USAGE.txt
|
||||
|
||||
|
||||
Build info
|
||||
==========
|
||||
Contributed by Gilles Vollant <info@winimage.com>
|
||||
|
||||
Compiler: Microsoft Visual C++ Toolkit 2003
|
||||
Library: Microsoft Visual C++ 6.0 (to link with MSVCRT.DLL)
|
||||
|
||||
|
||||
Copyright notice
|
||||
================
|
||||
(C) 1995-2005 Jean-loup Gailly and Mark Adler
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Jean-loup Gailly Mark Adler
|
||||
jloup@gzip.org madler@alumni.caltech.edu
|
||||
|
||||
|
||||
1464
doc/tech_eng.txt
1538
doc/tech_fra.txt
BIN
share/grafx2/fonts/PF_Arma_5__.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
share/grafx2/fonts/PF_Easta_7_.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
share/grafx2/fonts/PF_Easta_7__.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
share/grafx2/fonts/PF_Ronda_7__.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
share/grafx2/fonts/PF_Tempesta_5.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
share/grafx2/fonts/PF_Tempesta_5_.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
share/grafx2/fonts/PF_Tempesta_5__.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
share/grafx2/fonts/PF_Tempesta_5___.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
share/grafx2/fonts/PF_Tempesta_7.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
share/grafx2/fonts/PF_Tempesta_7_.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
share/grafx2/fonts/PF_Tempesta_7__.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
share/grafx2/fonts/PF_Tempesta_7___.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
share/grafx2/fonts/PF_Westa_7_.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
share/grafx2/fonts/PF_Westa_7__.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
@ -356,4 +356,22 @@
|
||||
;
|
||||
Menubars_visible = 255; (Default 255)
|
||||
|
||||
; This enables a mode where right mouse buttons acts as
|
||||
; a color picker, with most tools.
|
||||
;
|
||||
Right_click_colorpick = NO; (Default NO)
|
||||
|
||||
; When this mode is active, scrolling the view (and the magnifier view)
|
||||
; affects both the main image and the spare page - as long as they have
|
||||
; the same dimensions.
|
||||
Sync_views = YES; (Default YES)
|
||||
|
||||
; This setting determines which key inverts the mouse buttons
|
||||
; when it's held : A left click is then interpreted as a right-click.
|
||||
; It's especially useful for one-button controllers,
|
||||
; such as touchscreens and tablets.
|
||||
; Possible values are 0 (none), 1 (control), 2 (alt)
|
||||
|
||||
Swap_buttons = 1; (Default 1)
|
||||
|
||||
; end of configuration
|
||||
|
||||
79
share/grafx2/scripts/ani_db_ellipse.lua
Normal file
@ -0,0 +1,79 @@
|
||||
--PICTURE scene: Ellipse update-demo (anim)
|
||||
--Demonstrates 'interactive' features.
|
||||
--by Richard Fhager
|
||||
|
||||
-- Copyright 2011 Richard Fhager
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; version 2
|
||||
-- of the License. See <http://www.gnu.org/licenses/>
|
||||
|
||||
|
||||
--
|
||||
-- rot: Rotation in degrees
|
||||
-- stp: Step is # of line segments (more is "better")
|
||||
-- a & b are axis-radius
|
||||
function ellipse2(x,y,a,b,stp,rot,col)
|
||||
local n,m=math,rad,al,sa,ca,sb,cb,ox,oy,x1,y1,ast
|
||||
m = math; rad = m.pi/180; ast = rad * 360/stp;
|
||||
sb = m.sin(-rot * rad); cb = m.cos(-rot * rad)
|
||||
for n = 0, stp, 1 do
|
||||
ox = x1; oy = y1;
|
||||
sa = m.sin(ast*n) * b; ca = m.cos(ast*n) * a
|
||||
x1 = x + ca * cb - sa * sb
|
||||
y1 = y + ca * sb + sa * cb
|
||||
if (n > 0) then line(ox,oy,x1,y1,col); end
|
||||
end
|
||||
end
|
||||
--
|
||||
|
||||
--
|
||||
function line(x1,y1,x2,y2,c)
|
||||
local n,st,m; m = math
|
||||
st = m.max(1,m.abs(x2-x1),m.abs(y2-y1));
|
||||
for n = 0, st, 1 do
|
||||
putpicturepixel(m.floor(x1+n*(x2-x1)/st), m.floor(y1+n*(y2-y1)/st),
|
||||
c );
|
||||
end
|
||||
end
|
||||
--
|
||||
|
||||
setpicturesize(300,300)
|
||||
setcolor(0,96,96,96)
|
||||
setcolor(1,255,255,128)
|
||||
|
||||
r1 = 100
|
||||
r2 = 50
|
||||
rt = 0
|
||||
|
||||
frames = 100
|
||||
|
||||
|
||||
while (1 < 2) do
|
||||
|
||||
r1t = 10 + math.random() * 140
|
||||
r2t = 10 + math.random() * 140
|
||||
rtt = math.random() * 360
|
||||
|
||||
for n = 0, frames-1, 1 do
|
||||
clearpicture(0)
|
||||
|
||||
f2 = n / frames
|
||||
f1 = 1 - f2
|
||||
|
||||
r1a = r1*f1 + r1t*f2
|
||||
r2a = r2*f1 + r2t*f2
|
||||
rta = rt*f1 + rtt*f2
|
||||
|
||||
-- x, y, r1, r2, stp, rot, col
|
||||
ellipse2(150, 150, r1a, r2a, 50, rta, 1)
|
||||
|
||||
statusmessage('press ESC to stop')
|
||||
updatescreen();if (waitbreak(0)==1) then return end
|
||||
|
||||
end
|
||||
|
||||
r1,r2,rt = r1a,r2a,rta
|
||||
|
||||
end
|
||||
47
share/grafx2/scripts/ani_db_spritesheet.lua
Normal file
@ -0,0 +1,47 @@
|
||||
--ANIM: Sprite Animator v0.1
|
||||
--Spare page holds data - Plays on current
|
||||
--by Richard Fhager
|
||||
|
||||
require("memory")
|
||||
|
||||
arg=memory.load({XS=16,YS=16,SPACE=1,FRAMES=8,XOFF=0,YOFF=0,FPS=10})
|
||||
|
||||
OK, XS, YS, SPACE, FRAMES, XOFF, YOFF, FPS = inputbox("Sprite-Sheet
|
||||
Animator",
|
||||
"Sprite X-size", arg.XS, 1, 256,0,
|
||||
"Sprite Y-size", arg.YS, 1, 256,0,
|
||||
"Spacing", arg.SPACE, 0, 32,0,
|
||||
"# of Frames", arg.FRAMES,2, 100,0,
|
||||
"X-offset", arg.XOFF, 0, 256,0,
|
||||
"Y-offset", arg.YOFF, 0, 256,0,
|
||||
"Play Speed (FPS)",arg.FPS, 1, 60,0
|
||||
);
|
||||
|
||||
|
||||
if OK == true then
|
||||
|
||||
memory.save({XS=XS,YS=YS,SPACE=SPACE,FRAMES=FRAMES,XOFF=XOFF,YOFF=YOFF,FPS=FPS})
|
||||
|
||||
MAXPLAYS = 25
|
||||
|
||||
w,h = getpicturesize()
|
||||
OX = w / 2 - XS/2
|
||||
OY = h / 2 - YS/2
|
||||
|
||||
for play = 1, MAXPLAYS, 1 do
|
||||
|
||||
for f = 0, FRAMES-1, 1 do
|
||||
for y = 0, YS-1, 1 do
|
||||
for x = 0, XS-1, 1 do
|
||||
sx = x + XOFF + f * (XS + SPACE)
|
||||
sy = y + YOFF
|
||||
putpicturepixel(OX+x, OY+y, getsparepicturepixel(sx, sy))
|
||||
end
|
||||
end
|
||||
updatescreen(); if (waitbreak(1/FPS)==1) then return; end
|
||||
end
|
||||
|
||||
end -- plays
|
||||
|
||||
end --OK
|
||||
|
||||
132
share/grafx2/scripts/libs/memory.lua
Normal file
@ -0,0 +1,132 @@
|
||||
-- Persistence library:
|
||||
-- Memorize data for current function
|
||||
-- memory.save(tab) and tab=memory.load()
|
||||
--
|
||||
-- The data will be stored in file called
|
||||
-- ZZZ<calling_function_name>.dat
|
||||
-- in the lua directory
|
||||
--
|
||||
-- Example 1:
|
||||
--
|
||||
-- -- Load initial values or set defaults
|
||||
-- arg = memory.load({picX=320,picY=200,scale=0})
|
||||
-- -- Run an inputbox
|
||||
-- OK,arg.picX,arg.picY,arg.scale = inputbox("Image Size")",
|
||||
-- "Width", arg.picX, 1,2048,0,
|
||||
-- "Height", arg.picY, 1,2048,0,
|
||||
-- "Scale", arg.scale, 0,1,0);
|
||||
-- if OK == true then
|
||||
-- -- Save the selected values
|
||||
-- memory.save(arg)
|
||||
-- end
|
||||
|
||||
-- Example 2:
|
||||
--
|
||||
-- -- Load initial values or set defaults
|
||||
-- arg = memory.load({x=320,y=200,scale=0})
|
||||
-- picX=arg.x
|
||||
-- picY=arg.y
|
||||
-- scale=arg.scale
|
||||
-- -- Run an inputbox
|
||||
-- OK,picX,picY,scale = inputbox("Image Size")",
|
||||
-- "Width", picX, 1,2048,0,
|
||||
-- "Height", picY, 1,2048,0,
|
||||
-- "Scale", scale, 0,1,0);
|
||||
-- if OK == true then
|
||||
-- -- Save the selected values
|
||||
-- memory.save({x=picX,y=picY,scale=scale})
|
||||
-- end
|
||||
|
||||
|
||||
memory =
|
||||
{
|
||||
serialize = function(o)
|
||||
if type(o) == "number" then
|
||||
return tostring(o)
|
||||
elseif type(o) == "string" then
|
||||
return string.format("%q", o)
|
||||
--elseif type(o) == "table" then
|
||||
-- io.write("{\n")
|
||||
-- for k,v in pairs(o) do
|
||||
-- io.write(" ", k, " = ")
|
||||
-- memory.serialize(v)
|
||||
-- io.write(",\n")
|
||||
-- end
|
||||
-- io.write("}\n")
|
||||
else
|
||||
error("cannot serialize a " .. type(o))
|
||||
end
|
||||
end;
|
||||
|
||||
-- Return a string identifying the calling function.
|
||||
-- Pass 1 for parent, 2 for grandparent etc.
|
||||
callername = function(level)
|
||||
local w
|
||||
local last_slash
|
||||
local info = debug.getinfo(level+1,"Sn")
|
||||
local caller=tostring(info.name)
|
||||
-- Function name if possible
|
||||
if (caller~="nil") then
|
||||
return caller
|
||||
end
|
||||
-- Otherwise, get file name, without extension
|
||||
|
||||
-- Get part after directory name
|
||||
last_slash=0
|
||||
while true do
|
||||
local pos = string.find(info.short_src, "/", last_slash+1)
|
||||
if (pos==nil) then break end
|
||||
last_slash=pos
|
||||
end
|
||||
caller=string.sub(info.short_src, last_slash+1)
|
||||
|
||||
-- Remove file extension
|
||||
if (string.sub(caller,-4, -1)==".lua") then
|
||||
caller=string.sub(caller, 1, -5)
|
||||
end
|
||||
return caller
|
||||
end;
|
||||
|
||||
-- Memorize some parameters.
|
||||
save = function(o)
|
||||
local caller=memory.callername(2)
|
||||
--for k, v in pairs(o) do
|
||||
-- messagebox(tostring(k))
|
||||
-- messagebox(tostring(v))
|
||||
--end
|
||||
local f, e = io.open("ZZZ"..caller..".dat", "w");
|
||||
if (f ~= nil) then
|
||||
f:write("Entry {\n")
|
||||
for k, v in pairs(o) do
|
||||
if (type(v)=="number") then
|
||||
f:write(" "..k.."="..memory["serialize"](v)..",\n")
|
||||
end
|
||||
end
|
||||
f:write("}\n")
|
||||
f:close()
|
||||
end
|
||||
end;
|
||||
|
||||
|
||||
-- Recover some saved parameters.
|
||||
load = function(o)
|
||||
local caller=memory.callername(2)
|
||||
local i
|
||||
|
||||
function Entry (b)
|
||||
-- Adds (or replaces) values in arg with those from b
|
||||
for k, v in pairs(b) do
|
||||
o[k]=v
|
||||
end
|
||||
end
|
||||
local f = (loadfile("ZZZ"..caller..".dat"))
|
||||
if (f ~= nil) then
|
||||
f()
|
||||
end
|
||||
|
||||
return o
|
||||
end;
|
||||
|
||||
}
|
||||
|
||||
return memory
|
||||
@ -49,7 +49,11 @@ for y = 0, h - 1, 1 do
|
||||
c = matchcolor(rp*f,gp*f,bp*f)
|
||||
|
||||
putpicturepixel(x, y, c);
|
||||
|
||||
end
|
||||
updatescreen()
|
||||
if (waitbreak(0)==1) then
|
||||
return
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
@ -49,5 +49,9 @@ for y = 0, h - 1, 1 do
|
||||
putpicturepixel(x, y, c);
|
||||
|
||||
end
|
||||
updatescreen()
|
||||
if (waitbreak(0)==1) then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
-- 12bit colour space from palette
|
||||
--
|
||||
|
||||
-- Copyright 2010 Paulo Silva
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; version 2
|
||||
-- of the License. See <http://www.gnu.org/licenses/>
|
||||
|
||||
w,h=getpicturesize();
|
||||
for y1=0,3,1 do
|
||||
for x1=0,3,1 do
|
||||
for y2=0,15,1 do
|
||||
for x2=0,15,1 do
|
||||
putpicturepixel(x1*16+x2,y1*16+y2,matchcolor((y2*255)/15,
|
||||
((y1*4+x1)*255)/15,(x2*255)/15))
|
||||
end;end;end;end
|
||||
@ -1,18 +0,0 @@
|
||||
-- 15bit colour space from palette
|
||||
--
|
||||
|
||||
-- Copyright 2010 Paulo Silva
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; version 2
|
||||
-- of the License. See <http://www.gnu.org/licenses/>
|
||||
|
||||
w,h=getpicturesize();
|
||||
for y1=0,3,1 do
|
||||
for x1=0,7,1 do
|
||||
for y2=0,31,1 do
|
||||
for x2=0,31,1 do
|
||||
putpicturepixel(x1*32+x2,y1*32+y2,matchcolor((y2*255)/31,
|
||||
((y1*8+x1)*255)/31,(x2*255)/31))
|
||||
end;end;end;end
|
||||
@ -1,18 +0,0 @@
|
||||
-- 18bit colour space from palette
|
||||
--
|
||||
|
||||
-- Copyright 2010 Paulo Silva
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; version 2
|
||||
-- of the License. See <http://www.gnu.org/licenses/>
|
||||
|
||||
w,h=getpicturesize();
|
||||
for y1=0,7,1 do
|
||||
for x1=0,7,1 do
|
||||
for y2=0,63,1 do
|
||||
for x2=0,63,1 do
|
||||
putpicturepixel(x1*64+x2,y1*64+y2,matchcolor((y2*255)/64,
|
||||
((y1*8+x1)*255)/64,(x2*255)/64))
|
||||
end;end;end;end
|
||||
@ -1,19 +1,12 @@
|
||||
-- Glass grid filter
|
||||
|
||||
-- Copyright 2010 Paulo Silva
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; version 2
|
||||
-- of the License. See <http://www.gnu.org/licenses/>
|
||||
|
||||
-- Glass grid filter - Copyright 2010 Paulo Silva
|
||||
-- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. See <http://www.gnu.org/licenses/>
|
||||
w,h=getpicturesize();
|
||||
for y1=0,h-1,8 do
|
||||
for x1=0,w-1,8 do
|
||||
for y2=0,3,1 do
|
||||
for x2=0,7,1 do
|
||||
c1=getpicturepixel(x1+x2,y1+y2)
|
||||
c2=getpicturepixel(x1+7-x2,y1+7-y2)
|
||||
putpicturepixel(x1+x2,y1+y2,c2)
|
||||
putpicturepixel(x1+7-x2,y1+7-y2,c1)
|
||||
end;end;end;end
|
||||
ok,xsiz,ysiz=inputbox("message","xsize",8,0,64,5,"ysize",8,0,64,6);
|
||||
if ok==true then
|
||||
for y1=0,h-1,xsiz do
|
||||
for x1=0,w-1,ysiz do
|
||||
for y2=0,(ysiz/2)-1,1 do
|
||||
for x2=0,xsiz-1,1 do
|
||||
c1=getpicturepixel(x1+x2,y1+y2);c2=getpicturepixel(x1+(xsiz-1)-x2,y1+(ysiz-1)-y2)
|
||||
putpicturepixel(x1+x2,y1+y2,c2);putpicturepixel(x1+(xsiz-1)-x2,y1+(ysiz-1)-y2,c1)
|
||||
end;end;end;end;end
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
-- Draw 8x8 grid
|
||||
|
||||
-- Copyright 2010 Paulo Silva
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; version 2
|
||||
-- of the License. See <http://www.gnu.org/licenses/>
|
||||
|
||||
w,h=getpicturesize();
|
||||
for y=0,h-1,1 do
|
||||
for x=0,w-1,8 do
|
||||
putpicturepixel(x,y,1);
|
||||
end;end
|
||||
for y=0,h-1,8 do
|
||||
for x=0,w-1,1 do
|
||||
putpicturepixel(x,y,1);
|
||||
end;end
|
||||
@ -1,19 +0,0 @@
|
||||
-- Draw red 8x8 grid
|
||||
|
||||
-- Copyright 2010 Paulo Silva
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; version 2
|
||||
-- of the License. See <http://www.gnu.org/licenses/>
|
||||
|
||||
w,h=getpicturesize();
|
||||
c=matchcolor(0xFF,0x00,0x00)
|
||||
for y=0,h-1,1 do
|
||||
for x=0,w-1,8 do
|
||||
putpicturepixel(x,y,c);
|
||||
end;end
|
||||
for y=0,h-1,8 do
|
||||
for x=0,w-1,1 do
|
||||
putpicturepixel(x,y,c);
|
||||
end;end
|
||||
@ -1,18 +0,0 @@
|
||||
-- Draw isometric grid
|
||||
|
||||
-- Copyright 2010 Paulo Silva
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; version 2
|
||||
-- of the License. See <http://www.gnu.org/licenses/>
|
||||
|
||||
w,h=getpicturesize();
|
||||
for y=0,h-1,8 do
|
||||
for x=0,w-1,1 do
|
||||
putpicturepixel(x,y+(x/2)%8,1);
|
||||
end;end
|
||||
for y=0,h-1,8 do
|
||||
for x=0,w-1,1 do
|
||||
putpicturepixel(x+3,y+7-((x/2)%8),1);
|
||||
end;end
|
||||
@ -1,14 +0,0 @@
|
||||
-- x1 palette to picture
|
||||
|
||||
-- Copyright 2010 Paulo Silva
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; version 2
|
||||
-- of the License. See <http://www.gnu.org/licenses/>
|
||||
|
||||
w,h=getpicturesize();
|
||||
for y1=0,7,1 do
|
||||
for x1=0,31,1 do
|
||||
putpicturepixel(x1,y1,y1+x1*8)
|
||||
end;end
|
||||
@ -1,16 +0,0 @@
|
||||
-- x8 palette to picture
|
||||
|
||||
-- Copyright 2010 Paulo Silva
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; version 2
|
||||
-- of the License. See <http://www.gnu.org/licenses/>
|
||||
|
||||
setpicturesize(256,64);
|
||||
for y1=0,7,1 do
|
||||
for x1=0,31,1 do
|
||||
for y2=0,7,1 do
|
||||
for x2=0,7,1 do
|
||||
putpicturepixel(x1*8+x2,y1*8+y2,y1+x1*8)
|
||||
end;end;end;end
|
||||
37
share/grafx2/scripts/pic_ni_cellcolourreducer.lua
Normal file
@ -0,0 +1,37 @@
|
||||
-- cell colour reducer - jan'11, from Paulo Silva, with help from people from GrafX2 google group (DawnBringer, Adrien Destugues (PulkoMandy), and Yves Rizoud)
|
||||
-- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. See <http://www.gnu.org/licenses/>
|
||||
w,h=getpicturesize()
|
||||
ok,xcell,ycell=inputbox("Modify cell pixel size","xcell",8,1,16,4,"ycell",8,1,16,4);
|
||||
if ok==true then
|
||||
function grayscaleindexed(c)
|
||||
r,g,b=getcolor(c);return math.floor((b*11+r*30+g*59)/100);end
|
||||
celcnt={};for n=0,255,1 do celcnt[n+1]=0;end -- Arraycounter must have initial value
|
||||
for y1=0,h-1,ycell do
|
||||
for x1=0,w-1,xcell do
|
||||
for i=0,255,1 do
|
||||
celcnt[i+1]=0;end
|
||||
for y2=0,ycell-1,1 do
|
||||
for x2=0,xcell-1,1 do
|
||||
x=x1+x2;y=y1+y2;u=getpicturepixel(x,y)
|
||||
celcnt[u+1]=celcnt[u+1]+(1000*xcell*ycell)+math.random(0,950);end;end
|
||||
ikattr=0;paattr=0;ikcnt=0;pacnt=0
|
||||
for i=0,255,1 do
|
||||
if ikcnt<celcnt[i+1] then ikcnt=celcnt[i+1];ikattr=i;end;end
|
||||
celcnt[ikattr+1]=0
|
||||
for i=0,255,1 do
|
||||
if pacnt<celcnt[i+1] then pacnt=celcnt[i+1];paattr=i;end;end
|
||||
if grayscaleindexed(ikattr)>grayscaleindexed(paattr) then tmpr=ikattr;ikattr=paattr;paattr=tmpr;end
|
||||
wmid=math.floor((grayscaleindexed(paattr)+grayscaleindexed(ikattr))/2)
|
||||
for y2=0,ycell-1,1 do
|
||||
for x2=0,xcell-1,1 do
|
||||
x=x1+x2;y=y1+y2;u=getpicturepixel(x,y)
|
||||
if u==ikattr then
|
||||
idou=ikattr
|
||||
elseif u==paattr then
|
||||
idou=paattr
|
||||
else
|
||||
idou=ikattr
|
||||
if grayscaleindexed(u)>wmid then idou=paattr;end
|
||||
end
|
||||
putpicturepixel(x,y,idou)
|
||||
end;end;end;end;end
|
||||
13
share/grafx2/scripts/pic_ni_drawgridisometric.lua
Normal file
@ -0,0 +1,13 @@
|
||||
-- Draw isometric grid - Copyright 2010 Paulo Silva
|
||||
-- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. See <http://www.gnu.org/licenses/>
|
||||
w,h=getpicturesize();
|
||||
ok,gsiz,ik=inputbox("draw isometric grid","size",16,0,128,5,"colour",1,0,255,6);
|
||||
if ok==true then
|
||||
for y=0,h-1,gsiz do
|
||||
for x=0,w-1,1 do
|
||||
putpicturepixel(x,y+(x/2)%gsiz,ik);
|
||||
end;end
|
||||
for y=0,h-1,gsiz do
|
||||
for x=0,w-1,1 do
|
||||
putpicturepixel(x+((gsiz/2)-1),y+(gsiz-1)-((x/2)%gsiz),ik);
|
||||
end;end;end
|
||||
@ -0,0 +1,11 @@
|
||||
-- draw grid - indexed colour - Copyright 2010 Paulo Silva
|
||||
-- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. See <http://www.gnu.org/licenses/>
|
||||
w,h=getpicturesize();
|
||||
ok,xsiz,ysiz,c=inputbox("draw grid - indexed colour)","x size",8,1,64,5,"y size",8,1,64,6,"colour id",0,0,255,6);
|
||||
if ok==true then
|
||||
for y=0,h-1,1 do
|
||||
for x=0,w-1,xsiz do
|
||||
putpicturepixel(x,y,c);end;end
|
||||
for y=0,h-1,ysiz do
|
||||
for x=0,w-1,1 do
|
||||
putpicturepixel(x,y,c);end;end;end
|
||||
@ -0,0 +1,14 @@
|
||||
-- draw grid - rgb (matchcolor) - Copyright 2010 Paulo Silva
|
||||
-- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. See <http://www.gnu.org/licenses/>
|
||||
w,h=getpicturesize()
|
||||
ok,xsiz,ysiz,r,g,b=inputbox("draw grid - rgb (matchcolor)","x size",8,1,64,5,"y size",8,1,64,6,"r",128,0,255,6,"g",128,0,255,6,"b",128,0,255,6);
|
||||
if ok==true then
|
||||
c=matchcolor(r,g,b)
|
||||
for y=0,h-1,1 do
|
||||
for x=0,w-1,xsiz do
|
||||
putpicturepixel(x,y,c);
|
||||
end;end
|
||||
for y=0,h-1,ysiz do
|
||||
for x=0,w-1,1 do
|
||||
putpicturepixel(x,y,c);
|
||||
end;end;end
|
||||
17
share/grafx2/scripts/pic_ni_flippicture.lua
Normal file
@ -0,0 +1,17 @@
|
||||
-- flip picture - Copyright 2010 Paulo Silva
|
||||
-- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. See <http://www.gnu.org/licenses/>
|
||||
w,h=getpicturesize();
|
||||
ok,flipx,flipy=inputbox("flip picture","flip x",1,0,1,-1,"flip y",0,0,1,-1);
|
||||
if ok==true then
|
||||
if flipx==1 then
|
||||
for y=0,h-1,1 do
|
||||
for x=0,w/2,1 do
|
||||
c1=getpicturepixel(x,y);c2=getpicturepixel(w-x-1,y)
|
||||
putpicturepixel(x,y,c2);putpicturepixel(w-x-1,y,c1)
|
||||
end;end
|
||||
else
|
||||
for y=0,h/2,1 do
|
||||
for x=0,w-1,1 do
|
||||
c1=getpicturepixel(x,y);c2=getpicturepixel(x,h-y-1)
|
||||
putpicturepixel(x,y,c2);putpicturepixel(x,h-y-1,c1)
|
||||
end;end;end;end
|
||||
11
share/grafx2/scripts/pic_ni_palettetopicture.lua
Normal file
@ -0,0 +1,11 @@
|
||||
-- palette to picture - Copyright 2010 Paulo Silva
|
||||
-- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. See <http://www.gnu.org/licenses/>
|
||||
w,h=getpicturesize();
|
||||
ok,xsiz,ysiz=inputbox("palette to picture","x size",8,1,16,5,"y size",8,1,16,6);
|
||||
if ok==true then
|
||||
for y1=0,7,1 do
|
||||
for x1=0,31,1 do
|
||||
for y2=0,ysiz-1,1 do
|
||||
for x2=0,xsiz-1,1 do
|
||||
putpicturepixel(x1*xsiz+x2,y1*ysiz+y2,y1+x1*8)
|
||||
end;end;end;end;end
|
||||
12
share/grafx2/scripts/pic_ni_xbitcolourspacefrompalette.lua
Normal file
@ -0,0 +1,12 @@
|
||||
-- Copyright 2010 Paulo Silva
|
||||
-- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. See <http://www.gnu.org/licenses/>
|
||||
w,h=getpicturesize();
|
||||
ok,bitd=inputbox("colourspace from palette","bitdepth:",4,1,8,5);
|
||||
if ok==true then
|
||||
bitd3=(2^bitd);bitd8=(2^(math.floor(bitd/2)));bitd9=(2^((math.floor((bitd-1)/2))+1))
|
||||
for y1=0,(bitd8-1),1 do
|
||||
for x1=0,(bitd9-1),1 do
|
||||
for y2=0,(bitd3-1),1 do
|
||||
for x2=0,(bitd3-1),1 do
|
||||
putpicturepixel(x1*bitd3+x2,y1*bitd3+y2,matchcolor((y2*255)/(bitd3-1),((y1*8+x1)*255)/(bitd3-1),(x2*255)/(bitd3-1)))
|
||||
end;end;end;end;end
|
||||
BIN
share/grafx2/skins/skin_Aurora.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
share/grafx2/skins/skin_Clax2.gif
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
share/grafx2/skins/skin_Clax3.gif
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
share/grafx2/skins/skin_Clax4.gif
Normal file
|
After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 19 KiB |
@ -778,11 +778,7 @@ HTML_FILE_EXTENSION = .html
|
||||
|
||||
HTML_HEADER =
|
||||
|
||||
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard footer.
|
||||
|
||||
HTML_FOOTER = ../tools/footer.html
|
||||
HTML_TIMESTAMP = NO
|
||||
|
||||
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
|
||||
# style sheet that is used by each HTML page. It can be used to
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
<hr size="1"/><address style="text-align: right;"><small>
|
||||
Generated for $projectname by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.png" alt="doxygen"/></a></small></address>
|
||||
</body>
|
||||
</html>
|
||||
97
tools/gifanalyzer/gifanalyzer.c
Normal file
@ -0,0 +1,97 @@
|
||||
/* vim:expandtab:ts=2 sw=2:
|
||||
*/
|
||||
/* Grafx2 - The Ultimate 256-color bitmap paint program
|
||||
* Gif Analyzer tool
|
||||
|
||||
Copyright 2010 Adrien Destugues
|
||||
|
||||
Grafx2 is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; version 2
|
||||
of the License.
|
||||
|
||||
Grafx2 is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Grafx2; if not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
FILE* theFile;
|
||||
|
||||
if(argc != 2)
|
||||
{
|
||||
printf("%s file.gif\n",argv[0]);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
theFile = fopen(argv[1], "r");
|
||||
|
||||
uint8_t buffer[256];
|
||||
|
||||
fread(buffer, 1, 6, theFile);
|
||||
buffer[6] = 0;
|
||||
|
||||
printf("Signature: %6s\n", buffer);
|
||||
|
||||
uint16_t w,h;
|
||||
|
||||
fread(&w,2,1,theFile);
|
||||
fread(&h,2,1,theFile);
|
||||
|
||||
printf("Resolution: %dx%d\n",w,h);
|
||||
|
||||
fread(buffer,1,3,theFile);
|
||||
|
||||
int colors = ((buffer[0]&0b01110000)>>4)+1;
|
||||
colors = pow(2,colors);
|
||||
|
||||
int bpp = (buffer[0]&0xF) +1;
|
||||
|
||||
printf("Color palette: %#02.2x\n",buffer[0]&0xFF);
|
||||
if (buffer[0] & 0b10000000)
|
||||
printf("\tGlobal palette\n");
|
||||
printf("\tColor count: %d\n", colors);
|
||||
printf("\tBits per pixel: %d\n",bpp);
|
||||
|
||||
printf("Index of background color: %d\n",buffer[1]);
|
||||
printf("(reserved byte: %d)\n",buffer[2]);
|
||||
|
||||
printf("Color palette:\n");
|
||||
for (int i = 0; i < pow(2,bpp); i++)
|
||||
{
|
||||
fread(buffer,1,3,theFile);
|
||||
printf("\t%d: %u %u %u\t",i,buffer[0], buffer[1], buffer[2]);
|
||||
if ((i+1)%4 ==0)puts("");
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
do {
|
||||
fread(buffer,1,1,theFile);
|
||||
i++;
|
||||
} while (i != ',');
|
||||
|
||||
if (i > 1);
|
||||
printf("Skipped %d meaningless bytes before image descriptor\n",i);
|
||||
|
||||
uint16_t x,y;
|
||||
|
||||
fread(&x,2,1,theFile);
|
||||
fread(&y,2,1,theFile);
|
||||
fread(&w,2,1,theFile);
|
||||
fread(&h,2,1,theFile);
|
||||
|
||||
printf("Image descriptor\n");
|
||||
printf("\tx=%d y=%d w=%d h=%d\n",x,y,w,h);
|
||||
|
||||
fclose(theFile);
|
||||
}
|
||||