Bump version number

This commit is contained in:
drmortalwombat 2022-02-06 21:47:08 +01:00
parent 3a7ea0837b
commit a5d5060048
5 changed files with 356 additions and 67 deletions

View File

@ -73,7 +73,7 @@ int main2(int argc, const char** argv)
#else
strcpy(strProductName, "oscar64");
strcpy(strProductVersion, "1.4.83");
strcpy(strProductVersion, "1.4.84");
#ifdef __APPLE__
uint32_t length = sizeof(basePath);

View File

@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,4,83,0
PRODUCTVERSION 1,4,83,0
FILEVERSION 1,4,84,0
PRODUCTVERSION 1,4,84,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -43,12 +43,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "oscar64"
VALUE "FileDescription", "oscar64 compiler"
VALUE "FileVersion", "1.4.83.0"
VALUE "FileVersion", "1.4.84.0"
VALUE "InternalName", "oscar64.exe"
VALUE "LegalCopyright", "Copyright (C) 2021"
VALUE "OriginalFilename", "oscar64.exe"
VALUE "ProductName", "oscar64"
VALUE "ProductVersion", "1.4.83.0"
VALUE "ProductVersion", "1.4.84.0"
END
END
BLOCK "VarFileInfo"

View File

@ -34,6 +34,12 @@
}
"Entry"
{
"MsmKey" = "8:_03D7013B0D39A89CEA9D267005ADCE39"
"OwnerKey" = "8:_FB2E467BC172457785F4279BB0BFE8B6"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_04ABABC55200450383686DD782DD1548"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@ -130,6 +136,12 @@
}
"Entry"
{
"MsmKey" = "8:_2CA3A525072974368303677563606FFE"
"OwnerKey" = "8:_FB2E467BC172457785F4279BB0BFE8B6"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_2D828D0247F144CDB0112B2AD4004C2C"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@ -190,6 +202,12 @@
}
"Entry"
{
"MsmKey" = "8:_3FA71395262A4AB4A1C2839FD6B91190"
"OwnerKey" = "8:_FB2E467BC172457785F4279BB0BFE8B6"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_3FFD08277B804985BDF072C0C1877287"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@ -328,12 +346,24 @@
}
"Entry"
{
"MsmKey" = "8:_777CE896BB0B3C09C1B5FB6CB3BFE84F"
"OwnerKey" = "8:_FB2E467BC172457785F4279BB0BFE8B6"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_79985361F09A43299E258E1A8E5ED934"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_7A40466D5E5D2D3FD71213A0C0AA5075"
"OwnerKey" = "8:_FB2E467BC172457785F4279BB0BFE8B6"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_7A9E700FC438425580655F7C1BC07FD3"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@ -526,6 +556,12 @@
}
"Entry"
{
"MsmKey" = "8:_B2B920A649CF4027457BBAB004078A03"
"OwnerKey" = "8:_FB2E467BC172457785F4279BB0BFE8B6"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_B4265CBF352343D2867DBCCE67D9F493"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@ -664,6 +700,18 @@
}
"Entry"
{
"MsmKey" = "8:_DC9FDF52011EB7C47318682BA0B3F26F"
"OwnerKey" = "8:_FB2E467BC172457785F4279BB0BFE8B6"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_DE2BF7C92569053E7C3DCE88AB7E2566"
"OwnerKey" = "8:_FB2E467BC172457785F4279BB0BFE8B6"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_E218D776D9014F99BE2B046AEF2D6E8B"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@ -718,6 +766,12 @@
}
"Entry"
{
"MsmKey" = "8:_EA3C0BCB01F2639DFA2E37EC8436E5F6"
"OwnerKey" = "8:_FB2E467BC172457785F4279BB0BFE8B6"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_ED872D39D58443D590B7C80604BC0FF4"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@ -923,6 +977,26 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_03D7013B0D39A89CEA9D267005ADCE39"
{
"SourcePath" = "8:VCRUNTIME140.dll"
"TargetName" = "8:VCRUNTIME140.dll"
"Tag" = "8:"
"Folder" = "8:_607E75AF0E2A4CB9908C4C39DF8FE6E4"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_04ABABC55200450383686DD782DD1548"
{
"SourcePath" = "8:..\\samples\\games\\lander.c"
@ -1243,6 +1317,26 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_2CA3A525072974368303677563606FFE"
{
"SourcePath" = "8:api-ms-win-crt-heap-l1-1-0.dll"
"TargetName" = "8:api-ms-win-crt-heap-l1-1-0.dll"
"Tag" = "8:"
"Folder" = "8:_607E75AF0E2A4CB9908C4C39DF8FE6E4"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_2D828D0247F144CDB0112B2AD4004C2C"
{
"SourcePath" = "8:..\\samples\\scrolling\\tunnel.c"
@ -1443,6 +1537,26 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_3FA71395262A4AB4A1C2839FD6B91190"
{
"SourcePath" = "8:api-ms-win-crt-stdio-l1-1-0.dll"
"TargetName" = "8:api-ms-win-crt-stdio-l1-1-0.dll"
"Tag" = "8:"
"Folder" = "8:_607E75AF0E2A4CB9908C4C39DF8FE6E4"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_3FFD08277B804985BDF072C0C1877287"
{
"SourcePath" = "8:..\\include\\assert.c"
@ -1903,6 +2017,26 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_777CE896BB0B3C09C1B5FB6CB3BFE84F"
{
"SourcePath" = "8:api-ms-win-crt-filesystem-l1-1-0.dll"
"TargetName" = "8:api-ms-win-crt-filesystem-l1-1-0.dll"
"Tag" = "8:"
"Folder" = "8:_607E75AF0E2A4CB9908C4C39DF8FE6E4"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_79985361F09A43299E258E1A8E5ED934"
{
"SourcePath" = "8:..\\include\\gfx\\mcbitmap.c"
@ -1923,6 +2057,26 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7A40466D5E5D2D3FD71213A0C0AA5075"
{
"SourcePath" = "8:api-ms-win-crt-locale-l1-1-0.dll"
"TargetName" = "8:api-ms-win-crt-locale-l1-1-0.dll"
"Tag" = "8:"
"Folder" = "8:_607E75AF0E2A4CB9908C4C39DF8FE6E4"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7A9E700FC438425580655F7C1BC07FD3"
{
"SourcePath" = "8:..\\samples\\rasterirq\\textcrawler.c"
@ -2563,6 +2717,26 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_B2B920A649CF4027457BBAB004078A03"
{
"SourcePath" = "8:api-ms-win-crt-math-l1-1-0.dll"
"TargetName" = "8:api-ms-win-crt-math-l1-1-0.dll"
"Tag" = "8:"
"Folder" = "8:_607E75AF0E2A4CB9908C4C39DF8FE6E4"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_B4265CBF352343D2867DBCCE67D9F493"
{
"SourcePath" = "8:..\\include\\c64\\joystick.c"
@ -3023,6 +3197,46 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_DC9FDF52011EB7C47318682BA0B3F26F"
{
"SourcePath" = "8:api-ms-win-crt-string-l1-1-0.dll"
"TargetName" = "8:api-ms-win-crt-string-l1-1-0.dll"
"Tag" = "8:"
"Folder" = "8:_607E75AF0E2A4CB9908C4C39DF8FE6E4"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_DE2BF7C92569053E7C3DCE88AB7E2566"
{
"SourcePath" = "8:api-ms-win-crt-runtime-l1-1-0.dll"
"TargetName" = "8:api-ms-win-crt-runtime-l1-1-0.dll"
"Tag" = "8:"
"Folder" = "8:_607E75AF0E2A4CB9908C4C39DF8FE6E4"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_E218D776D9014F99BE2B046AEF2D6E8B"
{
"SourcePath" = "8:..\\include\\stdlib.c"
@ -3203,6 +3417,26 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_EA3C0BCB01F2639DFA2E37EC8436E5F6"
{
"SourcePath" = "8:VERSION.dll"
"TargetName" = "8:VERSION.dll"
"Tag" = "8:"
"Folder" = "8:_607E75AF0E2A4CB9908C4C39DF8FE6E4"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_ED872D39D58443D590B7C80604BC0FF4"
{
"SourcePath" = "8:..\\samples\\kernalio\\fileread.c"
@ -3648,15 +3882,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:oscar64"
"ProductCode" = "8:{273BF824-E947-4B58-8992-6060F95D9EF7}"
"PackageCode" = "8:{3C6231C2-746F-4D40-83F7-159286D6BDB3}"
"ProductCode" = "8:{A0C4446A-49BE-4F87-9DD2-AE08FDB6A4AF}"
"PackageCode" = "8:{F280BCCE-9142-4B81-93B8-454DCA640E4E}"
"UpgradeCode" = "8:{9AB61EFF-ACAC-4079-9950-8D96615CD4EF}"
"AspNetVersion" = "8:2.0.50727.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:1.4.83"
"ProductVersion" = "8:1.4.84"
"Manufacturer" = "8:oscar64"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"

View File

@ -22,8 +22,10 @@ byte * const Font = (byte *)0xd000;
byte * const Color = (byte *)0xd800;
byte * const Sprites = (byte *)0xd800;
unsigned flashingBricks[32];
char numFlashingBricks[4];
inline void brick_put(char x, char y, char c)
void brick_put(char x, char y, char c)
{
char * cp = Color + 40 * y + x;
@ -46,25 +48,33 @@ inline void brick_put(char x, char y, char c)
sp[40] = 131;
sp[41] = 132;
sp[42] = 133;
sp[43] = 97;
sp[43] = 103 - (x & 1) - 2 * (y & 1);
sp[81] = 97;
sp[82] = 97;
sp[83] = 97;
sp[81] = 101 - (x & 1) + 2 * (y & 1);
sp[82] = 100 + (x & 1) + 2 * (y & 1);
sp[83] = 101 - (x & 1) + 2 * (y & 1);
}
void brick_init(void)
{
for(char y=0; y<6; y++)
for(char y=0; y<25; y++)
{
for(char x=0; x<40; x++)
{
Screen[40 * y + x] = 96 + (x & 1) + 2 * (y & 1) + 4 * (x == 0 || y == 0);
}
}
for(char y=0; y<8; y++)
{
for(char x=0; x<12; x++)
{
brick_put(3 * x + 2, 2 * y + 2, 8 + y);
brick_put(3 * x + 2, 2 * y + 1, 8 + y);
}
}
}
void brick_clr(char x, char y)
void brick_hit(char x, char y)
{
__assume(x < 40 && y < 25);
@ -82,6 +92,36 @@ void brick_clr(char x, char y)
x -= c;
unsigned bi = 256 * y + x;
char i = 0, n = numFlashingBricks[3];
while (i < n && flashingBricks[i] != bi)
i++;
if (i == n)
{
flashingBricks[i] = bi;
numFlashingBricks[3]++;
char * cp = Color + 40 * y + x;
cp[ 0] = 9;
cp[ 1] = 9;
cp[ 2] = 9;
cp[40] = 9;
cp[41] = 9;
cp[42] = 9;
}
}
}
void brick_animate(void)
{
char n = numFlashingBricks[0];
for(char i=0; i<n; i++)
{
char x = flashingBricks[i] & 0xff;
char y = flashingBricks[i] >> 8;
char * cp = Color + 40 * y + x;
cp[ 0] = 15;
@ -93,38 +133,47 @@ void brick_clr(char x, char y)
char * sp = Screen + 40 * (y - 1) + (x - 1);
char ch = 96 + (x & 1) + 2 * (y & 1)
if (sp[ 0] >= 128)
sp[41] = 97;
sp[41] = ch | 4;
else
sp[41] = 96;
sp[41] = ch;
if (sp[ 1] >= 128)
sp[42] = 97;
sp[42] = (ch ^ 1) | 4;
else
sp[42] = 96;
sp[42] = (ch ^ 1);
if (sp[ 2] >= 128)
sp[43] = 97;
sp[43] = ch | 4;
else
sp[43] = 96;
sp[43] = ch;
if (sp[40] >= 128)
sp[81] = 97;
sp[81] = (ch ^ 2) | 4;
else
sp[81] = 96;
sp[81] = (ch ^ 2);
sp[82] = 96;
sp[83] = 96;
if (sp[84] == 97)
sp[84] = 96;
sp[82] = (ch ^ 3);
sp[83] = (ch ^ 2);
if (sp[122] == 97)
sp[122] = 96;
if (sp[123] == 97)
sp[123] = 96;
if (sp[124] == 97)
sp[124] = 96;
if (sp[84] < 128)
sp[84] = (ch ^ 3);
if (sp[122] < 128)
sp[122] = (ch ^ 1);
if (sp[123] < 128)
sp[123] = ch;
if (sp[124] < 128)
sp[124] = (ch ^ 1);
}
for(char i=0; i<3; i++)
numFlashingBricks[i] = numFlashingBricks[i + 1] - n;
numFlashingBricks[3] = numFlashingBricks[2];
for(char i=0; i<numFlashingBricks[3]; i++)
flashingBricks[i] = flashingBricks[i + n];
}
struct Ball
@ -148,8 +197,10 @@ void ball_init(Ball * ball, char index, int sx, int sy, int vx, int vy)
ball->vx = vx;
ball->vy = vy;
spr_set(2 * index + 2, true, 200, 200, 97, 0, false, false, false);
spr_set(2 * index + 3, true, 200, 200, 96, 15, true, false, false);
int ix = BALL_INT(ball->sx) + 24, iy = BALL_INT(ball->sy) + 50;
spr_set(2 * index + 2, true, ix, iy, 97, 0, false, false, false);
spr_set(2 * index + 3, true, ix, iy, 96, 15, true, false, false);
}
void ball_lost(Ball * ball)
@ -203,39 +254,43 @@ void ball_loop(Ball * ball)
else if (ix + 6 >= px + 48 && ball->vx < 0)
mirrorX = true;
else
ball->vx = (ball->vx * 12 + paddlevx + 8) >> 4;
ball->vx = (ball->vx * 6 + paddlevx + 4) >> 3;
}
}
int x0 = ix >> 3;
int y0 = iy >> 3;
int x1 = (ix + 6) >> 3;
int y1 = (iy + 6) >> 3;
int x1 = (ix + 5) >> 3;
int y1 = (iy + 5) >> 3;
char col = 0;
if (y0 >= 0 && Screen[40 * y0 + x0] >= 128) col |= COL_00;
if (y0 >= 0 && Screen[40 * y0 + x1] >= 128) col |= COL_01;
if (y1 < 24 && Screen[40 * y1 + x0] >= 128) col |= COL_10;
if (y1 < 24 && Screen[40 * y1 + x1] >= 128) col |= COL_11;
if (ball->vx < 0 && ((col & (COL_00 | COL_01)) == COL_00) || ((col & (COL_10 | COL_11)) == COL_10))
mirrorX = true;
else if (ball->vx > 0 && ((col & (COL_00 | COL_01)) == COL_01) || ((col & (COL_10 | COL_11)) == COL_11))
mirrorX = true;
if (ball->vy < 0 && ((col & (COL_00 | COL_10)) == COL_00) || ((col & (COL_01 | COL_11)) == COL_01))
mirrorY = true;
else if (ball->vy > 0 && ((col & (COL_00 | COL_10)) == COL_10) || ((col & (COL_01 | COL_11)) == COL_11))
mirrorY = true;
if (col)
if (x0 >= 0 && x1 < 40 && y0 >= 0 && y1 < 24)
{
brick_clr(x0, y0);
brick_clr(x1, y0);
brick_clr(x0, y1);
brick_clr(x1, y1);
char col = 0;
if (Screen[40 * y0 + x0] >= 128) col |= COL_00;
if (Screen[40 * y0 + x1] >= 128) col |= COL_01;
if (Screen[40 * y1 + x0] >= 128) col |= COL_10;
if (Screen[40 * y1 + x1] >= 128) col |= COL_11;
if (ball->vx < 0 && ((col & (COL_00 | COL_01)) == COL_00) || ((col & (COL_10 | COL_11)) == COL_10))
mirrorX = true;
else if (ball->vx > 0 && ((col & (COL_00 | COL_01)) == COL_01) || ((col & (COL_10 | COL_11)) == COL_11))
mirrorX = true;
if (ball->vy < 0 && ((col & (COL_00 | COL_10)) == COL_00) || ((col & (COL_01 | COL_11)) == COL_01))
mirrorY = true;
else if (ball->vy > 0 && ((col & (COL_00 | COL_10)) == COL_10) || ((col & (COL_01 | COL_11)) == COL_11))
mirrorY = true;
if (col)
{
brick_hit(x0, y0);
brick_hit(x1, y0);
brick_hit(x0, y1);
brick_hit(x1, y1);
}
}
if (mirrorY)
@ -335,7 +390,7 @@ void game_state(GameState state)
break;
case GS_BALL_LOCKED:
ball_init(TheGame.balls + 0, 0, paddlex + BALL_COORD(12, 0), BALL_COORD(180, 0), BALL_COORD(0, 0), BALL_COORD(0, 0))
ball_init(TheGame.balls + 0, 0, paddlex + BALL_COORD(22, 0), BALL_COORD(184, 0), BALL_COORD(0, 0), BALL_COORD(0, 0))
break;
case GS_PLAYING:
@ -370,11 +425,10 @@ void game_loop()
case GS_PLAYING:
paddle_control();
vic.color_border++;
for(char i=0; i<4; i++)
{
for(char j=0; j<3; j++)
ball_loop(TheGame.balls + j)
}
for(char i=0; i<3; i++)
ball_loop(TheGame.balls + i);
for(char i=0; i<3; i++)
ball_loop(TheGame.balls + i);
vic.color_border--;
if (!(TheGame.balls[0].active || TheGame.balls[1].active || TheGame.balls[2].active))
game_state(GS_BALL_DROPPED);
@ -421,6 +475,7 @@ int main(void)
for(;;)
{
brick_animate();
game_loop();
vic_waitFrame();

Binary file not shown.