Skip to content

Commit

Permalink
CR purge
Browse files Browse the repository at this point in the history
  • Loading branch information
runer112 committed Feb 9, 2017
1 parent 78be69c commit 15a573e
Show file tree
Hide file tree
Showing 15 changed files with 472 additions and 471 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=lf
122 changes: 61 additions & 61 deletions CEdev/examples/library_examples/graphics/demo_11/GRAPHX11_test.json
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
{
"rom": "84pce_515.rom",
"transfer_files": [
"bin/GRAPHX11.8xp"
],
"target": {
"name": "GRAPHX11",
"isASM": true
},
"sequence": [
"action|launch", "delay|300", "hash|rectangles", "hash|palette_0",
"key|enter", "delay|1000", "hash|palette_25",
"key|enter", "delay|1000", "hash|palette_50",
"key|enter", "delay|1000", "hash|palette_75",
"key|enter", "delay|1000", "hash|palette_100",
"key|enter", "delay|300", "hash|after_exit"
],
"hashes": {
"rectangles": {
"description": "Test rectangles",
"start": "vram_start",
"size": "vram_8_size",
"expected_CRCs": [ "328D511E" ]
},
"palette_0": {
"description": "Test lighten/darken fade, 0% progress",
"start": "lcdPalette",
"size": "8",
"expected_CRCs": [ "41C3BFF8" ]
},
"palette_25": {
"description": "Test lighten/darken fade, 25% progress",
"start": "lcdPalette",
"size": "8",
"expected_CRCs": [ "5F64F889" ]
},
"palette_50": {
"description": "Test lighten/darken fade, 50% progress",
"start": "lcdPalette",
"size": "8",
"expected_CRCs": [ "C48CEF7C" ]
},
"palette_75": {
"description": "Test lighten/darken fade, 75% progress",
"start": "lcdPalette",
"size": "8",
"expected_CRCs": [ "81FEDD4E" ]
},
"palette_100": {
"description": "Test lighten/darken fade, 100% progress",
"start": "lcdPalette",
"size": "8",
"expected_CRCs": [ "B451E096" ]
},
"after_exit": {
"description": "Back to the home screen (exit check)",
"start": "vram_start",
"size": "vram_16_size",
"expected_CRCs": [ "FFAF89BA", "101734A5" ]
}
}
{
"rom": "84pce_515.rom",
"transfer_files": [
"bin/GRAPHX11.8xp"
],
"target": {
"name": "GRAPHX11",
"isASM": true
},
"sequence": [
"action|launch", "delay|300", "hash|rectangles", "hash|palette_0",
"key|enter", "delay|1000", "hash|palette_25",
"key|enter", "delay|1000", "hash|palette_50",
"key|enter", "delay|1000", "hash|palette_75",
"key|enter", "delay|1000", "hash|palette_100",
"key|enter", "delay|300", "hash|after_exit"
],
"hashes": {
"rectangles": {
"description": "Test rectangles",
"start": "vram_start",
"size": "vram_8_size",
"expected_CRCs": [ "328D511E" ]
},
"palette_0": {
"description": "Test lighten/darken fade, 0% progress",
"start": "lcdPalette",
"size": "8",
"expected_CRCs": [ "41C3BFF8" ]
},
"palette_25": {
"description": "Test lighten/darken fade, 25% progress",
"start": "lcdPalette",
"size": "8",
"expected_CRCs": [ "5F64F889" ]
},
"palette_50": {
"description": "Test lighten/darken fade, 50% progress",
"start": "lcdPalette",
"size": "8",
"expected_CRCs": [ "C48CEF7C" ]
},
"palette_75": {
"description": "Test lighten/darken fade, 75% progress",
"start": "lcdPalette",
"size": "8",
"expected_CRCs": [ "81FEDD4E" ]
},
"palette_100": {
"description": "Test lighten/darken fade, 100% progress",
"start": "lcdPalette",
"size": "8",
"expected_CRCs": [ "B451E096" ]
},
"after_exit": {
"description": "Back to the home screen (exit check)",
"start": "vram_start",
"size": "vram_16_size",
"expected_CRCs": [ "FFAF89BA", "101734A5" ]
}
}
}
132 changes: 66 additions & 66 deletions CEdev/examples/library_examples/graphics/demo_11/src/main.c
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
/* Keep these headers */
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <tice.h>

/* Standard headers - it's recommended to leave them included */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/* Shared libraries */
#include <lib/ce/graphx.h>

#define color gfx_RGBTo1555(34, 55, 89)

/* Put function prototypes here */

/* Put all your code here */
void main(void) {
uint8_t i = 0;

/* Initialize the 8bpp graphics */
gfx_Begin( gfx_8bpp );

/* For i in 0..255 */
do {

/* Fade out to black */
gfx_palette[0] = gfx_Darken(color, i);
/* Fade in from black */
gfx_palette[1] = gfx_Darken(color, ~i);
/* Fade in from white */
gfx_palette[3] = gfx_Lighten(color, ~i);
/* Fade out to white */
gfx_palette[2] = gfx_Lighten(color, i);

/* Fade out to black */
gfx_SetColor(0);
gfx_FillRectangle_NoClip(0,0,160,120);
/* Fade in from black */
gfx_SetColor(1);
gfx_FillRectangle_NoClip(160,0,160,120);
/* Fade in from white */
gfx_SetColor(2);
gfx_FillRectangle_NoClip(0,120,160,120);
/* Fade out to white */
gfx_SetColor(3);
gfx_FillRectangle_NoClip(160,120,160,120);

/* Wait for a keypress at the start of each quarter of the fade */
if (!(i & 0x3f)) {
while(!os_GetCSC());
}

/* Loop until i is 0 again because of 8 bit range */
} while(++i);

/* Wait for a keypress */
while(!os_GetCSC());

/* Usual cleanup */
gfx_End();
prgm_CleanUp();
}
/* Keep these headers */
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <tice.h>

/* Standard headers - it's recommended to leave them included */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/* Shared libraries */
#include <lib/ce/graphx.h>

#define color gfx_RGBTo1555(34, 55, 89)

/* Put function prototypes here */

/* Put all your code here */
void main(void) {
uint8_t i = 0;

/* Initialize the 8bpp graphics */
gfx_Begin( gfx_8bpp );

/* For i in 0..255 */
do {

/* Fade out to black */
gfx_palette[0] = gfx_Darken(color, i);
/* Fade in from black */
gfx_palette[1] = gfx_Darken(color, ~i);
/* Fade in from white */
gfx_palette[3] = gfx_Lighten(color, ~i);
/* Fade out to white */
gfx_palette[2] = gfx_Lighten(color, i);

/* Fade out to black */
gfx_SetColor(0);
gfx_FillRectangle_NoClip(0,0,160,120);
/* Fade in from black */
gfx_SetColor(1);
gfx_FillRectangle_NoClip(160,0,160,120);
/* Fade in from white */
gfx_SetColor(2);
gfx_FillRectangle_NoClip(0,120,160,120);
/* Fade out to white */
gfx_SetColor(3);
gfx_FillRectangle_NoClip(160,120,160,120);

/* Wait for a keypress at the start of each quarter of the fade */
if (!(i & 0x3f)) {
while(!os_GetCSC());
}

/* Loop until i is 0 again because of 8 bit range */
} while(++i);

/* Wait for a keypress */
while(!os_GetCSC());

/* Usual cleanup */
gfx_End();
prgm_CleanUp();
}
56 changes: 28 additions & 28 deletions CEdev/lib/src/std/shared/isalnum.asm
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
.def _isalnum
.ref ___maptab
.assume adl=1
; original source
; int isalnum(int c) {
; if( (unsigned char)c & (unsigned char)0x80 )
; return (0);
; return(__maptab[c] & (unsigned char)(UC|LC|DIG));
; }

_isalnum:
pop hl
pop de
push de
push hl
or a,a
sbc hl,hl
bit 7,e
ret nz
ex de,hl
ld de,___maptab
add hl,de
ld a,(hl)
and a,13
sbc hl,hl
ld l,a
ret
.def _isalnum
.ref ___maptab
.assume adl=1
; original source
; int isalnum(int c) {
; if( (unsigned char)c & (unsigned char)0x80 )
; return (0);
; return(__maptab[c] & (unsigned char)(UC|LC|DIG));
; }

_isalnum:
pop hl
pop de
push de
push hl
or a,a
sbc hl,hl
bit 7,e
ret nz
ex de,hl
ld de,___maptab
add hl,de
ld a,(hl)
and a,13
sbc hl,hl
ld l,a
ret
54 changes: 27 additions & 27 deletions CEdev/lib/src/std/shared/isalpha.asm
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
.def _isalpha
.ref ___maptab
.assume adl=1
; original source
; int isalnum(int c) {
; if( (unsigned char)c & (unsigned char)0x80 )
; return (0);
; return(__maptab[c] & (unsigned char)(UC|LC));

_isalpha:
pop hl
pop de
push de
push hl
or a,a
sbc hl,hl
bit 7,e
ret nz
ex de,hl
ld de,___maptab
add hl,de
ld a,(hl)
and a,12
sbc hl,hl
ld l,a
ret
.def _isalpha
.ref ___maptab
.assume adl=1
; original source
; int isalnum(int c) {
; if( (unsigned char)c & (unsigned char)0x80 )
; return (0);
; return(__maptab[c] & (unsigned char)(UC|LC));

_isalpha:
pop hl
pop de
push de
push hl
or a,a
sbc hl,hl
bit 7,e
ret nz
ex de,hl
ld de,___maptab
add hl,de
ld a,(hl)
and a,12
sbc hl,hl
ld l,a
ret
Loading

0 comments on commit 15a573e

Please sign in to comment.