05 September 2015, 18:53 | #21 |
Registered User
Join Date: Oct 2009
Location: Salem, OR
Posts: 1,770
|
|
05 September 2015, 23:46 | #22 | |
Code Kitten
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 52
Posts: 1,178
|
Quote:
m68k-amigaos-gccthat's gcc. However the vb<something>utilities are part of the vbcc compiler (available at http://sun.hasenbraten.de/vbcc/). |
|
08 September 2015, 04:07 | #23 |
Registered User
Join Date: Oct 2009
Location: Salem, OR
Posts: 1,770
|
Moving forward...
I just did the basic open window example from "Amiga C for Beginners" (which I own again, and was the book I had back in the day. I was able to compile it and get a window to pop up!! I did have 1 line it didn't like: if ((Window = OpenWindow(&NewWindow)) == NULL) exit (FALSE); I had to change it to: if ((Window = (struct Window *) OpenWindow(&NewWindow)) == NULL) exit (FALSE); Even tho I did have: struct Window *Window; ..near the top.. vbcc was giving me a: > if ((Window = OpenWindow(&NewWindow)) == NULL) error 39 in line 43 of "window.c": invalid types for assignment Luckily, a quick google found the change... So.. Making progress, but of course, looks like there will be differences (as expected). I used DICE back in the day, and the book seems to expect you to use Aztec C (or Lattice). Thanx again... desiv |
08 September 2015, 05:22 | #24 | ||
Code Kitten
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 52
Posts: 1,178
|
Quote:
Quote:
OpenWindowis not declared as returning a struct Window*but rather a void *. Which headers do you include? It is a bit weird that you had to cast that return value. This said, all compilers should behave the same with this code since it is 100% standard from what I can read. |
||
08 September 2015, 06:01 | #25 | |
Registered User
Join Date: Oct 2009
Location: Salem, OR
Posts: 1,770
|
Quote:
I had a typo in my extern struct.. (And I even had my glasses on.. Oh well. ) Fixed that and removed the specific struct and it works.. It does warn me when I compile: me@mymachine ~/Retro/Amiga/DEV $ vc -o window window.c > if ((Window = OpenWindow(&NewWindow)) == NULL) warning 85 in line 43 of "window.c": assignment of different pointers But it compiles and runs fine... (I'll check for more typos later.. ;-) desiv |
|
08 September 2015, 10:08 | #26 |
Registered User
Join Date: Dec 2013
Location: GR
Age: 47
Posts: 1,416
|
A simple countdown timer i did.
main() or other function is calling timer and pass an argument like timer(500); int timer (int time) { if (time>=0) { printf("time %d\n",time); time--; Delay(50L); /*delay 50 frames (1sec) or 60L for NTSC*/ } else gameover(); /*another function for game over sequence*/ } |
14 June 2016, 11:13 | #27 |
Ya' like it Retr0?
Join Date: Jul 2005
Location: United Kingdom
Age: 49
Posts: 9,768
|
A big thanks for ReadOnlyCat putting me onto these threads.
For those that want to learn a bit more C/C++ there is w3schools.net as well as google - I would also humbly suggest having a look at nehe (http://nehe.gamedev.net/) to take their knowledge to the next level. For Windows on the Amiga I would humbly suggest people look at GadTools - its a great program and gives you a WYSIWYG environment to create Screen / Window(s) and then provides the code / handlers you need - http://aminet.net/package/dev/misc/gt34_1 I am currently looking for a dev environment (playing with Hannibal's Dev Tool Chain) - as I want to try and port games / applications over to the Amiga (SDL etc) - its been well over 10 years since I hit C/C++ on the Amiga in any serious way - (used to use DICE - lots of Make File Mayhem! I hope that helps =) |
14 June 2016, 13:09 | #28 | |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,381
|
Quote:
Erm, well let's just say it's less about computer programming and more about human programming... Seems to be some sort of religious nut website with a look of '90s Geocities HTML about it. An interesting page I'm sure if religion or '90s web design are your bag, but not a whole lot of C |
|
15 June 2016, 08:07 | #29 |
Ya' like it Retr0?
Join Date: Jul 2005
Location: United Kingdom
Age: 49
Posts: 9,768
|
@Daedalus
Its been a few years since I was on there - I remember using it a lot for my HND - which would of been errr... 9 ish years ago? And that was not the correct link LMFAO! - http://www.w3schools.com/ - there you go! Interestingly there is no "C/C++" on there any more - just web based languages =( |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A new Learning Demo for Amiga OCS and beyond. | Toni Galvez | Amiga scene | 46 | 01 March 2015 15:20 |
Help with learning more about my A2000 and bring it up to speed? | kurtis | New to Emulation or Amiga scene | 3 | 04 December 2014 18:35 |
I need help with my intro... I´m learning... | Skillion76 | Coders. General | 10 | 27 September 2014 17:36 |
Suggestions for learning | pmc | Coders. Tutorials | 248 | 20 October 2010 21:42 |
Learning assembler | bLAZER | Coders. General | 1 | 12 May 2007 05:00 |
|
|