mirror of
https://frontier.innolan.net/github/AmigaExamples.git
synced 2026-09-12 13:32:30 +00:00
Playing with copper_fun
This commit is contained in:
@@ -6,6 +6,7 @@ BASE_ADDRESS=10000
|
||||
include ../shared/base.mk
|
||||
|
||||
out/copper-new.s: assets/test.gif out/copper_fun_generate
|
||||
rm -f out/*.png
|
||||
/opt/ImageMagick/bin/convert assets/test.gif out/%05d.png
|
||||
./convert.sh > out/copper-new.s
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ for I in out/*.png; do
|
||||
if [ $ODD = 0 ] ; then
|
||||
echo `echo $I | sed -e 's/\///' -e 's/\.png//'`":"
|
||||
./out/copper_fun_generate $I
|
||||
#mv -f resized.png $I.resized.png
|
||||
echo " dc.l \$fffffffe"
|
||||
ODD=1
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ entry:
|
||||
move.l a1,(a0)
|
||||
|
||||
move.l counter,d0
|
||||
cmpi.l #5,counter
|
||||
cmpi.l #2,counter
|
||||
bne .ok
|
||||
move.l #0,counter
|
||||
move.l copperptr,a0
|
||||
@@ -56,7 +56,7 @@ entry:
|
||||
move.l copperptr,d0
|
||||
cmpi.l #end,d0
|
||||
bne .ok
|
||||
move.l #copper,copperptr
|
||||
move.l #out00001,copperptr
|
||||
.ok
|
||||
addi.l #1,counter
|
||||
bra.b .mainLoop
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
#include <sys/types.h>
|
||||
#include <magick/api.h>
|
||||
|
||||
#define HEIGHT 256+16
|
||||
#define TOP 16
|
||||
#define HEIGHT 256+TOP
|
||||
#define COPPER_WIDTH 52
|
||||
|
||||
typedef struct {
|
||||
@@ -22,7 +23,7 @@ typedef struct {
|
||||
} image_t;
|
||||
|
||||
image_t image = {0};
|
||||
config_t config = {.blur = 0.75};
|
||||
config_t config = {.blur = 1.0, .debug=0};
|
||||
|
||||
static void
|
||||
cleanup()
|
||||
@@ -73,7 +74,7 @@ getframedata(char* inputFile)
|
||||
abort_("Failed to read image %s\n", inputFile);
|
||||
}
|
||||
|
||||
int width = COPPER_WIDTH;
|
||||
int width = COPPER_WIDTH-8;
|
||||
int height = HEIGHT;
|
||||
|
||||
image.resizeImage=ResizeImage(image.image, width, height, BesselFilter, config.blur, &exception);
|
||||
@@ -95,9 +96,8 @@ main(int argc, char** argv)
|
||||
config.argv = argv;
|
||||
getframedata(argv[1]);
|
||||
|
||||
int startLine = 0x2c-16;
|
||||
int screenHeight = HEIGHT;
|
||||
int endLine = startLine+screenHeight;
|
||||
int startLine = 0x2c-TOP;
|
||||
int endLine = startLine+HEIGHT;
|
||||
int startHpos = 6+8;
|
||||
int i, line;
|
||||
|
||||
@@ -114,7 +114,7 @@ main(int argc, char** argv)
|
||||
}
|
||||
|
||||
for (i = 0; i < endw; i++) {
|
||||
PixelPacket pixel = GetOnePixel(image.resizeImage, i, line-startLine);
|
||||
PixelPacket pixel = GetOnePixel(image.resizeImage, i-10, line-startLine);
|
||||
printf("\tdc.w COLOR00,$%x%x%x\n", pixel.red>>4, pixel.green>>4, pixel.blue>>4);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user