From 194d2dad593df578855af3fc428a716242ce9bc4 Mon Sep 17 00:00:00 2001 From: sam-astro <77079540+sam-astro@users.noreply.github.com> Date: Sun, 22 May 2022 10:27:02 -0400 Subject: [PATCH 1/8] Switch back to \n --- ZSharp/Main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZSharp/Main.cpp b/ZSharp/Main.cpp index 57a86cc..eddb7f9 100644 --- a/ZSharp/Main.cpp +++ b/ZSharp/Main.cpp @@ -587,7 +587,7 @@ int parseZSharp(string script) #endif // Split the script by ;, signifying a line ending - vector lines = split(script, ';'); + vector lines = split(script, '\n'); vector> words; for (int i = 0; i < (int)lines.size(); i++) // Then split said lines into indiviual words words.push_back(split(lines.at(i), ' ')); From bbc1e1f16b9f1e59cc533db50b765ca1d0f578b8 Mon Sep 17 00:00:00 2001 From: sam-astro <77079540+sam-astro@users.noreply.github.com> Date: Sun, 22 May 2022 10:33:46 -0400 Subject: [PATCH 2/8] Change output folder to ZS_Win_Base_Raw --- ZSharp/ZSharp.vcxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ZSharp/ZSharp.vcxproj b/ZSharp/ZSharp.vcxproj index 863a2f0..2dc51e1 100644 --- a/ZSharp/ZSharp.vcxproj +++ b/ZSharp/ZSharp.vcxproj @@ -83,13 +83,13 @@ true D:\Code\SDL2-2.0.18\include;D:\Code\SDL2_image-2.0.5\include;D:\Code\SDL2_ttf-2.0.15\include;$(IncludePath) D:\Code\SDL2_ttf-2.0.15\lib\x64;D:\Code\SDL2-2.0.18\lib\x64;D:\Code\SDL2_image-2.0.5\lib\x64;$(LibraryPath) - $(SolutionDir)\Releases\ZS-Win-x64-Base + $(SolutionDir)\Releases\ZS_Win_Base_Raw false D:\Code\SDL2-2.0.18\include;D:\Code\SDL2_image-2.0.5\include;D:\Code\SDL2_ttf-2.0.15\include;$(IncludePath) D:\Code\SDL2_ttf-2.0.15\lib\x64;D:\Code\SDL2-2.0.18\lib\x64;D:\Code\SDL2_image-2.0.5\lib\x64;$(LibraryPath) - $(SolutionDir)\Releases\ZS-Win-x64-Base + $(SolutionDir)\Releases\ZS_Win_Base_Raw From 9c1f999425dd07ea0b4a5736ede2ecbeeaff01f4 Mon Sep 17 00:00:00 2001 From: TheAwesome98 <59254971+TheAwesome98-Real@users.noreply.github.com> Date: Sun, 22 May 2022 17:36:38 +0100 Subject: [PATCH 3/8] change rendertext to use blended --- ZSharp/graphics.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZSharp/graphics.h b/ZSharp/graphics.h index 283504e..d84d207 100644 --- a/ZSharp/graphics.h +++ b/ZSharp/graphics.h @@ -554,7 +554,7 @@ public: { SDL_Color color = { r, g, b }; - SDL_Surface* surface = TTF_RenderText_Solid(font, content.c_str(), color); + SDL_Surface* surface = TTF_RenderText_Blended(font, content.c_str(), color); SDL_DestroyTexture(texture); texture = SDL_CreateTextureFromSurface(gRenderer, surface); From faeef8851eb7640df83e21b72788ca8e0ef62085 Mon Sep 17 00:00:00 2001 From: sam-astro <77079540+sam-astro@users.noreply.github.com> Date: Sun, 22 May 2022 17:25:21 -0400 Subject: [PATCH 4/8] Change initial load RenderText to also be Blended --- ZSharp/graphics.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZSharp/graphics.h b/ZSharp/graphics.h index d84d207..e32ebba 100644 --- a/ZSharp/graphics.h +++ b/ZSharp/graphics.h @@ -533,7 +533,7 @@ public: { SDL_Color color = { r, g, b }; - SDL_Surface* surface = TTF_RenderText_Solid(font, content.c_str(), color); + SDL_Surface* surface = TTF_RenderText_Blended(font, content.c_str(), color); texture = SDL_CreateTextureFromSurface(gRenderer, surface); From 036253e92cc41a0fabed284460e26cef6be69fd5 Mon Sep 17 00:00:00 2001 From: sam-astro <77079540+sam-astro@users.noreply.github.com> Date: Sun, 22 May 2022 18:23:33 -0400 Subject: [PATCH 5/8] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 42e6895..262d63d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ ## Introduction -Z-Sharp is a custom programming language I made because I don't like c++ very much (Z-Sharp's interpreter is written in c++ though). It used to be called Slang, standing for "Stupid Lang", but another programming language called Slang already exists :(. Z-Sharp scripts have the file extension .zs. The base syntax and formatting I would say is quite similar to C#, but differs as task complexity increases. It has support for graphics using SDL2, and by default is not enabled. +Z-Sharp is a custom programming language I made because I don't like c++ very much (Z-Sharp's interpreter is written in c++ though). Z-Sharp scripts have the file extension .ZS. The base syntax and formatting I would say is quite similar to C# or Python, but differs as task complexity increases. It has support for graphics using SDL2, and by default is not enabled. + +So before you try to use anything you could normally find in a programming language, ask yourself this: Is this feature required to play pong? If not, then most likely that feature has not been implemented yet. I initially only made the language so I could create pong and make a video about it, so it really is the bare minimum. ## Installation Downloading or installing is very simple, here is how depending on your version and operating system: From 04e4125ae405326a7906b81a3c81b022f20ff694 Mon Sep 17 00:00:00 2001 From: sheep Date: Mon, 23 May 2022 12:13:11 +0200 Subject: [PATCH 6/8] =?UTF-8?q?=F0=9F=93=9D=20Add=20install=20instructions?= =?UTF-8?q?=20for=20Arch-based=20systems?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Include the command and package name equivalent to the debian packages on arch linux --- README.md | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 262d63d..f90452e 100644 --- a/README.md +++ b/README.md @@ -20,16 +20,36 @@ Downloading or installing is very simple, here is how depending on your version > If you don't want to install ZSharp on your device, or you want easier acces to the executable and .DLLs, another version is provided called `ZS_Win_Base_Raw.zip`. This just contains all of the files the installer puts on your computer. ### Linux 1. Install requirements: - * You need the package ***libsdl2-dev***. For Debian based operating systems you can install it with + * You need the package ***libsdl2-dev***. + + For Debian based operating systems you can install it with ```$ sudo apt install libsdl2-dev``` - * You also need the package ***libsdl2-image-dev***. For Debian based operating systems you can install it with + + For Arch based operating systems you can install it with + + ```$ sudo pacman -S sdl2``` + + * You also need the package ***libsdl2-image-dev***. + + For Debian based operating systems you can install it with ```$ sudo apt install libsdl2-image-dev``` - * You also need the package ***libsdl2-ttf-dev***. For Debian based operating systems you can install it with + + For Arch based operating systems you can install it with + + ```$ sudo pacman -S sdl2_image``` + + * You also need the package ***libsdl2-ttf-dev***. + + For Debian based operating systems you can install it with ```$ sudo apt install libsdl2-ttf-dev``` + For Arch based operating systems you can install it with + + ```$ sudo pacman -S sdl2_ttf``` + 2. Navigate to [the most recent release](https://github.com/sam-astro/Z-Sharp/releases) and download `ZSharp-Linux.zip`. 3. Unzip `ZSharp-Linux.zip` and open the unzipped folder. 4. You will see some files. The Z# interpreter is `ZSharp`. Any time you want to execute a script, this is the program that will be used. You can use it like so: From 0c700407f6a2753017232ab85b41aec6df24137f Mon Sep 17 00:00:00 2001 From: sam-astro <77079540+sam-astro@users.noreply.github.com> Date: Mon, 23 May 2022 15:24:35 -0400 Subject: [PATCH 7/8] Update ZSharpInstallerMakerInnoSetup.iss --- ZSharp/ZSharpInstallerMakerInnoSetup.iss | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ZSharp/ZSharpInstallerMakerInnoSetup.iss b/ZSharp/ZSharpInstallerMakerInnoSetup.iss index e5459e5..eb965eb 100644 --- a/ZSharp/ZSharpInstallerMakerInnoSetup.iss +++ b/ZSharp/ZSharpInstallerMakerInnoSetup.iss @@ -64,16 +64,16 @@ Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl" Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl" [Files] -Source: "D:\Code\Z-Sharp\Releases\ZSharp-Win-x64\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion -Source: "D:\Code\Z-Sharp\Releases\ZSharp-Win-x64\libfreetype-6.dll"; DestDir: "{app}"; Flags: ignoreversion -Source: "D:\Code\Z-Sharp\Releases\ZSharp-Win-x64\libjpeg-9.dll"; DestDir: "{app}"; Flags: ignoreversion -Source: "D:\Code\Z-Sharp\Releases\ZSharp-Win-x64\libpng16-16.dll"; DestDir: "{app}"; Flags: ignoreversion -Source: "D:\Code\Z-Sharp\Releases\ZSharp-Win-x64\libtiff-5.dll"; DestDir: "{app}"; Flags: ignoreversion -Source: "D:\Code\Z-Sharp\Releases\ZSharp-Win-x64\libwebp-7.dll"; DestDir: "{app}"; Flags: ignoreversion -Source: "D:\Code\Z-Sharp\Releases\ZSharp-Win-x64\SDL2.dll"; DestDir: "{app}"; Flags: ignoreversion -Source: "D:\Code\Z-Sharp\Releases\ZSharp-Win-x64\SDL2_image.dll"; DestDir: "{app}"; Flags: ignoreversion -Source: "D:\Code\Z-Sharp\Releases\ZSharp-Win-x64\SDL2_ttf.dll"; DestDir: "{app}"; Flags: ignoreversion -Source: "D:\Code\Z-Sharp\Releases\ZSharp-Win-x64\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "D:\Code\Z-Sharp\Releases\ZS_Win_Base_Raw\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion +Source: "D:\Code\Z-Sharp\Releases\ZS_Win_Base_Raw\libfreetype-6.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "D:\Code\Z-Sharp\Releases\ZS_Win_Base_Raw\libjpeg-9.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "D:\Code\Z-Sharp\Releases\ZS_Win_Base_Raw\libpng16-16.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "D:\Code\Z-Sharp\Releases\ZS_Win_Base_Raw\libtiff-5.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "D:\Code\Z-Sharp\Releases\ZS_Win_Base_Raw\libwebp-7.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "D:\Code\Z-Sharp\Releases\ZS_Win_Base_Raw\SDL2.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "D:\Code\Z-Sharp\Releases\ZS_Win_Base_Raw\SDL2_image.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "D:\Code\Z-Sharp\Releases\ZS_Win_Base_Raw\SDL2_ttf.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "D:\Code\Z-Sharp\Releases\ZS_Win_Base_Raw\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Registry] From 4ae56e427a4b701e76aee25f5bc8d305dd78e055 Mon Sep 17 00:00:00 2001 From: sam-astro <77079540+sam-astro@users.noreply.github.com> Date: Tue, 24 May 2022 15:42:34 -0400 Subject: [PATCH 8/8] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f90452e..73d91cf 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,9 @@ ## Introduction Z-Sharp is a custom programming language I made because I don't like c++ very much (Z-Sharp's interpreter is written in c++ though). Z-Sharp scripts have the file extension .ZS. The base syntax and formatting I would say is quite similar to C# or Python, but differs as task complexity increases. It has support for graphics using SDL2, and by default is not enabled. -So before you try to use anything you could normally find in a programming language, ask yourself this: Is this feature required to play pong? If not, then most likely that feature has not been implemented yet. I initially only made the language so I could create pong and make a video about it, so it really is the bare minimum. +Before using Z#: +There is ***no documentation***, ***strings*** barely work, ***performance*** isn't great, the syntax is ***very specific***, and most errors just cause it to ***crash without warning***. I am just a *single developer* working on this during my free time; between school, other projects, and YouTube. Z-Sharp will most likely never be finished, since it was really supposed to end when the video was published about it. +If you are trying to use a common programming language feature, ask yourself this: ***Is this feature required to play pong?*** If not, then most likely that feature ***has not been implemented yet***. I initially only made the language so I could create pong and make a video about it, so it really is the ***bare minimum***. ## Installation Downloading or installing is very simple, here is how depending on your version and operating system: