Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old July 21, 2018, 20:26   #11
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,858
Donated: $40
Pete Mack is on a distinguished road
Quote:
Originally Posted by AnonymousHero View Post
I would suggest trying QtCreator or a similar IDE. Then you can Ctrl-click to "go through" any function/typedef/etc. you see.

(I mean Pete's method sort-of works, but it's incredibly cumbersome for commonly used "names" and it's pointlessly tedious.)
Sure an (any) IDE works better. So do syntax-aware editors. But if you just want to dip your toes, it's not worth setting up an environment.
Pete Mack is offline   Reply With Quote
Old July 22, 2018, 00:10   #12
Quirk
Adept
 
Join Date: Mar 2016
Posts: 181
Quirk is on a distinguished road
Quote:
Originally Posted by AnonymousHero View Post
I would suggest trying QtCreator or a similar IDE. Then you can Ctrl-click to "go through" any function/typedef/etc. you see.

(I mean Pete's method sort-of works, but it's incredibly cumbersome for commonly used "names" and it's pointlessly tedious.)
I would note here as an aside that, working on a decent sized codebase in my day job, Visual Studio Intellisense is vastly slower at finding function references than Find in Files - i.e. grep routinely outperforms the IDE features. Mileage may vary here depending on usage.
Quirk is offline   Reply With Quote
Old July 23, 2018, 18:34   #13
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,356
AnonymousHero is on a distinguished road
Quote:
Originally Posted by Pete Mack View Post
Sure an (any) IDE works better. So do syntax-aware editors. But if you just want to dip your toes, it's not worth setting up an environment.
Any difficulty effort in getting Angband into an IDE seems to be because they seem to want to stick with the utter brain-damage that is auto{conf,make} + Makefiles. In ToME 2.x-ah it's something like 5 clicks or thereabouts and you're done.
AnonymousHero is offline   Reply With Quote
Old August 2, 2018, 11:47   #14
wobbly
Veteran
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 1,562
wobbly is on a distinguished road
So I can find if/thens in the code but none apear to be nested. How is this generally handled?
wobbly is offline   Reply With Quote
Old August 2, 2018, 12:02   #15
Quirk
Adept
 
Join Date: Mar 2016
Posts: 181
Quirk is on a distinguished road
Quote:
Originally Posted by wobbly View Post
So I can find if/thens in the code but none apear to be nested. How is this generally handled?
Mostly if you're checking two conditions that both have to be true you would use AND (&&) e.g.
Code:
 
if (monster_is_awake && monster_sees_you)
{
}
however you would nest ifs in cases where you want to do one of two or more things when a condition is true e.g.
Code:
 
if (monster_is_awake)
{
    if (monster_sees_you)
    {
        do_monster_attack();
    }
    else
    {
        do_monster_wander();
    }
}
To keep logic from getting too awkwardly nested, the inner logic may be moved into functions - so you might actually see the inner if moved into a do_monster_awake function in practice.
Quirk is offline   Reply With Quote
Old September 8, 2018, 04:53   #16
whiterhino123
Rookie
 
Join Date: Jul 2018
Posts: 4
whiterhino123 is on a distinguished road
just wanted to do this thread an update

i found this game being remade in javascript

i cant really read C and i didnt understand anything looking at angbands github (very new to programming) but I do know javascript best and things are making more sense

https://github.com/jcheatham/angband...master/angband


should i be able to read C if I can pretty much read this javascript?
whiterhino123 is offline   Reply With Quote
Old September 8, 2018, 08:40   #17
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,858
Donated: $40
Pete Mack is on a distinguished road
C has pointers, as javascript does not. It is strongly typed, except you can force casts between anything. It also has far more primitive libraries. But yeah, you should be able to read it, once you figure out the type system and the pointers.
Pete Mack is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
crash on reading unknown scroll quarague Development 7 September 6, 2016 20:41
Reading Silmarillion Bowman Idle chatter 53 January 29, 2016 20:20
?Acquirement location of reading revisited Ingwe Ingweron Vanilla 5 October 20, 2014 13:56
Reading scrolls from inventory menu Ingwe Ingweron Vanilla 1 October 22, 2013 12:42
strange C code in Angband (am I reading this right?) will_asher Idle chatter 3 February 4, 2008 09:07


All times are GMT +1. The time now is 03:58.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.