![]() |
#81 |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,186
Donated: $40
![]() |
That reference to player IS the reason. If you first include player.h instead of picking it up later, the warning will vanish. But a forward declaration is better:
strict player; ... Reference to *player. You only need the full structure when you dereference the pointer (with * or ->), and that never happens in .h files. |
![]() |
![]() |
![]() |
#82 |
Knight
Join Date: Oct 2019
Posts: 963
![]() |
Who gets credit for this?
Code:
const s16b ddd[9] = { 2, 8, 6, 4, 3, 1, 9, 7, 5 }; Code:
7 1 6 3 5 2 5 0 4 |
![]() |
![]() |
![]() |
#83 |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,186
Donated: $40
![]() |
|
![]() |
![]() |
![]() |
#84 |
Knight
Join Date: Oct 2019
Posts: 963
![]() |
The second part is arranging it like you would on a numpad. 4 -> down and to the right, for example.
|
![]() |
![]() |
![]() |
#85 |
Knight
Join Date: Oct 2019
Posts: 963
![]() |
Found this interesting bit:
#define PY_KNOW_LEVEL 30 /* Level to know all runes */ But it doesn't appear to be in use. Does this mean someone intended all runes to be instantly known at character level 30? If this constant isn't used again, shouldn't it throw a compiler warning? |
![]() |
![]() |
![]() |
#86 |
Knight
Join Date: Oct 2019
Posts: 963
![]() |
Code:
/** * Return the player's chance to hit with a particular weapon. */ int chance_of_melee_hit(const struct player *p, const struct object *weapon) { int chance, bonus = p->state.to_h; if (weapon) bonus += weapon->to_h; chance = p->state.skills[SKILL_TO_HIT_MELEE] + bonus * BTH_PLUS_ADJ; return chance; } /* elsewhere */ #define BTH_PLUS_ADJ 3 /* Adjust BTH per plus-to-hit */ Last edited by DavidMedley; April 7, 2020 at 19:58. Reason: Better example |
![]() |
![]() |
![]() |
#87 |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,186
Donated: $40
![]() |
No. The 3x applies to the to_h bonus on the character sheet, sum of effects from equipment, stats, and buffs.
|
![]() |
![]() |
![]() |
#88 |
Veteran
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,460
![]() |
I'm failing to see the difference. 35 + 11 * 3 is well not exactly 70 but pretty close & if you look at how it displays on the character sheet:
human warrior: to-hit: 24, human rogue: to-hit: 13, |
![]() |
![]() |
![]() |
#89 | |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,747
Donated: $60
![]() |
Quote:
__________________
One for the Dark Lord on his dark throne In the Land of Mordor where the Shadows lie. |
|
![]() |
![]() |
![]() |
#90 | |
Knight
Join Date: Oct 2019
Posts: 963
![]() |
Coming back to compiling for Windows... Any help is greatly appreciated because I have no idea what I'm doing.
Instructions: Quote:
Code:
*info* running aclocal (-I m4) *info* running autoheader *info* running autoconf Code:
checking build system type... i686-pc-linux-gnu checking host system type... i586-pc-mingw32msvc checking target system type... i586-pc-mingw32msvc checking for tput... /usr/bin/tput configure: touching .deps files Note: You have chosen to compile for installation, with data files in standard locations. For development, you may wish to consider using --with-no-install which will leave the game to run from the directory into which it was extracted and compiled. checking for i586-mingw32msvc-gcc... no checking for gcc... gcc configure: WARNING: using cross tools not prefixed with host triplet checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... yes checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether make sets $(MAKE)... yes checking whether ln -s works... yes checking for a BSD-compatible install... /usr/bin/install -c checking for a thread-safe mkdir -p... /bin/mkdir -p checking for i586-mingw32msvc-windres... no checking for windres... no checking for rst2html.py... no checking for rst2html... no checking for rst2latex.py... no checking for rst2latex... no checking for pdflatex... no checking for rm... /bin/rm checking for mv... /bin/mv checking for cp... /bin/cp checking for dirent.h that defines DIR... yes checking for library containing opendir... none required checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking for stdint.h... (cached) yes checking for stdbool.h that conforms to C99... yes checking for _Bool... yes checking for an ANSI C-conforming const... yes checking return type of signal handlers... void checking for mkdir... yes checking for setresgid... yes checking for setegid... yes checking for stat... yes checking if gcc supports -Wno-missing-field-initializers... yes checking if make supports SysV-style inclusion... yes checking for make silent include syntax... gnu checking for mvwaddnwstr... no checking for use_default_colors... no checking for can_change_color... no checking for X... no configure: creating ./config.status config.status: creating mk/buildsys.mk config.status: creating mk/extra.mk config.status: creating mk/sinclude.mk config.status: creating src/autoconf.h Configuration: Install path: /usr/local binary path: /usr/local/games config path: /usr/local/etc/angband/ lib path: /usr/local/share/angband/ doc path: /usr/local/share/doc/angband/ var path: (not used) (with private save and score files in ~/.angband/Angband/) -- Frontends -- - Curses Disabled - X11 No; missing libraries - SDL2 Disabled - SDL Disabled - Windows Yes - Test No - Stats No - SDL2 sound Disabled - SDL sound Disabled Code:
Entering directory src. win/readpng.c:21:10: fatal error: windows.h: No such file or directory #include <windows.h> ^~~~~~~~~~~ compilation terminated. win/scrnshot.c:19:10: fatal error: windows.h: No such file or directory #include <windows.h> ^~~~~~~~~~~ compilation terminated. win/win-layout.c:19:10: fatal error: windows.h: No such file or directory #include <windows.h> ^~~~~~~~~~~ compilation terminated. Successfully generated dependencies. /bin/bash: no: command not found Makefile:31: recipe for target 'win/angband.res' failed make[3]: *** [win/angband.res] Error 127 ../mk/buildsys.mk:110: recipe for target 'all' failed make[2]: *** [all] Error 2 mk/buildsys.mk:115: recipe for target 'subdirs' failed make[1]: *** [subdirs] Error 2 mk/buildsys.mk:110: recipe for target 'all' failed make: *** [all] Error 2 |
|
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
is there a code? | jozmon | Development | 19 | August 4, 2014 00:38 |
Questions regarding vanilla inscriptions | Avenger | Vanilla | 8 | December 13, 2013 21:15 |
Questions regarding vanilla dungeon design | Cazliostro | Vanilla | 23 | October 11, 2010 12:05 |
code help please | will_asher | Variants | 22 | March 15, 2010 19:00 |
Looking through the code | K.I.L.E.R | Vanilla | 5 | July 11, 2007 08:01 |